Skip to Content

Executing BAPI through Webdynpro

Hi All,

I am tryin to run the Bapi 'BAPI_SALESORDER_CREATEFROMDAT1'. When i try to execute this directly from the R3 side through transaction se37 its working properly. While exceuting i'm setting only the mandatory fields for this bapi. But when i tried to do this through webdynpro its giving me error. Sale document type which is one among the input parameters, I'm setting this to value OR. But when i do this through webdynpro it returns message "sales document OR not defined". i checked the mapping as well as setting of values and couldn't find any errors. Any suggestions.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 19, 2005 at 01:31 PM


    Check whether you are passing the same combination of values of Sales Organisation,Distribution Channel,Division..... as you are passing in the transaction SE37.

    One more option to check is when you are passing a variable from Web Dynpro for example - Item No we should be passing it with the length equal to the Item No variable length defined in ABAP.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2005 at 01:52 PM


    Can you elaborate what error you are getting?

    Have you mapped UI elements with corresponding attributes,is JCO connections are established.Have you mapped input and output parameters.



    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2005 at 06:03 AM

    Hi Vasundhara & Venkat,

    Thanks for your reply,

    See when i'm executing the bapi from webdynpro side its getting executed but its not giving the same set of values as output as it is giving from the R3 side for same input. I'll give the codesample that i'm using to pass value from webdynpro.

    Bapi_Salesorder_Createfromdat1_Input inp = new Bapi_Salesorder_Createfromdat1_Input();


    Bapisdhead bp = new Bapisdhead();






    Bapiitemin itm = new Bapiitemin();




    Bapipartnr bpart = new Bapipartnr();




    After this when i execute the rfc its giving me the message

    "Sales document type OR is not defined"

    But when i gave the same input from the R3 side it gave the output and a sales order got created .

    hope you guys understood the scenario.

    Add comment
    10|10000 characters needed characters exceeded