Creating inbound Sales Orders IDOC within SAP
Hi,
I receive a flat file containing sales order information. I would like to create inbound Sales Order IDOCs from this flat file. I know I can use BAPI_SALESORDER_CREATEFROMDAT2 to create sales orders however I would like to retain the benefits of IDOCs e.g. error retention and re-processing.
There are a number of functions MASTERIDOC_CREATE* to create various IDOCs but I can't seem to find one for message type ORDERS. I know I can create a 'Z' version but would like to avoid that as much as possible as development budget is tight.
Any help would be greatly appreciated in the form of reward points.
Thanks and regards,
Liam
Hi,
Can u tell me the steps to create a sales order using idoc, i've created a bapi but thats a temprory use. I wanted to created a sales order automatically when a purchase order is saved.
Please let me know if u can help me, i wanted to do it using idoc
Regards
Sanju
Similar Messages
-
Sales Order iDoc from SAP SCM 7.0
Hi Experts
I have two question fro you guys.
1. Can we generate VMI sales order idoc from SAP SCM 7.0? I know is can generate xml message. If we can generate idoc for VMI sales order from SAP SCM , please give me some direction or path to explore.
2. Can I use idoc to to create to VMI sales order in ECC skiping CIF. But the changes in ECC to these order should use the CIF to update the VMI orders in SAP SCM.
Please share your experience on this.Hi,
Did you set up this scenario? I want something similar, but I want an ERP order to be created. Do you know if that is possible? Do you have som tips?
regards Camilla -
Message No.00088 while posting Inbound Sales Order Idoc.
Hello Experts,
I am working on Inbound Interface i.e inbound sales order via Biz talk. When BizTalk send one file contains all sales order related data .
When it comes to SAP, the Net price for PRICE condition type, getting an error message
Input must be in the format ___,___,__~.__V
Message no. 00088
Diagnosis
Your entry does not match the specified input format.
System Response
The entry in this field was rejected.
I already checked my User settings everything is ok. When I am manually putting it like 122.32 its working but when its came by file thru inbound interface I am getting the above error.
The Net price field is KOMV-KBETR.
Please help me out.
Waiting for your suggestions.
Thanks in Advance.
DevThanks for your reply.
Already check that thread & settings.
Still the error is there.
Manually its working only when data receive tru IDOC sysytem is throwing same error. -
Segment for WBS element in Inbound Sales Order Idoc
Hi gurus,
I am trying to create an inbound idoc for sales order ' VA01'. I need to populate WBS element in the item level under Account Assignment Tab. I am using ORDERS05 basic type. Please help to find which segment to use for WBS element. Waiting for your reply. Please help.
Regards,
SatyajitHello,
As far as I know, there is no Segment / Field definition in ORDERS05 for WBS Element as it is not mandatory information to be filled in order for the Sales Order to be Complete. So, you need to create an Extension of the IDoc Type ORDERS05. For your requirement, here is the Approach I have.
1. Create an extension for IDoc Type ORDERS05 to ZORDER05 with a Custom Segment Z1EDP01 in which you'll have the Custom Field Name VBAP-PS_PSP_PNR which is the WBS Element field in VBAP Table.
2. Now, use the Customer Exit EXIT_SAPLVEDA_001 in the Enhancement VEDA0001 in which you can actually populate the Field WBS Element that would be already available in the Inbound IDoc to store it in a Work Area. As you are aware, you'll need to create a Project in CMOD for the same.
3. Export the same to some MEMORY ID 'XXX'.
4. Come back to the Selection Program for ORDER05 which is IDOC_INPUT_ORDERS in which you'll find the below CASE Statement.
CASE xaprau.
WHEN ' '.
PERFORM call_va01_new_orders USING ok.
WHEN 'Q'.
Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Angebot
call transaction Order Entry VA01 with refer to quote number.
PERFORM call_va01_new_orders_angbt USING ok.
WHEN 'C'.
Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Kontrakt
call transaction Order Entry VA01 with refer to contract number
PERFORM call_va01_new_orders_contk USING ok.
WHEN 'L'.
5. Now, since our Standard Order Type (VBAK-VBTYP) is 'C',
we'll have to choose the Subroutine for the 'C' Option.
6. In this Subroutine, there is another Subroutine va01_dynpro_kopf_kaufmann_kde2 which is for populating Custom Dynpro Fields for the Sales Order. So, we need to choose the same Subroutine inside which we have to Create an Enhancement Implementation.
7. In this Enhancement Implementation (Implicit), we have to IMPORT the value of the WBS Element which was exported in the Customer Exit.
8. Check if it is initial. If it is not, then Call the Perform as below.
IF NOT WA_Z1EDP01 IS INITIAL. "Checking if the Segment
" is Empty
PERFORM DYNPRO_SETZEN USING 'COBL-PS_POSID' WA_Z1EDP01-ZZWBSELEMENT.
ENDIF.
9. Since the Sales Orders are posting using BDC here, by calling the above Subroutine DYNPRO_xxx, we are appending our Custom Segment / Field value to the BDC_DATA table.
10. In Step 8, I've given the Notation for Work Area. It will also be applicable when there are multiple Line Items. All you have to do is to EXPORT an Internal Table instead of Work Area and use the same here for each Line Item.
11. I've given you above procedure because I've worked on similar requirement in which I had to populate the Special Processing Indicator instead of WBS Element.
Hope it would be helpful for you.
Thanks and Regards,
Venkat Phani Prasad Konduri -
Inbound Sales Order IDoc ORDERS05
Hi there,
I'm using the Idoc ORDERS05 Process Code ORDE to create Sales Order, all the process it's working perfectly. I would like to know if I can fill the header text of the order using the Idoc. The FM that I'm using is IDOC_INPUT_ORDERS
I have included in the idoc the following segments:
E1EDKT1 003 EN 0001 0001
E1EDKT2 XXXXXXXXXXXXXXXXX
but the header text in the order created is empty.
Any idea about this, thanks in advance.
Alexis RamirezHello Alexis
Below you see part of the XSLT mapping (on SAP-XI) for EDI purchase orders which are mapped to ORDERS.ORDERS05 IDocs (-> sales order).
I assume that in your case the name of TDOBJNAME (here = 'String') is missing.
<E1EDKT1 SEGMENT="1">
<TDID>Z091</TDID>
<TSSPRAS>D</TSSPRAS>
<TSSPRAS_ISO>DE</TSSPRAS_ISO>
<TDOBJECT>VBBK</TDOBJECT>
<TDOBNAME>String</TDOBNAME>
<E1EDKT2 SEGMENT="1">
<TDLINE>
<xsl:if test="../S_UNB/C_S002/D_0004='12345'">
<xsl:value-of select="S_BGM/D_1004"/>
<xsl:text>/RY</xsl:text>
</xsl:if>
<xsl:value-of select="S_FTX/C_C108/D_4440"/>
</TDLINE>
<TDFORMAT/>
</E1EDKT2>
</E1EDKT1>
Regards
Uwe -
Sales Order IDOC creation using IDOC_INPUT_ORDERS
I am trying to create a Sales order IDOC (Inbound) from a flat file using the FM - IDOC_INPUT_ORDERS .
I am able to create the sales order. But I don't see the idoc getting generated anywhere.
I see the import parameter - DOCUMENT_NUMBER coming blank. Why is the IDOC not getting generated ?
Any tips will be useful ?
Can we create Inbound SAles Order IDOC using 'MASTER_DISTRIBUTE_IDOC' FM ?
THanks.Hi Shareen Hegde
To create Inbound...idoc
Use the Function Module in you Program : IDOC_INBOUND_WRITE_TO_DB to create the Inbound idoc
Pass the Control record and Data record in FM.....
Use Message type : Orders
IDoc type : Orders01 or 02 or 03 or 04 or 05 .... which ever suite for your requirement....
Process Code : ORDE
When ever your custom program for creating the inbound sales order with runs .....
it call the internally FM IDOC_INPUT_ORDERS to create the Sales order...
or
If you are getting the inbound idoc from subsystem .....then check you partner profile ,Message type ed and Process code is correct or not....
I hope this resolves your issuse..
Ramesh -
Sales Order creation using SAP NCo 3.0 x64
Hi,
I have been trying to create a sales order using the SAP NCo from Visual Studio (C#) and I'm stuck.
The code I have used is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SAP.Middleware.Connector;
namespace ConsoleApplication2
class Program : IDestinationConfiguration
static void Main(string[] args)
RfcDestinationManager.RegisterDestinationConfiguration(new Program());
RfcDestination destination = RfcDestinationManager.GetDestination("EHP6");
try
RfcRepository repo = destination.Repository;
IRfcFunction salesDoc = repo.CreateFunction("BAPI_SALESORDER_CREATEFROMDAT2");
IRfcFunction salesDocCommit = repo.CreateFunction("BAPI_TRANSACTION_COMMIT");
IRfcStructure salesHeader = salesDoc.GetStructure("ORDER_HEADER_IN");
IRfcTable salesItems = salesDoc.GetTable("ORDER_ITEMS_IN");
IRfcTable salesPartners = salesDoc.GetTable("ORDER_PARTNERS");
IRfcStructure salesItemsStruct = salesItems.Metadata.LineType.CreateStructure();
IRfcStructure salesPartnersStruct = salesPartners.Metadata.LineType.CreateStructure();
//Sales Header
salesHeader.SetValue("DOC_TYPE", "MOR");
salesHeader.SetValue("DOC_DATE", Convert.ToDateTime("2014-06-19"));
salesHeader.SetValue("SALES_ORG", "M210");
salesHeader.SetValue("DISTR_CHAN", "01");
salesHeader.SetValue("DIVISION", "M1");
salesHeader.SetValue("CURRENCY", "USD");
//Sales Items
salesItemsStruct.SetValue("ITM_NUMBER", "000010");
salesItemsStruct.SetValue("MATERIAL", "MP_SHEET_22");
salesItemsStruct.SetValue("SHORT_TEXT", "Sheet Grade B, BWT 20lb/75gsm");
salesItemsStruct.SetValue("PLANT", "M210");
salesItemsStruct.SetValue("TARGET_QTY", "2000");
salesItemsStruct.SetValue("TARGET_QU","LBR");
salesItemsStruct.SetValue("TARGET_VAL", "11655.67");
// Partner
salesPartnersStruct.SetValue("PARTN_ROLE", "SP");
salesPartnersStruct.SetValue("PARTN_NUMB", "MP-CUST201");
RfcSessionManager.BeginContext(destination);
salesDoc.Invoke(destination);
salesDocCommit.Invoke(destination);
RfcSessionManager.EndContext(destination);
Console.WriteLine("Sales Order Created!!");
Console.ReadLine();
catch (RfcCommunicationException e)
e.ToString();
Console.WriteLine(e);
Console.ReadLine();
catch (RfcLogonException e)
e.ToString();
Console.WriteLine(e);
Console.ReadLine();
catch (RfcAbapRuntimeException e)
e.ToString();
Console.WriteLine(e);
Console.ReadLine();
catch (RfcAbapBaseException e)
e.ToString();
Console.WriteLine(e);
Console.ReadLine();
public RfcConfigParameters GetParameters(String destinationName)
if ("EHP6".Equals(destinationName))
RfcConfigParameters parms = new RfcConfigParameters();
parms.Add(RfcConfigParameters.AppServerHost, "xx.xxx.xxx.xx");
parms.Add(RfcConfigParameters.SystemNumber, "00");
parms.Add(RfcConfigParameters.SystemID, "IE6");
parms.Add(RfcConfigParameters.User, "user");
parms.Add(RfcConfigParameters.Password, "password");
parms.Add(RfcConfigParameters.Client, "800");
parms.Add(RfcConfigParameters.Language, "EN");
return parms;
else return null;
It returns me no error and even displays "Sales Order Created!!" from the try block. But when I check in VBAK, no Sales Order is being created.
Can somebody help me understand, if I have missed out something or if I'm going wrong somewhere?
All dependencies have been added correctly, platform being set to x64. No build/run-time errors.Hi Sreyan Choudhury
have you check if you have completed all the mandatory field?
the partner "SP" is the customer in your system?
here an example on how I've used this bapi in a webdynpro:
* Order Header Details
CLEAR w_order_header_in.
w_order_header_in-doc_type = zauart.
w_order_header_in-sales_org = zvkorg.
w_order_header_in-distr_chan = stru_order_header-distr_chan.
w_order_header_in-division = 'GN'.
w_order_header_in-purch_no_c = stru_order_header-purch_no_s.
w_order_header_in-purch_no_s = stru_order_header-purch_no_s.
w_order_header_in-sales_grp = zvkgrp.
w_order_header_in-sales_off = zvkbur.
w_order_header_in-compl_dlv = stru_order_header-compl_dlv.
w_order_header_in-req_date_h = stru_order_header-req_date_h.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_order_items_in-material
IMPORTING
output = w_order_items_in-material.
* Order Partner Details
CLEAR: i_order_partners,w_order_partners.
w_order_partners-partn_role = 'AG'.
w_order_partners-partn_numb = stru_order_partners-partn_numb.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_order_partners-partn_numb
IMPORTING
output = w_order_partners-partn_numb.
APPEND w_order_partners TO i_order_partners.
*partener roles
SELECT * INTO w_agenti FROM zagenti WHERE vkgrp = zvkgrp.
CLEAR w_order_partners.
w_order_partners-partn_role = w_agenti-parvw.
w_order_partners-partn_numb = w_agenti-lifnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_order_partners-partn_numb
IMPORTING
output = w_order_partners-partn_numb.
APPEND w_order_partners TO i_order_partners.
ENDSELECT.
* Order Items
LOOP AT stru_order_items INTO i_order_items.
CLEAR: w_order_items_in.
MOVE-CORRESPONDING i_order_items TO w_order_items_in.
w_order_items_in-store_loc = i_order_items-lgort.
w_order_items_in-itm_number = sy-tabix * 10.
w_order_items_in-item_categ = 'TAN'.
w_order_items_in-ship_point = 'LS00'.
w_order_items_in-plant = 'DS00'.
APPEND w_order_items_in TO i_order_items_in.
w_order_items_inx-itm_number = w_order_items_in-itm_number.
w_order_items_inx-target_qty = 'X'.
w_order_items_inx-item_categ = 'X'.
w_order_items_inx-ship_point = 'X'.
w_order_items_inx-plant = 'X'.
IF w_order_items_in-batch IS NOT INITIAL.
w_order_items_inx-batch = 'X'.
ENDIF.
IF w_order_items_in-store_loc IS NOT INITIAL.
w_order_items_inx-store_loc = 'X'.
ENDIF.
APPEND w_order_items_inx TO i_order_items_inx.
w_order_schedules_in-itm_number = w_order_items_in-itm_number.
w_order_schedules_in-sched_line = '0001'.
w_order_schedules_in-req_qty = w_order_items_in-target_qty.
APPEND w_order_schedules_in TO i_order_schedules_in.
w_order_schedules_inx-itm_number = w_order_items_in-itm_number.
w_order_schedules_inx-sched_line = '0001'.
w_order_schedules_inx-req_qty = 'X'.
w_order_schedules_inx-updateflag = 'I'.
APPEND w_order_schedules_inx TO i_order_schedules_inx.
* Order Condition Details
IF i_order_items-prriga <> i_order_items-prnet AND
i_order_items-prriga <> i_order_items-prbase.
CLEAR: w_order_conditions_in.
w_order_conditions_in-itm_number = w_order_items_in-itm_number.
w_order_conditions_in-cond_type = 'ZMAN'. “manual
price condition
w_order_conditions_in-cond_value = i_order_items-prriga / 10.
APPEND w_order_conditions_in TO i_order_conditions_in.
ENDIF.
DATA: v_message_riga TYPE string.
* Get message manager
DATA: l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager.
l_current_controller ?= wd_this->wd_get_api( ).
CALL METHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
IF i_order_items-prriga = 0 AND i_order_items-omaggio = ''.
CONCATENATE 'Error during the creation '
'empty line INTO v_message_riga.
* v_message_riga = 'Errore durante la creazione. Riga non
*valorizzata'.
* Report Error message
CALL METHOD l_message_manager->report_error_message
EXPORTING
message_text = v_message_riga.
i_bloccasalva = 'X'.
ENDIF.
ENDLOOP. -
Inbound ORDERS05 IDoc - Create SD Sales Order (EDI)
I having an issue in inbound ORDERS05 IDoc processing to create SD sales order where the sales unit of measure for the material is getting lost/replaced. We are sending sales unit of measure in the E1EDP01-MENEE field, we are also sending the material UPC in teh E1EDP19 (003) segment relying on UPC material determination rules to resolve the material for the sales order. During this process of material determination the sales unit of measure is getting lost/replaced. I know as if we send the actual SAP material in the E1EDP19 segment (no material determination required) the sales unit of measure is unchanged. In this SAP system multiple sales unit of measure are maintained for each individual UPC code. Just looking for input on where to look to resolve this, config, user exits, etc..
I can't say for sure what you should be doing, as I don't know how you have setup your material master, or how your Customers order. We have some Customers that always want EAches, some that always want OUTers, then some who want whatever UOM is assigned to the GTIN (UPC) that they order, which could be one of several. We have our custom code in ZXVEDU03.
Cheers, Paul. -
How to get know the Sales Order IDOC#, if I know the created Sales Order#?
Hi Experts,
Let me know that, How to get know the IODC #, if I know the Sales Order#?
Scenario is that, sales order(say 12345678) was created from Inbound EDI. I also Know the MATERIAL too.
So, How to pull the associated Inbound ORDERS idoc, which is created this Sales order-12345678?
Is it from EDID4 table? or EDIDC? or any thing else?
reples r appreciated.
thanq
Edited by: SAP ABAPer on Sep 8, 2008 5:29 AMHello
This can be done much easier using fm SREL_GET_NEXT_NEIGHBORS:
Input:
OBJECT-OBJKEY = <number of sales order> " with leading zeros!!!
OBJECT-OBJTYPE = 'BUS2032'
MAX_HOPS = '01'
Result:
NEIGHBORS-OBJKEY = <IDoc number with leading zeros>
NEIGHBORS-OBJTYPE = 'IDOC'
NEIGHBORS-ROLETYPE = 'INIDOC'.
Regards
Uwe -
How to create a sales order having incomplete non-sap data as input start
We have facing the following problem in our company. We have a non-SAP system where we pull data from. We built a webservice that enables a user to pull data from the non-sap sustem by entering a key value (e.g. project number). Pulling the non-sap data is not a problem. However, once the user have pulled the data via the webservice, this data (e.g. material number, qty and sales unit) needs to be transfered to the va01 screen directly. The user will have to complete the missing master data like sold to party, ship to party, customer PO number etc. Then by hitting enter standard SAP will run and if everything is OK, the user has to save the order and a sales order number will be created. We know there a lot of techniques that can be used like Idoc, BAPI, XML, RFC. We have XI, Adobe and Portal available. Does somebody have an idea for a solid solution to get this to work?
kind regards
Angelique HeutinckYou want to Create Sales Order thru VA01 after puling the data from NonSAP system. Moreover you want that the Incomplete Sales Order will be saved.
if thats the requirement - I ll suggest
While doing VA01 - start from Create with reference Sales order. in that case default Sales Orders will be automatically created and using the BDC you can change the items or Customers you want to change. Once the Order number is created properly - u r free to change eveything of that Order.
Otherwise calling BAPI / RFC for creating the sales orders is the most safest way of achieving it. But again if you dont have the complete data - calling RFC or BAPI does not make much sense. because they will fail to create the Sales Order in case u dont fill up the mandatory fields. -
How to create a sales order using PO ALE Idoc
Hi,
I have a purchase order in my ECC6 system, and output for this PO is ALE idoc.
Now I want to create a Sales order using that Idoc in the same system,
can anbody please tell the procedure
sreeramDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
Use BAPI_SALESORDER_CREATEFROMDAT1 .
To build a reference to your contract you have to supply ORDER_HEADER_IN.
Here´s a sample:
MOVE:
gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
gs_vbak-auart TO ls_bapisdhd1-refdoctype.
also gothrouh the links
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi -
IDoc type in GTS to create a sales Order
Hi Gurus,
Is there any Inbound IDoc type in GTS that can be used to create a sales order. I Know that sales orders are created in ECC system, but still want to know if there is any Idoc type in GTS that has the segments with fields of a sales Order.
Thanks in Advance,
SamHi Sam,
No, there is nothing available as standard. There would be little point in "hi-jacking" the iDoc for GTS Customs Declarations because it would be unknown in your external system. You could consider using the very general /SAPSLL/CCEABI01, but it might be easier to build the standard ORDERSP or similar in GTS. In any case, there is no inbound Function Module available to process the received iDoc, so you would have to write code to parse and process the iDoc.
The best approach would be to use the API if possible, and employ RFC techniques to call Function Module /SAPSLL/API_6800_SYNCH - the standard call for Sales Orders transferred from the ERP system.
Sorry that I don't have better news. Anyone else have suggestions?
Regards,
Dave -
When idoc failes for inbound sales orders then how to trigger a mail notifi
Hi All,
When idoc failes for inbound sales orders in SAP then i would like to send an email notificaiton to particular user id. Could you please let me know the settings for this requirement.
Thanks in advance..Closing thread as there are no replies
-
Crating multiple sales orders based on one inbound purchase order idoc
Hi All,
I have a requirement to create multiple sales orders based on single inbound PO idoc.Please let me know whether is it possible or not?
Regards
maheshHi Mahesh,
What is your crieteria for different SO's ?
Regards
Megha -
To create the Sales Order based on PO IDOC.
Hi Experts,
The requirement is based on the generated PO IDoc, I have to create the Sales Order.
Say Ex: Consider the Client 130. Here I have changed the PO 4500017195 by giving the Medium as EDI in the messages and saved the PO.
As a result of that IDoc got generated at the port. Now using this IDoc I have to create the Sales Order in the same 130 client.
Thanks in Advance.now read the same IDOC..configure it for inbound process code in WE20...or you can create a report...call the created idoc using process code of SO...
regards,
madan
Maybe you are looking for
-
Can not query PQH_BUDGET_DETAILS in SQL*Plus
Hi! I can see the Positions in the Forms-Mask within EBS. I want to write a concurrent Programm which queries some data form the positions-table. If i klick on "Help > Diagnostics > Examine" and select "system.last_query" i can see, that the data com
-
Oracle 10g discoverer and report services installation issue
Hi Could some one help me in finding the solution for the problem while installing oracle 10g discoverer and report services installation .. at configuration assistants the opmn configuration failed.. could some one suggest the possible solution for
-
Cannot export photos from Elements so they will sync on ITunes to IPad
After I have edited my photos in Photoshop Elements the export button is grayed out so I cannot export my photos like I used to in Lightroom. I can save them but when I try to sync the photos using ITunes to my IPad. the photos are not imported. I ju
-
Mavericks 10.9.3 Update Has Disabled Two of My Quad Monitors
I have a Mac Pro 2014 with four 24 inch monitors attached. Two of them are DVI monitors, two of them are HDMI. 3 of them are attached to thunderbolt connections with Active Display Port conversion kits, one is plugged directly into the HDMI port.
-
Function module for Create service order with reference to sales doc (RAS )
Hi All, I have to create a service order (type SM03) with reference to sales document (doc type RAS, in other way it is called as repair order). I have used function module 'ALM_ME_ORDER_CREATE' && 'CO_ZV_ORDER_POST' to create service order and its w