How to fill the configuration data while creating a sales order

Hi,
   I am creating Sales order through BAPI_SALESORDER_CREATEFROMDAT2, the order is getting created but I am not getting the characteristic values. I filled the structures required for the configuration part.
  If possible please post the code for the config part.
Thanks,
Sarath.

Hi,
Here for your reference:
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
        salesdocumentin     = w_line-vbeln
        order_header_in     = order_header_in
      IMPORTING
        salesdocument       = salesdocument
      TABLES
        return              = return
        order_items_in      = order_items_in
        order_partners      = order_partners
        order_schedules_in  = schedules_in
        order_conditions_in = conditions_in
        order_text          = order_text.
Rgds,
Jenny

Similar Messages

  • How to fill the master data in ecc

    Hi,
             0product_attr having zero records i ecc,how to fill the master data in ecc can you pls provide me the setps?
    Regrads,
    devi.

    Hi Devi,
    Loading data is ECC is not the part of BI Activities. Contact your functional consultant to load data. 
    BDC and LSMW both are used for loading data into SAP system.
    Or ask even directly they can create in ECC.  If it is for your testing purpose, it is better to ask them to create master in source system .
    Thanks
    BVR

  • Mapping datas from idoc while creating a sales order.

    Hi Friends,
    From the idoc i want to fill the field 'YOUR REFERNCE' in the tag ORDER DATA at header level while creating a sales order. From which segment i can find the datas for that field.
    Your answers will be valuable.
    Thanks,
    Bestin
    Edited by: Be$t!N on Aug 26, 2009 4:41 PM

    Hi,
    You can find the Your Reference field in the segment E1EDKA1 and the field name is IHREZ.  This Your reference field is at the Partner level. This is a standard field.
    If you can let me know at which place you want this field to be populated then we can find another suitable field in the IDOC.
    Thanks,
    Mahesh.

  • Error while creating a sales order BAPI_SALESORDER_CREATEFROMDAT2

    Hi All,
    I am using the BAPI BAPI_SALESORDER_CREATEFROMDAT2 to create a sales order.
    I am passing all the required fields and also the rejection code at the item level.
    Also I am using a variant configuration material and hence ai am filling the VC config tables.
    When I execute this BAPI it is giving me the error 'Item 000010's configuration can no longer be changed' although configuration is maintained for this material.
    When I try the same case with no rejection code and with VC configuration, the sales order is created.
    When I try the same case again with rejection code and NO VC configuration, the sales order is created.
    When I maintain both the rejection code and VC configuration I am getting the error.
    Does anyone have any idea what is causing this error or I am supposed to populate any flag in ORDER_ITEMS_INX to get this correctly.
    Any answers will be greatly apppreciated!
    Thanks
    Sandeep

    Sandeep,
    There are a few SAP Notes that you should investigate, some of which you may have already seen.  First, I'd suggest you look at [Note 481102|https://service.sap.com/sap/support/notes/481102] and its three related Notes: [774346|https://service.sap.com/sap/support/notes/774346], [550431|https://service.sap.com/sap/support/notes/550431], [366265|https://service.sap.com/sap/support/notes/366265].
    If these Notes do not help then check if [Note 1099414|https://service.sap.com/sap/support/notes/1099414] has been applied in your system.  If it has been applied, then [Note 1116144|https://service.sap.com/sap/support/notes/1116144] might solve your issue.  If neither of these two notes are applied, then it could be that they both need to be applied.  However, if both notes are already applied, then you may want to consider opening a customer message with SAP.  Since these two SAP Notes are relatively new, it makes me think that you might have discovered a related error that has not been reported to SAP yet.
    Best Regards,
    Jamie

  • How to transfer the stock form Project stock to Sale order stock

    Hi
    How to transfer the stock form Project stock to Sale order stock
    I tried to do this with movement type 413Q
    System is giving me error
    Valuated project stock not allowed with customer stock.
    Message no. KI346
    How to do this
    Thanks
    NK

    You can use Mov Type 412-Q
    412     Q     Transfer posting project to own - reversal
    Thanks
    Rajesh

  • How to change the document type while creating a PO by ME59N

    Hi,
    I  have 2 groups of PR's, for group one the document type is picked as NB and PO is created and for the group 2 it should pick as XYZ and PO should be created using ME59N tcode.
    How to change the document type for group 2 in ME59N? Which user exists to use to change the document type while creating PO in ME59N? 
    Can any one suggest me.

    Hi,
    There a config area, where you can define default PO doc types for a particular Pr doc type. If you maintain the settings properly there, then your requirement can be fulfilled.
    SPRO->IMG->MM->Purchasing->Purchase requisation->Define doc types.
    This will serve your purpose.
    Thanks,
    Srinu

  • How to pass delivery date through BAPI while creating a sale order

    Dear frndz,
         I am using 'BAPI_SALESORDER_CREATEFROMDAT1'
    to create a sale order .
        I don't have any problem..
        But I have to pass schedule line delivery date through this bapi .
       I used REQ_DATE in structure BAPISCHDL.
       But I can' t get it.
       Through which parameter can i meet this..
       The sale order should be created line item wise along with my delivery date..
      Any suggestions...
    regards.
    siva

    Dear frnd,
        Danq for your response..I can't use DLV_DATE for this requirement..
        But I used REQ_DATE in the structure BAPISCHEDULE .
       I came to know that the problem i faced previously  was only
    internal data conversion.
        Now am able to pass my delivery date..
        so I am closing the thread..
    Regards.
    siva

  • How to resolve the issue of route while creating a sales order using IDOC

    Hi,
    When I am creating a sales order mannualy the the route is correct and matching  also but while using IDOC try to create a sales order then the route is showing wrong.
    I tried to debug the program SAPMV45A but I am not getting anything.
    Could any body help me on this.
    Waiting for quick response.
    Best Regards,
    BDP

    Hi Bansidhar,
                 You need to debug the Function Module thats assigned to your Process code.
                 In standard config for Sales Order, Process Code ORDE is assigned to FM IDOC_INPUT_ORDERS. And this FM uses Call Transaction Method to create Sales Orders. SO you can  debug this FM.
               Hope this helps you solving the problem.
    Regards
    Srikanth  M

  • Line item data is not saving while creating a Sales order using Interactive

    Hi all,
    I am creating a sales order Using Interactive forms. In the form i am having Header data and line item data.I had created two structures one for Header data and one for Line item data. For entering  the LINE ITEM DATA i had created a Dynamic table with Buttons ADD ROW and DELETE ROW.
    User will Add the Row or Delete the Row based on the requirement.
    My issue is When ever the user clicks the SUBMIT button after entering the header data and 3 line items data , Sales order has been created with only first line item and the remaining two line items are not created.
    My Interactive form is like below
    HEADER DATA
    DOC_TYPE
    SALES_ORG
    DIST_CHN
    DIVISION
    PURCH_NO
    PARTN_ROLE
    PART_NO
    LINE ITEM DATA
                             ITEM_NO      MATERIAL          PLANT          QTY        COND_TYPE            COND_VALUE
    ADD ROW
    DELETE ROW
                                                                                    SUBMIT
    My  code for the method ONACTIONCLICK is like below
    method ONACTIONCLICK .
    data:
          Node_Adobe       type ref to If_Wd_Context_Node,
          Node_Zsaleheader       type ref to If_Wd_Context_Node,
          Elem_Zsaleheader       type ref to If_Wd_Context_Element,
          Stru_Zsaleheader       type If_Main=>Element_Zsaleheader,
          Node_Zsaleitem       type ref to If_Wd_Context_Node,
          Elem_Zsaleitem       type ref to If_Wd_Context_Element,
          Stru_Zsaleitem       type If_Main=>Element_Zsaleitem.
      data: header_data type BAPISDHEAD.
      data: item_wa type BAPIITEMIN.
      data: item_data type table of BAPIITEMIN.
      data: partner_wa type BAPIPARTNR.
      data: partner_data type table of BAPIPARTNR.
      data: sales_order type BAPIVBELN-VBELN.
      data: Errorlog type BAPIRETURN1.
    navigate from <CONTEXT> to <ADOBE> via lead selection
      Node_Adobe = wd_Context->get_Child_Node( Name = IF_MAIN=>wdctx_Adobe ).
    navigate from <ADOBE> to <Zsaleheader> via lead selection
      Node_Zsaleheader = Node_Adobe->get_Child_Node( Name = IF_MAIN=>wdctx_Zsaleheader ).
      Node_Zsaleitem = Node_Adobe->get_Child_Node( Name = IF_MAIN=>wdctx_Zsaleitem ).
    get element via lead selection
      Elem_Zsaleheader = Node_Zsaleheader->get_Element(  ).
      Elem_Zsaleitem = Node_Zsaleitem->get_Element(  ).
    get all declared attributes
      Elem_Zsaleheader->get_Static_Attributes(
        importing
          Static_Attributes = Stru_Zsaleheader ).
      header_data-DOC_TYPE = Stru_Zsaleheader-DOC_TYPE.
      header_data-SALES_ORG = Stru_Zsaleheader-SALES_ORG.
      header_data-DISTR_CHAN   = Stru_Zsaleheader-DISTR_CHAN.
      header_data-DIVISION = Stru_Zsaleheader-DIVISION.
      header_data-PURCH_NO = Stru_Zsaleheader-PURCH_NO.
      partner_wa-PARTN_ROLE   = Stru_Zsaleheader-PARTN_ROLE.
      partner_wa-PARTN_NUMB = Stru_Zsaleheader-PARTN_NUMB.
       append partner_wa to partner_data.
        Elem_Zsaleitem->get_Static_Attributes(
        importing
          Static_Attributes = Stru_Zsaleitem ).
      item_wa-ITM_NUMBER = Stru_Zsaleitem-ITM_NUMBER.
      item_wa-MATERIAL   = Stru_Zsaleitem-MATERIAL.
      item_wa-PLANT = Stru_Zsaleitem-PLANT.
      item_wa-REQ_QTY = Stru_Zsaleitem-REQ_QTY.
      item_wa-COND_TYPE   = Stru_Zsaleitem-COND_TYPE.
      item_wa-COND_VALUE = Stru_Zsaleitem-COND_VALUE.
      append item_wa to item_data.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        ORDER_HEADER_IN           = header_data
      WITHOUT_COMMIT            = ' '
      CONVERT_PARVW_AUART       = ' '
    IMPORTING
       SALESDOCUMENT             = sales_order
      SOLD_TO_PARTY             =
      SHIP_TO_PARTY             =
      BILLING_PARTY             =
       RETURN                    = errorlog
      TABLES
        ORDER_ITEMS_IN            = item_data
        ORDER_PARTNERS            = partner_data
      ORDER_ITEMS_OUT           =
      ORDER_CFGS_REF            =
      ORDER_CFGS_INST           =
      ORDER_CFGS_PART_OF        =
      ORDER_CFGS_VALUE          =
      ORDER_CCARD               =
      ORDER_CFGS_BLOB           =
      ORDER_SCHEDULE_EX         =
    endmethod.
    PLEASE SUGGEST ME IF ANY CODE CHANGE IS REQUIRED
    Thanks in advance
    Ajay

    Hi,
    The item data is not read because, the dynamically added rows should also reflect back to the Web Dynpro context. When the user clicks on Add Row, use the Onsubmit event to add a empty line to internal table and then bind it to the context. And if the user removes a row, remove a row from internal table and bind it back to the context.
    You may refer this article.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/802f0ed1-a17a-2c10-7db4-d515a5b047ed
    Regards,
    Runal

  • Error while Creating a Sales Order for a Configurable Material

    Dear Members,
                            When I am creating a Sales Order for a Material. After Entering the Sold to Party and Material(Variant Configuration) I am getting an error in popup that Derivatiion Rule not defined for the Country IN. Please can you help me out regarding the settings for this.
    Thanks,
    Farhan.

    It seems your issue relates to some non assignment in COPA settings.  Hence,  check this help link and I hope this will be helpful to you
    [Source and Target Fields |http://help.sap.com/saphelp_erp2004/helpdata/en/59/65a2b8dd1711d2a6110060087a7a87/frameset.htm]
    thanks
    G. Lakshmipathi

  • Run time error while creating a sales order by va01

    hi ,
         while  i am creating a sales order a runtime error occurs as i fill entry for sole to party and then material and quantity and as i press enter. the run time error is:
    error in current abap program "saplv61z"  had to be terminated because it has come across the statement that unfortunately can not be executed.
    kindly solve my problem.
    thanks.

    Hi Agrawal
    As you are getting run-time error after entering the sold to party and material and the error is in SAPLV61Z ,
    close the session for sometime and open again and then create sales order and then enter sold to party and material and then check wheather you are getting or not. If you are still facing the problem then take the help of the ABAP & BASIS consultant's.
    Regards
    Srinath

  • Change Request demanded while creating a Sales Order

    Dear All,
    I am creating a Sales Order. The solution is using user exits to communicate between SD and TEM.
    Whenever we create a Sales Order its corresponding sales order and line item is updated in TEM table HRVPAD25.
    While saving the Sales Order, its asking for a Change Request which is by default the Customizing Request created for functional configuration of that particular solution.
    Sales orders however are created successfully.
    Can anyone throw some light on the issue?
    regards,
    Prosenjit.

    Solved

  • Error while creating a Sales Order

    Hi ,
    I have created a material master for a material Y-350 in my system.I have defined it for the Plant 1100 (Berlin), Sales Org 1020 , Distribution channel 22.When i try to create a sales order for a customer in Dusseldorf,Germanyy , i get an error saying "Material Y-350 is not defined for sales org 1020,distr.chann 22,language DE".It means that a short text with the appropriate language exists(a short text must be available in the language of either the customer or the sales organization).I had it maintained in English.From where do i go and maintain it in German ?Kindly let me know.Thanks.

    Hi,
    First check what's the sales area assigned to your customer in Dusseldorf,Germany. It has to be Sales Org 1020 , Distribution channel 22.
    To check that go to XD02 & enter customer number there and press "Customer Sales Areas" button. There you can view all sales areas available for your customer. Check whether Sales Org 1020 , Distribution channel 22. exists there. If not, from XD01, you have to extend your customer for that sales area again.
    If that's there, then check the language in Material Master.
    What you have to do is, go to MM02, give the Material number and go in by selecting Basic Data view.
    Once go in, select "Additional Data" button option from the top.
    Under "Descriptions" tab, maintain language "DE", since customer is from Germany.
    Now try & see.
    Best regards,
    Anupa

  • Problem while creating a Sales Order from RFC

    Dear All,
    I get an error ( Errror ID "TD" Number "600" ) "Text XXXXXXXXXX000001 ID X106 language EN not found" whenever I try to create a Sales Order for a particular Customer and Material.
    But when I create Manually using VA01 for the same details, a Sales Order is created Successfully.
    The error is coming from the Standard Function Module "SD_SALES_ITEM_MAINTAIN".
    Please let me know if any of you have come accross similar problem and if yes, please provide me a solution.
    Thanks and Regards,
    Dinakaran.R

    Hi Dinakaran,
    How ru passing the values in the RFC????
    pass the item details through the tables option of FM...else it will give the error...
    Regards,
    Vamshi

  • How to check the analysis of material determination in sales order

    hi,
    We are trying to create a sale order with material determination. Material determination analysis is on. After  switching this on  while adding a new line item, in an existing sales order, we are able to do analysis as the system itself takes us to analysis screen. But once  the document is saved, we need analysis to be done  at material determination for the determined materials  , something similar to  pricing or account determination analysis.Please help
    Regards,
    Aparna.

    Hi,
    If you drag the line item a little towards the right side, you will find a filed material entered. The one you see in the material filed on sales order over view screen is the one determined. You can as well double click and see the fields material entered and material determined.
    Is there anything else you are expecting to see as part of analysis ?
    Regards
    Sadhu Kishore

Maybe you are looking for