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

TO CREATE SALES ORDER USING BAPI PROBLEM

I am trying to create Sales Order using bapi function, this is giving me error as mentioned below

*Please enter SHIP-TO-PARTY OR SOLD TO PARTY

*SALES DOCUMENT WAS NOT CHANGED.

it does not GIVE ME THE SALES DOCUMENT NO .

The BAPI I am using is BAPI_SALESORDER_CREATEFROMDAT2.

Would someone know which parameters I have to papulate,or have any other suggestion

THE INTERNAL TABLES I AM PASSING TO BAPI FUNCTION ARE

DATA: IT_BAPI_HEADER LIKE BAPISDHD1.

DATA: IT_BAPI_SOLD_TO_PARTY LIKE BAPIPARNR occurs 0 with header line.

DATA: SO_NO LIKE BAPIVBELN-VBELN.

DATA: IT_BAPI_ITEMS_IN LIKE BAPISDITM occurs 0 with header line.

DATA: IT_BAPI_RETURN LIKE BAPIRET2 occurs 0 with header line.

IS THERE ANYTHING ELSE TO POPULATE OTHER THAN THIS STRUCTURES

HEADER

  • Sales-Document type:

* Sales-Organization

* Distrubution-Channel:

* Division

PARTNER

Partner Function

Customer Number

ITEM DETAIL

Material Number

how to accomplish my task?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 08:40 PM

    We are also using the BAPI_SALESORDER_CREATEFROMDAT2. I think you need to fill in the ORDER_PARTNERS-PARTN_ROLE field. We are filling the field with 'SP' which means Sold-to party. You can also use 'SH' for ship-to party. There is documentation on this in the BAPI.

    Becky

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2005 at 02:23 PM

    The bapi has an Importing section. You need it to get the document number

        IMPORTING
          salesdocument = salesdocument

    Brian

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 11, 2005 at 05:21 PM

    Nandan,

    Please go through the documentation of the BAPI. It gives you details of what needs to be filled in in which structure/parmater. Also, read the documentation associated with each structure, that will tell what to fill.

    It is really hard to explain it in simple terms as to what are required. But, you need the header, items and partners at the minimum. Also, with some of these structures there are also 'X' structures(like ORDER_ITEMS_INX for ORDER_ITEMS_IN) which should also be filled based on what fields you filled in the original structure. For example, if you filled 'MATERIAL' field on the ORDER_ITEMS_IN structure, you should also fill in the same field on the ORDER_ITEMS_INX structure with an 'X' in it.

    All this is well documented in the BAPI.

    Srinivas

    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.