Skip to Content
author's profile photo Former Member
Former Member

Help :- BAPI or BATCH Input for VA01 / VA02

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Dec 02, 2004 at 11:44 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Sergei Korolev

      Hi Sergei,

      Thanks for your posts. I should rather rename this topic to Application log. Anyways, I need a tip from you or anyone who knows it. This is cosmetic thing but still !!

      I am able to create / add / display logs. But the problem is I can either display all the logs at once or no messages at all.(using the display profile). This makes the user select to go and select the log from the tree to display the particular log.

      Q:- Can I not display the log created at the very last in the tree??

      TIA,

      ZAM

      Message was edited by: ZAMUser

  • Posted on Dec 02, 2004 at 02:17 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2004 at 05:03 PM

    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
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.