COOIS report with sales order details

Hello,
I am looking for a COOIS report attribute or an extension of the COOIS report that will have the sales order detials on the ALV grid instead of having to drill down to it. I want the item level details and the characteristic values... Hopefully there's a function module that will get that information.
Thanks,
AJ
Edited by: Antonio Jones on Feb 11, 2008 7:07 PM

Hi,
As far as my understanding there is no standard report is availbale
see in va05 and in layout see inco term option is available or not
Otherwise you can develop zreport, extract this from table VBKD
Kapil

Similar Messages

  • PR or PO report with Sales Order Number

    Friends,
    Is there any report with PR Number & Sales Order Number or PO Number & Sales Order Number
    Regards
    Banniar

    hi,
    VBAK SAles doc header data
    VBAP sales doc item data
    VBEP - sales doc schedule line data
    VBFA - sales doc flow...in it VBELV gives preceding doc...and VBELN gives subsequent docs....
    hope it helps...
    Regards
    Priyanka.P
    Edited by: Priyanka Paltanwale on Sep 23, 2008 6:38 AM

  • SD Report with Sales Order and IncoTerms

    Hi, is there any standard transaction where I can list Sales Orders and the Inco Terms?
    Just curious... Thanks,

    Hi,
    As far as my understanding there is no standard report is availbale
    see in va05 and in layout see inco term option is available or not
    Otherwise you can develop zreport, extract this from table VBKD
    Kapil

  • Possibility of getting serial report with sales invoice details

    Hi All,
    We are Telco company and there is a requirement to view the serial numbers issued to a customer along with the invoice number, invoice date and invoice value.
    Is this possible? If yes, please let me know the tables which can be used in SQVI.
    Thanks,
    Savindi

    Hi,
    Refer the below link it may help you.......
    Re: Invoice details related to Serial Numbers

  • Issue for Production Report With Production Order Details and Batch Number

    Hi Guys,
    I am looking for a  batch report.I have tried it but i didnt get the desired results.Pls any body give me some solution.
    I need to include the Batch number  in this report and when i have done the same  the values are repeating  and also need to display the Item Description for (Description in Production Order - Parent Item)
    SELECT  distinct t0.docnum,T0.[DocDate], t4.IssuedQty as 'Consumed Qty', T1.[ItemCode] as 'Circle Codee',T1.[Dscription] as 'Circle Name',t3.itemcode
    FROM [dbo].[OIGE]  T0
    INNER JOIN [dbo].[IGE1]  T1 ON T0.DocEntry = T1.DocEntry
    LEFT JOIN owor t3 on t1.baseref = t3.docnum
    left  join wor1 t4 on t3.docentry=t4.docentry
    INNER JOIN OITM T5 ON T1.ItemCode = T5.ItemCode
    INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN IBT1 T7 ON T5.ItemCode = T7.ItemCode
    INNER JOIN OIBT T8 ON T7.BatchNum = T8.Batchnum and T7.ItemCode = T8.itemcode
    where t0.docdate between  [%0] and [%1] and T6.[ItmsGrpNam] = 'Raw Materials' and t0.JrnlMemo = 'Issue for Production'
    Any body provide me some idea for achieving this....
    Regards,
    Vamsi.

    Hi Bala.
    Thanks for the query but still  not acheived the result.
    The Scenario is to know the quantity of the Coil (Raw MAterial) used IN making a product in different stages and from which batch and Whse the RawMaterial is Consumed in making of the Product(Production Order Parent Item)
    ------------- (Issue for Production )-----------------------|    Production Order Qty(IssuedQty)    Production Order       |  BatchNum
    DocNo/Date      | ( RawMaterial/Coil Code/Desription)  |   (Quantity issued for RM)                  ItemCode/Description | Batchnum
    Regards,
    Vamsi..
    Edited by: VamsamP on Dec 1, 2010 5:06 PM

  • Report for Sales orders with the consumed credit limit value

    Dear Gurus,
    In my company, the credit check is at sales order level. We want a report which shows up the credit value consumed from the credit master by Sales order.
    Going into the details, Say Credit limt is setup for a customer at Credit master for 10000 $.
    I want a report showing Sales order 59235 has consumed 500 $, Sales order 59277 has consumed 1500 $, Sales order 59333 has consumed 2500 $.
    Is their a report in standard SAP for the above functionality. If not, any ideas of how to achieve it?
    Thank you for your responses.
    Regards,

    Hi,
    Try the following transaction codes
    S_ALR_87012218
    FDK43
    F.31
    But if you want to a report like what you explained in thread i think in standard not available we need to develop a customized one.
    Regards

  • How  to grow the report of customer's openitem with sales order

    How  to grow the report of customer's open item with sales order?
    Now we can get the customer's open item with invoice No easily,but our end user need the the customer's open item also with sales order .And because a invoice to multi sales orders. I can do nothing.
    Now I have a idea that a develivey No with one sales order , and one invoice with a sales order's develivery ,then one inovice to one sales order .  I want to  know if other company have use this idea. Or have other solution for my problem.

    Hi Yuzhou Yang ,
      Yes you are right. In FI transaction you can get the sales invoice wise , reference field of the header data.
      As you are aware that while creating a sales order , no FI entry is generated.
      In my opinion you can get the required report through customization.
    Thanks
    D.K.Lakshmi narayana

  • 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

  • Report of sales orders with several schedules lines

    Hi all,
    I try to develop a report for sales orders and delivery info. I need sales order quantity, delivery quantity and the quantity in the scheduled line. But I faced with the problem of several scheduled lines.
    I could not find the relation between delivery information and the scheduled lines of sales order.
    Any function module or other way to find out a delivery belongs to which cheduled line of the sales order ?
    Thanks,
    Utku

    Solved problem

  • Report of sales orders with several scheduled lines

    Hi all,
    I try to develop a report for sales orders and delivery info. I need sales order quantity, delivery quantity and the quantity in the scheduled line. But I faced with the problem of several scheduled lines.
    I could not find the relation between delivery information and the scheduled lines of sales order.
    Any function module or other way to find out a delivery belongs to which scheduled line of the sales order ?
    Thanks,
    Utku

    post this in ABAP forum for quicker response.
    Regards
    Raja

  • Report on Sales Orders Cancelled

    Dear Experts,
    I have the following TWO Requirements.
    1) How to cancel Sales Orders.
    2) How to Generate a Report  on Sales Orders Cancelled during a given time. The details required in the Report are:
    Orders cancelled by an User, Depot and by the Region.
    Creation date of sale order.
    Cancellation date.
    Kindly give us your Detailed & Valuable solutions to proceed.
    Regards
    Hari

    Hi Lakshmipathi,
    I have been going through various Threads Posted in the Forum.
    In One of your Replies to a Question Posted "Re: Deletion indicator of sales order" the Solution given is "Execute TCode AUT10."
    When I had tried with the Transaction Code AUT10 on the SAP System, No Data is populated on the Screen. Any settings to be done on the System.
    You can suggest a possible solution to the Issue posted by me.
    Regards
    hari

  • Report for Sales Order Change History   CDPOS and CDHDR

    How to take a report of the data for the Sales Order Change history for a particular period of time. It is required to take a report of all the Sales Orders for which the basic price has been changed. Please let me know the procedure. I could not get the data from the table CDPOS and CDHDR
    Helpful answer would be rewarded.
    Regards
    Praveen

    Dear Praveen Kumar
    Have you tried with VBAP where sale order details at item level would be stored.
    Moreover, to my knowledge, there won't be any changes as for as pricing is concerned at sale order level but there is at billing level.  Normally, any price increase / decrease would reflect in billing.  So why dont you to table join through SQVI VBAP (for sale order details) and VBRP (for billing details) so that you can compare the selling price in sale order with billing. 
    Thanks
    G. Lakshmipathi

  • Requires experts help - abap report in sales order

    hello,
    for the sales order details -  to display partner function and delivery status.
    first screen contains selection screen containing sales organization and a check box.
    if i enter the sales organization without clicking check box, it displays many sale orders clicking on any sale order, (interactive)  takes me to another screen, where i have push buttons for displaying partner func and delivery status. - this output is coming correctly.
    if i enter sales org. and <b>click the check box</b>, goes to next screen where i give sale order no. in parameter and after giving i should go to the same screen where i created pushbuttons for displaying the partner functions and delivery status of that particular vbeln.
    i am not getting the output for the above thing.
    ( i am not using dialog module). ordinary report only.
    can anybody help me in this regard.
    thank you.

    Hello Akilandeswari
    Sorry to say that but your application is an example of a poor user interface (UI).
    The following sample report <b>ZUS_SDN_TWO_ALV_GRIDS_SO</b> shows you how to display all sales order for a given sales organisation. Double-clicking on a sales order fills the second ALV list with the partner functions. Obviously, it would be a piece of cake to display the statusinfo in another ALV list (-> Alv).
    *& Report  ZUS_SDN_TWO_ALV_GRIDS
    *& Screen '0100' contains no elements.
    *& ok_code -> assigned to GD_OKCODE
    *& Flow logic:
    *  PROCESS BEFORE OUTPUT.
    *    MODULE STATUS_0100.
    *  PROCESS AFTER INPUT.
    *    MODULE USER_COMMAND_0100.
    REPORT  zus_sdn_two_alv_grids.
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_outtab        TYPE STANDARD TABLE OF vbak,
      gt_partner       TYPE STANDARD TABLE OF vbpavb.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_outtab      LIKE LINE OF gt_outtab.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_outtab INTO ls_outtab INDEX e_row-index.
        CHECK ( ls_outtab-vbeln IS NOT INITIAL ).
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
    *        IS_ROW_ID    =
    *        IS_COLUMN_ID =
            is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    PARAMETERS:
      p_vkorg    TYPE vkorg  DEFAULT '1000'.
    START-OF-SELECTION.
      SELECT        * FROM  vbak INTO TABLE gt_outtab
             WHERE  vkorg = p_vkorg.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 2
          columns           = 1
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 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.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_bottom
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Display data
      gs_layout-grid_title = 'Sales Orders'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBAK'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_outtab
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      gs_layout-grid_title = 'Partner Functions'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBPA'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_partner  " empty !!!
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          OTHERS         = 2.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ld_title    TYPE lvc_title,
        ls_outtab   LIKE LINE OF gt_outtab,
        lt_sadrvb   TYPE STANDARD TABLE OF sadrvb.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_outtab INTO ls_outtab INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      REFRESH: gt_partner.
      CALL FUNCTION 'SD_PARTNER_READ'
        EXPORTING
          f_vbeln                = ls_outtab-vbeln
    *     OBJECT                 = 'VBPA'
          no_master_adress       = 'X'
        TABLES
          i_xvbadr               = lt_sadrvb  " dummy, obligatory
          i_xvbpa                = gt_partner.
      CONCATENATE ls_outtab-vbeln 'Partner Functions' INTO ld_title
        SEPARATED BY ': '.
      go_grid2->set_gridtitle( ld_title ).
      CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
        EXPORTING
          salesdocument       = ls_outtab-vbeln
    *   IMPORTING
    *     RETURN              =
    *    TABLES
    *     STATUSINFO          = gt_status
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    Regards
      Uwe

  • 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

  • How to create a daily report for sales order

    hi
    how to create a daily report for sales order. what fields it must consists of. what are the tables it need?

    Hi
    You have to use the sales order tables VBAK,VBAP and VBEP
    So keep date field on selection screen
    and treat this date as Order creation data audat field in VBAK.
    based on this fetch the data from VBAK and VBAP  with the following fields like
    VBELN, KUNNR,NETWR,POSNR, MATNR,ARKTX,KWMENG,WAERS  etc and display in the report
    <b>Reward points for useful Answers</b>
    Regards
    Anji

