Skip to Content
author's profile photo Former Member
Former Member

Problem with FM 'BAPI_SALESDOCU_CREATEFROMDATA1'

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'.



.....

...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Mar 07, 2013 at 12:48 PM

    Hi Dimitris.

    Did you try using BAPI_SALESORDER_CREATEFROMDAT2 instead?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.