Create Sales order using ORDERS05 idoc
Hi Experts,
i need to create sales order from an external system using Idocs. we are using ORDERS05. We needs to save data in some custom fields. hence we have extended the idoc. But the Z* fields are not at the screen level. The function module 'IDOC_INPUT_ORDERS' uses call transaction and hence we are unable to save data in the Z fields.
Please advice some alternate approach.
We are looking into the possibility of using a custom function module and calling the create BAPI. Please advice is there is a better approach.
Thanks & Regards,
Amit
The process code ORDE does not use BAPIs. It uses call transaction to VA01. This is the reason i am facing the problem. The custom fields which i have are not in the VA01 screen.
The BAPi is called by IDOC_INPUT_SALESORDER_CREATEFR for message type SALESORDER_CREATEFROMDAT202. But i am not sure if this works.
Regards,
Amit
Similar Messages
-
Creating Sales Order using inbound IDOC
hi,
Using test tool WE19 if i create sales order in foregound no error occurs and order is created successfully but if i try to create in backgound it gives error "No batch input data for screen SAPMSSY0 0120".
please suggest a way out .I hope you do not have any popup windows during your order create, popups should be suppressed for batch-input.
try to run it in foreground and check if there is any warning message which forces you to press Enter once more to bypass it.
try to process it in "foreground after error" to see if it stops on any error/warning message. -
Creating Sales order using the IDocs.
Hi All,
I am looking to create a Sales Oredr from outside SAP syatem making use of the ALE-IDocs.
What should be the structure of the data to be recived from legacy system and what should be the settings (ALE).
Thanks In Advance....
Abhi.....How to input the data file from non-SAP into SAP, from which the Idocs will be generated...... there is a FM for this purpose.
-
Problem creating sales order using IDoc ORDERS05 (Inbound)
Hello Experts,
We are trying to create a sales order using the IDoc ORDERS05 with process code ORDE for creating sales order. I am getting the following error "VKORG, VTWEG, SPART cannot be determined for customer 0000006000 , vendor
Diagnosis
No sales organization, distribution channel or division were sent to the IDOC. This data is necessary if a sales order is to be added automatically. If this data is unavailable, you cannot create a sales order document.
I was not able to find the fields to fill the distribution channel and divison in the Idoc structure. I have filled in Sales organization in E1EDK14 segment as 3000.
I am not able to figure out the cause for the error.
Same data works fine from BAPI_SALESORDER_CREATEFROMDAT2.
Please help.
Thanks,
Suma
Edited by: Suma B on Jun 17, 2008 11:12 AMHello Suma
In this case I would recommend to debug the IDoc processing.
Call transaction WE19 and start the inbound processing of your IDoc in debugging mode. The error message will most likely occur in function module IDOC_INPUT_ORDERS.
LOOP AT idoc_contrl.
* SET/GET Parameter und interne Tabellen neu initialisieren
* initialize SET/GET Parameter and internal tables
PERFORM initialize_organizational_data.
* IDOC-Segmente in die entsprechenden Anwendungsdaten übernehmen
* Move IDOC to internal tables
PERFORM interpret_idoc_orders. "<= check here
* Prüfen ob gewisse Segmente gefüllt sind
* check IDOC-Segments
PERFORM check_idoc_segments. "<= check here
* Prüfen und Ermitteln von Organisationsdaten
* check internal tables and determine organization data
Regards
Uwe -
Creating a Purchase Order using ORDERS05 Idoc
Hi Experts,
I need to create a purchase order using ORDERS05 Idoc, with the data I am using a sales order is gettig created but I need to create a PO insted of SO.
Please let me know what is difference between a PO and SO while using ORDERS05. Also please let me know what are all the fields that needs to chaged in the Idoc.
Thanks,
SumaHi,
I'm looking at a similar problem, can we use ORDERS05 IDOC basic type to create a Purchase Order?
What is the inbound processing FM? I tried IDOC_INPUT_ORDRSP, but it seem to only allow changes to a PO, and not creation of a PO.
For IDOC_INPUT_ORDERS FM this one seem to only create Sales Orders?
Which inbound FM should i be using?
Regards. -
Hello,
I am getting this Error message"error determining posting period(infostructure S008,Variant Z2,RC3)" while creating Sales order from Inbound Idocs in the IDOC,which is affecting sales order creation.
While viewing this Info structure S008, I could see no records have been maintained. Wanted to know the reasons behind this Hard error?
Is it something related to Date Field used in the Update Rules for this Infostructure which is causing this posting period error?
Appreciate your inputs on this.
Thanks and Regards
Mohammed RoshanThank you Jelena,I checked the Ship. Delivery dates in the IDOC which are for Current Fiscal Year- 20140703 and 20140711,Could there be any other reason for this error?
Could it be an issue with e Update rule in this Infostructire S008
Secondly when we try change the update rule thru MC25 for this Infostructure S008,It gives a message"
"Maintenance of SAP standard updates not allowed"
Kindly advice
Thanks and Regards
Mohammed Roshan -
Creation of sales order using inbound idoc
hello all,
I have a scenario where i need to read data from a flat file, then create a sales order with the flat file data using IDOC. we can also create sales order using BAPI but the problem is that we need to handle serveral errors so we want to use IDOC.
we are trying to use the function modules 'Idoc_input_orders' but we are not sure how exactly we need to pass the parameters into the function module, actullays data control structure is asking for different parameters like partner, idoc number, idoc port etc which we need not have as we are processing it internally in the same system.
It would be great if some one could help me regarding.
Thanks
krishnam raju N
Message was edited by:
krishnam Raju N
krishnam Raju NHi,
see FUNCTION 'IDOC_INBOUND_FROM_FILE'
Regards,
Clemens -
Purchase Order triggering Sales Order using Inbound Idocs
Hi All,
Can any one explain the flow of Purchase Order triggering Sales Order using Inbound Idocs..??
Thanks & Regards
AnoopUse search tool to find sample like Integrating MM & SD Modules in Same Client to Create Sales order in Supplying Company Code Using PO raised in Receiving Company Code By I-Doc Message Type ORDERS Part1, Part 2 and Part 3.
Regards,
Raymond -
Setting user specific contract data while creating sales order using BAPI
Hi all,
I am creating sales order using BAPI - BAPI_SALESORDER_CREATEFROMDAT2.
Now my problem is that there is no structure for contract data (i.e. VEDA), system automatically set contract data using customization values.
I am doing some validations on cotract data in MV45AFZZ which fails, because these validations are performed on standard values, user specific values r not set.
How to handle this issue, your small clue may help a lot.
Regards,
S@meerHI
Pricing will be carried basing on the pricing
procedure.
Case1: Prices will be carried out automatically if
necessary condition records are maintained for the
condition type.
For this you can go to Sales Order-> Item Conditions
In the screen you can click on command button Analysis,
which gives you the list of condition types associated
to the pricing procedure. By clicking on the condition
type you can know the action that has taken place.
Case2: Manually forcing prices for Items.
To do this, you have to populate ORDER_CONDITIONS_IN &
ORDER_CONDITIONS_INX. Also note to identify the item
numbers, you manually pass the item number for each item
in the sales order, use the same item number for
populating conditions.
Parameters required:
ORDER_CONDITIONS_IN:
ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
ORDER_CONDITIONS_INX:
ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
Hope the above info helps you. Do revert back if you
need more info.
Kind Regards
Eswar -
PS Project description when creating sales order using BAPI
I am trying to create sales orders using BAPI_SALESORDER_CREATE_FROMDAT2.
Because of the material configuration in table TCN61 the material will trigger a project creation in the project system.
Now, in order to create a project, we must provide the project description.
I would like to ask you if anyone knows how to pass the project description in one of the BAPI parameters.
Thank you for your help.Thank you Sreedhar for the answer.
I tried the CAMPAIGN field but did not work...
In fact, I am not able to find a field, in any of the of the tables, that could hold the project description (PROJ-POST1).
An entry is created in PROJ table when we manually create a sales order for materials specified in table TCN61.
Thanks. -
Creating sales order using bapi
while creating sales order using bapi serial no is added in dat but its not saving.
plz replyHi
See tha sample code for sales order creation
SALES ORDER INPUT CREATION.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
PARAMETERS: p_spart TYPE vtweg OBLIGATORY.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
*ITEM
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
PARAMETERS: p_itcat TYPE pstyv OBLIGATORY.
DATA DECLARATIONS.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
HEADER DATA
header-doc_type = p_auart.
headerx-doc_type = 'X'.
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
PARTNER DATA
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
item-material = p_matnr.
itemx-material = 'X'.
item-plant = p_plant.
itemx-plant = 'X'.
item-target_qty = p_menge.
itemx-target_qty = 'X'.
item-target_qu = 'EA'.
itemx-target_qu = 'X'.
item-item_categ = p_itcat.
itemx-item_categ = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
after that check in the table VBAP whether serial number is cretaed or not
Reward points if useful
Regards
Anji -
Creating sales order using ' BAPI_SALESORDER_CREATEFROMDAT1'
Hi ,
i have a problem in creating sales order using ' BAPI_SALESORDER_CREATEFROMDAT1 ' .
order number is created and every thing unless the order quantity isn't created for material item .
my inputs are .
in "ORDER_HEADER_IN"
(DOC_TYPE , SALES_ORG , DISTR_CHAN , DIVISION ,SALES_OFF )
in " ORDER_ITEMS_IN"
(MATERIAL ,PLANT ,REQ_QTY )
in "ORDER_PARTNERS"
(PARTN_ROLE , PARTN_NUMB)
so the order created but as i say the the order quqntity isn't created for the material so the "net value and maertial net valve )
aren't calcoluted .
<< Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
waiting .
thanks for all
Edited by: Rob Burbank on Jan 7, 2011 4:28 PMHi Mr. Ahmed Tohamy,
my point is just create a schedule line with each item line. The relevant code we used was (excerpt)
perform bapi_map_filled using:
lv_matnr 'MATERIAL' space
changing ls_in ls_inx,
lv_tax_class1 'TAX_CLASS1' gc_true
changing ls_in ls_inx,
lv_qty 'TARGET_QTY' space
changing ls_in ls_inx, "QTY to item line
lv_qty 'REQ_QTY' space
changing ls_schdl ls_schdlx,"QTY to schedule line
lv_itm_number 'ITM_NUMBER' space
changing ls_in ls_dummy,
lv_itm_number 'ITM_NUMBER' space
changing ls_schdl ls_dummy,
lv_ref_doc_ca 'REF_DOC_CA' space
changing ls_in ls_inx,
lv_orderid 'ORDERID' space
changing ls_in ls_inx,
lv_ref_doc 'REF_DOC' space
changing ls_in ls_inx.
append:
ls_in to pt_order_items_in,
ls_inx to pt_order_items_inx,
ls_schdl to pt_order_schdl,
ls_schdlx to pt_order_schdlx.
Here the quantity is put to item line and schedule line, we always mark the correspoing X structure fields:
*& Form bapi_map_filled
* if the value passed is not initial, it is moved to the field
* and the corresponding (BAPI-) X-field is marked
* if no x-structure is required, a dummy structure is passed
* if p_initial parameter is filled, initial fields will be marked
* in x-structure. Purpose: transfer of initial values to BAPI
form bapi_map_filled using p_value type any
p_fieldname type fieldname
p_initial type flag
changing p_structure type any
p_structurex type any.
field-symbols:
<any> type any,
<c> type c.
check:
not ( p_value is initial and p_initial is initial ).
assign:
component p_fieldname of structure p_structure to <any>,
component p_fieldname of structure p_structurex to <c>.
<any> = p_value.
check <c> is assigned.
<c> = gc_true.
endform. " bapi_map_filled
Also, we did something to create conditions (i.e. tax) but I think that was project-specific.
We used BAPI_SALESORDER_CREATEFROMDAT2, I do not know about BAPI_SALESORDER_CREATEFROMDAT1.
Regards,
Clemens -
Issue in creating sales order using process_header API
Hi all,
We have a requirement to create sales order using apps adapter in ebiz from SOA suite composite.I used OE_ORDER_PUB.Process_header API to create order header.
When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
I cant identify where the problem is.Pls suggest me with the things to resolve this issue.
Thanks,
gouthamHi all,
We have a requirement to create sales order using apps adapter in ebiz from SOA suite composite.I used OE_ORDER_PUB.Process_header API to create order header.
When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
I cant identify where the problem is.Pls suggest me with the things to resolve this issue.
Thanks,
goutham -
How to create sales order using BAPI.
Hi all,
I am trying to create sales order using standard BAPI
"BAPI_SALESORDER_CREATEFROMDAT2". But, even I had entered all mandatory fields, I am unable to create sales order sucessfully.
I had gone through the documentaion of this BAPI and entered these fields.
These are the mandatory fields that which I had tried to create,
ORDER_HEADER_IN :
DOC_TYPE Sales document type
SALES_ORG Sales organization
DISTR_CHAN Distribution channel
DIVISION Division
ORDER_PARTNERS..:
PARTN_ROLE Partner role, SP sold-to party
PARTN_NUMB Customer number
ORDER_ITEMS_IN..:
MATERIAL Material number
Do we have anymore fields to give as inputs? I am getting this error message as below :
Msg: Personal number 00007176 does not exit.
But, I am not giving any personal number manually. This personal number was having connection with partner role field,
I had reffered this from the VBPA (Sales Document: Partner Table). Now, please suggest me how to solve this?
Can anyone tell me how to solve this problem and create sales order sucessfully.
Thanks in advance,
Surender Batlanki.hi surendra ,
chech with below code.
REPORT z_bapi_salesorder_create.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
let us know if you have any qauistions.
~linganna -
Creating sales order using BDC
I need to create sales order using BDC by reading material from material master(R/3) and customer from
customer master(R/3).
For example. combination should be like this
Customer1 + Material 1 = Sales order 1
Customer2 + Material 2 = Sales order 2
Other than customer and material, all other values are fixed... Could you please help me......Hi,
Better go for BDC rather then BAPI for this requirement.
Simply, record the transaction and upload the data, Hope you know how it works.
Try this, In case of any clarification feel free to reply.
Regards,
Vikas
Maybe you are looking for
-
How do I configure a counter to generate pulses using DAQmx?
How do I configure a counter to generate pulses using DAQmx? Is says in the DAQmx C reference help "CtrnInternalOutput-The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses o
-
Is it normal for me to be hearing the iPhone 6 fan/machine running from the speaker
when I put my ear To the iPhone 6 speakers I could hear the machine or the fan running loudly is that normal?
-
URGENT QUESTION concerning Pavilion DV6 laptop charger
Hey I have a question: I have two HP laptops; one is the Pavilion dv6 and has a charger with the series number PPP009L-E, with input 1.6A and 65W; The other laptop is the Pavilion dv6-3236NR, with the charger having the series number PPP009D, with in
-
Removing PDF options in print dialog box
When I bring up the print dialog box and click on "PDF" to go to the options for saving the document as PDF, how do I remove some of the options from that list? I installed software that put an option in that list, but I don't use the software so I w
-
Saving files crashes dreamweaver CS5 running 10.6.8...
Saving files crashes dreamweaver CS5 running 10.6.8...