Maybe you are looking for

  • How do I copy an App from my wife's phone to mine

    My wife has a free App from a 3rd party authorised provider that I would find very useful. Its a gateway to a government work related suite of password secured websites. She can't remember where it came from and no amount of searching can find it. An

  • Session-failover-enabled not working in iWS6 with a FileStore

    I'm trying to use a FileStore to implement session persistence using IWSSessionManager. I have the following in my web-apps.xml: <web-app uri="/Banking" dir="c:/java/online"> <session-manager class='com.iplanet.server.http.session.IWSSessionManager'>

  • T520i Sound problem (real-time audio)

    I`m using my Lenovo T520i i7-2630QM with 8GB Ram for my DJ needs.But i have  pops, hisses, crackles and pauses. I disabled the wireless adapter in order to get better results and it`s working but in every 15 min or 30min there is crackles and pops.I`

  • Why is the CS6 install PKG so slow?

    Ok so I can't use the clone solution anymore (without creating a serialization file etc.,) which we used to deploy using Casper. So using the 3.1 enterprise deployment tool I have created the install pkg, and loaded it to Casper Admin and ran an inst

  • Order By Vs. RowNum

    Hello, My query has an Order By statement (order by tblA.Name) . When the query runs this is the order the records come out: 1) All records that have a space in the first byte of their Name field. 2) All records whos name begins with a special charac