Regarding Sales Order Bapi
Hi Friends,
I am trying to upload the sales order history from the legacy side using Bapi BAPI_SALESORDER_CREATEFROMDAT2. I am passing all the mandatory values but I am getting an error message "please select sold-to or ship-to party".
What is that I am missing? Can anybody guide me in this issue.
Thanks,
Raj
Raj, when calling the BAPI are you passing values in the following table which is in BOLD. If not, I'm pretty sure that you need to pass the SOLDto and the SHIPto partners in this table. Please see Srinivas's previous reply also.
FUNCTION BAPI_SALESORDER_CREATEFROMDAT2.
**Lokale Schnittstelle:
* IMPORTING
* VALUE(SALESDOCUMENTIN) LIKE BAPIVBELN-VBELN OPTIONAL
* VALUE(ORDER_HEADER_IN) LIKE BAPISDHD1 STRUCTURE BAPISDHD1
* VALUE(ORDER_HEADER_INX) LIKE BAPISDHD1X STRUCTURE BAPISDHD1X
* OPTIONAL
* VALUE(SENDER) LIKE BAPI_SENDER STRUCTURE BAPI_SENDER OPTIONAL
* VALUE(BINARY_RELATIONSHIPTYPE) LIKE BAPIRELTYPE-RELTYPE
* OPTIONAL
* VALUE(INT_NUMBER_ASSIGNMENT) LIKE BAPIFLAG-BAPIFLAG OPTIONAL
* VALUE(BEHAVE_WHEN_ERROR) LIKE BAPIFLAG-BAPIFLAG OPTIONAL
* VALUE(LOGIC_SWITCH) LIKE BAPISDLS STRUCTURE BAPISDLS OPTIONAL
* VALUE(TESTRUN) LIKE BAPIFLAG-BAPIFLAG OPTIONAL
* VALUE(CONVERT) LIKE BAPIFLAG-BAPIFLAG DEFAULT SPACE
* EXPORTING
* VALUE(SALESDOCUMENT) LIKE BAPIVBELN-VBELN
* TABLES
* RETURN STRUCTURE BAPIRET2 OPTIONAL
* ORDER_ITEMS_IN STRUCTURE BAPISDITM OPTIONAL
* ORDER_ITEMS_INX STRUCTURE BAPISDITMX OPTIONAL
* <b>ORDER_PARTNERS STRUCTURE BAPIPARNR</b>
* ORDER_SCHEDULES_IN STRUCTURE BAPISCHDL OPTIONAL
* ORDER_SCHEDULES_INX STRUCTURE BAPISCHDLX OPTIONAL
* ORDER_CONDITIONS_IN STRUCTURE BAPICOND OPTIONAL
* ORDER_CFGS_REF STRUCTURE BAPICUCFG OPTIONAL
* ORDER_CFGS_INST STRUCTURE BAPICUINS OPTIONAL
* ORDER_CFGS_PART_OF STRUCTURE BAPICUPRT OPTIONAL
* ORDER_CFGS_VALUE STRUCTURE BAPICUVAL OPTIONAL
* ORDER_CFGS_BLOB STRUCTURE BAPICUBLB OPTIONAL
* ORDER_CFGS_VK STRUCTURE BAPICUVK OPTIONAL
* ORDER_CFGS_REFINST STRUCTURE BAPICUREF OPTIONAL
* ORDER_CCARD STRUCTURE BAPICCARD OPTIONAL
* ORDER_TEXT STRUCTURE BAPISDTEXT OPTIONAL
* ORDER_KEYS STRUCTURE BAPISDKEY OPTIONAL
* EXTENSIONIN STRUCTURE BAPIPAREX OPTIONAL
* PARTNERADDRESSES STRUCTURE BAPIADDR1 OPTIONAL
Regards,
Rich Heilman
Similar Messages
-
ISSUE REGARDING SALES ORDER BAPI
Is "ISM_SALESORDER_CREATEFROMDAT2" function module and
"BAPI_SALESORDER_CREATEFROMDAT2" function module same for creation of sales order for bapi.
srinivasThis is because you are still missing some segments or data.
Maybe this thread will be helpful:
BAPI_SALESORDER_CREATEFROMDAT2 to replace VA01, KBETR and NETWR
You should also check the documentation from transaction BAPI. -
How to change pricing Conditions in Sales order in change sales order bapi
Hi Experts,
How to change pricing Conditions in Sales order in change sales order bapi.
I have used the 2 function modules bapi-changesalesorder and sd salesdocument change, But it is creating the new record , instead of changing the existing one, Could please assist regarding the same
Thanks in Advance .
NLNHI NLN
I have just tried on my system and managed to overwrite the existing price by passing the following parameters.
<b>Import Paramters:</b>
SALESDOCUMENT - Sales Document Number
ORDER_HEADER_INX - UPDATEFLAG as <b>'U'</b>.
LOGIC_SWITCH - Import Structure - Pass 'X' to LOGIC_SWITCH-COND_HANDL.
<b>Tables:</b>
CONDITIONS_IN - ITM_NUMBER,
COND_COUNT, -> Condition counter same as KONV-ZAEHK generally it is <b>'01'</b>
COND_TYPE,
COND_VALUE,
CURRENCY.
CONDITIONS_INX - ITM_NUMBER,
COND_COUNT,
COND_TYPE,
UPDATEFLAG as <b>'U'</b>,
CURRENCY.
Hope i have clarified your query.
Kind Regards
Eswar -
I have a problem regarding sales order line item with confimed quanity
Hi Experts,
I have a problem regarding sales order line item with confimed quanity with '0' with delivery block but confirming the sales order quantity once the order is released from credit check.
The situation arises as per the below scenarios.
Scenario - 1 - When the sales order has two line item - one line item with confirmed qunaity in the schedule line and for the 2nd line item there is no available stock for the Material xxxxxx.
Initially the sales order is created for the line item 2 with confirmed quantity = 0, and having the delivery block = 01 for the Material xxxxxx and the order is set with credit check. Once the order is relased from the credit check. The quanity for the item 2 where the confirmed quantity will be = 0 ( Where it is not changing the confirmed quantity)
Scenario -2- Updating the order qunaity for the line item 2 as (9Pcs) it will goes to credit check and save the order.
Maintain the stock for the line item 2 ( 5 Pcs).
Once the order is released from the credit check. Then for the line item 2 the confirm quanity will be seting to 5 Pcs with Delivery blcok 01.
This should not happen, When the credit check is released even though if it has stock based on the delivery blockl it should set the confirmed quanity to Zero.
Can you please help me how to solve this issue.
Looking forward for your reply.
Thanks and Regards,Hi,
I agree with your point. In the sales order When the complete delivery check box is enabled where the confimed qty is set to zero, it is fine but when we save the orderr it goes to credit check. Once we release the order using VKM3 where in the sales order the confimed quantity is setting to 5, But it should set to Zero quantity. Quatity should not be get confirmed it should be Zero Quantity.
Further in SPRO - customizing in the deliveries blocking reasons - It has a tick mark in the confirmation blcok. But we dont want to remove the - Confirmation Block tick mark
Please any one can help me if you have any solution to solve this problem.
Thanks and Regards. -
Hi,
We would like to pass custom fields data to Custom screens in VA01 Standard Sales Order. For that we are extending standard BAPI BAPI_SALESORDER_CREATEFROMDAT2 using EXTENSION parameter. We have appended custom structures to VBAKKOZ. VBAKKOZX, BAPE_VBAK,BAPE_VBAKX and able to pass information from portal upto 480 characters using
valuepart1 and valuepart2.
But when we are trying to extend it further, standard sales order BAPI
BAPI_SALESORDER_CREATEFROMDAT2 is going to dump at :
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = da_bape_vbap
IMPORTING
ex_container =
ch_parex+lenstruc(da_length_bape_vbap)
EXCEPTIONS
illegal_parameter_type = 1
OTHERS = 2.
We need to extend it up to 900 chars.
Any help on this will be greatly apprecited.
Thanks
KalyanI found shortly after posting my message that the notes had not been correctly applied as the Notes Assistant ended with an error, and the error that resulted in this failure had not been corrected. The basis folks failed to inform me that this error had occured in applying the notes. I discovered it through testing. Had you applied the notes and run into the same error?
When we subsequently corrected for this, the issue with lenstruc went away and everything appears to be OK. The real problem was that due to the error in the Notes Assistant the updated version of LVBAKTOP with the definition of lenstruc did not get activated. It was left in a state where it needed an SSCR key to be applied manually, which should all have been handled automatically with SNOTE.
Once this was done and the source was activated, the original error went away. The two notes seem to have solved the original Unicode issue as well.
We still have this update in the development area only since the CRM enhancements that caused the original problem with an append to the VBAK structure are also still in development. We will be testing those changes together before moving everything up. If there are any further issues that come up, I'll let you know.
What I am wondering is if you had a similar problem applying the above notes, since the problem went away for us when the notes to handle the Unicode conversion were properly applied.
Brian
Edited by: Brian Sammond on Jul 24, 2008 10:55 AM -
Backend Tables for Chargeback regarding Sales Order.
Hi,
I am Searching for the tables Chargeback Data regarding Sales Orders, and also Joins for sales tables.
Can any one help me in this.
Thanks in Advance
Regards
Vamsi...
Edited by: 965678 on Apr 29, 2013 6:05 AM
Edited by: 965678 on Apr 29, 2013 6:42 AMThanks for your inputs..I have few more queries on same.
Initially we had incoming sales order activated in KEKF allong with implemented SAP note 571697, which helped us to update CE1XXXX only for a particular sales order type. This was initial requirement to have system updating COPA values only for one particular sales order type.Also, KEQ3 was also activated which resulted in updates to CE4XXXX. This was not a problem initially since we had few sales orders now that plant has grown old with more sales order (resulting in huge size of CE4XXXX) VA01 is impacted..
Currently ,since we have KEQ3 activated so, Segment is created the moment we create sales order.. and table CE4XXXX is updated..
As most of you have suggested to switch off sales order in KEQ3, i need to analyze the impact of this..
From what i understand CE1XXXX will continue with updation for that order type... and CE4XXXX won't be updated in future..Please correct me if i am wrong..
Also, please advise what all can be possible impacts on COPA reporting if I switch off from now onwards (client has been using this since long) , and what all should be the precautions that i should take while doing this.
Thanks -
Issue regarding Sales Order creation using bapi BAPI_salesorder_createfromd
Hi Experts,
Can anyone help me what is the data I'm missing in creating sales order?
I tried to create sales order using BAPI_salesorder_createfromdat2 and I recieve error regarding my creation.
here's the lists of RETURN for the BAPI.
"SALES_HEADER_IN has been processed successfully"
"SALES_ITEM_IN has been processed successfully"
"SALES_CONDITIONS_IN has been processed successfully"
"The sales document is not yet complete: Edit data"
Iam not able to get the message ""The sales document is not yet complete: Edit data"
Please help in this regard.
Regards,
SaktiThis is because you are still missing some segments or data.
Maybe this thread will be helpful:
BAPI_SALESORDER_CREATEFROMDAT2 to replace VA01, KBETR and NETWR
You should also check the documentation from transaction BAPI. -
Hi All,
M using BAPI_SALESORDER_CREATEFROMDAT2 to create Sales Order. It is working fine & creating sales order. But i also want to give Order Quantity in sales order. What is the field name for that in BAPI.
Thanks in advance....
Regards
AKHi AK....
You can assign the quantity in table
ORDER_SCHEDULES_IN
you have to assign REQ_QTY in this table for material....
Here For each material you have to assign Item no....
like
010
020
with ref to that material gets identified in this table.......
eg.
in item table
item 010 and material no is 0000000001
and if u wan to give quantity then
ORDER_SCHEDULES_IN
itme no 010 and REQ_QTY = 10
That will solve your problem
Regards
Ashish -
Regarding Sales order creation using Material with Parent-child
hey guys
i cannot create sales order for parent child material using Below bapi(BAPI_....ORDERDAT2).
Could you please tell me if any special parameter should be set with this bapi
to create the order for PARENT MATERIAL AND child materials.
i am able to create parent-child material order using VA01. but cant using BAPI
just for information I am passing Parent materail alone to the BAPI.
can somebody give suggestion.
ambichanHi AMBI ,
SAP will explode the Sales BOM while creating the Sales Order.
useful Tcodes : CS03.
Bom Usage : 5.(sales Bom)
Regards
prabhu -
Regarding Sales Order Creation
hi all,
I have one requirement , i.e Our Client has one wish that for every customer he is fixing some line items means 5 or 6 line items. IF it is less than that sales order will not create for that particular customer and it needs to show warning message .
How can i achieve this .
Plz send some suggetions to solve this problem.
Regards
Rami Reddyhi,
pls see the below threads.
SALES ORDER creation using BAPI
sales order creation/change
XML upload of data into SAP - Sale order creation
sales order creation
Sales order creation BAPI
thanks
karthik -
Hi ,
Please help me in the issue . I want a bapi for return sales orders specific to AFS as i am not able to use the normal returns orders bapi BAPI_CUSTOMERRETURN_CREATE. Can anyone please let me know how to proceed for the same.
Thanks in advance,Hi...
try by using FM " BAPI_SALESDOCUMENT_CREATE".
Regards,
Lokeswari. -
Regarding sales order creation with "BAPI_SALESORDER_CREATEFROMDAT2"
Hi Experts,
I am facing an issue when creating a sales order with FM "BAPI_SALESORDER_CREATEFROMDAT2" it is showing the error
V1 -761 as " unpermitted combination of BUS 2032 with Sales document category L" .
In VA01 ,if i provide the fallowing details
Sales org 1000
dist 10
div 10
item no 10 material-52 plant 1000 shipping point -0001 target qty-1,uOM-EA,weight unit-KG
billing date 11022011
pricing date-11022011
currency - GBP
shipping party -1
sold to party -1
buyer - 1
bill-to-party -1
it is creating the sales order.
what could be the problem with this BAPI..
Please help.
Regards
VishnuHi Vishnu,
First try with minimum data for header and item .Check the documentation of that bapi.
DATA:
Order partners
li_order_partners TYPE STANDARD TABLE OF bapiparnr,l_order_partners LIKE bapiparnr,l_order_header_in LIKE bapisdhd1,
li_order_items_in TYPE STANDARD TABLE OF bapisditm,l_order_items_in LIKE bapisditm,li_order_items_inx TYPE STANDARD TABLE OF bapisditmx,l_order_items_inx LIKE bapisditmx,return TYPE STANDARD TABLE OF bapiret2,l_return TYPE bapiret2,
l_vbeln LIKE bapivbeln-vbeln,
CLEAR l_order_partners.
l_order_partners-partn_role = 'AG'. "Remember German codes !
l_order_partners-partn_numb = '0000001032'.
APPEND l_order_partners TO li_order_partners.
Sales document type
l_order_header_in-doc_type = 'TA'. "Remember German codes !
l_order_header_inx-doc_type = 'X'.
Sales organization
l_order_header_in-sales_org = '1000'.
l_order_header_in-distr_chan = '10'.
l_order_header_in-division = '00'.
l_order_items_in-itm_number = '10'.
l_order_items_in-material = 'abcmaterial'.
l_order_items_in-comp_quant = '1'.
APPEND l_order_items_in TO li_order_items_in.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = l_order_header_in
IMPORTING
salesdocument = l_vbeln
TABLES
return = li_return
order_items_in = li_order_items_in
order_partners = li_order_part
WRITE: / l_vbeln.
IF l_errflag IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
For the above document type , sales organisation,distribution channel,division,customer,material check with you functional consultants and take the exact combination of data. That combination is very important.Please ask t if you need more help in this.
Regards,
Madhu.
Edited by: madhurao123 on Mar 3, 2011 5:11 AM -
LSMW Sales Order BAPI : Header & Item Text
Hi frenz,
I'm migrating Sales Order data using LSMW with BAPI method. We got four files...
one for header, one for item, one for header text, one for item text.
Now my problem is how do i update both header and item text.
B'cos while assigning structural relations we got only one text structure(E1BPSDTEXT) common for both header and item. So which source structure(whether header_text or item_text) should be assigned to this segment(E1BPSDTEXT)?
Else is there any other way to update both header and item texts?
With regards,
praveen.Unfortunately, you cannot assign more than one source structure to a target structure. But you can still manipulate the code. Here is how.
Let us say your source structure defined for item texts is ITEM_TEXTS. In your field mapping section for E1BPSDTEXT, double click the '__BEGIN_OF_RECORD__' in change mode. It will pop-up a warning message, say 'yes' and proceed. Remove all the coding that is there in this section, but copy the lines to somewhere(say x buffer) before you do that. You will need those lines below. Just add the following lines there.
if v_transferred_texts = 'X'.
*-- all the texts are transferred, don't need to process again.
skip_record.
endif.
You need to define 'v_transferred_texts' in the
'__GLOBAL_DATA__' section as follows.
data: v_transferred_texts type c.
Now double click on '_END_OF_RECORD_' in change mode. It will pop-up a warning, but you can say 'yes' and proceed. This will open up the coding window with one line of code in it 'transfer_record.'. Here you need to add your coding as follows.
*-- move the header texts
LOOP AT HEADER_TEXTS.
*-- This should <b>ALWAYS</b> be there
g_edidd_segnam = 'E2BPSDTEXT000'.
g_edidd_segnum = '0021'.
g_edidd_psgnum = '000001'.
g_edidd_hlevel = '02'.
clear E1BPSDTEXT.
*-- fill each field of the following fields
E1BPSDTEXT-DOC_NUMBER = SALESHEADER-ORDERNUMBER.
E1BPSDTEXT-ITM_NUMBER = '000000'.
E1BPSDTEXT-TEXT_ID = HEADER_TEXTS-TEXTID.
E1BPSDTEXT-LANGU = SY-LANGU.
E1BPSDTEXT-LANGU_ISO
E1BPSDTEXT-FORMAT_COL
E1BPSDTEXT-TEXT_LINE = HEADER_TEXTS-TEXT.
E1BPSDTEXT-FUNCTION = '005'.
transfer_record.
ENDLOOP.
*-- Now move the item texts
LOOP AT ITEM_TEXTS.
*-- This should <b>ALWAYS</b> be there
g_edidd_segnam = 'E2BPSDTEXT000'.
g_edidd_segnum = '0021'.
g_edidd_psgnum = '000001'.
g_edidd_hlevel = '02'.
clear E1BPSDTEXT.
*-- fill each field of the following fields
E1BPSDTEXT-DOC_NUMBER = SALESHEADER-ORDERNUMBER.
E1BPSDTEXT-ITM_NUMBER = ITEM_TEXTS-ITM_NUMBER.
E1BPSDTEXT-TEXT_ID = ITEM_TEXTS-TEXTID.
E1BPSDTEXT-LANGU = SY-LANGU.
* E1BPSDTEXT-LANGU_ISO =
* E1BPSDTEXT-FORMAT_COL
E1BPSDTEXT-TEXT_LINE = ITEM_TEXTS-TEXT.
E1BPSDTEXT-FUNCTION = '005'.
transfer_record.
ENDLOOP.
*-- set the flag that the texts have been transferred
v_transferred_texts = 'X'.
Please let me know how it goes.
Srinivas -
Very Urgent (Regarding Sales order)
Hi Experts!
I am stuck in a problem and I seriously need your comments/thoughts
I am calling BAPI_SALESORDER_CHANGE to update a sales document. Along with other updates, at the header level, i need to update the user status to 'planned' i.e status 11. In the context of the BAPI call, the user status update should happen. If for some reason the user status could not be updated, the BAPI COMMIT should not happen. Changes should roll back.
Has anybody came across such a situation? Is there any exit/enhancement which I can use for this purpose?
Any quick help will be highly appreciated.
ThanksHi Kiran
To update status of sales order, try using FM: STATUS_MAINTAIN.
Try doing as below:
1. Use the above FM to update Sales Order - Header/Item Status
2. Change sales order using : BAPI_SALESORDER_CHANGE for other changes.
3. Commit the changes
Kind Regards
Eswar -
Bapi For Blocked sales orders & Bapi for Releasing those orders
Hi All,
Can anybody help me regarding <b>Bapi</b> for getting <b>Blocked sales orders</b> and bapi for <b>releasing</b> those sales orders..
Any help will be rewarded...
Thanks..
Regards,
Srinivas.Use bapi:
BAPI_SALESORDER_GETLIST to get the list of all sales orders based on Parameters
CUSTOMER_NUMBER
SALES_ORGANIZATION
MATERIAL
DOCUMENT_DATE
DOCUMENT_DATE_TO
PURCHASE_ORDER
Then,
loop at the internal table
and use the bapi BAPI_SALESORDER_GETSTATUS to get the status of each sales order.
choose only which are blocked.
Regards,
ravi
Maybe you are looking for
-
Hi, We are trying evaluate the best command line PGP encryption software that we may be able to call from within PI 7.1I. Any recommendations regarding this are greatly appreciated. Thanks Teja
-
How do I cancel a purchase made in error?
I have accidentally purchased a magazine subscription which I do not want. How do I ask Itunes to cancel the order? Thank you.
-
Hi Fellows, as "User Guide - End-To-End Change Analysis" https://websmp107.sap-ag.de/~sapidb/011000358700000742402007E at topic 2.2 promises the EFWK to offer "an API for the Setup Wizard of Solution Manager Diagnostics (SMD) which will activate all
-
My county library is asking users to download Clean Access onto our computers. I've gone to the Clean Access page (NACS) and can't seem to recognize the right program. All that I've come across want a Cisco Tech support contract, but the client agent
-
Loading Hierarchy thru csv file
I was unable to load the hierarchies into BW 7.0 using a CSV data file. (1) It does not allow me to create a datasource for the hierarchies (source system: PC_File). (2) But i was able to create a datasource for the attributes (source system: PC_File