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

Similar Messages

  • Abap Report including sales orders and delivery data.

    Hi Experts,
    I Want to develop a new abap report which would contain the data for sales orders and delivery.
    I want to fetch all the sales orders based on the ship date (LIKP-WADAT_IST) of the delievry.
    Could anyone please let me know how to fetch teh data or is their any function module which would help me to solve my problem.
    <Removed by moderator>
    Thanks,
    Komal.
    Moderator message : Spec dumping not allowed. Thread locked.
    Edited by: Vinod Kumar on Aug 10, 2011 1:25 PM

    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 on sales order material

    Hi
    i am working in implementation project first time.We are implementing sd module in bi. We are working on the infocube 0sd_c03.I have to develop the reports on "*sales order material". As i am new kindly explain me what is procedure step by step
    Tushar

    Hi Tushar,
    1.Execute T-code RSA1, Under menu options on LHS, goto Metadata Repository.
    You will find 2 windows adjacent to eachother.
    Under "SAP Business Information Warehouse" window, Click on "Local Objects" under Heading Business Content.
    After Selecting that, you will find a huge list of all the objects on RHS window such as KPI's,Infoarea,Application, info object catalog etc..
    Click on "Infocube". (note:System may take time to display all list of cubes.)
    You will find a list of all infocubes which are ready to use (out-of-the-box) from Business content.
    Search for your cube ,use CTRL+F /Find option (give Sales cube or 0SD_C03 in search).
    Click on the cube Sales cube :0SD_C03.
    Now you will find all the details about this cube. Each and every data objects are dispayed.
    Goto reports section, you will find a huge list of reports already built on your sales cube. There you will find the report 0sd_c03_Q0012.
    If you need to know which key figs/characteristics/variables used in this query, then just click on that query, it will take you to a new screen displaying details about that query.
    Once you gather all the details, then after Gap analysis, if you feel that, yes the standard out of the box report matches your requirement or it almost meets the requirement and if you need to do slight enhancements then you can go ahead in instaling this report and save a lot of time instead of starting from scratch.
    To install this report, pre-requisites are- you should haveinstalled your cube, underlying DSO, transformation, all keyfigs, all chars, data source etc.
    and then use T-code RSORBCT/you can use BI Content menu on LHS in RSA1 screen to install this report.
    If pre-requisites are pending, you need to install all the objects first, you can use RSORBCT to install your cubes.
    2. It is advisable to search the query you need in the business content, if the query matches the requirement, you save a lot of time in developing the query. If you didnt find the suiatable query in Busines content, then you need to develop it from scratch.
    3)
    so when we run the query in bex query designer on cube 0sd_c03 by using 0sd_c03_Q0012 then what are things we have to take care. In rows and columns which chartersitic and key figures we have to put?
    I hope the query 0sd_c03_Q0012 "sales order material" may meet your requirements. If its not then try to get what is missing in this. If you need to enhance by adding any new objects, then first install this query from Business content, and then modify this query as per your need. and then activate and it will be ready to use.
    You can install any object as many times as possible from business content, its just the same as copy and paste.
    So only business content can help you on first phase regarding your requirement, because SAP has developed these reports at standard level used world wide thoughout industry.
    Hope this clears your queries.
    Regards
    Jeeth
    Edited by: Jeeth_P on Feb 3, 2012 9:25 AM

  • 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

  • Help ! Saving a sales order manually in VA01

    Hi All,
    I have a requirement to let the user's save the return sales order manually in VA01, by making some additional changes in the order like change in qty and so on..etc..
    As of now the return sales order is created with reference to the sales order by using BDC and calling the transaction VA01 at the end of the program.
    Ex:
      CALL TRANSACTION 'VA01'  USING bdcdata
                                                  MODE 'E'
                                                  UPDATE 'S'
                                                   MESSAGES INTO messtab.
        REFRESH bdcdata.
        CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
    Now here since the BDCDATA table will have all the required data and we call the tcode VA01, it automatically creates a return sales order until and unless there is a error.
    But my requirement is to save the return sales order manually via VA01 and it should not be created automatically even if it doesn't have any errors in it.
    Could you please let me know on how to go about the same.
    Would really appreciate any help on it.
    Edited by: Imran on Dec 12, 2008 11:15 AM

    n/a

  • Interactive report for sales order

    how to create an Interactive Report which displays all the sales orders for one particular customer, the materials ordered, quantity ordered, goods issue date of that particular order and contact information about that particular customer.

    http://www.sap-img.com/abap/program-for-sales-order-by-customer-date-sales.htm
    https://forums.sdn.sap.com/click.jspa?searchID=2651341&messageID=1671145.
    Have a look at the demo programs,
    DEMO_LIST_INTERACTIVE_1
    DEMO_LIST_INTERACTIVE_2
    DEMO_LIST_INTERACTIVE_3
    DEMO_LIST_INTERACTIVE_4
    DEMO_LIST_HIDE
    Please give me reward points.
    Regards,
    Murali Poli

  • Requied code in abap to display sales order header text

    hi all,
    can anybody help me to send the code in abap to display sales order header text.

    Use FM, Read_text. Pass the necessary parameters like object name, id, language. You can see some of the infos in by clicking the scroll-like button.
    Reward points if useful

  • Require a dummy date in a sale order

    Hi gurus,
    I require a dummy date in a sales order for entering a date on which letter of indent has come to end user. This date should also appear in tcode va05.
    U can also specify a date which is not used for regular purpose in a std order.
    Note:
    USER EXIT should't be used.
    regards,
    vimal

    hi,
    check these fields in vbap STDAT, STADAT. in vbkd FBUDA, VALDT, BSTDK. i think its not mandatory for u to use a date kind of data type certain kinds of fields can be used as date even though they are not date data types- consult ur ABAP consul for this. morevover its really for you to find out which fields are avalible to you as u are the best judge of teh business process.
    saurabh

  • What are required feilds values for creating a sales order using va01?

    What are required feilds values for creating a sales order using va01?
    Please give examples if possible.

    Hi,
    go through this URL:
    <a href="http://web.mit.edu/cao/www/SB2002/CR/VA01.htm">http://web.mit.edu/cao/www/SB2002/CR/VA01.htm</a>
    Hope this will help you.
    Thanks
    Shiva

  • Track/report delayed sales order

    Dear Experts,
    Do you have a simple solution to track/report delayed sales order with reason code? (I'd like to see delays in days and a reason code in a list.) Is there anyone who generate this KPI from SAP?
    Thanks in advance,

    Dear Roland
    Besides going down order by order, if you want to see the changes made to sale orders in bulk, I dont think there is a standard TCode available.
    As you would be aware, for sales documents, the change object is VERKBELEG and you have to develop a report considering tables VBAK and VBAP.  Of course, you are aware, changed history are recorded in CDHDR and CDPOS but both will eat your time.
    May be you can check this link and develop a zee report accordingly.
    [Sales Order Changed History Display |http://www.sap-img.com/ab024.htm]
    thanks
    G. Lakshmipathi

  • 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

  • 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

  • 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

  • Can any one help in creating a sales order

    Can any one help in creating a sales order  using va01 transaction ?
    I have a reference sales order number .
    Reason why I need this sales order :- I need it to check my task.
    The task was to generate a routine using VOFM ,create a Ztable with fields:sales area and condition types .The routine is activated if the combination of condition types and sales area exists in the Ztable.
    Can anyone tell me what is relationship between the three :Ztable ,routine and sales order?

    VA01 - Create Sales Order
    Use these steps to create a sales (or project) order for the purpose of billing a cost reimbursable project. The sales order is the document that links the sponsor to the project.
    Get started (SAP menu path, fast path)
    Create sales order: initial screen
    Create project order: overview
    Create Variant to simplify VA01 data entry
    1. Get Started
    SAP menu path: (not in role ZSBM)
    SAP Fast Path
    At the Command Line, enter: /nVA01
    2. Create Sales Order: initial screen
    Order Type: (Use default = "ZPS" for Project Order)
    Organizational data: (Use defaults)
    Sales organization ("1000" for Sponsored Billing)
    Distribution channel ("10" for MIT Distribution Channel)
    Division ("10" for MIT Division)
    or ENTER
    The Create Project: Overview screen displays, as shown below.
    3. Create Project Order: overview
    Sold-to party (type in 10-digit sponsor ID number, as shown below)
    In Material field of first line item: (type PROJECT to identify as sales order for sponsor billing, as shown below)
    (or ENTER)
    Result: A field for entering the WBS element displays, as shown below.
    WBS element (type in 7-digit WBS number for project)
    Click on  or F11 to SAVE.
    A message states that Project order XXXX has been saved.
    4. Create Variant to simplify VA01 data entry
    Run VA01 as described in step 1, so that the "Create Project Order: overview" screen displays (shown at start of step 3).
    On Item Overview tab, scroll to right to find WBS element column (about half way across).
    Click on column title, WBS Element; hold and drag all the way to left; then drop next to Material column, as shown below.
    Click on tiny (multicolored) icon  above vertical scroll bar (shown above, to far right) to display Table Settings dialogue box, shown below.
    Under Maintain Variants, type name for Variant, for example "my_settings" (leaving Use as standard setting checked); click on Create; then click on Save button to close dialogue box.
    From now on, the WBS element column displays next to Material column when you run VA01.
    Check the path as
    http://web.mit.edu/cao/www/SB2002/CR/VA01.htm

Maybe you are looking for

  • Error - Can't open more than one image in CS3

    My Photoshop CS3 was working fine until all of a sudden it no longer lets me open more than one image at a time without crashing. Anyone else have this problem? How do I fix it?

  • No digital sound after Vista upgrade on Audigy Platinum

    I finally got around to upgrading my Media Center PC from Win XP to Win Vista Ultimate x64. Following the upgrade and after installing the latest official drivers for my Audigy Platinum, I am unable to get any sound when using the digital out on the

  • V890 - how to identify specific DIMM from FM message?

    I can't figure out what DIMM slot is referenced by the Fault Manager output. It seems to be CPU/Memory module C but I need to know which four DIMMS must be replaced. This server has all four CPU/Memory modules completely populated with 2GB DIMMs. I c

  • Re-installation issue

    Hello and thanks in advance for your help. I have a macbook (not that it makes a differnce) and I had OSX 10.5. I repartitioned my hd (with nothing on it but a fresh copy of OSX) and I installed a partition of Ubuntu so I could have something to play

  • SNMP configuration in WLC

    hi all, Can any one tell me if there is document available for SNMP configuration for WLC 4404?