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: 

Problem in changing the internal table contents of a standard program

Former Member
0 Kudos

Dear All,

I am making changes to internal table LT_PPDIT of standard program SAPLHRPT in the user exit EXIT_SAPLACC4_001 while payroll posting to accounting with tcode PC00_M99_CIPE. But though the changed value of LT_PPDIT is visible within the exit still the value of LT_PPDIT when we come outside exit is the same as what was before entering exit.

Please suggest is there any way of modifying internal table of a standard program in the user exit.

Regards,

Kanupriya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I think the internal table is getting refreshed or something like that after the user exit.

Try debugging after the user exit and put breakpoints at clear and modify statements.

Then you ll find out where its regaining the oringinal value after getting changes.

After locating that point try finding some enhancmenent point there and including your code so that your value of internal able gets modified.

Regards,

Subhashini

6 REPLIES 6

Former Member
0 Kudos

Hi,

Try using this code:

modify LT_PPDIT from w_tab index sy-tabix.

*Note: w_tab is a local work area defined.

Hope this helps.

Benedict

0 Kudos

Hi Benedict,

As suggested by you, the LT_PPDIT gets modified only within the user exit. When the code flow moves outside the user exit, it again takes its previous values.

Please suggest how I can carry the modification beyond the flow of user exit.

Regards,

Kanupriya

0 Kudos

Hi,

Try using COMMIT WORK statement within the user exit and check if the internal table values changed are reflected when the control moves out of the user exit.

Regards,

Vik

0 Kudos

Hi,

Even Commit work. statement does not carry the changes beyond the flow of the exit.

Regards,

Kanupriya

0 Kudos

The interface of that user exit does not support changing an internal table. The only thing that can be changed through the interface is a structure.

Oh, and don't even think of using a COMMIT in a user exit: you might find yourself with dumps or database inconsistencies. Besides, a COMMIT does nothing with an internal table.

Former Member
0 Kudos

Hi,

I think the internal table is getting refreshed or something like that after the user exit.

Try debugging after the user exit and put breakpoints at clear and modify statements.

Then you ll find out where its regaining the oringinal value after getting changes.

After locating that point try finding some enhancmenent point there and including your code so that your value of internal able gets modified.

Regards,

Subhashini