Trying to create a Sales Order Confirmation through IDoc

Hi,
I am trying to create Sales Order Confirmation through ALE with message control.
My recieving system is XI server.
Can u please send me the steps to what to be done to trigger IDoc automatically.
The condition types and access sequence created is for Output type customer but i am sending it to XI Server.
please help me.
Thank you in advance,
Gangolu.

Hi Gangolu,
Have a look at url. Hope this provides some inputs.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/73527b2c-0501-0010-5398-c4ac372c9692
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6bd6f69a-0701-0010-a88b-adbb6ee89b34
Thanks
Lakshman

Similar Messages

  • Trying to create a sales order in CRM with BAPI_BUSPROCESSND_CREATEMULTI.

    hi all,
    I am trying to create a sales order in CRM using the BAPI BAPI_BUSPROCESSND_CREATEMULTI.
    I need the sales order number as the out put. So I am declaring OBJECT_ID as the export parameter.
    This is my source code, I donu2019t get an error, but the sales order is not generated and I donu2019t get any output for my export parameter OBJECT_ID.
    I am setting the tables HEADER,ITEM ,SALES,PARTNER, ORGANISATION, RETURN and
        SCHEDULELINE in BAPI_BUSPROCESSND_CREATEMULTI. But still unable to display the sales order number. Please help me with information
    This is my code
    ***********************************Define the Internal Tables*************************
    DATA: IT_HEADER TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS WITH HEADER LINE.
    DATA: IT_SALES TYPE STANDARD TABLE OF BAPIBUS20001_SALES WITH HEADER LINE.
    DATA: IT_ITEM TYPE STANDARD TABLE OF BAPIBUS20001_ITEM WITH HEADER LINE.
    DATA: IT_SCHEDULELINE TYPE STANDARD TABLE OF BAPIBUS20001_SCHEDLIN WITH HEADER LINE.
    DATA: IT_PARTNER TYPE STANDARD TABLE OF BAPIBUS20001_PARTNER_INS WITH HEADER LINE.
    DATA: IT_ORGANIZATION TYPE STANDARD TABLE OF BAPIBUS20001_ORGMAN_INS WITH HEADER LINE.
    **Values for Internal Table IT_HEADER**
    IT_HEADER-PROCESS_TYPE  =  'YWEB'.
    IT_HEADER-DESCRIPTION   =  'Web Order'.
    IT_HEADER-POSTING_DATE  =  'SY-DATUM'.
    IT_HEADER-CREATED_BY    =  'SY-USER'.
    APPEND IT_HEADER TO IT_HEADER.
    **Values for Internal Table IT_SALES**
    IT_SALES-PO_NUMBER_SOLD = '1'.
    APPEND IT_SALES TO IT_SALES.
    **Values for Internal Table IT_ITEM**
    IT_ITEM-NUMBER_INT  =  '20'.
    IT_ITEM-ORDERED_PROD  =  '50000180'.
    IT_ITEM-ITM_TYPE  =  'ZABC'.
    APPEND IT_ITEM TO IT_ITEM.
    **Values for Internal Table IT_PARTNER**
    IT_PARTNER-REF_PARTNER_NO  =  '100000620'.
    IT_PARTNER-REF_PARTNER_FCT = 'CRMH04'.
    APPEND IT_PARTNER TO IT_PARTNER.
    **Values for Internal Table IT_ORGANIZATION**
    IT_ORGANIZATION-SALES_ORG = 'O 50000100'.
    IT_ORGANIZATION-DIS_CHANNEL = '30'.
    IT_ORGANIZATION-DIVISION = '80'.
    APPEND IT_ORGANIZATION TO IT_ORGANIZATION.
    **Values for Internal Table IT_SCHEDULELINE**
    IT_SCHEDULELINE-QUANTITY  =  '2.268'.
    APPEND IT_SCHEDULELINE TO IT_SCHEDULELINE.
    **Call BAPI_BUSPROCESSND_CREATEMULTI for creating a sales 0rder******
    CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
      TABLES
        HEADER                  =  IT_HEADER
        ITEM                    =  IT_ITEM
        SALES                   =  IT_SALES
        PARTNER                 =  IT_PARTNER
        ORGANISATION            =  IT_ORGANIZATION
        RETURN                  = IT_RETURN1
        SCHEDULELINE            = IT_SCHEDULELINE.
    ****************CALL COMMIT WORK**********
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
        WAIT          = 'X'
    IMPORTING
       RETURN        =  IT_RETURN2.
    ENDFUNCTION.
    Edited by: jessica sam on Dec 10, 2008 1:45 AM

    Hi am getting the sales order but the item data is not available in sales order. Also should I generate a new guide always for HEADER, ITEM, PARTNER, ORGANIZATION, SCHEDULELINE,u2026u2026for the tables that I use?
    I  mean do I need to create a new guide each time for all the tables that I use and finally pass only header guide to the  bapi 'BAPI_BUSPROCESSND_SAVE'.
    I donu2019t know why I am not getting the product data in the saved sales order please help me.
    this is my code
    ***TABLES
    DATA: IT_HEADER TYPE TABLE OF BAPIBUS20001_HEADER_INS.
    DATA: IT_INPUT_FIELDS_FILL TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS.
    DATA: IT_ITEM TYPE TABLE OF BAPIBUS20001_ITEM.
    DATA: IT_OBJECTS_TO_SAVE TYPE STANDARD TABLE OF BAPIBUS20001_GUID_DIS WITH HEADER LINE.
    ***WORK AREA
    DATA: WA_INPUT_FIELDS TYPE BAPIBUS20001_INPUT_FIELDS.
    DATA: WA_HEADER TYPE BAPIBUS20001_HEADER_INS.
    DATA: WA_ITEM TYPE BAPIBUS20001_ITEM.
    DATA: IT_EV_GUID_32 TYPE GUID_32.
    DATA: IT_EV_GUID_32_1 TYPE GUID_32.
    *Create GUID
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        EV_GUID_32       = IT_EV_GUID_32.
    * Fill the HEADER
    WA_HEADER-GUID                      =  IT_EV_GUID_32.
    WA_HEADER-PROCESS_TYPE              =  'ZWEB'.
    WA_HEADER-DESCRIPTION               =  'WEB ORDER'.
    WA_HEADER-CREATED_BY                =  'jiopidn'.
    APPEND WA_HEADER TO IT_HEADER.
    *For each FIELD of HEADER fill INPUT_FIELDS
    WA_INPUT_FIELDS-REF_GUID               =  IT_EV_GUID_32.
    WA_INPUT_FIELDS-REF_KIND               =  'A'.
    WA_INPUT_FIELDS-OBJECTNAME             =  'ORDERADM_H'.
    WA_INPUT_FIELDS-LOGICAL_KEY            =  '1'.
    WA_INPUT_FIELDS-CHANGEABLE             =  ' '.
    WA_INPUT_FIELDS-FIELDNAME              =  'PROCESS_TYPE'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'GUID'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'DESCRIPTION'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'CREATED_BY'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    *Create your own GUID
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        EV_GUID_32       = IT_EV_GUID_32_1.
    * Fill the ITEM
    WA_ITEM-GUID              =  IT_EV_GUID_32_1.
    WA_ITEM-NUMBER_INT        =  '10'.
    WA_ITEM-ORDERED_PROD      =  '000000000070000000'.
    WA_ITEM-ITM_TYPE          =  'ZTAN'.
    WA_ITEM-MODE              =  'A'.
    APPEND WA_ITEM TO IT_ITEM.
    *For each FIELD of ITEM fill INPUT_FIELDS fields
    WA_INPUT_FIELDS-REF_GUID               =  IT_EV_GUID_32_1.
    WA_INPUT_FIELDS-REF_KIND               =  'A'.
    WA_INPUT_FIELDS-OBJECTNAME             =  'ORDERADM_I'.
    WA_INPUT_FIELDS-LOGICAL_KEY            =  '1'.
    WA_INPUT_FIELDS-CHANGEABLE             =  ' '.
    WA_INPUT_FIELDS-FIELDNAME              =  'GUID'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'NUMBER_INT'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME                 =  'ORDERED_PROD'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME                 =  'ITM_TYPE'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    REFRESH: CREATED_PROCESS.
    ***** CALL BAPI_BUSPROCESSND_CREATEMULTI
                   CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
                     TABLES
                       HEADER                  = IT_HEADER
                       ITEM                    = IT_ITEM
                       INPUT_FIELDS            = IT_INPUT_FIELDS_FILL
                       CREATED_PROCESS         = CREATED_PROCESS
                       RETURN                  = RETURN.
    IT_OBJECTS_TO_SAVE-GUID = IT_EV_GUID_32.
    IT_OBJECTS_TO_SAVE-OBJECT_TYPE = 'BAPIBUS20001'.
    APPEND IT_OBJECTS_TO_SAVE TO IT_OBJECTS_TO_SAVE.
    **** CALL 'BAPI_BUSPROCESSND_SAVE
    CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
      EXPORTING
        UPDATE_TASK_LOCAL       = true
        SAVE_FRAME_LOG          = true
      TABLES
        OBJECTS_TO_SAVE         = IT_OBJECTS_TO_SAVE
        SAVED_OBJECTS           = ITAB_SAVED_OBJECTS
        RETURN                  = itab_return.
    **** CALL BAPI_TRANSACTION_COMMIT
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
        WAIT = true
      IMPORTING
        RETURN = RETURN1.
    Edited by: jessica sam on Dec 12, 2008 3:50 AM

  • Sales Order confirmation through standard IDoc in Background

    Hi all,
    I want to send Order confirmation throough standard or existing IDoc.
    Can  you please help me the steps to configure the IDoc
    and also the standard program to fill the IDoc with the data and send as background job.
    It is also the case for
    Invoice
    and Shipping
    Can you please send me the steps to  configure and standard program to fill the IDoc with data.
    Hope you would respond me ASAP.
    Thanks and Regards,
    Shalem.

    Hi,
    After the sales order has been created, an ORDRSP IDoc is automatically created using message control.  This IDoc is sent from the vendor system to the retail system, which means that the outbound IDoc can usually be found in the vendor system and the inbound IDoc in the retail system.
    SAP menu -> Tools -> Business Communication -> IDoc Basis -> WE02 –> Display IDoc.
    Before this you need to complete NACE configuration Part.
    If you want to send the IDocs automatically while creating sales order, you can configure it using message control. The process code will be SD10, which is for sales order confirmation (called as EDI 855).
    Use NACE transaction to create output/message type with program as RSNASTED and form routine as EDI_PROCESSING and configure the condition record for your partner (profile). Also configure the same in your partner profile.
    <i>Hope This Info Helps YOU.</i>
    Regards,
    Raghav

  • Sales Order Confirmation through Email

    Dear Friends,
    Can i ask you to give me a quick idea on what need to be done to establish the functionality to send the order confirmation through emails.
    Thanks in advance.
    Ravi

    Once you made sure that the output type definition is all set with all relevant data and ABAP work, go to the condition record of the same output. Maintain the mediums as 5 -- Extrenal Send and Date / Time as 4- send immediately when saving the order. Then go to the details of the record and maintain the relevant communication strategy. Save the record. This should trigger the mail automatically when you save the order.
    If you also want to print with the same output type, then you need to go back to order VA02 , repeat output and change the medium to 1.
    If you want to automatically print and also mail on single save / then you need to tweak the output program to trigger print and mail both at the same instance. This is possible by the output program. Then you need to keep the medium as 1.
    Hope this helps.
    Sai

  • Reversal of Production Order Confirmation through IDOCS

    Hello all,
                  The time for each operation in a  production order is logged in KabaBEnzing tool called Autotime. This is sent to SAP through IDOCS and the order confirmation is created. There is a scenario where the supervisor could have entered the wrong time against an operation. Is it possible to reverse the confirmation through IDOCs. If yes, please let me know what should be the approach? Also, I heard that SAP does not accept negative time to do the reversal. How true is this?
    All helpful answers will be rewarded.
    Thanks,
    Kalyan

    Hello,
    I saw your message and we are doing the same thing.  Did you find any answers to your questions.   We are using Kaba for our shop system and now we would like to sent negative numbers back to sap because of supervisor adjustments.  I have not found any way to set Sap to allow it.  What conclusions have you came up with the situation.
    Thanks again,
    Jeff

  • Issue while trying to create Sales Order from Inbound Idoc ORDER05

    Hi All,
    I am trying to create a sales order through an Inbound idoc ORDERS05 created out of a Purchase order. The header pricing conditions from the Purchase orders gets populated in E1EDK05 segment and this needs to go to the Sales order header conditions while trying to create the Sales order.
    But when the fields are getting incorrectly mapped to the Sales order. Issue  being, the segment E1EDK05-BETRG contains the condition value. But this fields gets populated to the KOMV-KWERT (condition value) screen field on the Sales order header conditions. But this should have got mapped to field KOMV-KBETR (Rate). If I look at the Purchase order, E1EDK05-BETRG is the field getting fetched from field KOMV-KBETR on the Purchase order. So this should have correspondingly got mapped to KOMV-KBETR on the Sales order as well.
    This looks like a standard behavior. But if any of you have encountered this issue before please let me know if any Correction instructions are available for the same. If this some issue in Pricing conditions configuration, do let me know.

    Hi Paaavan
    You can set a break-point include "FV45PFAP_VBAP_BEARBEITEN_VORBE" that is called by both the SAP Standard and BAPI where the data is prepared and checked in the internal table XVBAP. Compare both SAP standard VA01 and your 'Z' program for what may be different in XVBAP.
    I think the problem my be with regards to the business_object number that is hardcoded in the standard function module. It has given me issues before and hence I tend to use the function module  SD_SALESDOCUMENT_CREATE to create sales documents with.
    Regards,
    Marius

  • Sales order confirmation form in Adobe Forms-Urgent

    Hi Experts,
    I have to create an adobe form for Sales order Confirmation.
    I have worked on ABAP but no idea about Adobe forms. I am new for this.
    Could you please tell me what are are the things required to delelop an adobe forms
    What are the steps i have to follow to create an adobe form.
    I have to do coading in ABAP DEV Workbench or somewhere else?
    If somewhere else then in which language and where ?
    If someone has created a sales order confirmation adobe forms earlier please send me the code for reference.
    Regards,
    Nik

    Thanks again Vinod for this input. I've already had a look into the form where nothing named as 'TITLE' appear. And frankly I'm not very strong in identifying the print program for a given form. I try with debug but taking into account my poor skills in ABAP I'm lost with all those function module. And the print program that I could get from [NACE] includes so many things that I'm still not able to find out the OPEN_FORM statement. But I keep on trying.
    Regards.
    Nozome.

  • How to create a Sales Order using BAPI_SALESORDER_CREATEFROMDAT1 in VC

    I am new to Visual Composer.
    I read the tutorial and created a Model which fetches the Sales Orders from the R/3 using <b>BAPI_SALESORDER_GETLIST</b>, every thing worked fine.
    I am trying to create a sales order in R/3 using <b>BAPI_SALESORDER_CREATEFROMDAT1</b>, following are the steps I did:
    1)Create a model
    2)Drag a model element(iView) on to the designer
    3)Double click the iView and Drag the function <b>BAPI_SALESORDER_CREATEFROMDAT1</b> on to the iView Designer
    Now my question is, for <b>BAPI_SALESORDER_CREATEFROMDAT1</b> there are some mandatory fields as mentioned in the document.
    1. Mandatory entries:
    ORDER_HEADER_IN :
    DOC_TYPE     Sales document type
    SALES_ORG    Sales organization
    DISTR_CHAN   Distribution channel
    DIVISION     Division
    ORDER_PARTNERS..:
    PARTN_ROLE   Partner functions, SP sold-to party
    PARTN_NUMB   Customer number
    ORDER_ITEMS_IN..:
    MATERIAL     Material number
    REQ_QTY      Order quantity in sales unit
    I can pass the values of structure <b>ORDER_HEADER_IN</b> from a input form but how should I pass mandatory values for tables <b>ORDER_PARTNERS</b> and <b>ORDER_ITEMS_IN</b>.
    Ideally I should have one form where I can send all the mandatory items in the form.
    Thank you,
    Vamsi

    Hi,
    how did you return the materials in the Table View. I tried to do it, but it only returns one material?
    Regards,
    Matthias

  • Error while creating the sales order using Proxy

    Hi Folks,
    I am trying to create a Sales Order using Proxy via BAPI "BAPI_SALESORDER_CREATEFROMDAT2" :
    and i got this type of standard error message
    <Message>FB call: insufficient parameters</Message>
    few days back only i used the same bapi for creating the Sales Order and did it successfully...using the same parameters
    I don't have any clue about this type error .
    Kindly guide .
    Regards,

    Hi Nikhil,
    How refreshing the cache and restart the server will help ?
    basically i am testing the scenario at R/3 end only by generating XML template in SPROXY.
    My ECC 6.0 is on sp 12....I am not sure is it configuration related error or a bug ? as i have used the same code in ECC 6.0 with sp 09.
    regards,

  • Issues in creating the sales order with oe_order_pub.process_order api

    Hi All,
    I am trying to create a sales order with BOOKED status using oe_order_pub.process_order api, and I am getting response as
    <X_RETURN_STATUS>E</X_RETURN_STATUS>
              <X_MSG_COUNT>1</X_MSG_COUNT>
              <X_MSG_DATA>ONTOE_LOCK_ROW_DELETED</X_MSG_DATA>
    Can any one help me in fixing this issue ..!
    Thanks,
    Vamsi…
    Edited by: user11147471 on Jul 9, 2009 2:02 AM

    When using the API, are you trying to create the order as booked using the booked flag or the book action?  I would recommend using the action if you are not. To troubleshoot, I would try the API without booking and then use the following article to determine the issue:
    Unable To Setup A Credit Card Bank Account For The Customer. CC Information On The Order Is Not Valid (Doc ID 1450936.1)

  • Need to Create a Sales Order Using BAPI....

    Hello Gurus,
    I have called 'BAPI_SALESORDER_CREATEFROMDAT2' n a FM and trying to create a Sales Order. I have passed the header (auart, vkorg, vtweg, spart) and partner (nmbr and role). I passed the parameters to BAPI but in the return messages it says 'Sales Document was not changed V4 E'.
    I hope I am clear, if not please ask...
    Suggestions would be rewarded....
    Regards
    Leo

    Hi Leo,
    Check out the following codes:
    Even I have worked in ECC 5.0.These are the mandatory parametersthat u need to pass to create a Sales Order successfully...
    REPORT  Z6SKS_HERSHEYS2.
    data : order_header_in1 type BAPISDHD1.
    data: order_partners1 type BAPIPARNR occurs 0 with header line.
    data: ORDER_ITEMS_IN1 type BAPISDITM occurs 0 with header line.
    DATA : SALESDOCUMENT1 TYPE BAPIVBELN-VBELN.
    DATA : RETURN1 TYPE BAPIRET2 OCCURS 0.
    DATA : RETURN2 TYPE BAPIRET2.
       order_header_in1-doc_type = 'TA'.
       order_header_in1-sales_org = '0001'.
       order_header_in1-distr_chan = '01'.
       order_header_in1-division = '01'.
       ORDER_ITEMS_IN1-material = '000000000000000013'.
       append ORDER_ITEMS_IN1.
       order_partners1-PARTN_ROLE = 'WE'.
       order_partners1-PARTN_NUMB = '0000000017'.
       APPEND order_partners1.
    Perform call_function.
    *&      Form  call_function
          text
    -->  p1        text
    <--  p2        text
    form call_function .
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
      SALESDOCUMENTIN               =
        order_header_in               = order_header_in1
      ORDER_HEADER_INX              =
      SENDER                        =
      BINARY_RELATIONSHIPTYPE       =
      INT_NUMBER_ASSIGNMENT         =
      BEHAVE_WHEN_ERROR             =
      LOGIC_SWITCH                  =
      TESTRUN                       =
      CONVERT                       = ' '
    IMPORTING
       SALESDOCUMENT                 = SALESDOCUMENT1
      tables
       RETURN                        = RETURN1
       ORDER_ITEMS_IN                = ORDER_ITEMS_IN1
      ORDER_ITEMS_INX               =
        order_partners                = order_partners1
      ORDER_SCHEDULES_IN            =
      ORDER_SCHEDULES_INX           =
      ORDER_CONDITIONS_IN           =
      ORDER_CONDITIONS_INX          =
      ORDER_CFGS_REF                =
      ORDER_CFGS_INST               =
      ORDER_CFGS_PART_OF            =
      ORDER_CFGS_VALUE              =
      ORDER_CFGS_BLOB               =
      ORDER_CFGS_VK                 =
      ORDER_CFGS_REFINST            =
      ORDER_CCARD                   =
      ORDER_TEXT                    =
      ORDER_KEYS                    =
      EXTENSIONIN                   =
      PARTNERADDRESSES              =
      IF NOT SALESDOCUMENT1 IS INITIAL.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                WAIT          =
               IMPORTING
                 RETURN        = RETURN2
       ELSE.
              CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
              IMPORTING
                RETURN        =
       ENDIF.
    endform.                    " call_function
    This should help u...
    Please reward points if found useful...

  • Creating a FM to create a Sales Order

    Hi All,
    I am not a CRM guy, so please ask for clarifications if my questions poses any confusion.
    And please suggest if I should post this question on some other forum for a better answer.
    I am trying to create a FM to create a BAPI Wrapper and for this I am callling a BAPI - BAPI_BUSPROCESSND_CREATEMULTI in my FM.
    There must be many (manadatory) parameters which must be passed to this BAPI for the successful creation of a Sales Order. (I am trying to create a Sales Order of the typse 'TA')
    Now I want to pass on the minimum parameters to this BAPI to create a Sales Order for a Particular BP and a Particular Product for a fixed quantity.
    Please let me know how shall I go about this, There are so many table parameters with so many fields that I am not sure how to and what to fill in them..
    I am waiting for help. Please ask me to be more specific if you need anything to know.
    Thanks
    Ankur
    and I am particularly interested in the Paratmeter - INPUT_FIELDS and what its fields mean.
    And Samples codes will be very helpful

    Hello Ankur,
    I attach you some code. I hope this helpful to you.
    * HEADER STRUCTURE.
      gs_orderadm_h-handle  = '0000000001'.
      gs_orderadm_h-guid = '00000000000000000000000000000000'.
      gs_orderadm_h-process_type = TYPE.
      gs_orderadm_h-description = DESCRITION.
      gs_orderadm_h-mode = 'A'.
      APPEND gs_orderadm_h to gt_orderadm_h.
      ls_input_field-ref_handle  = '0000000001'.
      ls_input_field-ref_kind  = 'A'.
      ls_input_field-ref_guid   = '00000000000000000000000000000000'.
      ls_input_field-logical_key   = '00000000000000000000000000000000'.
      ls_input_field-objectname  = 'ORDERADM_H'.
      ls_input_field_names-fieldname = 'PROCESS_TYPE'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      INSERT ls_input_field  INTO TABLE  gt_input_fields.
      clear ls_input_field-field_names[].
    * You have to do the same with the another structrures..
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
      it_schedlin_i   = gt_schedlin_i_com
      it_partner      = gt_partner
      it_sales        = gt_sales
      it_pricing      = gt_pricing
      it_text         = gt_text
    CHANGING
      ct_orderadm_h   = gt_orderadm_h
      ct_orderadm_i   = gt_orderadm_i
      ct_input_fields = gt_input_fields.
      LOOP AT gt_orderadm_h INTO gs_orderadm_h.
        INSERT gs_orderadm_h-guid INTO TABLE gt_obj_guids.
      ENDLOOP.
      CALL FUNCTION 'CRM_ORDER_SAVE'
        EXPORTING
          it_objects_to_save = gt_obj_guids
          iv_no_bdoc_send    = ''
        IMPORTING
          et_saved_objects   = gt_saved_objects.
      read table gt_saved_objects index 1 into ls_saved_objects.
      ORDER = ls_saved_objects-object_id.
      COMMIT WORK.
    Regards...
    Mon

  • How to put the value in Header test while creating the sales order

    Hi ,
    I am creating the Sales order using the Idoc Orders05 .
    I have to pass the value in the header text 1. the value is a transaction id which is a string value.
    If anyone has an idea how to do this using the the Orders Idoc. it would be a great help
    Thanks
    Nikhil

    If you have access to idoc before calling the processing Function module, Adding header text segments E1EDKT1 and E1EDKT2 to the idoc will create the header text.
    Regards
    Sridhar

  • 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
    sreeram

    Do 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

  • Email Sales Order Confirmation to "Created By" -

    Hi Experts
    I have a requirement where we need to email the Order confirmation output to the person who has created the sales order.
    So lets say i am creating a sales order and my user id is 9999. (SY-UNAME).
    Now as we have implemented HR module and our PERNR and user name are same.
    So in other words my PERNR will also be 9999 and email is maintained in HR record and well as user record.
    How can i achieve this functionality and Email order confirmation printout to "Created By".
    We dont want to send order confirmation to SP or SH but just created by.
    Thanks in advance.

    HI Shiva,
    I did exactly as you said but it send the email to the email ID maintained in Ship-to-party customer.
    I think "Recipient" field is just used for cover page (Incase you are printing cover page), i dont think SAP uses it for sending the form output.
    I think SAP sends output based on the partner function, so if i specify SH, SAP will send it to SH.
    I tried using "Created By" partner type too and all email setting are maintained for the creator and printer is properly setup but it doesn't allow me to use this partner function.
    I tried using both "$1" and "§§" but both of them doesn't work.
    I have also tried using Employee responsible partner type "ER" but even that doesn't work.
    Will appreciate if you can provide a solution for this.
    Thanks in advance.

Maybe you are looking for