BAPI for Creating Sales Order For Variant Configuration Materials
Dear Gurus,
Before posting this thread, we have referred many SDN threads, OSS notes and other sites for any sort of help..but no success..All threads and other referrals are not much of help as they are kind of incomplete( Perhaps, we are unable to understand them..no offense).
Few checked threads on this subjects are:
http://scn.sap.com/thread/34590
http://scn.sap.com/thread/851070
http://scn.sap.com/community/abap/blog/2014/04/23/update-vc-variant-configuration-data-using-standard-bapi-in-sales-order
http://scn.sap.com/community/abap/blog/2014/07/15/creating-orders-with-variant-configured-items-using-bapisalesordercreatefromdat2
http://scn.sap.com/community/abap/blog/2014/04/23/update-vc-variant-configuration-data-using-standard-bapi-in-sales-order
http://scn.sap.com/thread/120144
OSS: 549563
Well, we're using the BAPI (BAPI_SALESORDER_CREATEFROMDAT2) which creates the sales order successfully but without the characteristic values in line items.
We're passing data to the following parameters - ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_VALUE to create the variant config but not able to see it getting created.
Pls find attached BAPI coding document for your reference.
If you could throw any light on this issue will be of great help for us.
Thank You in Advance!!!
Reg,
Jagan-SD.
Jagan nath
Try below.
you would need miimum of 3 segments to pass variant config data using this bapi
ORDER_CFGS_REF for each configurable item
POSEX = ITEM #
CONFIG_id , root_id - Start with 1 and increment it for each configurable line item
ORDER_CFGS_INST
CONFIG_ID - from above
INST_ID - Start with 1 and increment it for each configurable line item
OBJ_TYPE = "MARA'
CLASS_TYPE = '300'
OBJ_KEY = material #
ORDER_CFGS_VALUE
CONFIG_ID for the item, INST_ID for the item
charc for characteristic value
VALUE for characteristic value
Reference thread
How to Fill Configuration Data in BAPI BAPI_SALESORDER_CREATEFROMDAT2
Hope it will solve your issue.
Thanks
Ritesh
Similar Messages
-
BAPIs to create sales orders for Returns and Debit Memo Request
Hi,
I have to create a sales order for document type Returns as well as a debit memo request.The BAPI 'BAPI_SALESORDER_CREATEFROMDAT2' is giving the following error message for Debit Memo Request document creation as well as for Returns.
761 Unpermitted combination of business object BUS2032 and sales doc. category L
I found BAPIs:
BAPI_CUSTOMERRETURN_CREATE for creating sales document of type ZDRE and SD document category H.
BAPI_DEBITREQUEST_PROXY_CREATE for creating sales document of type ZDDR and SD document category L.
please let me know if anybody have used them. If so what values need to be passed to I_UPLOAD_ID,I_DESTIN,I_SFA_REL parameters of BAPI_DEBITREQUEST_PROXY_CREATE. Are there any alternative solutions using the Salesorder bapi.
I have to create documents based on the flat file data no reference sales document numbers are available.
Appreciate your help..
Good Day
Regards
BhargaviLook at the code done by me
Program Name: *
SAP Name : ZAXXXXXX Version : *
Programmer : Chris Dong of ITDC *
Description : *
Includes : *
Function Modules: XX_XXXXXX *
Transactions : *
Programs : *
REPORT XXXXXXXX LINE-SIZE 80
LINE-COUNT 65
MESSAGE-ID ZA
NO STANDARD PAGE HEADING.
CLEAR l_order_partners.
l_order_partners-partn_role = 'AG'.
l_order_partners-partn_numb = '0001202491'.
APPEND l_order_partners TO li_order_partners.
CLEAR l_order_partners.
l_order_partners-partn_role = 'WE'.
l_order_partners-partn_numb = '0001202491'.
APPEND l_order_partners TO li_order_partners.
Sales document type
l_order_header_in-doc_type = 'ZDR'.
Sales organization
l_order_header_in-sales_org = '1000'.
Distribution channel
l_order_header_in-distr_chan = '01'.
Division
l_order_header_in-division = '04'.
REF DOCUMENT
l_order_header_in-REF_DOC = '9100000144'.
order reason
l_order_header_in-ord_reason = '925'.
item number
l_order_items_in-itm_number = '000001'.
material no
l_order_items_in-material = '000000000007000012'.
Qty
l_order_items_in-target_qty = '0000000000100.000'.
APPEND l_order_items_in TO li_order_items_in.
*BUS2094 Credit memo request " OSS NOTE 93091
*BUS2096 Debit memo request " OSS NOTE 93091
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
EXPORTING
ORDER_HEADER_IN = l_order_header_in
BUSINESS_OBJECT = 'BUS2096'
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = ' '
IMPORTING
SALESDOCUMENT = l_vbeln
RETURN = li_return
TABLES
ORDER_ITEMS_IN = li_order_items_in
ORDER_PARTNERS = li_order_partners
Message was edited by:
Chris Dong
null -
BAPI For CREATE SALES ORDER WITH REFERENCE TO ORDER
Hi ,
I want to develop a new RFC for 'Creating Sales Order' with reference to another sales order -
Is there any BAPI available for the same ? (Version 4.7) - I know its available for new create and change
but couldn't find for create with reference to Order ...
Thanks in advance ...
Regards
Rajesh.Hi,
You can use this FM "/SAPNEA/SMAPI_ORDER_CREATE". I haven;t tried this but you can still give it a try. Mention the Reference Order Type and other data in the header work area and pass it to the FM.
Reward if it's useful.
Thanks,
Anil -
Pricing determination for creating sales order using BAPI
Hi,
I am using BAPI_SALESORDER_CREATEFROMDAT2 for creating sales order. I am filling conditions structures
'BAPICOND' and 'BAPICONDX' .
fs_order_conditions_in-itm_number = '00010'.
fs_order_conditions_in-cond_type = 'ZNTP'.
fs_order_conditions_in-cond_value = zsalesinput-price.
fs_order_conditions_in-currency = 'INR'.
append fs_order_conditions_in to order_conditions_in.
fs_order_conditions_inx-itm_number = '00010'.
fs_order_conditions_inx-cond_type = 'ZNTP'.
fs_order_conditions_inx-cond_value = 'X'.
fs_order_conditions_inx-currency = 'X'.
fs_order_conditions_inx-updateflag = 'U'.
append fs_order_conditions_inx to order_conditions_inx.
I am filling the conditions table with above mentioned fields.
Sales order is getting created successfully but I am getting two condition records in the conditions tab of sales order, one which is filled using the BAPI and the other one which is automatically picked by the system. Please tell me how to restrict the one which is created automatically by the system.
Because I want the one which is created by BAPI only.
Helpful posts will be rewardedHello Manchu.
Basically, it is an SD customizing issue. During the creation of the Sales Order you cannot "restrict" any other condition type. The SD guys must customize the condition type to allow for zero value so that the sales order is successfully created without this conition type.
Regards,
George -
Web Service for "Creating Sales Order" by using BAPI
Hello All,
I am trying to create a WS for "Creating Sales Order". The corresponding BAPI that I am using for this purpose is BAPI_SALESORDER_CREATEFROMDAT1. I am able to create the Web Service and run the WSDL on WS Navigator.
But there is a problem whil executing the Web Service. In the interface of WS, we can only enter item level details of "Order Partner". So when I enter the details and click on Execute, it returns me an error message "Please enter Ship to Party and Sold to Party". I have already given these details.
Does any one have any idea of what is going wrong?
Regards,
AbhishekAs you suggested i have passed the suggested parameters in item level..But this time i was not ablet to create the SO also..earlier i am able to creat SO but not line item, But now ia m not able to creat salesdocuement also.
Return talbe filled with belwo messages.
S V4 233 SALES_HEADER_IN has been processed successfully
E V1 320 No item category available (Table T184 ZKB TEXT )
E V4 248 Error in SALES_ITEM_IN 000000
W V1 555 The sales document is not yet complete: Edit data
E V4 219 Sales document was not changed -
BAPI/FM in ECC to create a sales order with variant configurable material
Hi all,
I need to create a function module that creates a sales order in ECC with a variant configurable material.
can some one tell me if there is a in built function module or BAPI that i can make use of to create a sales order with variant configurable material in ECC.
Regards,
Jessica SamThanks MxG,
I dont know how to use this BAPI. .Can you suggest me a sample code.
My reqmnt is, i have
Sold to party, ship to party, bill to party , VC config material and all char values that should be populated while creating a sales order.
please help me with what values should i populate in i/p paramters and and how to use this BAPI with some sample code if posible.
Regards,
Jessica. -
How to use Bapi for creating sales order
Dear All,
I am facing problem in creating Sales orders using BAPI.
Actually I am getting one file as an input and after validating the contents in the file i am preparing an internal table which has 6 fields - Customer number,PO Number,Material Number,Quantity,Price,Unit of measure.
Now my doubt is that while using BAPI_SALESORDER_CREATEFROMDAT2 , I am not getting how to pass PO Number and Customer number.
Please Help.
Regards,
ShwetaHi shweta upadhyay
I have gone through you are post i have done some coding for creating sales order using bapi , I think it is helpful for you.
*& Report YOBJ_BAPI_SALESORDER
*& REPORT : CREATING SALES ORDER USING STANDARD BAPI
*& AUTHOR : S.PAVAN KUMAR INUMARTHY
REPORT YOBJ_BAPI_SALESORDER.
DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
*APPENDING VALUES FOR HEADER.
ORDER_HEADER_IN-DOC_TYPE = 'TA'.
ORDER_HEADER_IN-SALES_ORG = '1000'.
ORDER_HEADER_IN-DISTR_CHAN = '10'.
ORDER_HEADER_IN-DIVISION = '00'.
ORDER_HEADER_IN-SALES_GRP = '130'.
ORDER_HEADER_IN-SALES_OFF = '1030'.
APPEND ORDER_HEADER_IN.
*APPENDING VALUES FOR ITEM
ORDER_ITEMS_IN-MATERIAL = 'M-13'.
ORDER_ITEMS_IN-PLANT = '1000'.
ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
ORDER_ITEMS_IN-DIVISION = '07'.
ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
ORDER_ITEMS_IN-VOLUME = '0.780'.
ORDER_ITEMS_IN-VOLUNIT = 'M3'.
APPEND ORDER_ITEMS_IN.
*APPENDING VALUES FOR PARTNER
ORDER_PARTNERS-PARTN_ROLE = 'AG'.
ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
ORDER_PARTNERS-COUNTRY = 'DE'.
ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
APPEND ORDER_PARTNERS.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
ORDER_HEADER_IN = ORDER_HEADER_IN
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
IMPORTING
SALESDOCUMENT = SALESDOCUMENT
TABLES
RETURN = RETURN
ORDER_ITEMS_IN = ORDER_ITEMS_IN
* ORDER_ITEMS_INX =
ORDER_PARTNERS = ORDER_PARTNERS
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDIF.
WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
This will be very helpful for you .
this one is the correct answer I have tried it and I am posting it for you.
Message was edited by: pavan inumarthy -
Creating Sales Order for "Payer" thru VA01 trans.
Dear All,
In our project, we have stations which r <b>Sold-to-party</b> and <b>Credit customers</b> which is a <b>Payer</b>.
We have to create <b>Sales order</b> for both <b>Stations</b> and <b>Credit customers</b>. Creating Sales order for Station is not a problem but each station has many credit customers, which are maintained in the Station.
When we are creating Sales Order via <b>VA01</b> for a particular credit customer, we are entering Station as a sold-to-party and it asks for Payer which is the Credit customer for that station.<b>But when we are recording through SHDB transaction it is not asking for payer(credit customer for that station).</b>
Please let me know of BAPI or some other method to create sales order for credit customer(Payer).
Kindly help at the earliest.
Thanks and Regards,
Sudipto.Hi,
There is TABLES parameter where you can pass the PARTNERS information. I am not sure of the parameter name but it would refer to something like BAPIPAR.
Regards,
Ravi
Note : Please mark all the helpful answers. -
WebDynpro Application for Create Sales Order
Hi All,
Can any one help me to get the right documentation on How to create a WebDynpro Application for Create Sales Order, Calling BAPI.In NWDS, click Help-->Welcome...Netweaver Developer Studio. Under "Developing WebDynpro Applications" click the link to the chapter.
Go to....
SAP WebAS for Java Applications
Development Manual
Developing Web Application
Web Dynpro
Tutorials
Advanced Tutorials
Model Tutorials
Creating a Web Dynpro Appliation Accessing ABAP Functions.
This should get you started.
Regards,
Rich Heilman -
Minimum mandatry fields for Creating Sales Order
Hi All,
I am going to create sales order using <b>BAPI_SALESORDER_CREATEFROMDAT2</b> in the web dynpro for java,
I want to use minimum fields, so, what are the <b>minimum</b> fields for creating sales order ?.
if u have any documents or links realted to this please send me.
please help me out.
Thanks & regards,
Iqbal Ahmadchk it
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = l_order_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = l_salesdocument
TABLES
RETURN = it_return
ORDER_ITEMS_IN = it_order_items
ORDER_ITEMS_INX =
ORDER_PARTNERS = it_order_partners
ORDER_SCHEDULES_IN = it_order_schdl
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN = it_order_conditions
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES
How to create sales order using bapi( test purpose)
Create Sales Order using BAPI
creating sales order using bapi -
Duplication of Purchase Order while creating sales orders for a customer
when we try to create sales order for one customer it have to create by picking up the purchase order from the table linearly.
But the problem is that here when we are trying to create multiple sales orders the same purchase order is being picked.
for example..when we create sales order 1 the purchase order picked is PO1 and
for creation of sales order 2 the same purchase order PO1 is being picked up instead of PO2.
No idocs are being generated in this, even to check them..
How shall i resolve this...? Please help me out ASAPHi Kumar,
Thanks for the reply. But actually the problem is that this is related to some customized table in the project. When a EDI Batch job runs in the background then automatically the SO is created and the PO is being picked from the table(custom table) and then posted against the respective SO. we are not aware of that job which is triggering this to debug. Once if we can know that particular batch job or pgm or edi or idoc what ever it is then we can debug.
Do you have any idea how can we find that particular pgm/edi/idoc/job name which triggers this creation of SO? -
Creating Sales Order for Item Category TATX (Text)
How can I create Sales order for text item where no material master has been maintained?
It does not give me any conditions and no accounting document.
What I need to do if I want to create that with a value?
Thanks
STHi,
Its not possible to create an SO w/o material code.
But you can create an dummy material.
This dummy material can be just an refer to create an SO.
Do refer the below help doc which may help you..
Settings in the Material Master (Dummy-Material) - mySAP Engineering &amp; Construction - SAP Library -
Sales Order with Variant Configuration
I´m trying to create a Sales Order with Variant Configuration.
First, I tried to create the order with the BAPI SD_SALESDOCUMENT_CREATE but It would not let me update characteristics.
Then I separated into two BAPI's:
SD_SALESDOCUMENT_CREATE to create Sales Order and BAPI_SALESORDER_CHANGE to modify the characteristics.
I run the two SAP BAPI's from SAP and create the Sales Order and make the characteristics correctly, but when I try to invoke from The Middleware the message V1 555 The sales document is not yeat complete is displayed and does not update the characteristics.
Both functions are such as Remote-enabled Module.
The remote user profile is SAP ALL
Reviewing where the message is used, I see that the message is in the include MV45AF0B_BELEG_BEARBEITEN_ENDE
IF DA_LINES> 0 AND
SY-NE SPACE AND BINPT
CTU_AMODUS BI_INFO-NA 'A' AND
CATTAKTIV IS INITIAL.
MESSAGE I555.
ENDIF.
Do you have any idea why since Middleware is not working?.
Best Regards.
Blanca Segovia.Hi Diwakar
I changed the creation of Sales Order using only SD_SALESDOCUMENT_CREATE and using Commit Work and it is the same, running the function from se37 create the Sales Order and make the characteristics correctly, but when I try to invoke from The Middleware the message V1 555 The sales document is not yeat complete is displayed and does not update the characteristics.
I Open that Sales order in VA02 and check 'Incompletion Log' the screen show 1 Configuration, I Open the tab of the characteristics without changing the characteristics and only save, then the status changes to Complete document.
You give me another idea that could be happening?
Thank you very much.
Blanca Segovia. -
BAPI_SALESORDER_CREATEFROMDAT2 for creating sales orders with configurable
Hi All,
I want to create sales order with a material which in turn triggers a configurable network order.
I am using the following BAPI : BAPI_SALESORDER_CREATEFROMDAT2.
After reading the "[Variant Configuration (LO-VC)|http://help.sap.com/printdocu/core/print46c/en/data/pdf/lovc/lovc.pdf]" documentation, I thought I had to populate the
following tables ORDER_CFGS_REF, ORDER_CFGS_INST and ORDER_CFGS_VALUE.
The call function return no errors and the sale order is well created. However, I have no values in the network.
If I created a sale order in VA01, a network is created with value. So the customizing is good.
Do you have any idea how to populate this tables ? Sample code will be very helpful.
We found in this forum a lot of sample code about configurable material, with obj_type populate with MARAu2019. But no example with configurable network.
Actually I complete these tables like this :
" E1CUCFG
ls_order_cfgs_ref-posex = '000010'.
* ls_order_cfgs_ref-config_id = '000010'.
ls_order_cfgs_ref-config_id = '000001'.
ls_order_cfgs_ref-root_id = '00000001'.
ls_order_cfgs_ref-complete = 'T'.
ls_order_cfgs_ref-consistent = 'T'.
* ls_order_cfgs_ref-cbase_id = '4ECADFC4BE9F03A6E10080000AC4AB76'.
* ls_order_cfgs_ref-cbase_id_type = 'G'.
APPEND ls_order_cfgs_ref TO lt_order_cfgs_ref.
" E1CUINS
ls_order_cfgs_inst-config_id = '000001'.
ls_order_cfgs_inst-inst_id = '00000001'.
ls_order_cfgs_inst-obj_type = 'PLKONET'. u201C(in replacement of MARA)
ls_order_cfgs_inst-class_type = '300'. u201C(or 020).
ls_order_cfgs_inst-obj_key = '01000000801'.
APPEND ls_order_cfgs_inst TO lt_order_cfgs_inst.
" E1CUVAL
ls_order_cfgs_value-config_id = '000001'.
ls_order_cfgs_value-inst_id = '00000001'.
ls_order_cfgs_value-charc = 'XXXX'. u201C(corresponding to Flag DTA)
ls_order_cfgs_value-charc_txt = 'Flag DTA'.
ls_order_cfgs_value-value = '0'.
APPEND ls_order_cfgs_value TO lt_order_cfgs_value.
Thanks,Have a look to OSS-Message 567348. There is sample coding for using BAPI_SALESORDER_CHANGE, but the parameters should be the same to yout BAPI
Best regards
Torsten Manhardt -
BAPI FOR CREATING SALES ORDER WITH REFFERENCE TO QUOTATION
Hi All,
I am creating sales order with refference to quotation by using bapi "BAPI_SALESORDER_CREATEFROMDATA".Able to create sales order but its not refferencing qutation.Is there any other bapi for this scenario.Please guide me.
Regards,
SureshHi ,
Thank you for giving reply I tried by using bapi BAPI_SALESORDER_CREATEFROMDAT2 after execution it giving sales order number but when I am trying to see that sales order system is giving error message as document is not exist.
Please guide me.
Suresh
Maybe you are looking for
-
I can't set the phone number in imessage
please help ! i hvae iphone 4S and try to set up imessage but it only show my email address at Receive at
-
Transaction for Mass processing of PM(Plant maintenance) orders
Hi all, Pls let me know if there is any standard tcode for for Mass processing of PM(Plant maintenance) orders I checked for COHV ,but it's appplicable only for produciton orders it seems Costing has to be recalculated for all the orders of order ty
-
Group data by week of data filter in ssrs
Hii all I am creating matrix report where report has date parameters like @From_Date and @To_Date and more, i want to provide a filter like selection : where user will select Weekly, Mothly or Daily I would do it with grouping based expreession on p
-
Somehow each of my pictures in the library have been duplicated. How do I easily delete all duplicates?
-
Hi gurus' please assist me resolve the following issue .. i would like to hide or remove the "*printer firendly icon* " can you please give me the code that i can use or some other soulution... so for i have unchecked the print option from the dashbo