Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_SALESDOCU_CREATEFROMDATA1 with referrence

Former Member
0 Likes
585

Dear Guys ,

I have read "all" the posts in the SDN  about the creation of sales order.

i can create it without reference but i cant with reference .

Look my code please

<code>

     HEADERX-UPDATEFLAG = 'I'.
    
* Reference Data
     HEADER-REFOBJECTKEY  = ITAB-VBELN.
     HEADER-REFDOCTYPE    = '9INS'.
     HEADERX-REF_DOC = ITAB-VBELN.


* Sales document type
     HEADER-DOC_TYPE 'ZX1'.
     HEADERX-DOC_TYPE = 'X'.

* Sales order reason
     HEADER-ORD_REASON = VBAK-AUGRU.
     HEADERX-ORD_REASON = 'X'.

* Sales organization
     HEADER-SALES_ORG = VBAK-VKORG.
     HEADERX-SALES_ORG = 'X'.

* Distribution channel
     HEADER-DISTR_CHAN  = VBAK-VTWEG.
     HEADERX-DISTR_CHAN = 'X'.

* Division
     HEADER-DIVISION = VBAK-SPART.
     HEADERX-DIVISION = 'X'.

* PO Number
     HEADER-PURCH_NO_C = VBAK-BSTNK.
     HEADERX-PURCH_NO_C = 'X'.

* PO Date
     HEADER-PURCH_DATE = VBAK-BSTDK.
     HEADERX-PURCH_DATE = 'X'.

* Requested Delivery date
     HEADER-REQ_DATE_H = VBAK-VDATU.
     HEADERX-REQ_DATE_H = 'X'.

* PO Delivery Block
     HEADER-DLV_BLOCK = '09'.
     HEADERX-DLV_BLOCK = 'X'.
</code>

1 REPLY 1
Read only

RaymondGiuseppi
Active Contributor
0 Likes
406

Read more carefully answers with link to Note 370988 - BAPIs in SD: Creation with reference.

Regards,

Raymond