cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the No. of package and requesting system name in user exit?

Former Member
0 Kudos

Dear all,

Is there anybody knowing how to obtain the extracting package number and requesting system name in the user exit "EXIT_SAPLRSAP_002" ? here is detail on my questions as below:

For package number. If extracting 100,000 records of 0MATERIAL_TEXT , and the package size is 20,000, then there are 10 packages, when executing the user exit, how can I know which package I am extracting on?

For requesting name, when executing the user exit, how can I know the logical system name from which the extraction request is sent?

Thanks.

best regards

Patrick

Accepted Solutions (1)

Accepted Solutions (1)

mansi_dandavate
Active Contributor
0 Kudos

Hi,

For no of data packages you can refer to the table RSMONFACT field DP-NR.

Thanks,

Mansi

Former Member
0 Kudos

Hi Mansi,

Thanks for your reply. The table "RSMONFACT" is in BIW side and not in R/3 side, is that correct? If it is, I am afraid there is misunderstanding due to my obscure description. Let me clarify my question as following, BIW sends the request to R/3 to extact the data "0MATERIAL_PLANT_ATTR", R/3 executes the user exit to populate the data, during the execution of user exit in R/3, is that possible to know the No. of data package and the requesting system name?

Thanks.

best regards

Patrick

mansi_dandavate
Active Contributor
0 Kudos

Hi Patrick,

Can you check the data package number in BW side? Why you want to chck it at R/3 side?

You can try this.

create a static variable. And in your exit increement it everytime by 1.

Every time it is executed for a new data package the variable will be increemented by 1.

And in the final call you will get the total number of data packages.

Regards,

Mansi

Former Member
0 Kudos

Hi Mansi,

Thanks for your quick response.

The background of this requirement is, in the datasource 0material_Plant_Att, we added two fields in the extraction structure, one is variable price, another is previous year's variable price, which need to be obtained by searching data KEKO & CKIS in the user exit, these tables have the huge data volume, in each data package, the user exit needs to be executed once, so the heavy searching needs to be done once, consequently, the total running time of this request including several data packages is very long. In order to improve the performance, we design the following logic:

1. Create the temporary tables YCKIS & YKEKO in R/3.

2. Run BW request in BIW.

3. In R/3, If this is first data package of this request, delete all data in YCKIS & YKEKO, then search the data from CKIS & KEKO ( Average 20 million records), then insert these data into YCKIS & YKEKO ( Average 0.2 million records).

4. In R/3, if this is not first data package of this request, then search the data directly from YCKIS & YKEKO.

You can see in the above, in the step 4, the data searching performance can be improved significantly due to reading data from temporary table, this is why I need to know the No. of data package. In addition, apparently, it can not be done in BIW side since the performance issue is in the user exit rather than in BIW. Also it is very difficult to setup one counter to deliver this since we do not know when to reset the counter. For example,

- Assuming there are 3 data packages.

- 1st day, we schedule one request from BIW, in R/3,

-> At 1st package, counter = 0+1=1

-> At 2nd package, counter =1+1= 2.

-> At 3rd package, counter = 2+1= 3, then reset counter = 0 for next request.

Question 1: How can we know the 3rd package is last one?

Question 2: If during the 2nd package, the extraction job is cancelled exceptionally, the counter value is 2 not 0, then for the next request, the data searching is not correct, right.

Hope the above is clear, and apology this email is too long.

Thanks.

best regards

Patrick

Answers (0)