Sending sales order details through ALE to External system

hi folks,
         i have a simple scenario to do with ALE/IDOCS. i have to create sales order in SAP. And when ever that SO is created the sales orders details should be sent to an external system (here, notepad). could any one suggest me teh step by step proceduer for the same......or atleast some brief procedure hw to acheive this...i also have one more doubt....can we send IDOCS from ECC 5.O to IDES 4.6. if i am trying to do the same it showing some error mentioning that basic idoc type does not exist in 4.6c......can any one resolve my doubt,
                        thnx in advance,
                            santosh.

Thanks for your quick response, Sarathy.
Yes I am referring to SAP ECC to third party system but using ALE.
Here is the scenario, a sales order will be created in SAP CRM and that sales order will be replicated to ECC as a sales order. Now I need to generate an Idoc for this sales order to send it to a third party system.
Regards

Similar Messages

  • Sales order details thru ALE

    hi folks,
    i have a simple scenario to do with ALE/IDOCS. i have to create sales order in SAP. And when ever that SO is created the sales orders details should be sent to an external system (here, notepad). could any one suggest me teh step by step proceduer for the same......or atleast some brief procedure hw to acheive this...i also have one more doubt....can we send IDOCS from ECC 5.O to IDES 4.6. if i am trying to do the same it showing some error mentioning that basic idoc type does not exist in 4.6c......can any one resolve my doubt,
    thnx in advance,
    santosh.

    Hi Gouri Sankar,
    would you be able to upload the sales orders with multiple line items using BAPI LSMW?
    if so could you plz suggest?
    Thanks in advance.
    Suresh/

  • How to send sales orders through XI  to non sap system

    Hello Experts,
    i need to send Sales order details from ECC to non sap system.
    anybody can help me to proceed with this in detailed way.
    i know how to send idoc through xi between sap systems.
    But i need between sap to non sap system.
    Thanks & Regards,
    Lakshmi..

    Hi !!
    Check this weblog on how to enable SSL:
    /people/gregor.wolf3/blog/2005/10/11/setup-https-ssl-for-the-sneak-preview-sap-netweaver-04-abap-edition-on-windows
    refer this realtive thread which shows the .NETnet integration with XI
    Re: .NET Client Integration with SAP XI
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2131 [original link is broken] [original link is broken] [original link is broken]
    for idoc related settings in r/3 refer the below link...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/73527b2c-0501-0010-5398-c4ac372c9692
    IDoc to File scenario
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    check this out ..
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://www.thespot4sap.com/Articles/SAP_ALE_Introduction.asp
    Also go thru this Blogs
    ALE Configuration for Pushing IDOC's from SAP to XI by Swaroopa Vishwanath
    Configuration Steps for Posting IDOC's by Ravikumar Allampalam.
    IDOC - File scenario
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    configuring IDOCS
    /people/sravya.talanki2/blog/2006/12/27/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-iii
    IDOC scenarios
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cdded790-0201-0010-6db8-beb9bb2b2660
    Idoc related setting
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/73527b2c-0501-0010-5398-c4ac372c9692
    refer this thread also
    Integration between sap and non-sap
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5651.. [original link is broken] [original link is broken] [original link is broken]
    also referthe concept of SSO
    To undersand SSO scenarios gothro the links in my reply in the following thread:
    SSO scenarios and configuring steps
    Check the following link to know the procedure for user mapping:
    Procedure to follow for user mapping.
    The following link gives you more idea on User Mapping:
    More Info on User Mapping
    Pls reward if useful

  • 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

  • Do we have any BAPI to get the Sales quote or Sales order details

    Hi Experts,
    Do we have any BAPI to get the sales quote or sales order details from my other SAP system.
    My requirement is to get the sales quote or sales order details from the other SAP system.
    Please help.
    Regards,
    Chitrasen

    Hi Experts,
    Thanks for ur help. The BAPI is BAPI_SALESORDER_GETSTATUS which helps in fetching the sales quote information.
    Thanks,
    Chitrasen

  • 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

  • Sending sale order data

    hi,
    how can we send sale order data from sapxisap.
    are there any standard tcode like BD10 BD12 BD14.
    plz help me.
    thanks and regards
    vijender

    For creating sales documents (sales order) through IDOCS you will have to use the T code WE19.  In that click basic type and enter order05(IDOC type) and select via message type then enter ORDERS(message type), click execute.
    You will get to see many fields.here you have to enter the datas that you enter in the VA01 screen in order to create sales order. The datas such as material name, date, qty, P.O no etc.  After entering all the datas, you click standard inbound the IDOC would be created by the system.You can see the created order by going in to VA03 screen.
    Next time when you create the IDOC, in same tcode WE19 screen, click existing IDOC and enter the IDOC which you created in the above step and just change the P.O no.Sytem will create new sales order through new IDOC
    Before doing all you need to maintain the partner profile in T code WE20

  • Sales order change through bapi

    iam uploading va02 changes through bapi..but its not changing the sales order
    details in bapi_change function module item number its taking as zero. plz can any one
    say where iam going wrong.this is my code
    *______BAPI STRUCTURES
    data : bapi_header type BAPISDH1 occurs 0 with header line,
           bapi_item type BAPISDITM occurs 0 with header line,
           bapi_header_x like BAPISDH1X occurs 0 with header line,
           bapi_item_x type BAPISDITMX occurs 0 with header line,
         it_return type BAPIRET2 occurs 0 with header line.
    data: v_vbeln like BAPIVBELN-VBELN,
          v_bstkd like bapisdh1-purch_no_c,
          v_zterm like bapisdh1-pmnttrms,
          v_inco1 like bapisdh1-incoterms1,
          v_inco2 like bapisdh1-incoterms2,
          v_arktx like  bapisditm-short_text,
          v_koe1n like  bapisditm-currency.
    *_____ Internal to hold the records in the text file
    DATA : BEGIN OF it_header OCCURS 100,
      VBELN(10) ,
      BSTKD(35) ,
      ZTERM(4) ,
      INCO1(3) ,
      INCO2(28) ,
      POSNR(6) ,
      matnr(18) ,
      ARKTX(40) ,
    END OF it_header.
    *_____ Internal table to hold excel file data
    DATA : it_intern TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK scr1 WITH FRAME TITLE text-111.
    PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY .
    *paRAMETERS : p_header TYPE i DEFAULT 0.
    parameters :  p_begcol TYPE i DEFAULT 1 NO-DISPLAY,
                 p_begrow TYPE i DEFAULT 1 NO-DISPLAY,
                 p_endcol TYPE i DEFAULT 100 NO-DISPLAY,
                 p_endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK scr1.
    ___________START-OF-SELECTION________________
    START-OF-SELECTION.
    PERFORM convert_xls_itab. "to convert excel data into internal table
    ___________END-OF-SELECTION________________
    END-OF-SELECTION.
    *&      Form  convert_xls_itab
          text
    -->  p1        text
    <--  p2        text
    FORM convert_xls_itab .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
       filename    = p_file
          i_begin_col = p_begcol
          i_begin_row = p_begrow
          i_end_col   = p_endcol
          i_end_row   = p_endrow
        TABLES
          intern      = it_intern.
    EXCEPTIONS
      INCONSISTENT_PARAMETERS       = 1
      UPLOAD_OLE                    = 2
      OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    PERFORM move_data. " to move the data into an internal table
    ENDFORM.                    " convert_xls_itab
    ___________END-OF-SELECTION________________
    END-OF-SELECTION.
    PERFORM upload_so.   "to upload salesorder changes
    *&      Form  upload_so
          text
    -->  p1        text
    <--  p2        text
    *&      Form  move_data
          text
    -->  p1        text
    <--  p2        text
    FORM move_data .
      DATA : lv_index TYPE i.
      FIELD-SYMBOLS <fs>.
      SORT it_intern BY row col.  "Sorting Internal Table
      CLEAR it_intern.
      LOOP AT it_intern.
        MOVE it_intern-col TO lv_index.
        ASSIGN COMPONENT lv_index OF STRUCTURE it_header TO <fs>. " assigning each record to internal table row
        MOVE it_intern-value TO <fs>.
        AT END OF row.
          APPEND it_header.
          CLEAR it_header.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " MOVE_DATA
                       " move_data
    *&      Form  upload_so
          text
    -->  p1        text
    <--  p2        text
    FORM upload_so .
    LOOP AT it_header.
    Header
       v_vbeln            = it_header-VBELN.
       bapi_header-purch_no_c  = it_header-BSTKD.
       bapi_header-pmnttrms    = it_header-ZTERM.
       bapi_header-incoterms1  = it_header-INCO1.
       bapi_header-incoterms2  = it_header-INCO2.
    APPEND BAPI_header.
        bapi_header_x-updateflag = 'U'.
       bapi_header_x-purch_no_c  = 'X'.
       bapi_header_x-pmnttrms    = 'X'.
       bapi_header_x-incoterms1  = 'X'.
       bapi_header_x-incoterms2  = 'X'.
    APPEND BAPI_header_x.
    item
       REFRESH BAPI_item.
        bapi_item-ITM_NUMBER = it_header-POSNR.
        bapi_item-material =  it_header-matnr.
        bapi_item-short_text = it_header-arktx.
       bapi_item-currency   = it_item-koein.
        APPEND BAPI_item.
    bapi_item_x-updateflag = 'U'.
        bapi_item_x-ITM_NUMBER = it_header-POSNR.
        bapi_item_x-MATERIAL = 'X'.
        bapi_item_x-short_text = 'X'.
       bapi_item_x-currency   = 'X'.
        APPEND  bapi_item_x.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT         = V_VBELN
         IMPORTING
           OUTPUT        = V_VBELN.
    BAPI to change sales order
                       CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
                         EXPORTING
                           SALESDOCUMENT               = v_vbeln
                        ORDER_HEADER_IN             = bapi_header
                           ORDER_HEADER_INX            = bapi_header_x
                         SIMULATION                  =
                         BEHAVE_WHEN_ERROR           = ' '
                         INT_NUMBER_ASSIGNMENT       = ' '
                         LOGIC_SWITCH                =
                         NO_STATUS_BUF_INIT          = ' '
                         TABLES
                           RETURN                      = it_return
                        ORDER_ITEM_IN               = bapi_item
                        ORDER_ITEM_INX              = bapi_item_x
                         PARTNERS                    =
                         PARTNERCHANGES              =
                         PARTNERADDRESSES            =
                         ORDER_CFGS_REF              =
                         ORDER_CFGS_INST             =
                         ORDER_CFGS_PART_OF          =
                         ORDER_CFGS_VALUE            =
                         ORDER_CFGS_BLOB             =
                         ORDER_CFGS_VK               =
                         ORDER_CFGS_REFINST          =
                         SCHEDULE_LINES              =
                         SCHEDULE_LINESX             =
                         ORDER_TEXT                  =
                         ORDER_KEYS                  =
                         CONDITIONS_IN               =
                         CONDITIONS_INX              =
                         EXTENSIONIN                 =
    COMMIT WORK.
    ENDLOOP.
      IF IT_return-type = 'E'.
          WRITE: / 'Error :', IT_return-message, / 'for VBELN:',it_HEADER-VBELN.
        ELSEIF IT_return-type = 'S'.
          WRITE: / 'Successfully CHANGED', it_HEADER-VBELN.
        ENDIF.
    ENDFORM.                    " upload_so
    thanks

    hi
    You can use ORDER_ITEMS_IN. For further details use the documentation of the function module.This must help you in your requirement.
    regards
    Aakash Banga

  • FM to get sales order details with billing document .

    hi ,
    is there any standard FM or BAPI to get the sales order details with input as billing document ?
    i have the billing document number now i need to get the sales order number and its details ..
    is that possible ..
    i very well know how to get it by using query, i need standard FM.
    Points will be awarded for sure , if it helps .
    Thanks and regards
    JK

    Here is the list of BAPIs
    BAPI_QUOTATION_GETDETAILBOS
    BAPI_INQUIRY_GETDETAILBOS
    BAPI_SALESORDER_GETDETAILBOS
    SALES ORDER->
    BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
    BAPI_ORDER_CHANGE_STATUS_GET Change status for order
    BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
    BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
    BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
    BAPI_SALESORDER_GETSTATUS Sales order: Display status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order

  • Error while sending sales order form by fax

    hi,
    Sending Sales order by fax is not working. While adding output type for Sales order choosing device as 'FAX' is throwing an error saying that 'Error while sending fax with SO_OBJECT_SEND, return code 9'.  Anything needs to be configured or we have to code anything in SAPScript program. Please advise.

    Hi Harry,
    You don't need to write any particular code for sending FAX in SAPscript. But you may need to check some configurations regarding it.
    We configure SCOT to send Fax and mails to outside SAP. Check SAP Note 455140 for the configuration of SCOT tcode.
    Please refer this link [Sending FAX |Sending FAX from SAP;
    It might be helpful.
    Thanks,
    Daya.

  • Deleting Sales Order Details using BAPI_SALESORDER_CHANGE And Reinserting

    Hi All,
    I need to <b>change a Sales Order</b> in such a way that I would <b>delete all the existing Line Items</b> of that SO And <b>then reinsert new Line Items</b> as generally is the practice of saving a document.(Update Header-Delete Old Item Entries-Reinsert New Present Entries).
    I coded a small test program in ABAP using the <b>BAPI_SALESORDER_GETLIST And BAPI_SALESORDER_CHANGE</b>.
    In order to affect the Qty I have to update the Schedule Parameter also of the BAPI_SALESORDER_CHANGE Function.But this causes a new entry in VBEP.
    eg:
    <b>Before BAPI Calls</b>
    SO-Number:9001
    Header:9001,etc......
    Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
    I coded the program such that
    1.I <b>Get the List of Items</b> using BAPI_SALESORDER_GETLIST.
    2.Call the <b>BAPI_SALESORDER_CHANGE</b> filling appropraite   values in Parameters <b>with UpdateFlag = 'D'</b>
    3.<b>Insert new values</b> in OrderItems And Schedule Parameters
    say:
    Detail:ItemNo=10,Material=xyz,TargetQty=25,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=25,etc...
    4.<b>Call the BAPI_SALESORDER_CHANGE</b> filling appropraite values in Parameters <b>with UpdateFlag = 'I'</b>
    <b>The output now becomes.</b>Header:9001,etc......
    Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
    Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
    ItemNo=10,Scheduleline=2,Req_Qty=25,etc...
    Now After Commit when I see my <b>SO it shows me a qty of
    125</b>.
    I am attaching the code for your analysis.
    Thanx in advance.
    *& Report  ZSM_CHANGESALESORDER                                        *
    REPORT  ZSM_CHANGESALESORDER                    .
    DATA:
    For Calling the GetList BAPI Function
      CUSTOMER_NUMBER LIKE  BAPI1007-CUSTOMER,
      SALES_ORGANIZATION LIKE  BAPIORDERS-SALES_ORG,
      IT_SALES_ORDERS LIKE TABLE OF BAPIORDERS,
      WA_SALES_ORDERS LIKE LINE OF IT_SALES_ORDERS,
      IT_RETURN LIKE TABLE OF BAPIRETURN,
      WA_RETURN LIKE LINE OF IT_RETURN.
    For Calling the ChangeFromData BAPI Function
    DATA:
      SALESDOCUMENT LIKE  BAPIVBELN-VBELN,
      WA_ORDER_HEADER_IN LIKE  BAPISDH1,
      WA_ORDER_HEADER_INX LIKE BAPISDH1X,
      IT_ORDER_ITEM_IN LIKE TABLE OF BAPISDITM ,
      WA_ORDER_ITEM_IN LIKE LINE OF IT_ORDER_ITEM_IN,
      IT_ORDER_ITEM_INX LIKE TABLE OF BAPISDITMX ,
      WA_ORDER_ITEM_INX LIKE LINE OF IT_ORDER_ITEM_INX,
      IT_SCHEDULE_LINES LIKE TABLE OF BAPISCHDL ,
      WA_SCHEDULE_LINES LIKE LINE OF IT_SCHEDULE_LINES,
      IT_SCHEDULE_LINESX LIKE TABLE OF BAPISCHDLX ,
      WA_SCHEDULE_LINESX LIKE LINE OF IT_SCHEDULE_LINESX,
      IT_RETURN_CHG LIKE TABLE OF BAPIRET2,
      WA_RETURN_CHG LIKE LINE OF IT_RETURN_CHG.
    DATA:
      IT_RETURN_CT LIKE BAPIRET2.
    PARAMETERS:
      P_SO LIKE VBAK-VBELN,
      P_CUSTNO LIKE  BAPI1007-CUSTOMER,
      P_SORG LIKE BAPIORDERS-SALES_ORG.
    START-OF-SELECTION.
      SALESDOCUMENT = P_SO.
      CUSTOMER_NUMBER = P_CUSTNO.
      SALES_ORGANIZATION = P_SORG.
    Retrieve the Existing Sales Order details for that Sales Order.
      PERFORM GETREQSODETAILS.
    Delete the Existing Sales Order details from that Sales Order.
      PERFORM DELETEOLDSODETAILS.
    Insert New details for that Sales Order.
       PERFORM ADDNEWSODETAILS.
    END-OF-SELECTION.
      PERFORM COMMITTRANS.
    *&      Form  GetReqSODetails
    FORM GETREQSODETAILS .
      CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
        EXPORTING
          CUSTOMER_NUMBER    = CUSTOMER_NUMBER
          SALES_ORGANIZATION = SALES_ORGANIZATION
        IMPORTING
          RETURN             = WA_RETURN
        TABLES
          SALES_ORDERS       = IT_SALES_ORDERS.
    *delete the Sales Order Details of Sales Orders other than the req.One
      IF NOT IT_SALES_ORDERS[] IS INITIAL.
        SORT IT_SALES_ORDERS BY SD_DOC.
        LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
          IF WA_SALES_ORDERS-SD_DOC NE SALESDOCUMENT.
            DELETE IT_SALES_ORDERS.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " GetReqSODetails
    *&      Form  deleteOldSODetails
    FORM DELETEOLDSODETAILS .
      DATA: IRECCOUNT TYPE I.
      IRECCOUNT = 1.
    *Clear all the Inernal Tables And Work Areas
    *and Update the SO Header Index
      PERFORM CLEARDATA.
      PERFORM SOHEADERINDEX.
      LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
    *Fill the Order Details Index Internal Table
        PERFORM FILLSODELETEDTLS_INDEX_PARAM
        USING WA_SALES_ORDERS-ITM_NUMBER 'D'.
    *Fill the Order Scedule Index Internal Table
        PERFORM FILLSODELETESCH_INDEX_PARAM
        USING WA_SALES_ORDERS-ITM_NUMBER IRECCOUNT 'D'.
      ENDLOOP.
    *call the Sales Order Change Fumction to delete the Existing Data
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT    = SALESDOCUMENT
          ORDER_HEADER_INX = WA_ORDER_HEADER_INX
        TABLES
          RETURN           = IT_RETURN_CHG
          ORDER_ITEM_INX   = IT_ORDER_ITEM_INX
          SCHEDULE_LINESX  = IT_SCHEDULE_LINESX.
    ENDFORM.                    " deleteOldSODetails
    *&      Form  SOHeaderIndex
    FORM SOHEADERINDEX .
      WA_ORDER_HEADER_INX-UPDATEFLAG = 'U'.
    ENDFORM.                    " SOHeaderIndex
    *&      Form  FillSODeleteDtls_Index_param
    FORM FILLSODELETEDTLS_INDEX_PARAM
    USING VALUE(P_ITM_NUMBER) VALUE(P_FLAG).
      WA_ORDER_ITEM_INX-ITM_NUMBER = P_ITM_NUMBER.
      WA_ORDER_ITEM_INX-UPDATEFLAG = P_FLAG.
      APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
    ENDFORM.                    " FillSODeleteDtls_Index_param
    *&      Form  FILLSODELETEsch_Index_PARAM
    FORM FILLSODELETESCH_INDEX_PARAM
    USING VALUE(P_ITM_NUMBER) VALUE(P_RECCOUNT) VALUE(P_FLAG).
      WA_SCHEDULE_LINESX-ITM_NUMBER = P_ITM_NUMBER.
      WA_SCHEDULE_LINESX-SCHED_LINE = P_RECCOUNT.
      WA_SCHEDULE_LINESX-UPDATEFLAG = P_FLAG.
      APPEND WA_SCHEDULE_LINESX TO IT_SCHEDULE_LINESX.
    ENDFORM.                    " FILLSODELETEsch_Index_PARAM
    *&      Form  addnewSODETAILS
    FORM ADDNEWSODETAILS .
      DATA: IRECCOUNT TYPE I, ITEMNO TYPE I.
      IRECCOUNT = 1.
    *Clear all the Inernal Tables And Work Areas
    *and Update the SO Header Index
      PERFORM CLEARDATA.
      PERFORM SOHEADERINDEX.
      WHILE IRECCOUNT <= 1.
        ITEMNO = IRECCOUNT * 10.
    *Fill the New Order Details in the Internal Table
        PERFORM FILLSODTLDATA USING ITEMNO 'TEST FG' 37 .
    *Fill the Order Details Index Internal Table
        PERFORM FILLSODELETEDTLS_INDEX_PARAM USING ITEMNO 'I'.
    *Fill the New Schedule Details in the Internal Table
        PERFORM FILLSOSCHDATA USING ITEMNO IRECCOUNT 37 .
    *Fill the Order Scedule Index Internal Table
        PERFORM FILLSODELETESCH_INDEX_PARAM
        USING ITEMNO IRECCOUNT 'I'.
        IRECCOUNT = IRECCOUNT + 1.
      ENDWHILE.
    *call the Sales Order Change Fumction to Insert New Data
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          SALESDOCUMENT    = SALESDOCUMENT
          ORDER_HEADER_INX = WA_ORDER_HEADER_INX
        TABLES
          RETURN           = IT_RETURN_CHG
          ORDER_ITEM_IN    = IT_ORDER_ITEM_IN
          ORDER_ITEM_INX   = IT_ORDER_ITEM_INX
          SCHEDULE_LINES   = IT_SCHEDULE_LINES
          SCHEDULE_LINESX  = IT_SCHEDULE_LINESX.
    ENDFORM.                    " addnewSODETAILS
    *&      Form  clearData
    FORM CLEARDATA .
      CLEAR WA_ORDER_HEADER_INX.
      CLEAR WA_ORDER_ITEM_INX.
      REFRESH IT_ORDER_ITEM_INX.
      CLEAR WA_SCHEDULE_LINESX.
      REFRESH IT_SCHEDULE_LINESX.
      CLEAR WA_RETURN.
      REFRESH IT_RETURN.
      CLEAR WA_ORDER_ITEM_IN.
      REFRESH IT_ORDER_ITEM_IN.
      CLEAR WA_SCHEDULE_LINES.
      REFRESH IT_SCHEDULE_LINES.
    ENDFORM.                    " clearData
    *&      Form  FILLSODTLDATA
    FORM FILLSODTLDATA  USING    VALUE(P_ITEMNO) VALUE(P_MATERIAL)
    VALUE(P_TARGET_QTY) .
      WA_ORDER_ITEM_IN-ITM_NUMBER = P_ITEMNO.
      WA_ORDER_ITEM_IN-MATERIAL = P_MATERIAL.
      WA_ORDER_ITEM_IN-TARGET_QTY = P_TARGET_QTY.
      APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
    ENDFORM.                    " FILLSODTLDATA
    *&      Form  FILLSOschDATA
    FORM FILLSOSCHDATA  USING    VALUE(P_ITEMNO)
                                 VALUE(P_RECCOUNT)
                                 VALUE(P_REQ_QTY)  .
      WA_SCHEDULE_LINES-ITM_NUMBER = P_ITEMNO.
      WA_SCHEDULE_LINES-SCHED_LINE = P_RECCOUNT.
      WA_SCHEDULE_LINES-REQ_QTY = P_REQ_QTY.
      APPEND WA_SCHEDULE_LINES TO IT_SCHEDULE_LINES.
    ENDFORM.                    " FILLSOschDATA
    *&      Form  committrans
    FORM COMMITTRANS .
      DATA:SUCCESSFLAG(1).
      LOOP AT IT_RETURN_CHG INTO WA_RETURN_CHG.
        IF WA_RETURN_CHG-TYPE = 'S'
              AND WA_RETURN_CHG-ID = 'V1'
              AND WA_RETURN_CHG-NUMBER = 311
              AND SUCCESSFLAG IS INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              WAIT   = 'X'
            IMPORTING
              RETURN = IT_RETURN_CT.
          SUCCESSFLAG = 'X'.
        ENDIF.
      ENDLOOP.
      IF SUCCESSFLAG IS INITIAL.
        WRITE: 'SORRY SOME ERROR'.
      ELSE.
        WRITE: 'SUCCESSFUL'.
      ENDIF.
    ENDFORM.                    " committrans

    Thanx wolfgang,
    I needed that info.
    As I had mentioned in the earlier posts, I want to delete the old Sales Order Item Details,
    Schedule Details,Basic Price data And Reinsert data in the same.
    I am giving u the algo that I have used.
    1.<b>Get the SalesOrder Details</b> for a particular Sales Order using BAPI_SALESORDER_GETLIST(para:customer & sales Org and then deleting unwanted SO data).
    2.<b>Delete</b> the Sales Order <b>Item Details,Schedule Details</b> using BAPI_SALESORDER_CHANGE.
    3.<b>Commit</b> Transaction(<b>If I dont use this commit Error comes in Step No.7 while Commiting</b>)
    using BAPI_TRANSACTION_COMMIT.
    4.Check <b>Return Table</b> of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
    5.if Step No.4 is <b>Not okay</b> <b>then Rollback</b>(BAPI_TRANSACTION_TRANSACTIN) <b>and Exit</b> <b>else move to step 6</b>.
    6.<b>Add New</b> Sales Order <b>Item Details,Schedule Details, Basic Price</b> using BAPI_SALESORDER_CHANGE.
    7.<b>Commit Transaction</b> using BAPI_TRANSACTION_COMMIT.
    8.<b>Check Return</b> Log of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
    9.if Step No.9 is okay then Exit else Rollback(BAPI_TRANSACTION_TRANSACTIN) and move to step 10.
    10.Add Old Sales Order Item Details,Schedule Details, Basic Price from Data available in Internal
    table(Filled in step.1 ) using BAPI_SALESORDER_CHANGE.
    11.Commit Transaction using BAPI_TRANSACTION_COMMIT.
         This <b>works fine in 1 server in which I get the message of Incomplete Data,etc...when I make a Sales Order from va01</b>.
    But in another server where I dont this message,I get <b>error in step  7 or 11 as per the flow</b>.
    The return structure of BAPI_TRANSACTION_COMMIT contains error with Message 'Updating was not possible'. Also the message 'Updation was terminated' cms frm the SAP server.  
         What could be the reason?
    Thanx in advance

  • Sales order details

    Hi ,
    can you help me to find the (BAPI or Function module)
    which will give the existing sales order detail...
    similar to BAPI_PO_GETDETAIL,
    is there any bapi or F.M. for that....
    thanks in advance..
    Manish

    BAPI_CUSTOMERORDER_GETLIST
    BAPI_SALESORDER_GETLIST.
    SD_PARTNER_READ     
    PRICING     
    RV_ORDER_FLOW_INFORMATION     
    SD_PRINT_TERMS_OF_PAYMENT     
    BAPI_SALESORDER_SIMULATE     
    RV_ORDER_FLOW_INFORMATION  Reads sales document flow of sales document after delivery and billing 
    Don't forget also check direct reference documents for the both starting document # and preceding/following document types that you are searching for (For example, if you search delivery for the given SO, check also LIPS-VGBEL and LIPS-VGPOS, if it's possible with regard to performance
    SD_SALES_DOCUMENT_READ   Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties) 
    SD_SALES_DOCUMENT_READ_POS   Reads sales document header and item material: tables VBAK, VBAP-MATNR 
    SD_DOCUMENT_PARTNER_READ   partner information including address. Calls SD_PARTNER_READ 
    SD_DETERMINE_CONTRACT_TYPE   In: at least VBAK-VBELN
    Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT 
    RV_DELIVERY_PRINT_VIEW  Data provision for delivery note printing  
    SD_PACKING_PRINT_VIEW   
    SD_DELIVERY_VIEW  Data collection for printing  called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW 
    RV_BILLING_PRINT_VIEW  Data Provision for Billing Document Print 
    regards
    vinod

  • Sending Sales Order via Outlook

    Apologies if this is not the correct forum to post this question.
    We are trying to use outlook as the default email system to send Sales Order, PO's, Invoices, etc.
    We have tried the Outlook Integration to get a not so complete solution.
    We are now trying to  B1 Print & Delivery from Boyum, and we can make the document be saved in the drafts folder in Outlook. This is again a half solution.
    Is there a macro  that we can use to open the outlook window with the attachment and the send to: address and be able to actually see what is going to get be sent via email and add any text?
    Thank you,
    Eddy

    Third Wave have an add on that does this. Advanced Productivity Pack

  • Sales order details uploading using BAPI method in LSMW

    Hi Guys,
    Sales order details uploading using BAPI in LSMW, could you please suggest me, is any standard method or programs is available for this.
    I have some queries about this.
    1) One header line having multiple line items, in this case  we able to upload use the  LSMW method,
        if possible please tell me the steps.
      2) Do we need to do any config changes while uploading data?     
      3) Flat file should be which format.
      4) Steps to process each step wise if possible.
    Please help me
    Thanks,
    Gourisanakar.

    Hi Gouri Sankar,
    would you be able to upload the sales orders with multiple line items using BAPI LSMW?
    if so could you plz suggest?
    Thanks in advance.
    Suresh/

  • Function module or BAPI to get the sales order details.

    Hi,
    Can any one revert back with the FM or BAPI to get the sales order details.
    I tried using BS01_SALESORDER_GETDETAIL, in my driver program of smartform but when i execute the form using VA03 -> Sales Document -> Issue output to -> Print preview, I am getting the required output.
    if i see the print preview in the overview of the sales order (enter sales order and press enter), the above specified FM is not populating any data.
    Thanks,
    Prathap

    Hi Prathap,
    The above specified FM BAPISDORDER_GETDETAILEDLIST should work. As you need the item conditions,
    Fill the I_BAPI_VIEW with header = 'X', item = 'X' and sdcond = 'X'.
    Fill the SALES_DOCUMENTS-vbeln = sales order number.
    Regards,
    Shylaja

Maybe you are looking for