In these cases, the parameter can be accessed and the value can be changed using the concept of pointers in ABAP. Here we assume that the parameter is declared either in the parent program, or in some other extrnal program (which has been triggered before user-exit call), but the parameter is not passed to the available user-exit.
The idea is to get the reference of the memory area of the required parameter and then assign a local pointer to access this memory area. Following example demonstrates this method:
data: wv_table(50) type c.
field-symbols: ‹wf_table› type any ,
‹wf_reference› type table.
DATA: wo_ref TYPE REF TO DATA.
wv_table = '(SAPLFPAYM_DE)DTADDEZ[]'.
ASSIGN (wv_table) TO ‹wf_table›.
GET REFERENCE OF ‹wf_table› INTO wo_ref.
ASSIGN wo_ref-›* TO ‹wf_reference›.
IF sy-subrc IS INITIAL.
loop at DTADDEZ.
* Manipulate the value of standard parameter here
* Then update to pass back the value
modify
endloop.
endif.
Sem comentários:
Enviar um comentário