Problem displaying drill down STANDARD ALV for a particular record after pressing back button

I have a simple interactive ALV grid report. NOT 'OO'. It display correctly on initial execution. AT the moment, 6 records. I want it to work such that if i click record '1', a drill-down version of that ALV with only that one record clicked is displayed. This currently occurs correctly. The problem arises when i click the back button and want to click on a new record, say in the 2nd row..this new 2nd row record is not displayed. The first one is displayed again. I tried clearing and fiddling around but then the last record is displayed. I have used the 'ID' field as a 'hotspot' getting picked up by sy-tabindex. Maybe it could be that i shouldn't loop and use  a work area e.g in my select statement. i'm not so sure i've looked around, and tried a few things. I can't get it right yet. My code is below:
*& Report  ZALV
REPORT  ZALV.
TABLES: ZCONTACT.
TYPE-POOLS: slis. "slis contains all of the ALV data types.
TYPES: BEGIN OF ty_zcontact.
         INCLUDE STRUCTURE zcontact.
TYPES: icon TYPE char4, "field holding traffic light value- adding a column to internal table to hold the traffic light
         END OF ty_zcontact.
DATA: "fieldcatALOG TYPE slis_t_fieldcat_alv WITH HEADER LINE,
       it_zcontact TYPE TABLE OF ty_zcontact,"declares an internal table of type ZCONTACT
       wa_zcontact TYPE ty_zcontact,
       gd_layout TYPE slis_layout_alv,
       gd_repid LIKE sy-repid,
       g_variant TYPE disvariant,
       gx_variant TYPE disvariant,
       g_save TYPE c VALUE 'X',
       it_fieldcat TYPE slis_t_fieldcat_alv,"declares field catalog table of line type alv
       wa_fieldcat TYPE slis_fieldcat_alv, "declares the work area of the field catalog
       it_list_top_of_page TYPE slis_t_listheader.
DATA: it_fieldcat1 TYPE slis_t_fieldcat_alv,
       wa_fieldcat1 TYPE slis_fieldcat_alv.
DATA: V_FIELD(30) TYPE C,
V_VALUE(10) TYPE C.
       "izontact TYPE TABLE OF zcontact.
        "i_logo TYPE OT.
       "ls_layout TYPE slis_layout_alv.
**Selection Screen details
*SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
*PARAMETERS: variant like disvariant-variant.
*SELECTION-SCREEN END OF BLOCK B1.
SELECT-OPTIONS:
age FOR wa_zcontact-age,
lastnme FOR wa_zcontact-lastname.
**Getting default variant
*  AT SELECTION-SCREEN ON age.
*    SELECT SINGLE age FROM zcontact INTO wa_zcontact-age WHERE age = age.
*  IF sy-subrc NE 0.
*    MESSAGE:'That age does not exist mate, Please enter another age' TYPE 'E'.
*    ENDIF.
INITIALIZATION.
*gx_variant-report = sy-repid.
*CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
*EXPORTING
*  I_SAVE = G_SAVE
*  CHANGING
*    CS_VARIANT = GX_VARIANT
*  EXCEPTIONS
*    NOT_FOUND = 2.
*IF SY-SUBRC = 0.
*  VARIANT = GX_VARIANT-VARIANT.
*  ENDIF.
START-OF-SELECTION.
  PERFORM DATA_RETRIEVAL.
  PERFORM BUILD_FIELDCATALOG.
  PERFORM DISPLAY_ALV_REPORT.
  PERFORM top_of_page.
