04-24-2006 2:42 PM
Hi All,
I am using BAPI "BAPI_SALESORDER_CREATEFROMDAT2" for creating sales order. Can you please tell how can I create a sales order with reference to a Quotation.
04-24-2006 2:58 PM
Hey,
Populate the Sales document header (import parameter BAPISDHD1) as below
1.) &Quotation number& in the field REF_DOC_L
2.) 'B' in the field REFDOC_CAT
Try it and let me know if it works...
Kiran
04-24-2006 2:58 PM
Vinit,
In your header structure, set like this:
hdr-REF_DOC = i_order-vbeln. "assign quotation # to sales order
hdr-REFDOC_CAT = 'B'. "assign Quotation to VBTYP_N.
For each line item, set as follows:
Assigning ref doc to create line item entries in VBFA.
itm-REF_DOC = i_order-vbeln. "quote number
itm-REF_DOC_IT = i_vbap-posnr. "quote line item #
itm-REF_DOC_CA = 'B'.
data: ret_text type BAPIRET2.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = hdr
convert = 'X'
IMPORTING
SALESDOCUMENT = salesdoc
TABLES
return = ret_tbl
ORDER_ITEMS_IN = itm
ORDER_PARTNERS = prtnr
ORDER_ITEMS_inx = itmx
ORDER_CONDITIONS_IN = conds
ORDER_CONDITIONS_INX = condsx
order_schedules_in = schd_lin.
Don't forget those points.
04-24-2006 3:48 PM
Vinit,
Have you solved your issue? If so, please reward points accordingly.
If not, plz provide more details of the issue.
Thanks in advance.
04-25-2006 5:47 AM
Hi John,
Thanks a lot for your help. Now able to create sales order with reference to quotation.
04-25-2006 2:00 PM
Vinit,
Glad to hear that it worked. Don't forget to award points for the helpful answers.
02-04-2015 7:09 AM
Hi John and Vinit,
I am doing the same thing as you explained above,but it is not creating Sales Order with reference
from quotation.
Although, i am also passing Sales area and partner function.
Please reply it is urgent.
Thanks,
Rohit