Hi People,
I bet you know this one, I am new to ABAP Programming and following is my problem .
My piece of code is
1. To identify and read (some type of) stock transfers that meet a certain criteria and
2. create/change sales orders for all the ST's (from above), depending upon proprietary requirements.
I was told that Batch input should be used for the transaction VA01 / VA02 which I found very cumbersome. I have rather decided to use BAPI 'BAPI_SALESORDER_CREATEFROMDAT2'.
Now that I have the program structure in mind I ask myself,
1. Is BATCH input / BAPI good ? Errorhandling in both ?
2. If I go on with the BAPI, what would be the standard method for error handling / monitoring in case of errors. This is of interest to me because my program would run in background and as you have might have guessed does mass processing. how do I deal with mass processing of Status Messages ?
Help me out !!
TIA,
ZAM
Message was edited by: ZAMUser
If not all, a lot of BAPI's use to return a structure or table called RETURN. Check the info on that structures to catch your errors.
I learned it from a work colleague:
- I call the BAPI activating the "run test mode" option
- I check the RETURN table/structure looking for an E(rror) message
- If no errors, I recall the BAPI without the test option and do the COMMIT...
Wish it helps,
Vic
Hi,
Using the BAPI FM is good. And u can use the 'Application Log' function modules for error handling, as suggested by 'Sergei.. This FM's has the nice interface to display messages ..
Regards,
Srini S
BAPI or Batch Input? - Depends on how you want to handle errors:
If End-User has to correct values/data to create the order sucessfully then Batch-Input is preferrable. You create the data, and if order creation fails, the data is still accessible (via SM35) for manual correction.
Greetings Jochen
Add a comment