SAP for Retail Discussions
Join conversations about personalization, omnichannel strategies, and operational excellence in retail using SAP for Retail software.
cancel
Showing results for 
Search instead for 
Did you mean: 

WPMA tcode in Background

nishantbansal91
Active Contributor
0 Kudos

Hi,

We have requirement how to submit the tcode WPMA in background. We need to call the WPMA tcode from another program and submit the IDOCS.

We need to check also status of the IDOC that i DOC is generated successfully or not.

Thanks and Regards,

Nishant

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Nishant,

I suppose that you can simply submit program RWDPOSAN from the main program with required selection table, in case you determine the relevant parameters just before calling WPMA. I have also used function modules for background job creation JOB_OPEN / JOB_SUBMIT (for example with an existing program selection variant) to be able to monitor both both WPMA job log in SM37 and subsequent IDocs in WE02 / BD87 / WPER / WLF_IDOC whichever transaction suits better your needs.

Hope this helps!

Cheers,
Tomas

View solution in original post

16 REPLIES 16

vikrant_mohite
Active Contributor
0 Kudos

Hi,

Use RWDPOSAN in background.

Get the help of ABAPer to submit or to call a program from another program.

Check table EDIDS for status of IDoc generated during this process.

Thanks,

Vikrant.

Former Member
0 Kudos

Hi Nishant,

I suppose that you can simply submit program RWDPOSAN from the main program with required selection table, in case you determine the relevant parameters just before calling WPMA. I have also used function modules for background job creation JOB_OPEN / JOB_SUBMIT (for example with an existing program selection variant) to be able to monitor both both WPMA job log in SM37 and subsequent IDocs in WE02 / BD87 / WPER / WLF_IDOC whichever transaction suits better your needs.

Hope this helps!

Cheers,
Tomas

0 Kudos

Hi Tomas,

Thanks for quick Response.

I am new in IDOC, i will submit the program using submit keyword.

But how i can check the status for IDOC for that given session or for the given Article number is there any flag or any table exporting, from i m able to understand that IDOC is generated successfully in background.if the IDOC is not generated successfully in Background i have to send email to the concerned person.

Thanks and Regards,

Nishant

0 Kudos

Hi Nishant,

this is rather technical but submitting RWDPOSAN in the background requires some time. Relevant data need to be determined, IDocs generated and sent which might in case of large amount of data (articles, sites etc.) take more than a 'minute'.

I would schedule two jobs (trigger the second after the end of the first) or one single job with two steps;

  • POS outbound (IDoc generation and diwnload to POS)
  • IDoc status check (EDIDC for specific message types created the day's date, EDIDS does not have the notion of IDoc type and contains all status history, however, you're only interested in the last one in EDIDC I'd say)

Or could not just checking POS interface daily in one of the above transactions be one of the regular routine checks of the person we talk about? That would save you a lot of trouble..

I would talk to your ABAPer about more technical details.

Cheers,

Tomas

0 Kudos

Hi Tomas,

I appreciate your answer.

As suggested by you, i will also create two jobs, One's for generation of IDOC and Second for get the status for IDOC.

There is one module pool program where user can change the Article price and request for direct outbound for the same. I have seen the EDIDC structure, on which basis i will get to know about my IDOC status. Because user can run the IDOC many times a day. So how i am able to find ??

Thanks and Regards,

Nishant Bansal.

0 Kudos

Hi Nishant,

this casts a bit more light on the whole requirement, sorry I should have asked you for more info at the beginning.

The process I had in mind was a periodic POS download (overnight usually) of hundreds or thousands of articles. However, if I understand it correctly you have a transaction where users maintain POS relevant article data (price) and send the updates immediately to POS (important change that can't wait for the overnight update).

So to cover (almost) all possible options I would consider the following:

  • Periodic mass POS download (All): Job RWDPOSAN + Check in EDIDC (general)
  • Periodic mass POS download (Changes): Job RWDPOSUP + Check in EDIDC (general)
  • Immediate POS download (limited number of entries): Submit RWDPOSAN + check the latest created IDocs (e.g. WP_PLU created since submit) in EDIDC (possibly join on EDIDS where you can specify user name?)

RWDPOSAN returns IDoc numbers but I am not sure how to catch them in a submit and then check in EDIDC, I am afraid that my technical knowledge is too imperfect to give more detailed ABAP advice.

FYI, there is also program RWDIDOCPOS that you can use to search by article/ date / store and display prices, however, no IDoc status in the list, damn!

Cheers,

Tomas

0 Kudos

Dear Tomas,

We have submit the program in Foreground with all the selected articles, but faced one issue Data ABAP_DUMP issues, due to time limit exceed is there any option how to optimize the WPMA program

Thanks
Nishant

0 Kudos

Hi,

Ask your Basis team to increase dialog time if you are really interested to run it in foreground.

I would recommend to run in background.

Thanks,

Vikrant.

0 Kudos

Dear Vikrant,

Is there any notes for performance increase,

or what is the SAP recommendation for this T-code either we need to do it on foreground on background.

Thanks and Regards,

Nishant

0 Kudos

Hi,

I am not sure about notes for performance.

If you have huge data to be sent it is best to run it in background as there will not be any time limit for background jobs.

Thanks,

Vikrant.

0 Kudos

Hi Nishant,

I agree with Vikrant's suggestion to run WPMA in the background as it seems that the users mass maintain larger number of articles.

As for the recommended execution of the transaction, I don't think there's a fixed number as it fully depends on the number of articles you want to process, whether you want a full download or deltas only (RWDPOSAN vs. RWDPOSUP), config of your outbound POS interface (there are few basic settings that can speed-up e.g. article prices determination etc.), number of users you let to call WPMA in foreground and the impact on the system performance which is always very system specific.

Not really helpful, I know, but I'd say that a time-out is the first sign that you should either try background, and this is either to confirm or deny by your basis team with regards to all above 'variables', or limit the number of articles that a user can process in the foreground.

Hope this helps!

Cheers,

Tomas

0 Kudos

Dear Vikrant,

Just confirm me one thing for get the status of IDOC's i did enhancement in the MASTERIDOC_CREATE_REQ_W_PDLD and Export the IDOC table and check the status for the idocs.

Is there any other way to get the status for the IDOC.

Thanks

Nishant

0 Kudos

Hi,

Why you want to go for other way when what you did is already working

Thanks,

Vikrant.

0 Kudos

Hi Vikrant,

I already did the enhancement in Function for getting the status table for IDOC.

I am just asking is there any another way to get the IDOC status.

Thanks

Nishant

0 Kudos

Hi Nishant,

I am not aware of at least.

I have never used.

Thanks,

Vikrant.

0 Kudos

Dear Vikant and Tomas,


Thanks for solution. I really appreciate your anwser.

Thanks
Nishant Bansal.