We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] Calling BAPI_PO_CHANGE in loop

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by vostan
on Aug 24 at 1:12 PM
Hello friends,

I found one solution.

Really, the problem is in BAPI_PO_CHANGE, so was necessary to run the BAPI out of main program...


Follows the solution below:

The data of PO are allocated in MEMORY ID..
Then I created a new report only with the BAPI_PO_CHANGE that import the data from MEMORY ID.
This happens for each loop from the main program that calls the program thought of SUBMIT.

Now the program now is working correctly.
I'm really thankful.

vostan

---------------Original Message---------------
From: farooq
Sent: Friday, July 15, 2011 12:15 PM
Subject: Calling BAPI_PO_CHANGE in loop

Hello Gurus!
I have an issue while calling BAPI_PO_CHANGE.

I'm looping on BAPI_PO_CHANGE with Purchase Orders one by one, and adding articles to the existing POs.

I'm refreshing all required iTabs and program works fine in case the newly added articles are valid.

But in case if one additional article is faulty, say '0' quantity or 'Discontinued' status, the BAPI returns with error msg, which is correct and required functionality.

But what happens is that all 'correct' articles of all remaining POs following a 'faulty' BAPI call also return in error msg.

I'm calling BAPI_TRANSACTION_COMMIT in case BAPI returns with successful PO change. In case of faulty BAPI returning with error, I've tried using BAPI_TRANSACTION_ROLLBACK.

It doesn't work either.

I'd appreciate any help.

Thank you,
Farooq

__.____._
Copyright © 2011 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Mark as helpful
View this online
  
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language