"g_repid = sy-repid.
*Fetch data from the database
FORM DATA_RETRIEVAL.
SELECT * FROM zcontact INTO TABLE it_zcontact WHERE age IN age AND lastname IN lastnme.
"assigning traffic light colour to each row based on a condition
*  IF wa_zcontact-age GE 65.
*   wa_zcontact-icon = 1. "Red Traffic Light
*   ELSEIF wa_zcontact-age BETWEEN 40 AND 64.
*     wa_zcontact-icon = 2. "Yellow traffic light
*     ELSE.
*       wa_zcontact-icon = 3." Green traffic light
*       ENDIF.
*       MODIFY it_zcontact FROM wa_zcontact TRANSPORTING icon.
*       CLEAR wa_zcontact.
ENDFORM.
FORM BUILD_FIELDCATALOG.
*Build field catalog
wa_fieldcat-fieldname = 'ID'.
"wa_fieldcat-seltext_m = 'The Contact ID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LASTNAME'.
"wa_fieldcat-seltext_m = 'Contact Lastname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'FIRSTNAME'.
"wa_fieldcat-seltext_m = 'Contact Firstname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'DOB'.
"wa_fieldcat-seltext_m = 'Date Of Birth'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'TEL'.
"wa_fieldcat-seltext_m = 'Telephone Number'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ADDRESS'.
"wa_fieldcat-seltext_m = 'The Address'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'OCCUPATION'.
"wa_fieldcat-seltext_m = 'The Occupation'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'WEIGHT'.
"wa_fieldcat-seltext_m = 'WEIGHT'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'AGE'.
"wa_fieldcat-seltext_m = 'AGE OF THE CONTACT'.
wa_fieldcat-do_sum   = 'X'.        "Display column total
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'SALARY'.
"wa_fieldcat-seltext_m = 'SALARY'.
wa_fieldcat-do_sum   = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
gd_layout-lights_fieldname = 'ICON'.
ENDFORM.
FORM DISPLAY_ALV_REPORT.
gd_repid = sy-repid.
*Pass data and field catalog to ALV function module to display ALV list
   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       it_fieldcat            = it_fieldcat
       i_callback_program     = gd_repid
       i_callback_top_of_page =  'TOP_OF_PAGE'
       i_callback_user_command =  'USER_COMMAND'
       i_structure_name       =  'ZCONTACT'
       i_save                 = 'X'
       is_variant             = g_variant
       is_layout     = gd_layout
TABLES
       t_outtab      = it_zcontact
EXCEPTIONS
       program_error = 1
       OTHERS        = 2.
ENDFORM.
FORM top_of_page.
*ALV Header declarations
   DATA: it_listheader TYPE slis_t_listheader,
         wa_listheader TYPE slis_listheader,
         t_line like wa_listheader-info,
         ld_lines TYPE I,
         ld_linesc(10) TYPE C.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Contact Details'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-repid.
wa_listheader-key = 'Program Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-uname.
wa_listheader-key = 'User Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Run Date :'.
CONCATENATE sy-datum+6(2)
             sy-datum+4(2)
             sy-datum(4)
             INTO wa_listheader-info
             SEPARATED BY '/'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Time :'.
CONCATENATE sy-uzeit(2)
             sy-uzeit+2(2)
             sy-uzeit+4(2)
             INTO wa_listheader-info
             SEPARATED BY ':'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
   CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
     EXPORTING
       it_list_commentary = it_listheader
       i_logo = 'KLOGO'.
ENDFORM. "top_of_page
*& Form sub_user_command
FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
P_SELTAB TYPE SLIS_SELFIELD.
CASE P_UCOMM.
   WHEN '&IC1'.
CASE p_seltab-fieldname.
   WHEN 'ID'.
   READ TABLE it_zcontact INTO wa_zcontact INDEX p_seltab-tabindex.
   PERFORM DATA_RETRIEVAL1.
   PERFORM BUILD_FIELDCATALOG1.
   PERFORM SECOND_GRID.
   ENDCASE.
   ENDCASE.
ENDFORM. "
FORM DATA_RETRIEVAL1.
SELECT * FROM zcontact INTO TABLE it_zcontact WHERE id EQ wa_zcontact-id.
ENDFORM.
FORM BUILD_FIELDCATALOG1.
*Build field catalog
CLEAR: wa_fieldcat, it_fieldcat.
wa_fieldcat-fieldname = 'ID'.
"wa_fieldcat-seltext_m = 'The Contact ID'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LASTNAME'.
"wa_fieldcat-seltext_m = 'Contact Lastname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'FIRSTNAME'.
"wa_fieldcat-seltext_m = 'Contact Firstname'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM.
FORM SECOND_GRID.
   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
     I_CALLBACK_PROGRAM = SY-REPID
     IT_FIELDCAT = IT_FIELDCAT
     i_structure_name       =  'ZCONTACT'
     i_callback_user_command =  'USER_COMMAND'
     TABLES
       T_OUTTAB = IT_ZCONTACT.
   ENDFORM.

Hi Ten Mariga,
                 I wonder why the second select Query is needed at all instead you can use
