Skip to Content
0
Former Member
Apr 01, 2008 at 11:39 AM

BAPI "BAPI_SALESDOCU_CREATEFROMDATA"

258 Views

Hello All,

My requirement is as follows:

I have to create a return order with reference to a billing document using the BAPI BAPI_SALESDOCU_CREATEFROMDATA .

I have all my billing documents for which the return orders need to be created and was suggested to use the BAPI BAPI_SALESDOCU_CREATEFROMDATA to create the return orders for all the obtained billing documents.

I observed that the following are the mandatory interface pararmeters for the above BAPI:

Import Parameters:

ORDER_HEADER_IN and BUSINESS_OBJECT

Tables Parameters:

ORDER_ITEMS_IN and ORDER_PARTNERS

and my input to the BAPI is as follows:

Import parameters:

ORDER_HEADER_IN - DOC_TYPE is of type return order

ORDER_HEADER_IN - SALES_ORG

ORDER_HEADER_IN - DISTR_CHAN

ORDER_HEADER_IN - DIVISION

ORDER_HEADER_IN - ORD_REASON

ORDER_HEADER_IN - REF_DOC is my billing document number

ORDER_HEADER_IN - REF_DOC_CA = M (invoice)

and

BUSINESS_OBJECT = BUS2102 (this business object is for return order)

Tables Parameters:

ORDER_ITEMS_IN – MATERIAL = providing the material number

ORDER_ITEMS_IN - REQ_QTY = providing the required quantity as well

ORDER_PARTNERS - PARTN_ROLE is SP(Sold to party)

ORDER_PARTNERS - PARTN_NUMB is the customer number(Sold to party number)

Having given this input to the BAPI, it is creating sales document with document category H(Returns), however the document seems as if the referencing is missing.

So, may i ask you all for your help to provide your inputs on this? Am i passing correct values? anything more needs to be passed to BAPI?

Kindly provide me your inputs ASAP.

Thanks in advance,

Prasad.