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_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
1,027

Can we use BAPI_SALESORDER_CREATEFROMDAT2 to create a sales order with reference to an invoice?If yes please tell me what should be given in the import parameters and export parameters.Please explain in detail if possible

Thanks in advance

7 REPLIES 7
Read only

bpawanchand
Active Contributor
0 Likes
882

Hi

Refer to this thread

regards

Pavan

Read only

Former Member
0 Likes
882

Shah,

yes you can use this bapi with refrence of invoice.

just see this field BAPISDHD1-REFDOCTYPE.in that you need to fill ref doc number.

for more read functional module documentation in SE37

Amit.

Read only

Former Member
0 Likes
882

hiii

for passing parameters refer to following link

regards

twinkal

Read only

Former Member
0 Likes
882

hi, you can find what you want by F1 doc.

here's the . Mandatory entries for it:

1. Mandatory entries:

ORDER_HEADER_IN : DOC_TYPE Sales document type

SALES_ORG Sales organization

DISTR_CHAN Distribution channel

DIVISION Division

ORDER_PARTNERS..: PARTN_ROLE Partner functions, SP sold-to party

PARTN_NUMB Customer number

ORDER_ITEMS_IN..: MATERIAL Material number

REQ_QTY Order quantity in sales unit

hope it helps

Read only

Former Member
0 Likes
882

Pavan/Twinkal,

Am really sorry to Shah he got some irrilivent input from both.and intersting thing is that both have indicate the same link ;-).

Let me elaborate bit i hope Shah is not asking about parameters which need to be filled in Fm but he is asking can we create a sales order with reference to an invoice?

an both provide a uninformed link which he not suppose to get.

sorry if i hurt you both.

and sorry if i misunderstood his question.

Amit.

Read only

0 Likes
882

Hello Amit,

You still the same..

If yes please tell me what should be given in the import parameters and export parameters

i gave reply regarding this..and in that link there is a code with import export parameter so that he can get some hint for his question..I asked same question for BAPI FM so i know how much it helps if somebody gives atleast this type of code, when you dont know anything about that FM.

regards

twinkal

Read only

0 Likes
882

Twinkal,

Wrote:
You still the same..

more:

i gave reply regarding this..and in that link there is a code with import export parameter so that he can get some hint for his question..

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'

EXPORTING

ORDER_HEADER_IN = W_HEAD

IMPORTING

SALESDOCUMENT = ZONC_ORDER_NUMBER

TABLES

RETURN = T_RETURN

ORDER_ITEMS_IN = T_LINE

ORDER_ITEMS_INX = T_LINEX

ORDER_PARTNERS = T_PARTNER

ORDER_CONDITIONS_IN = T_COND

ORDER_CONDITIONS_INX = T_CONDX

ORDER_CCARD = T_CCARD

ORDER_TEXT = T_TEXT

EXTENSIONIN = T_EXTEN.

this is what about both you and pavan posted about

are you able to see here what is filled in W_HEAD? which is exporting parameter.

simpal questionar is asking about the refrence document number.

be specific.

any ways your help is always welcome here.

Amit.