2013 Mar 07 12:05 PM
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>
2013 Mar 07 1:17 PM
Read more carefully answers with link to Note 370988 - BAPIs in SD: Creation with reference.
Regards,
Raymond