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: 

Inside Customer_function, container is loaded automatically

Former Member
0 Kudos

Hi Experts

I encounter a strange issue, can't figure it out.

Basically I load inbounding idoc to create a new Sales Order.

1. I load Idoc A to create sales order A in WE19, after SO A creation, I keep it on WE19 initial screen.

2. Then I create another session and the same to load idoc B to create Sales order B.

3. During Sales Order B createion, I debug it, outside customer-function EXIT_SAPLVEDA_001, internal table container xe1edpt2 is initial which is cleard by system program for every Idoc loading.

But don't know why once it is inside customer-function EXIT_SAPLVEDA_001, Idoc A's corresponding data is loaded into xe1edpt2 automatically, and of course when my code is reached in EXIT_SAPLVEDA_001, Idoc A and Idoc B's data are all in xe1edpt2.

I guess it must be related to memory, but I don't know the reason:

1. Before program reach EXIT_SAPLVEDA_001, xe1edpt2 is initial.

2. there is no local xe1edpt2 in EXIT_SAPLVEDA_001, it is global container.

3. When program reaches EXIT_SAPLVEDA_001, last Idoc's data will be automatially loaded into table xe1edpt2.

This is really strange. Is there anybody encounter this issue before? What is the reason?

Regards

Derek

1 ACCEPTED SOLUTION

paul_quinn
Participant
0 Kudos

hi Derek,

bit of a longshot, but a guess from me is

(SAPLXVED)xe1edkt2 is filled with the previous IDOC data

(SAPLVEDA)xe1edkt2 is empty

The programs SAPLVEDA and SAPLXVED do not share the data one with other

so that clearing/refreshing the internal table xe1edkt2 in the standard

coding (SAPLVEDA) does not lead to clearing/refreshing the table in the

customer-specific coding (SAPLXVED).

To solve the problem you have to clear/refresh this table in the

customer coding (SAPLXVED) by yourself.

Hope this helps

Paul Q

2 REPLIES 2

paul_quinn
Participant
0 Kudos

hi Derek,

bit of a longshot, but a guess from me is

(SAPLXVED)xe1edkt2 is filled with the previous IDOC data

(SAPLVEDA)xe1edkt2 is empty

The programs SAPLVEDA and SAPLXVED do not share the data one with other

so that clearing/refreshing the internal table xe1edkt2 in the standard

coding (SAPLVEDA) does not lead to clearing/refreshing the table in the

customer-specific coding (SAPLXVED).

To solve the problem you have to clear/refresh this table in the

customer coding (SAPLXVED) by yourself.

Hope this helps

Paul Q

0 Kudos

Hi Paul

Indeed, the Idoc loading function and customer-exits function belong to different function group, so the container with the same name in these two funcitons are not the same one. This lead to the error.

Your advice is right and can solve this problem, thank you so much for your help.

Regards

Derek