03-07-2013 12:28 PM
I try to create a new sales order with
'BAPI_SALESDOCU_CREATEFROMDATA1' and it goes well. The problem is when i try to create it via referrence.
It is created but i cant see the reference.
I have read many many posts here but i cant find my error .
Look my code please ....
....
....
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'.
.....
...
03-07-2013 12:48 PM
Hi Dimitris.
Did you try using BAPI_SALESORDER_CREATEFROMDAT2 instead?