2023 Feb 08 1:24 PM
I am working on a user exit. The user exit is being called via CALL CUSTOMER-FUNCTION. Both main program and function group have a TABLES object:
Now, before the call, I have a value of 0001 in the field VKORG and ZQ in field ARTPR:
stepping into the call, I notice that the value VKORG is gone, whilst ARTPR remains:
How can this be? Why is VKORG being cleared in this step and ARTPR (and other fields as well) keep their values?
2023 Feb 08 1:47 PM
AFAIK, TABLES work area are shared within a program group. But "an additional program pool is always created when function pools and class pools are loaded" (ref). The Customer Exit is part of a function pool, so the VIQMEL of the Exit Function Group should not be the VIQMEL of the Main Program?
2023 Feb 08 1:47 PM
AFAIK, TABLES work area are shared within a program group. But "an additional program pool is always created when function pools and class pools are loaded" (ref). The Customer Exit is part of a function pool, so the VIQMEL of the Exit Function Group should not be the VIQMEL of the Main Program?
2023 Feb 08 3:24 PM
Global structure VIQMEL (declared with TABLES) is simply overwritten by the MOVE statement that you have shown in fm EXIT_SAPMIWO0_009 - because this structure is used as an actiual parameter to formal parameter p_viqmel (changing) of form user_exit_009_f90 which calls CALL CUSTOMER-FUNCTION '009' (importing p_viqmel).
2023 Feb 08 4:02 PM
Difficult to say, you show the values of VIQMEL, not P_VIQMEL, and also I don't see the arguments passed to USER_EXIT_009_F90. Maybe in LIQS0I90. Excerpt:
PERFORM user_exit_009_f90(sapmiwo0) USING xcount_pai
tqtabs-tabcd
xuserscr_pai
CHANGING viqmel.
Excerpt from MIWO0F90:FORM user_exit_009_f90 USING p_xcount TYPE n
p_tabcd LIKE tqtabs-tabcd
p_uscr_pai LIKE tq80-userscr1
CHANGING p_viqmel LIKE viqmel.
CALL CUSTOMER-FUNCTION '009'
EXPORTING
i_viqmel = p_viqmel
i_tabcd = p_tabcd
i_subnr = p_xcount
i_uscr = p_uscr_pai
IMPORTING
e_viqmel = p_viqmel.
ENDFORM.