---> Not Needed
FORM DATA_RETRIEVAL1.
SELECT * FROM zcontact INTO TABLE it_zcontact WHERE id EQ wa_zcontact-id.
ENDFORM.
----> Instead you can do
   READ TABLE it_zcontact INTO wa_zcontact INDEX p_seltab-tabindex.
  Append wa_zcontact to Second_table.
And you can use the Second_table to display the second ALV. The second Select Query will affect the performance too.
Cheers,
Krishnakumar B.

Similar Messages

  • Problem with drill down in time dimension - OBIEE 11G

    Hello There,
    I have a problem with drill down in time dimension. The hierarchy for time dimension is " Fiscal Year---> Fiscal Quarter---> Month(Name)--->Date". When I select a Time dimension and click results its getting opened in a Pivot table view. The problem here is, when I click the "Total" its getting drilled down to Year ---> Quarter but when I click on "+ sign next to quarter" it should drill down to month for that particular quarter for that particular year but its drilling down to month for that particular quarter for all years.
    Any suggestions are much appreciated.
    Thanks,
    Harry.

    1.) Congrats for resurrecting a year-old thread.
    2.) Your answer is here: "Check the level key of the quarter level...it should include both quarter and year columns. Since a specific quarter occurs every year, quarter column alone can't be used as the level key."

  • Display list of sales orders for one particular customer using BAPI in WD

    Friends,
    i want to display list of 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, using Webdynpro.
    Please somebody send me related info,blogs,help links , to complete this task, this is very urgent.
    Please help
    Peter

    Find the WD tutorials here...
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/web%20dynpro%20sample%20applications%20and%20tutorials.htm">Tutorials</a>

  • How to retrieve long text for a particular record

    Hi,
    I've been looking through some of the numerous posts relating to reading long texts but I can't seem to find out how to retrieve the necessary parameters for READ_TEXT for a particular record without using the GUI.
    Is there a way in ABAP that one could retrieve the parameters that are required to execute READ_TEXT just from one of the fields in the base table.  eg.  I would like to bring back a list of all materials with their associated long texts.  I can run a query on MARA for example and retrieve the necessary material information but I would like to know how I could get the necessary information, for each row in my results, to pass to READ_TEXT. 
    What information would I need to perform the above, if at all possible?
    Thanks in advance,
    Charles

    You can check out SE75.  Here is where the objects and ids are listed/maintained.  There is one trick to find the object/id.  That is,  create the text in the specific transaction.  If you are talking about header text for a sales orders, go to VA02 and enter some text and save.  Now go to SE16, enter STXH as the table name.  On the selection screen for STXH,  enter your user name for "created by" and enter the date.  Execute.  The record that you see is probably the text that you just created.  You can see the object, the id, and even how the name is built.  In this case,  it would be sales order number.
    Sometimes where you enter the text, there is a little "scroll" icon under the text editor, clicking that will tell you the object and id.  In some cases, this functionality is not there.
    Regards,
    Rich Heilman

  • Since yesterday I am facing problem,when it goes in sleep mode it actually turn off and does not come up after pressing start button but every time I have to hard reset it.It is 4 gen running on 4.3.3

    Since yesterday I am facing problem,when it goes in sleep mode it actually turn off and does not come up after pressing start button but every time I have to hard reset it to turn it on .It is 4 gen running on 4.3.3.Please help

    so I have called HP tech support 12 times over the last 6 weeks and still my HP Officejet 4620 loses connection overnight. Of course becasue it was a birthday present I spent more time than I normally would have on this issue. While the tech are very polite they have not fixed my problem and now it is too late to return printer to store. This is a lot of money wasted and I think they need to admit this is a bug in this printer and resolve the problem!!!!!

  • Looking For Method Of Displaying Drill-Down Subreport Data On Same Page

    Not sure what the technical term for this is, but I need to find a way to display dynamic drill-down sub-report data within a report.  Here is an example of what I am trying to accomplish:
    + DATA SUMMARY 1
    + DATA SUMMARY 1
    - DATA SUMMARY 1
            data detail 11
            data detail 12
    - DATA SUMMARY 2
            data detail 2
            data detail 2
    The idea is you click on the + (plus sign) and the subreport detail unfolds below the summary row.  To close the sub-report data, you click on the - (minus sign).  Right now, the report pops up the sub-report data in a separate tab, which is not what the client wants.
    Fuskie
    Who doesn't know if this is a function of report design or of viewer manipulation of report data...

    I think this is called In Place Drill Down.
    Fuskie
    Who appreciates y'alls help....

  • Problem creating Drill-Down report

    Hi,
    I have problem in creating a drill-down report,got confused how to do it. this is my requirement.
    The main portion that will be first displayed contains a group on match_code and has its own detail section. now when the user selects one of these match_code it should drill down to give more information about this match_code, so the Drill down should also have its own detail section that will be hide and drilldown ok.
    If this the proper way to do it. I will be creating a drill down report for the first time.
    Thanks,
    Reena

    Hello Reena,
    If I understand your situation correctly you have a group on match_code and a details and b section. You want the Group Header and Details a sections to appear on the first "page" or drilldowngrouplevel 0. When the user drills down you want the Details b section to appear.
    You can do that using the drilldowngrouplevel function.
    Set the details b section to suppress when drilldowngrouplevel = 0, this section will only appear after drilldown.
    I am not sure if you still want the details a or group sections to appear after drilldown, if you do then there is no need for conditional suppression. If you don't then use a conditional suppression formula for those sections of drilldowngrouplevel <> 0

  • Drill down on alv

    Hi,
    I am trying to show 'me22n' ( PO details) by drilling down on ebeln in my  alv report. but for some reason this is NOT happening. can somebody pls help.
    the alv is been shown properly the it does not drill down on po number "ebeln".
    Please find the enclosed code.
    Thanks & Regards
    Hrishi
    REPORT  Z_VENDOR_BACKORDER_REPORT_ALV line-size 400.
    TABLES:  EKKO, LFA1, MAKT, EKET, EKPO, AFPO, MARC.
    *Data Declaration
    DATA:  BEGIN OF ITAB OCCURS 0 ,
            ebeln       LIKE ekko-ebeln  ,  " PO number
            aedat       LIKE ekko-aedat  ,  " creation date
            ebelp       LIKE ekpo-ebelp  ,  " item no
            lifnr       LIKE ekko-lifnr  ,  " vendor number
            name1       LIKE lfa1-name1  ,  " vendor name
            RESWK       LIKE EKKO-RESWK  ,  " PLANT NO
            MEMORY      LIKE EKKO-MEMORY , " ORDER INCOMPLETE
            matnr       LIKE ekpo-matnr  ,  " material number
            werks       like ekpo-werks  ,  " plant
            txz01       LIKE ekpo-txz01  ,  " material description
            eindt       LIKE eket-eindt  ,  " Promised date
            menge       LIKE eket-menge  ,  " quantity
            wemng       LIKE eket-wemng  ,  " delivered quantity
            netpr       like ekpo-netpr  ,  " value in AUD
            peinh       like ekpo-peinh  ,  " price unit
            banfn       like ekpo-banfn  ,  " PR no
            aufnr       like ebkn-aufnr  ,  " Production order no
            MAABC       LIKE MARC-MAABC  ,  " MATERIAL ABC Indicator
            maktx       like makt-maktx  ,  " material long description
            open_quant  type p decimals 2,  " quantity - delivered
            VALUE       TYPE p decimals 2,  " $ VALUE * OPEN QUANTITY
            end of ITAB.
    data: wa like itab.
    DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: TEMP TYPE EKKO-LIFNR.
    data: opt like CTU_PARAMS.
    *DATA:  WA TYPE FINAL.
    all ALV declarations
    type-pools: slis.                                 "ALV Declarations
    DATA:   fieldcatalog        TYPE slis_t_fieldcat_alv with header line,
            G_REPID             TYPE SY-REPID,
            GS_PRINT            TYPE SLIS_PRINT_ALV,
            GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
            GT_EVENTS           TYPE SLIS_T_EVENT,
            GT_SORT             TYPE SLIS_T_SORTINFO_ALV,
            GS_LAYOUT           TYPE SLIS_LAYOUT_ALV,
            COL_POS TYPE I.
    -----------------SELECTION SCREEN----------------------
      selection-screen begin of block b1 with frame title text-001.
      select-options VENDORNO for ekko-lifnr.
      select-options MATERIAL for ekpo-matnr.
      SELECT-OPTIONS PLANT FOR EKKO-RESWK.
      select-options REQDAT for eket-eindt.
      selection-screen end of block b1.
    *................... GET DATA..................
    SELECT EKKO~EBELN
           EKKO~AEDAT
           EKKO~LIFNR
          EKKO~MEMORY
          EKKO~RESWK
           EKPO~EBELP
           EKPO~MATNR
           ekpo~werks
           ekpo~netpr
           ekpo~peinh
           ekpo~banfn
           ekpo~txz01
          makt~maktx
           EKET~EINDT
           EKET~MENGE
           EKET~WEMNG
           LFA1~NAME1
    INTO corresponding fields of ITAB
    FROM (
    EKKO inner JOIN EKPO
    ON EKKOEBELN = EKPOEBELN
    inner JOIN EKET
    ON EKPOEBELN = EKETEBELN
    AND EKPOEBELP = EKETEBELP
    inner JOIN LFA1
    ON EKKOLIFNR = LFA1LIFNR
    *left outer join makt
    *on ekpomatnr = maktmatnr
    WHERE EKKO~LIFNR IN VENDORNO
    AND EKKO~RESWK IN PLANT
    and EKPO~MATNR IN MATERIAL
    and ekpo~elikz eq ' '
    and ekpo~loekz ne 'L'
    and eket~eindt in REQDAT.
    append itab.
    CLEAR ITAB.
    endselect.
    clear temp.
    sort itab by lifnr.
    loop at itab .
    ITAB-OPEN_QUANT = ITAB-MENGE - ITAB-WEMNG.
    if itab-matnr eq ''.
    select single aufnr from ebkn into itab-aufnr where banfn = itab-banfn.
      select single matnr from afpo into itab-matnr where aufnr = itab-aufnr.
    endif.
    select single maktx from makt into itab-maktx where matnr = itab-matnr.
    select single maabc from MARC INTO ITAB-MAABC WHERE MATNR = ITAB-MATNR.
    ITAB-VALUE = ITAB-NETPR * ITAB-OPEN_QUANT / itab-peinh.
    modify itab.
    endloop.
    SKIP.
      fieldcatalog-fieldname   = 'LIFNR'.
      fieldcatalog-seltext_m   = 'vendor no'.
      fieldcatalog-col_pos     = 1.
      fieldcatalog-outputlen   = 15.
    fieldcatalog-emphasize   = 'X'.
    fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
        clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'po Number'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'po date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'item number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'material number'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MAABC'.
      fieldcatalog-seltext_m   = 'material type'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'TXZ01'.
      fieldcatalog-seltext_m   = 'short text'.
      fieldcatalog-col_pos     = 7.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MAKTX'.
      fieldcatalog-seltext_m   = 'long text'.
      fieldcatalog-col_pos     = 8.
       fieldcatalog-outputlen   = 15.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    fieldcatalog-fieldname   = 'EINDT'.
      fieldcatalog-seltext_m   = 'date promised'.
      fieldcatalog-col_pos     = 9.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'Quantity'.
      fieldcatalog-col_pos     = 10.
      fieldcatalog-outputlen   = 15.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'WEMNG'.
      fieldcatalog-seltext_m   = 'Delivered'.
      fieldcatalog-col_pos     = 11.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'OPEN_QUANT'.
      fieldcatalog-seltext_m   = 'Open quantity'.
      fieldcatalog-col_pos     = 12.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    fieldcatalog-fieldname   = 'VALUE'.
      fieldcatalog-seltext_m   = '$ value'.
      fieldcatalog-col_pos     = 13.
       fieldcatalog-do_sum      = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = g_repid
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                 I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
                it_fieldcat             = fieldcatalog[]
                 is_layout               = GS_layout
               is_variant              = z_template
           tables
                t_outtab                = itab
                exceptions
                program_error           = 1
                others                  = 2.
    FORM USE_COMMAND USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    CASE r_ucomm.
    WHEN '&IC1'.
    CASE rs_selfield-sel_tab_field.
    WHEN 'ITAB-LIFNR'.
    WHEN 'ITAB-EBELN'.
    CHECK NOT rs_selfield-value IS INITIAL.
    SET PARAMETER ID 'BUS' FIELD rs_selfield-value.
    CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
    ENDCASE.
    ENDCASE.

    Problem solved. changed the code as follows and it did work
    Regards
    Hrishi
    form display_alv_report.
      g_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = g_repid
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gs_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
                it_events               = gt_events
               is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = itAB
           exceptions
                program_error           = 1
                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.
    endform.                    " DISPLAY_ALV_REPORT
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
      Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
        Read data table, using index of row user clicked on
          READ TABLE ITAB INTO wa_ekko INDEX rs_selfield-tabindex.
        Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
        Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF rs_selfield-fieldname = 'MATNR'.
        READ TABLE ITAB INTO wa_ekko INDEX rs_selfield-tabindex.
        SET PARAMETER ID 'MAT' FIELD wa_ekko-matnr.
        CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.
        ENDIF.
    ENDCASE.
    ENDFORM.

  • Problem with Drill down using Pie chart

    Hi all,
    I have a dashboard which displays sales according to product category in which I'm using combo box for category.
    Based upon the selection the corresponding products are displayed in the Pie chart and when I click a particular
    product its total sales value should be displayed in a Guage.
    The problem is if for one category there are 10 products the pie chart is showing only 5 labels if drill down option is checked
    and if its not then its showing all the products......
    What could it be ??
    Thanks
    John

    Hi John
    Is this fixed now?
    Regards
    [Charles|http://www.reportex.co.uk/xc_dataload.html]

  • How to add an extra field in the alv display(Scope of List:ALV) for me55.

    Hello..
    I've to display 2 fields- (wbs element description) and (network description) along with the standard ALV display, for the Account Assignment type 'Q'  and 'N' of all purchase requisitions being displayed.
    I was suggested to modify the standard program RM06BF00.
    Can you please let me know where and how should I modify the program RM06BF00. Is there any userexit or badi to add my fields??
    Thanks in advance.
    With Regards,
    Him

    Hello,
    If we create a Z report for this program, can anyone please tell me where can I find the function "REUSE_ALV_GRID_DISPLAY" in the given program so that I can add my fields along with the default filelds displayed...
    Thanks
    ~Him

  • Dynamically display drill-down column in report

    We have two drill-down hierarchies 1. Calendar Year and 2. Fiscal Year.
    In a report, we have year column along with some other measures. The year column must show the values based on user's choice - If the user is interested in fiscal then the year must show fiscal year else the year must show the calendar year values.
    We thought of the following approach
    1. Use a prompt - which displays Calendar/Fiscal.
    2. Store the user selected prompt value (Calendar/Fiscal) in a variable
    3. In the report, for the year column, use CASE logic on the variable to decide whether Calendar year or the Fiscal year must be shown.
    This works well but the drawback is - the year isn't drillable anymore.
    Any other alternatives to solve this ?
    Thanks in advance

    Are you showing the report on a dashboard or just in Answers? Do you want in-place drilling or can you jump to a new report?
    One option is to enable navigation on the year column data and set it to jump a new report - you will need to pass the cell values as arguments in the URL - but if you want to just use plain old drill down (within the same report) I think you will have to use two reports, one for fiscal and one for calendar. Here we can get a little creative and use guided analytics to choose which of the two reports to show on the dashboard based on the selection made.
    Pete Scott
    http://www.rittmanmead.com

  • Problem with drill down on hierarchy with data on diffrent levels

    Hello,
    Im working on a project using oracle bi 10.1.3.4.1, and im kinda stuck with some problems.
    I have a transaction table in which i have data about products, something like :
    prod_id
    amount1
    amount2
    and a product hierarchy which is something like:
    prod_id
    prod_name
    parent_id
    since bi doesnt support hierarchies, i had to faltten the hier table to somehing like this:
    prod_id
    lvl1_prod_id
    lvl2_prod_id
    lvl3_prod_id
    lvl4_prod_id
    and use this as my hierarchy in oracle bi. thus when i drill to lvl3, it will find all the products which are decendents of lvl3 value and group them.
    the problem is, that the hier tree is not even, one product data (in transaction table) can be for lvl4 and another for lvl2. so for a lvl2 product id's in level 3 and 4 will be null.
    when i try to drill to lvl 4, it takes all the rows which have the selected value in column lvl4 and group them, and if lvl 4 is null, it would sum up all the rows that have no parent at lvl4...
    i hope you understand... cause it is a bit complicated..
    anyway i would eventually like to add a filter of != null to the column being drilled down.
    but how do i know which column is it?
    i cant add a != null filter to all the columns since most if not all of them will have null in some lvl (lvl 10 or so).
    one suggested solution was to make a report for each lvl with the !=null filter on the report lvl, and use navigate instead of drilldown... but that would mean i have to make 10 reports for each "real" report... a big problem to maintain.
    hope i was clear enough, any suggestions?
    thanks a lot!

    Hi Ingo,
    Thanks for your reply. If I combine two objects in one objects then I cannot use that object for drill down in my report.
    I want to drill down for both Key and Text.

  • Problem while drill down

    Hi
    I have  a query which is based  on the sales and which has the following characteristics i.e  drill down is based on  Region,Area,Territory, customer and material wise sales..
    Intially we have to show up to customer where as material would be a free characteristics and the sales value  for this should be shown.
    when i look at the region wise/area wise/territory wise result it is not equal to the sum of the all the customer values but it is showing some thing which is entirely  differant. so as i keep removing the drill downs the value is getting changed.
    i used the option USE STANDARD AGGREGATION - TOTAL - WITH RESPECT TO MATERIAL AND CALCUALTE RESULT AS - TOTAL... to get even the customer level value rite or otherwise even that shows a differant value.

    Hi,
    In query how the sales value is getting calculated. Is it just a direct key figure or some calculation. There is a possibility that you are doing some calculations. For example if you find the value by dividing two key figures, then adding after dividing will give you a different result and divding after addition. To be clear,
    When you drill down the result(KF3) will be the addition of divided values which is 13.
    KF1 KF2 KF3(KF1/KF2)
    10   2     5
    15   5     3
    20   4     5
    But when you drill up the result(KF3) will be different.
    KF1 KF2 KF3(KF1/KF2)
    45   11   4.09
    I think this should be your case. check this.

  • Problem in Drill down the PPT produced by Xcelsius

    I usually prepare the PPT using Xcelsius s/w. That PPT can be drilled down in my office system but it could not drillled down in my client system. This problem is for this month. In the past i didnt face this issue.
    When i try to drill down its giving an error message as " Some controls cant be activated in ur system"
    Can anyone please help ?

    I've had a similar problem going back and forth between systems with Office 2003 and Office 2007 loaded on them.  If the file is viewed from an Office 2003 machine the next time it's opened on a 2007 machine it crashes.  I have reinsert the chart each time.  I'd love to stop doing this!

  • Transaction Variant related problem in Drill Down working

    Dear Sir,
    We had a business requirement that in CO02 transaction users should now be allowed to change the Material Component quantity . To address this requirement we had created a Transaction Variant YCO02 and it is working in normal course .
    However we face problem in certain Drill-Down working . E.g in Tcode COOIS , when users double click a Production Order it goes to CO02 and user has no authorization for CO02 .  Insteat of CO02 , user has authorization for YCO02 .
    Pl guide us as how can we resolve this problem.
    With Thanks and Rgds
    Sonia Agarwal

    Dear Mr KrishnamurthyDSS
    Thanks for reply .
    Pl clarify that can we make Transaction Variant with the same name i.e CO02 . 
    If Transaction Variant and  Original Transaction have the same name (i.e CO02) then how to control the authorization , because we want to give authorization only for Transaction Variant one and not for base transaction .
    Kindly help me pl .
    Rgds
    Sonia Agarwal

Maybe you are looking for

  • Importing XML using OWB

    We are developing a new application using Oracle 10g R2. This is a hybrid warehouse/on-line system. Some users will need access to current information (less than 24 hours old) while others will need to access data up to 12 months old. The system will

  • Not able to find the mapping for table W_CUSTOMER_STATUS_HIST_F_TMP

    Hi All, I have implemented the Out of Box solution of Order Management Analytics module with 11.5.10 version of Oracle EBS and respective adopters. Under the same I am not able to notice any mapping to load the data into W_CUSTOMER_STATUS_HIST_F_TMP

  • Double space for period

    A friend has a new iPhone and it will NOT put a period after a word when I type 2 spaces the way I can on my own iPhone - both the current 4G version and my previous 3G (not 3GS). Hers is a 4G. For the life of me I can't find any setting which might

  • Infotype 0002 Personal details

    Hi Experts, Currently I am using STD IT0002 the problem is in this Infotype there is no any field for Middle name. I have tried to configure it but anable to search any screen like this for India. can any one please guide me to solve this. Regards Sw

  • Radiogroup in the Query

    GoodMorning, I have a page consisting of two APEX region. There are filters in the first, second in the table. I have two filters: 1 is the research into a field(this is ok), the other is the setting of the time to set the search. For this research I