Code: Alles auswählen.
REPORT zs_test_mn_2.
PARAMETER: p_werk TYPE t001w-werks DEFAULT '0001'.
START-OF-SELECTION.
CALL FUNCTION 'ZS_TEST_MN'.
Code: Alles auswählen.
FUNCTION zs_test_mn.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"----------------------------------------------------------------------
DATA: var(6) TYPE c VALUE 'p_werk'.
FIELD-SYMBOLS: <var>.
ASSIGN ('(sy-cprog)(var)') TO <var>.
IF sy-subrc = 0.
WRITE: 'HURRA!'.
ELSE.
EXIT.
ENDIF.
ENDFUNCTION.
Code: Alles auswählen.
REPORT zs_test_mn_2.
PARAMETER: p_werk TYPE t001w-werks DEFAULT '0001'.
START-OF-SELECTION.
CALL FUNCTION 'ZS_TEST_MN'
* hier wird uebergeben
exporting
e_werk = p_werk
.
Code: Alles auswählen.
FUNCTION zs_test_mn.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(E_WERK) TYPE CHAR3
*"----------------------------------------------------------------------
* DATA: var(6) TYPE c VALUE 'p_werk'.
FIELD-SYMBOLS: <var>.
ASSIGN ('(sy-cprog)(var)') TO <var>.
IF sy-subrc = 0.
WRITE: 'HURRA!'.
ELSE.
EXIT.
ENDIF.
ENDFUNCTION.
Code: Alles auswählen.
ASSIGN ('(ZS_TEST_MN_2)P_WERK') TO <var>.
Code: Alles auswählen.
concatenate '(' sy-cprog ') p_var into feldname.
ASSIGN (feldname)...