cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Kudos

Hi

I have a scenario wehre i am sending the data from file to BAPI

BAPI_SALESORDER_CREATEFROMDAT2 and want to get back the SALES DOCUMENT NUMBER in Response...

My scenario is working fine but i am getting empty SALES DOCUMENT NUMBER in Response

MY SAMPLE FILE :

ORDER_HEADER_IN>

<ITEM>

<DOC_TYPE>ZCA</DOC_TYPE>

<SALES_ORG>0020</SALES_ORG>

<DISTR_CHAN>00</DISTR_CHAN>

<DIVISION>00</DIVISION>

</ITEM>

</ORDER_HEADER_IN>

<ORDER_PARTNERS>

<ITEM>

<PART_ROLE>SP</PART_ROLE>

<PRATN_NUMB>100103444</PRATN_NUMB>

<ITM_NUMBER>000000</ITM_NUMBER>

</ITEM>

</ORDER_PARTNERS>

<ORDER_ITEMS_IN>

<ITEM>

<MATERIAL>MMT-315</MATERIAL>

<BILL_DATE>20071207</BILL_DATE>

<ITM_NUMBER>000000</ITM_NUMBER>

<DLV_GROUP>000</DLV_GROUP>

<TAGET_QTY>1</TAGET_QTY>

<UOM></UOM>

</ITEM>

</ORDER_ITEMS_IN>

<ORDER_SCHEDULE>

<ITEM>

<ITM_NUMBER>000000</ITM_NUMBER>

<SCHED_LINE>0000</SCHED_LINE>

<REQ_QTY>1</REQ_QTY>

</ITEM>

</ORDER_SCHEDULE>

but with the same data when i tested tha BAPI i am getting the SALES DOCUMENT NUMBER in Response ..

I am getting EMPTY SALES DOCUMENT NUMBER When i send the data using the file from XI...

DID i missed any mandatory fileds for creating the SAles document

SV

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

From the error, i suggest you to check whether you r sending ship to party in the file. or check whether you have done the mapping for ship to party field.

Regards,

Sreeni

Former Member
0 Kudos

Hi

I f u see in sample file i am passing the PART_ROLE value as SP (Ship to Party)

I dont know why its giving me that error

SV

Former Member
0 Kudos

S.V

if you see the parameters, you have filled in <Order_Partners> node, but the error message says that you also need to fill in the <Order_header_in> node with ship-to or sold-to values. If you see the BAPI there few parameters related to ship-to party. Try to fill them and see what happens

PURCH_NO_S Ship-to Party's Purchase Order Number

PO_DAT_S Ship-to party's PO date

PO_METH_S Ship-to party purchase order type

REF_1_S Ship-to party character

Former Member
0 Kudos

Hi Guru

But when i tested the BAPI without the filed values u mentioned its giving me the SALESDOCUMENT NUMBER ..

But why its not giving me when i tested using XI with FILE

SV

Former Member
0 Kudos

S.V

Even not I am sure why its happening. A good idea might be ask your functional consultants about it. As we discussed try filling the header level items and see if it works. If you found any solution, let us know

Answers (1)

Answers (1)

Former Member
0 Kudos

S.V

Just to confirm, Did you select the Send 'Confirm Transaction' and Commit Control for Single BAPI Calls in the Advanced Mode.

For more refer below

http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm

Former Member
0 Kudos

Hi

I did that still no Use..

when i checked in the response BAPI in RETUTN Table i am Getting

<RETURN>

- <item>

<TYPE>E</TYPE>

<ID>VP</ID>

<NUMBER>112</NUMBER>

<MESSAGE>Please enter sold-to party or ship-to party</MESSAGE>

<LOG_NO />

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1 />

<MESSAGE_V2 />

<MESSAGE_V3 />

<MESSAGE_V4 />

<PARAMETER>SALES_HEADER_IN</PARAMETER>

<ROW>0</ROW>

<FIELD />

How to rectify that

SV

Former Member
0 Kudos

S.V

<MESSAGE>*Please enter sold-to party or ship-to party*</MESSAGE>

If you see this messages, it seems that BAPI is trying to post the sales order but there is a value for sold-to party or ship-to party which is missing. Please fill the value for that fields in the BAPI and try again. You will get the value