I would like to explain about creation of the sales order using BAPI by step by step procedure. This blog is mainly usefull for beginners. It is the back end development system for getting the data from SAP. It accesses through Restful API. We can access these services through UI5, other non-sap systems Ex: Java,etc. Sales Order can be created once the quote is accepted by your prospective customer.
Give the Entity type name and Data sources. IF sy-subrc EQ 0. It will automatically maintained the service.
Execute the Request by removing order number. Thanks for your blog, I have a question, after the successful creation of Sales Order, I am unable to get the Sales Order Number created in the back end system, I see that you have declared the statements.
I have created the Odata successfully, but when trying to get existing sales order, its giving following error, pls help me. Posted on April 10, 5 minute read. Follow RSS feed Like.
Follow these below steps: 1. We can see all the selected fields as below. Get: 7. Note:We can create order only after getting the data through set. Follow the same steps to Create entity. Save and Activate the entity sets.We need to maintain the following configurations. The iFlow is scheduled to run at regular intervals. We will have a look at the configuration of main components below. An XSD file is created which needs to be given as Target input for mapping.
Save and deploy the iFlow.SAP ABAP Creating a salesorder with a BAPI!
The iFlow will get triggered based on the interval of scheduling. For more details on how to set it up, please go through the official documentation here. Arun Nair. Posted on August 8, 5 minute read. Follow RSS feed Like. Maintain a Communication System to specify the host details. Maintain the Partner Profile details. If not, enter the following data. Ensure that the function module is assigned to the IDOC processing.
Using transaction BDBG, check if the function module is already assigned. If the function module is not assigned, assign it as shown below. The Address can be obtained from Communication arrangement see Fig. The source and target needs to be given for mapping. To get the Source mapping, the following needs to be done. If only the header data needs to be mapped, this file can be directly used as Source mapping. However, in this scenario we need the Item level relationship data as well.
So, we cannot use this EDMX file directly. At the end, an XSD file is generated which can be used as Source mapping. For more details on how to do it, please refer here. The mapping is done in a way to facilitate processing of multiple Purchase Orders. Maintain the configuration as shown below. Further Information: A video of the business scenario depicting this use case can be found here. For more information on 2-tier use cases, please refer the blog here. Alert Moderator.
Assigned tags. Related Blog Posts. Related Questions. Be the first to leave a comment. You must be Logged on to comment or reply to a post.Can anyone help me on this?
Have you checked that the format of the contract number is right leading zeros etc. Have you tried doing this from SE37 rather than your code to see if the data being passed to the BAPI will throw an error? Is there any other values that has to be passed? But this sales order number got updated in the document flow of the contract. Your Message is something like: "Document doesn't have documenttype. In general the best way to solve issues with the sales BAPI's is: The bapi gives in table with all the issued messages.
Find the message ID and number. Do a whereused in se91 for this message. Place breakpoints on all occurances. Run the BAPI and examine the code that leads to the message.
Enterprise Software. Tech Sign In Page. Forgot Password?
Don't have an account? Sign up. Follow Tech Sign In Page. Hope this helps. Rosie Brent. May 10, AM. Something went wrong on our end. Please try again later. For me it worked to fill additional a header field and a line reference as well. Succes Oorspronkelijk bericht Van: beenaprabh Still it is not working for me.
R there any other fields to be passed? Sign In to Post a Comment. Sign In. Hide Comments View Comments. Looking for more? Search the archive of solutions and how-to's. Ask a new question to a community of peers. Mainframes, DevOps, and Ansible.Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions Comments specific to the object. Associated Function Group: Released Date: This will allow you to compare and fully understand the new inline method.
Please note some of the newer syntax such as the DATA is not available until a later 4. The below ABAP code uses the older none in-line data declarations.
SAP Function BAPI_SALESORDER_CREATEFROMDAT2 - Sales order: Create Sales Order
It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the DATA is not available until 4. You can use this method to create sales orders. See here for full SAP fm documentation.
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. Contribute Add Comments Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function.But no success.
Variant Configuration:. It is a tool which helps to simplify the complex manufacturing of final product with more varieties and Variation of the input Material. Variant Configuration is for manufacturing complex products in which customer determines the features of the product and it also helps the customers or salespersons to put together specification for the product. Here it needs not to create separate Material for each variant of a product. When companies introduce variant configuration this often goes beyond a business process re-engineering project.
Variant Configuration offers an opportunity to restructure product structures for which then processes are defined. This has a direct impact to the core areas such as marketing and product data management. Variant configuration is useful if you have large number of combination of parts that go into a product. It means different Permutations and Combinations of the parts for same material. For Examples:. To define the features of a configurable material, you use Characteristics. To enable you to use Characteristics to configure material, you allocate the material to a class of class type Each Configurable object must have a configuration profile.
The configuration profile for a material controls the configuration process in the Sales Order. You use Dependencies to ensure that only allowed combination of features are selected. Dependencies also select exactly the right BOM B ill of M aterial components and operations to produce a variant. The usage of this BAPI is very simple when used to create sales order that do not used configurable materials.
But when it comes to creating sales order using variant configuration materials, the logic of filling the structures of this BAPI is a little bit complicated. For updating variant configuration VC data for sales orderitem, we need to populate below tables of standard function module or BAPI e.
Sales Order Item Data. Sales Order Item Data Flags. Schedule Line structure. Fill schedule line flags. Finally call your BAPI. I would also like to mention something you need to do when creating a sales order with characteristics using a BAPI. Now there is no way you would ever guess this, but that needs to be filled with the same value as the sales order item number POSNR.
Step-by-step Creation of sales order using BAPI in ODATA services
I hope that helps. However the sales order is getting created but VC characteristics are not updating. HariKrishna Malladi. Posted on January 21, 6 minute read. Follow RSS feed Like. For Examples: In a business involving steel manufacturing, the customer may order steel involving different physical properties like tensile strength, diameter, colour etc. A Customer ordering a Motor Bike can choose different combination of accessories and colour.
Thanks, Harikrishna. Alert Moderator. Assigned tags.Kindly let me know how to update characterestic values in sales order. I've only used the characteristics on the sales order BAPI for variant configuration. Try setting up this table as well and setting an instance number, which I believe you can set yourself. Could you provide SAP release which you are using. In our integration we are using two different RFCs for order creation for two different releases. From my understanding the values of the config id and instance id numbers are critical, just that they differ from other items on the same order that also have characteristics.
You will probably need to change the class type from toas is for variant config and is for material characteristics. Also - you probably don't need to worry about the section related to the BOM, this code is for sales order items with a sales bill of material. Not what you're looking for? Search community questions. This question has been deleted. This question has been undeleted. Former Member. Posted on May 28, at PM Views.
ABAP Development. Add comment. Related questions. Sort by: Votes Newest Oldest. This answer has been deleted. This answer has been undeleted. Posted on May 29, at AM. Alert Moderator. You already have an active moderator alert for this content. Posted on May 29, at PM. Hope this helps, Mark. Former Member Former Member. May 30, at PM. Show all. Posted on Jun 01, at PM. Here is a sample of code that sets up the characteristics for an item: From my understanding the values of the config id and instance id numbers are critical, just that they differ from other items on the same order that also have characteristics.
Sorry - I could not get thsi to format as code Jun 12, at AM.The usage of this BAPI is quite simple when used to create sales orders that do not used configured materials. But when it comes to creating sales orders that use variant material configurations, the logic of filling the pre-requisite structures of this BAPI is a little complicated and therefore this blog.
First things first, there is an SAP note which explains how the prerequisite structures should be filled. That note is So how do you take care of that? We will get to those questions in a moment but first, here is the logic for populating this parameter. Now since a picture speaks a thousand words for those who can see, here is what we have done so far in a nutshell.
Put the results of step d in another internal table B. Here is the code below. However the sales order is getting created but VC characteristics are not updating.
Sameer Ahmed. Posted on July 15, 4 minute read. Follow RSS feed Like. The four mandatory structures to be filled are; 1. Alert Moderator. Assigned tags. Related Blog Posts. Related Questions. You must be Logged on to comment or reply to a post. Himmel P.