Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3353

Code works in debug mode not in normal run mode

$
0
0

Dear Experts,

 

We have a customized requirement in SAP MM module where we need to send the Purchase order data to a third party system whenever the PO is released in SAP.

 

Now we need to send an extra field along with the PO data when a single PR line item is split into 2 or more PO's. For example, if a PR line item is having quantity 10, and if there are three PO's created PO1, PO2 and PO3 with quantity 5.2 and 3 respectively, then indicator Y should be sent with PO2 and PO3 when the PO is saved. As PO1 is the first PO created against the PR line item, no split indicator Y should be sent in this case.

 

In addition to this, once PO2 and PO3 are changed or modified or deleted, no split indicator should be sent. Deletion indicator should be sent in case of deletion. To identify the change, we have added a new field ZMOD ie modification flag, so that the change scenario is distinguished from the one in which new PO is created. ZMOD flag will not be sent to the third party system.

 

The scenario which is not working in normal run mode but works in debug mode is as follows. PR line item PR1 created with quantity 10.

PO1 created with quantity 5, PO2 created with quantity 2 and PO3 with quantity 3, all three with reference to PR1. When PO2 and PO3 are created, split flag is sent to third party system. Now PO2 is deleted, so deletion indicator is sent to third party system without split flag. User adds a new line item in PO3 (having quantity 3) with reference to PR1 ie user adds a new line item with quantity 2. Thus when PO3 is saved, no split indicator should be sent for PO3 line item 1 whereas split indicator should be sent for PO3 line item 2.

 

We have developed the code which is attached in a text file. However the scenario explained above works in debug mode but not in normal run mode.

 

Can anyone please guide if we are missing out on something or try some other option.

 

Regards,

Mitesh.


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>