Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit - Retain changed Table entries

Former Member
0 Kudos

Hello All,

My scenario is as follows:

1. I have a User Exit of EXIT_SAPLL03T_002 --> ZXLTOU02.

2. In the Include ZXLTOU02, I have a table itab.

3. The table has 5 entries during the processing of my exit. This itab is in a loop and for each loop a custom Function Module will be processed.

4. But the same exit will be called for other scenario.

5. In other scenario, the same table gets modified with 3 entries and gets processed.

6. When the control gets back to my scenario, I should have 5 entries for my scenario but the table itab has 3 entries from the other scenario.

I thought of using the following code for getting the table values from the current program (my scenario)

DATA: lt_exit TYPE STANDARD TABLE OF <<CUSTOM_TABBLE>>,

           lv_tab             TYPE char50.

FIELD-SYMBOLS :  <fs_data_t>          TYPE ANY TABLE .

   lv_tab = '(ZXLTOU02)T_EXIT[]'.

   ASSIGN (lv_tab) TO <fs_data_t>.

   IF <fs_data_t> IS ASSIGNED .

    t_exit[]   = <fs_data_t>.

   ENDIF.


But the above code will not be triggered as the control is still in the loop of my internal table .


Can anyone tell me how to fix this ?


Regards,

Deepu.K

1 ACCEPTED SOLUTION

sridhar_meesala
Active Contributor
0 Kudos

Hi,

You can keep your internal table with 5 entries in the user exit into a static variable of a class. When your internal table is modified at some other place and the control comes back to your exist, you can get the table with 5 entries from the class attribute into your local internal table.

Regards,

Sri.

2 REPLIES 2

sridhar_meesala
Active Contributor
0 Kudos

Hi,

You can keep your internal table with 5 entries in the user exit into a static variable of a class. When your internal table is modified at some other place and the control comes back to your exist, you can get the table with 5 entries from the class attribute into your local internal table.

Regards,

Sri.

0 Kudos

Perfect Reply Sridhar !

I didn't think about STATIC table at all !

Thanks for the input !

Regards,

Deepu.K