IDoc and creation of sales order!!
Hi,
I need to create sales order using IDoc and the file will have multiple line items for sales order and it has to be dynamic, so whats the best way to do this?
Regards
Gunjan
Hi
Check for the related IDOC types in EDBAS table and for related Message Types
in table EDMSG. take relavent one for your requirement and use.
Data Creation in Idoc
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
IDoc is a intermediate document to exchange data between two SAP Systems.
*IDocs are structured ASCII files (or a virtual equivalent).
*Electronic Interchange Document
*They are the file format used by SAP R/3 to exchange data with foreign systems.
*Data Is transmitted in ASCII format, i.e. human readable form
*IDocs exchange messages
*IDocs are used like classical interface files
IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
FOr testing you can use WE19.
How to create idoc?
*WE30 - you can create a IDOC type
For more information in details on the same along with the examples can be viewed on:
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
http://www.sappoint.com/presentation.html
http://www.allsaplinks.com/idoc_search.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.erpgenie.com/sapedi/idoc_abap.htm
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Check these out..
Re: How to create IDOC
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
go trough these links.
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
imp links
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
www.sappoint.com
--here u can find the ppts and basic seetings for ALE
http://sappoint.com/presentation.html
www.sapgenie.com
http://www.sapgenie.com/ale/index.htm
Reward points if useful
Regards
Anji
Similar Messages
-
How to generate IDOC while creation of Sales Orders
Hi
If i create a sales order means.. i want to trigger a IDOC with this ORDER data .. how can we do this.. when ever i'm creating a sales order it should be automatically trigger a IDOC , Because ehen ever sales ordre was created in R/3 system it should be transferred to some destination.. all the ALE configurations are done.. .
so, how can we trigger an IDOC based on Orders creation..
Thanks
BabuHi,
Here is the link
[Re: Idoc creation;
Regards
Sudheer -
Sending Order Number via IDOC upon creation of Sales Order
Hi Experts,
I have a requirement where i receive an order from an external system to SAP as an IDOC.
Upon arrival, i have to create the Order in SAP and send the Order Number back to the external system in the form of IDOC.
How can i accomplish this? Kindly share your expertise on this with me.
Thanks in advance.
Regards,
KeerthiHi Gary,
Now when the Order is posted in SAP, i need a method which will automatically trigger the Outbound IDOC from SAP rather than me doing so manually.
Is there a way i can track the creation of the Order in SAP and somehow configure SAP to trigger the Outbound IDOC with the Order number automatically?
Thanks in advance,
Keerthi -
Creation of Sales Order and Service Contract from Inbound IDOC
Hi Experts,
My requirement is to create a Sales Order as well as a Service Contract from one Inbound IDOC. I am getting the Inbound IDOC from a third Party. The message type is ORDERS and Basic Type is ORDERS02. How ever i am using an extension type IDOC which carries all the required data for Sales Order and Service Contract. My requirement is like, to create a Sales Order first.
I have created a Z FM which is attached to the Process Code and subsequently to the message type. Inside the FM i an calling FM 'IDOC_INPUT_ORDERS' for creation of Sales Order. After that i am changing the IDOC data for the Document Type. I am changing the document type which is responsible for Contract Creation.
Then I am again calling the FM 'IDOC_INPUT_ORDERS' for creation of Contract with the help of IDOC data. But here the Contract is not getting created. It's getting failed during the Batch input session.
I need to solve this problem as soon as possible. Please help me. If there are any other options also please share.
Thanks in Advance.
Regards,
PriyabrataActually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
Regards,
Priyabrata -
Idoc generated for creation of sales order
Hi all,
In my project we have two different boxes-I and B.When a purchase order is created in I Box an idoc is triggered which goes to the B Box and creates a sales order.I want to do some changes in E1EDKA1 and E1EDPA1 segment in the idoc in I Box so that when it goes to B Box it will show the changed one.For example if there is EN in E1EDKA1 and E1EDPA1 segment then in B Box it will be appeared as ZA.I need to know that for this change I have to do the coding changes in which USER EXIT?The function module which is triggered during the sales order creation in B Box is IDOC_INPUT_ORDERS.
Thanks in advance
RajHi Raj,
go to se37..
enter the function module and after each segement append there is a customer exit and badi is available to add you custom code..
in the user exit read the segement and modify the segemnt data..
these are the below exits available for the Orders
ORDCHG I VEDB0001 Sales Ord. Change
ORDERS I VEDA0001 Sales Orders "this is the user exit for you to code..
ORDRSP I MM06E001 Order Response for
Purchase Order
search-- CALL CUSTOMER-FUNCTION '011'--Fm--EXIT_SAPLVEDA_011--include--INCLUDE ZXVEDU13.
Regards,
Prabhudas -
Creation of sales order in CRM and replicating it to Multiple ECC system.
We have a requirement for creation of sales order in CRM and replicating it to Multiple ECC system.
We have checked the following standard Adapter objects in transaction R3AC1.
BUS_TRANS_MSG
The initial flow contexts does not support target site type as R/3(SMOF_ ERPSITE). So we are not able to replicate the sales order from CRM
to ECC.
2. SALESDOCUMENT
Here the initial flow contexts does not support flow from CRM -> R/3 as we don’t see the target site as CRM.
Please let us know if the standard sap middleware objects don’t support the sales order flow from CRM to multiple ECC or is there any
other adapter object we need to use for this.Hey Vijay Duvvada,
I hope you are already referred below sap note and which explains scope & how to do -
1084315 - Consulting: Information about the multiple backend scenario
1763516 - How-to: Basic Setup of MEP
As explained by Rohit Sharma data should be start flowing to multiple sites.
please let me know if it does help.
Regards,
Arjun -
Auto Creation of Delivery with PGI and Billing after creation of Sale Order
Dear Experts,
I am having one Req. like...After creation of sales order ..automatic Delivery and Billing should be done.
Right now i m able to create automatic Delivery but PGI is not happening for that delivery.
Is there any configuration I have to do ... or by any user exit we can get the solution.
Can u please provide me solution for this.
Regards,
Sanket.Hello,
yes, you can create the PGI Atomatically by BATCH JOB using the program nder the VL23 transaction code.
Goto the Transaction code SM36 to create a job for the program SAPMSSY0 which is the program for the AUTO PGI
create a variant for the Delivery document types and sales organisation combinatioans and add this variant to the bath job created in SM36.
Set the time of the Job to run after every 5 minutes, so once the job exected it will pcik all the Deliveries which are pending for the PGI.
After the PGI done you can run SDBILLDL program to create the Billing for all the document which were cleared and due for Billing.
Hope it is clear for yo, please revert if you need frther clarification .
santosh -
What is the IDOC Basic Type for sales order creation
Hi Experts,
Can anyone tell me Idoc Basic type for sales order creation.
Thanks
PrashantHi,
The basic types for creating the order are:
1.Orders01
2.Orders02
3.Orders03
4.Orders04
5.Orders05.
The basic type for SIS order is:
SISCSO01.
Regards,
Krishna. -
Creation of sales order from idoc; items referencing to different contracts
Hi All,
My requirement is to create sales order from an idoc.
IF a sale order contains multiple items , then the order should be created with contract referenced
-at the So item level, the valid contract found for each material is different
hence am not able to use the following bapis
BAPI_SALESORDER_CREATEFROMDAT2 is not triggering the copy controls.
BAPI_SALESDOCUMENT_COPY i can give only one reference document
Please help
Thanks
DeepaHi Deepa,
Following link can help you for creating sales order with reference
http://msdn.microsoft.com/en-us/library/cc185190.aspx
http://www.sap-img.com/fu036.htm
Award points if useful
Thanks,
Ravee.. -
Find the user exit while creation and change of sales order
Hi Team
Below mentioned requirement , in which user exit i have to put below logic while creaion and change of sales order?
u2022 The logic for the user exit to explode should consider the following assumptions and validations
o Customer master to have the entry at KNVV-KVGR1
o Material master to have the entry at MVKE
o UoM in the Sales order item (VBAP- VRKME) should be = Pallets PAL or tonnes (TES)
o Should have more than one line item or number of line items with UoM PAL or tonnes TES should be > 1
for example :-->
Product A with Scales mentioned below
Product A Quantity / Scale UoM Price(£)
0-10 PAL/TES 20
11- 20 PAL/TES 10
21- 30 PAL/TES 5
31-40 PAL/TES 2.5
>41 PAL/TES
Product B with Scales mentioned below
Product B Quantity / Scale UoM Price(£)
0-15 PAL/TES 25
16-20 PAL/TES 20
21- 30 PAL/TES 15
31-40 PAL/TES 10
> 41 PAL/TES 5
u2022 Product A (qty 10PAL) + Product B (qty 15 pal) ordered in a single order with 2 line items.
u2022 The expected results should be
o Product A qty 10 + B qty 15 added = 25Pal
o The system user exit should add the total number of pallets on the order line items and point towards the respective scales, so in this example prices against each line item should be the respective price against 25 Pal = 5£ for product A per pal and £15 for product B.
Thanks in Advance.
Puneet.Hi Team
Below mentioned requirement , in which user exit i have to put below logic while creaion and change of sales order?
u2022 The logic for the user exit to explode should consider the following assumptions and validations
o Customer master to have the entry at KNVV-KVGR1
o Material master to have the entry at MVKE
o UoM in the Sales order item (VBAP- VRKME) should be = Pallets PAL or tonnes (TES)
o Should have more than one line item or number of line items with UoM PAL or tonnes TES should be > 1
for example :-->
Product A with Scales mentioned below
Product A Quantity / Scale UoM Price(£)
0-10 PAL/TES 20
11- 20 PAL/TES 10
21- 30 PAL/TES 5
31-40 PAL/TES 2.5
>41 PAL/TES
Product B with Scales mentioned below
Product B Quantity / Scale UoM Price(£)
0-15 PAL/TES 25
16-20 PAL/TES 20
21- 30 PAL/TES 15
31-40 PAL/TES 10
41 PAL/TES 5
u2022 Product A (qty 10PAL) + Product B (qty 15 pal) ordered in a single order with 2 line items.
u2022 The expected results should be
o Product A qty 10 + B qty 15 added = 25Pal
o The system user exit should add the total number of pallets on the order line items and point towards the respective scales, so in this example prices against each line item should be the respective price against 25 Pal = 5£ for product A per pal and £15 for product B.
Thanks in Advance.
Puneet. -
Sample bom creation and explosion in sales order
hi,
can any one help to create a simple bom with atleast one sub item for the bom and create a sales order in which the bom explodes ( i mean when u enter the main bom item it should list its sub items as its line item below it)...
(also mention what item categories are to be taken care ... )
rewards for sure
thanks
mmnHi MMn,
Bill of materials (BOM)
1. In the SAP System, you can use BOMs to represent different objects (such as materials, equipment, functional location BOMs, and documents) and to maintain object-specific data.
2. Document BOM: A complex document may be made up of several documents, such as a program, technical drawings, papers, and photographs. These related information and documentation objects are grouped together as a unit using a document structure a BOM for a document.
3. Equipment BOMs are used to describe the structure of equipment and to assign spare parts to equipment for maintenance purposes. Bills of material for functional locations group together the elements of a technical structure, such as the functional unit of an entire plant.
4. You work with order BOMs when you specially tailor the make-to-order production of your products to the requirements of your customers. In order to meet the customer requirements, sales order specific modifications to various assemblies are often required. Furthermore, assemblies are often specially constructed for a particular sales order.
5. Before you can create a BOM for the component parts of an object, the object must have a valid master record in your system.
6. A bill of material that you create for a material is known as a material BOM in the SAP System. A BOM explosion answers the question: What is the product made of? This question arises in various situations, such as when you want to:
Determine material requirements for a product
Look at the overall structure of a product in a design department
See an overview of the parts and materials required
Calculate the effects of changes to costs
7. BOM is a collection of materials that make up a product. For example computer, home theatre system. Material BOM is complex and is dependent on sales and distribution, material management or production planning.
8. The most important rule is that the material type has to be a FINISHED PRODUCT (FERT) in order to categorise it as a BOM.
9. BOM processing is divided into two different ways either at the MAIN item level if the item is assembled or at the sub-item level (i.e. at the component level) if the material is not assembled.
10. BOM is configured at the item category level (VOV7) and transaction code to create a BOM is CS01.
11. In case of single level BOM, main item categories TAQ and TAP should represent single level BOM in VOV7 and in case of multi level BOM, the main item categories should represent multi level BOM.
Main item level processing
1. The material master records should have the item category group ERLA in the sales org.2 screen of the finished product. In this case, the associated sub items function only as text items, and thus are not relevant for delivery. This process ensures that pricing, inventory control and delivery processing is carried out the header level that is for the finished product only. This is mainly relevant to the assembled products.
2. item category group ERLA; main item category TAQ (schedule line CP) and sub item category TAE (schedule line CT)
Sub-item level processing
1. If the business prefers to have the sub-items be responsible for pricing, inventory control and delivery processing, the item category group should be LUMF on screen sales org.2 of the respective material master record. This ensures that subcomponents are relevant for processing. This is relevant to the products that are not assembled.
2. item category group LUMF; main item category TAP (schedule line is CT), sub item category TAN (schedule line is CP)
Multi-level BOM
In order to activate the multi-level BOM, structure scope in VOV7 has to be changed from single level explosion to multi level explosion.
Try this and revert back fr clearifications
Reward Points if helpful.
Regards
Srini -
Creation of sales order through Purchase order
Hi all
We have a special scenario in creation of Sales order with the help of purchase order,
Could you please advice me how we can create sales order with the help of purchase order.
Thank YOu
Swaroopyou can create the sales order from the purchase order.It can be achieved by Idocs.
Please maintain the condition record for the output medium EDI and also maintain the Partner profile in WE20. -
HOW TO CONTROL ON CREATION OF SALES ORDER WITH REFERENCE TO EARLIER SO?
Dear All,
I want to contol on creation of Sales order with reference to earlier SO? While creation of sales order our enduser are creating sales order with reference to earlier month SO which I want to restrict. Recently I made changes in sales order like payment terms is grayed, system will atomatically pick pay terms from customer master.Now I am getting correct data also but enduser is using old SO no while creating new SO and old payment data is reflecting in fbl5n.
I want to restrict enduser while creating new SO with ref. to old SO. Only for returns they should be able to use Billing refrence. Pl. suggest how to control the with reference to ealier SO.
NikhilNikhil Deshpande,
If you dont want allow create a sales order in referent to other one, just delete the copy control between these sales order type, so when the user tries to create a SO in reference to other one a message is displayed that is not possible.
Thanks,
Mariano. -
Issue with creation of sales order in CRM system
Hi Experts,
Here are the details of the process we followed
1. We found a Function Module u201CBAPI_BUSPROCESSND_CREATEMULTIu201D which is used to create a sales order in CRM.
2. We have set a Break point in the FM u201CCRM_ORDER_MAINTAINu201D and tried to create a sales order using the transaction u201CCRMD_ORDERu201D. For this the parameters we have given are
a. sold-to-party
b. ship-to-party
c. quantity
d. product
And after this we have saved the order and the order is saved and in the debug mode we have the parameters in u201CCRM_ORDER_MAINTAINu201D and we found all these parameters in the FM.
3. After this we have given all the parameters mentioned above in the FM u201CBAPI_BUSPROCESSND_CREATEMULTIu201D and still the order is not created, gave an error message saying that CRM_ORDER: Incorrect values in the interface object.
4. We checked the CRM_ORDER badiu2019s interface and it is having only header guid to be given. We gave this header guid also in the FM u201CBAPI_BUSPROCESSND_CREATEMULTIu201D and then it gave a different error saying that : Document cannot be saved.
5. Finally we are not able to know the parameters to be passed to the FM to create an order.
Any inputs will be highly appreciated.
Thanks a lot in advance.
Lakshman.Hi Easwar,
Now i am able to create a sales order by passing the parameters to "BAPI_BUSPROCESSND_CREATEMULTI" and the parameters i am passing are Process_type in the ORDERADM_H, parner_fct (partner function), partner_no , Quantity and prod_ordered (product name) but after creation of sales order using my report program and if i see the sales order uisng transaction crmd_order (using transaction ID) or crmd_orderadm_h(using headerguid) or crm_order_index, only the PROCESS_TYPE is updated but the remaining parameters which i passed like QUANTITY,PRODUCT NAME,PARTNER NUMBER are not present in the sales order. I am providing the code which i have written for creation of the sales order. Can you please look into it and tell me where i might have went wrong??
*& Report ZCREATEORDER_TEST
REPORT ZCREATEORDER_TEST.
DATA : LV_HEADER_GUID TYPE GUID_32,
WA_HEADER TYPE BAPIBUS20001_HEADER_INS,
ITAB_HEADER TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
ITAB_CREATED_PROCESS TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
ITAB_OBJECTS_TO_SAVE TYPE STANDARD TABLE OF BAPIBUS20001_GUID_DIS,
ITAB_PARTNER TYPE STANDARD TABLE OF BAPIBUS20001_PARTNER_INS,
lt_product_i TYPE STANDARD TABLE OF BAPIBUS20001_ITEM,
wa_product_i type BAPIBUS20001_ITEM,
lt_schedlin_i type standard table of BAPIBUS20001_SCHEDLIN,
wa_schedlin_i type BAPIBUS20001_SCHEDLIN,
ITAB_INPUT_FIELDS TYPE TABLE OF bapibus20001_input_fields,
ls_inputfields TYPE bapibus20001_input_fields,
WA_PARTNER TYPE BAPIBUS20001_PARTNER_INS,
ITAB_RETURN TYPE STANDARD TABLE OF BAPIRET2,
WA_OBJECTS_TO_SAVE LIKE LINE OF ITAB_OBJECTS_TO_SAVE,
"To store the Objects to be saved.
WA_CREATED_PROCESS LIKE LINE OF ITAB_CREATED_PROCESS,
ITAB_SAVED_OBJECTS TYPE STANDARD TABLE OF BAPIBUS20001_OBJECT_ID,
WA_SAVED_OBJECTS LIKE LINE OF ITAB_SAVED_OBJECTS,
GC_X type c.
gc_x = 'x'.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = lv_header_guid.
CLEAR : WA_HEADER.
Passing the respective values from the Header table to internal table.
WA_HEADER-GUID = LV_HEADER_GUID.
WA_HEADER-PROCESS_TYPE = 'ZTA'.
APPEND WA_HEADER TO ITAB_HEADER.
*Appending the values to the ITAB_HEADER.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'ORDERADM_H'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'PROCESS_TYPE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
*ls_inputfields-ref_handle = '0000000000'.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-objectname = 'ORDERADM_H'.
ls_inputfields-fieldname = 'MODE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'ORDERADM_H'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'GUID'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CHANGES MADE
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'LOGICAL_KEY'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'MODE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN_I'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'GUID'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN_I'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'QUANTITY'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'SCHEDLIN_I'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'MODE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CHANGES MADE
WA_PARTNER-REF_GUID = LV_HEADER_GUID.
WA_PARTNER-REF_KIND = 'A'.
giving the partner function and partner no 000000038 for slod to party
WA_PARTNER-PARTNER_FCT = '00000038'.
WA_PARTNER-PARTNER_NO = '10017'.
APPEND WA_PARTNER TO ITAB_PARTNER.
*"ADDING VALUES for the product
wa_product_i-header = lv_header_guid.
wa_product_i-handle = '0000000001'.
wa_product_i-ordered_prod = '12000014'.
wa_product_i-mode = 'A'.
APPEND wa_product_i TO lt_product_i.
*"ADDING VALUES for quantity
wa_schedlin_i-quantity = 30.
wa_schedlin_i-handle = 1.
APPEND wa_schedlin_i TO lt_schedlin_i.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
*ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'REF_GUID'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'PARTNER_FCT'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'PARTNER_NO'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
HEADER = ITAB_HEADER
ITEM = lt_product_i
RETURN = ITAB_RETURN
PARTNER = ITAB_PARTNER
INPUT_FIELDS = ITAB_INPUT_FIELDS
CREATED_PROCESS = itab_created_process
SCHEDULELINE = lt_schedlin_i.
READ TABLE ITAB_CREATED_PROCESS INTO WA_CREATED_PROCESS WITH KEY GUID = LV_HEADER_GUID BINARY SEARCH.
WA_OBJECTS_TO_SAVE-GUID = WA_CREATED_PROCESS-GUID.
Appending the Guid of the contract to be saved to the internal table
APPEND WA_OBJECTS_TO_SAVE TO ITAB_OBJECTS_TO_SAVE.
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
EXPORTING
update_task_local = space
save_frame_log = GC_X
TABLES
objects_to_save = itab_objects_to_save
saved_objects = itab_saved_objects
return = itab_return.
Calling the Standard BAPI to Commit the transcation.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
I have debugged the above code, all the values are passing are passing to the FM "'BAPI_BUSPROCESSND_CREATEMULTI'" and these passed to the CRM_ORDER_MAINTAIN and then to CRM_ORDER_READ which are called inside the "'BAPI_BUSPROCESSND_CREATEMULTI'". Finally the sales order is created but not able to see all the values that i am passing except PROCESS_TYPE.
Thanks a lot in Advance,
Lakshman. -
Creation of Sales Order from Service Order
Hi All,
I am usind BADI Workorder_update and method at_save to create a Sales Order while saving the Service Order.
I have created the ZBAPISALESORDER_CREATEFROMDAT2 which is a copy of BAPI_SALESORDER_CREATEFROMDAT2(Since order type was ZDR).
I have written the following stmt for Debt Memo.
BUSINESS_OBJECT = 'BUS2096' " Debit Memo
This BAPI is working fine and giving the Sales Order Number as a pop-up for information.
But now, the problem is coming with Service Order Creation (In the transaction IW31). It is giving short dump while saving the service order after creating the sales order.
I have checked in the standard code of Service Order. Dump is coming at
Include : LCOZFU64
Function Module:CO_ZF_PROJECT_BUDGET_CHECK
Line : 258
IF caufvdg-netzkont IS INITIAL.
CALL FUNCTION 'STATUS_CHECK'
EXPORTING
objnr = caufvdg-objnr
status = stk_vkt
EXCEPTIONS
object_not_found = 01
status_not_active = 02.
subrc = sy-subrc.
ELSE.
...ansonsten kann man das an NETZKONT erkennen!
IF caufvdg-netzkont EQ con_kont_kopf.
subrc = 02. "kopfkontiert
ELSE.
subrc = 00. "vorgangskontiert
ENDIF.
ENDIF.
With my code of BAPI, it is returning sy-subrc = 01 (Object not found).
Without my code of BAPI (Standard code of IW31), it is returning sy-subrc = 02 (status not active) which is the right one.
Kindly help me in this regard.
Regards,
Priyanka Vasudeva.Hi,
There are various scenarios to support end to end work managmenet process in IS-U find attached detail document at link below.
[http://help.sap.com/saphelp_utilities472/helpdata/en/6a/1a6c35a018d041e10000009b38f839/frameset.htm]
Scenario A describes process of creating sales order based on service order.
Maybe you are looking for
-
HP LaserJet m1120n multifunction printer scan to network
Hello, I have an issue making the scan to network function to work between HP LaserJet m1120n multifunction printer and Snow Leopard. Printing is working fine and it was added via IP. I checked the HP site for the instruction, but it does not work. h
-
How to keep the same image quality after OCR ?
Hello, I have scanned a page of a book, it has mostly black text over white background. In order to keep a good visual quality and a low size for the file I chose the GIF format. The gif is 153.4KB, when I save it as PDF the file is 119KB and after
-
Anybody else having this issue,seems to have started after the update to iOS 6.0 thought iOS 6.0.1 had a fix for it but nada
-
We are trying to crawl our portal in so it can be searched and when results are clicked it will take you to the page and not the content item. But we are having problems following community links and pages. has anyone done this? We are running 6.0 SP
-
ADF/ ADF Faces reading or tutorials
Hi all, I've been doing Java SE for a couple of years (and would say that I'm pretty good on language fundamentals). J2EE however is pretty new to me. I would like to get up to speed in development with ADF/ADF Faces. I've been looking for some tutor