Drilldown in ALV

Hello,
Can anyone please tell me as to how do we fetch the entire row of an alv grid.Based on few values in the selected row, I need to further drilldown to display another report.
Thanks in advance,
Meghana.

Hello,
  Use the parameter I_CALLBACK_USER_COMMAND in the function module REUSE_ALV_GRID_DISPLAY. You have to write a subroutine of the same name that you pass to this parameter. This subroutine will implicitly receive a parameter from the ALV Grid when you double click on that. This parameter will be of type slis_selfield and it has a component tabindex which will hold the index of row where the user action occured. You can read the original internal table with this index to get the row contents.
Check out the package SLIS for more details.
Regards,
Manoj

Similar Messages

  • DrillDown in ALV for fixed values of domains

    Hi,
    i want to create an ALV Grid with an structure that has data elements with domains containing fixed values.
    As far as i know, in Table Controls and other dynpro fields refering to such domains, the drilldown function is automatically available.
    In an ALV-Grid the values are available with the F4-Button.
    Ok, you can select a value, but the value is shown in the grid is the fixed value not the short text of the value like it is in Table Controls. What I did is to implement an conversion exit to show the short text in the grid, but I am not really satisfied.
    What I ask you: Is there a possability to show a field of the ALV-Structure with drilldown functionality automatically, when the domain has fixed values?
    Thanks in Advance
    Michael

    Hi Michael,
    I think I have found the solution to your problem. When you call the method SET_DROP_DOWN_TABLE of the ALV Grid, you can see that there are two tables parameters (both of which are optional).
    You can use the second tables parameter to give the short text of your field-value.
    Consider the following code snippet.
    ==========================
    data : lt_dropdown_with_alias type LVC_T_DRAL,
           ls_dropdown_with_alias type LVC_S_DRAL.
    ls_dropdown_with_alias-handle = '1'.
    ls_dropdown_with_alias-int_value = 'T'.
    ls_dropdown_with_alias-value = 'True'.
    append ls_dropdown_with_alias to lt_dropdown_with_alias.
    ls_dropdown_with_alias-handle = '1'.
    ls_dropdown_with_alias-int_value = 'F'.
    ls_dropdown_with_alias-value = 'False'.      
    append ls_dropdown_with_alias to lt_dropdown_with_alias.
    call method ALV_GRID->set_drop_down_table
                exporting IT_DROP_DOWN_ALIAS = lt_dropdown_with_alias.
    ==========================
    Obviously, <b>int_value</b> is the internal value and <b>value</b> is the text that you want to be displayed.
    Hope this helps.
    Regards,
    Anand Mandalika.
    P.S. I'm almost certain that this code will work. If it does, please do reward the points.

  • How to activate subtotals drilldown in ALV ?

    Hello Abap msters,
    I'am using FM REUSE_ALV_GRID_DISPLAY and I can't activate the subtotals drilldown (select total. level)
    do you have an idea ?
    Thanks

    Hi Fabrice,
           Check the Field Catalog structure for a a field which when Set to <b>'X'</b> activates the Subtotal in your ALV Grid Report.
           Hope this would help you.
    Cheers,
    Prashanth

  • ALV Drilldown help

    Guys,
    I have and ALV report that requires drilldown and this is the code im using;
    FORM callback_ucomm  USING pi_ucomm    TYPE syucomm
                               pi_selfield TYPE slis_selfield.  "#EC CALLED
      CASE pi_ucomm.
        WHEN '&IC1'.
          IF pi_selfield-fieldname = 'SGSART'.
            READ TABLE gt_main INTO gs_main INDEX pi_selfield-tabindex.
            DELETE gt_all1 WHERE sgsart NE pi_selfield-value.
    PERFORM alv_grid_display TABLES gt_all1
    So the user double clicks on the product type (SGSART) field and this opens another ALV displaying records from another internal table where product code = the one the user double clicked on.
    My problem is this will show all records with product code X ; i need to grab the company code and curreny from the same line they click on also. This would allow me to return records of product X in company code Y  and currency EUR rather than product X with all company codes and currencies.
    pi_selfield-value only holds the X (value of product code field the user clicked on), how do i get the rest of the values on that line to allow me to do a proper select on the second internal table??
    Thanks

    Guys,
    I have and ALV report that requires drilldown and this is the code im using;
    FORM callback_ucomm  USING pi_ucomm    TYPE syucomm
                               pi_selfield TYPE slis_selfield.  "#EC CALLED
      CASE pi_ucomm.
        WHEN '&IC1'.
          IF pi_selfield-fieldname = 'SGSART'.
            READ TABLE gt_main INTO gs_main INDEX pi_selfield-tabindex.
            DELETE gt_all1 WHERE sgsart NE pi_selfield-value.
    PERFORM alv_grid_display TABLES gt_all1
    So the user double clicks on the product type (SGSART) field and this opens another ALV displaying records from another internal table where product code = the one the user double clicked on.
    My problem is this will show all records with product code X ; i need to grab the company code and curreny from the same line they click on also. This would allow me to return records of product X in company code Y  and currency EUR rather than product X with all company codes and currencies.
    pi_selfield-value only holds the X (value of product code field the user clicked on), how do i get the rest of the values on that line to allow me to do a proper select on the second internal table??
    Thanks

  • ALV to another Drilldown ALV...???

    Hi..
    I have a requirement in which i have to create an ALV report.
    Now if any particular cell is selected.... for example... Sales Organization cell is selected...
    Then what i need to do is to show another ALV report as a drilldown with that sales organization only and other related data..for that sales organization only from the first report ....
    So.. i have to capture.. the field.. ie.. whether the field is sales organization or sales office or.. something else etc..and then the value of that field..and then..generate another drill down alv..
    How do i do.. this... can anyone give a sample report to achieve this...
    I have done the first part ie the first ALV part is done.. but second part i am confused..
    Regards,
    Subash

    hi,
    use this code .
    REPORT  ZZ_22038_22098_002 NO STANDARD PAGE HEADING LINE-SIZE 650
    MESSAGE-ID ZZ_9838                      .
    TYPE-POOLS: SLIS.
    *type declaration for values from ekko
    TYPES: BEGIN OF I_EKKO,
           EBELN LIKE EKKO-EBELN,
           AEDAT LIKE EKKO-AEDAT,
           BUKRS LIKE EKKO-BUKRS,
           BSART LIKE EKKO-BSART,
           LIFNR LIKE EKKO-LIFNR,
           END OF I_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
          WA_EKKO TYPE I_EKKO.
    *type declaration for values from ekpo
    TYPES: BEGIN OF I_EKPO,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MATNR LIKE EKPO-MATNR,
           MENGE LIKE EKPO-MENGE,
           MEINS LIKE EKPO-MEINS,
           NETPR LIKE EKPO-NETPR,
           END OF I_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE I_EKPO .
    *variable for Report ID
    DATA: V_REPID LIKE SY-REPID .
    *declaration for fieldcatalog
    DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    declaration for events table where user comand or set PF status will
    be defined
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT.
    declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    declaration for variant(type of display we want)
    DATA: I_VARIANT TYPE DISVARIANT,
          I_VARIANT1 TYPE DISVARIANT,
          I_SAVE(1) TYPE C.
    *PARAMETERS : p_var TYPE disvariant-variant.
    *Title displayed when the alv list is displayed
    DATA:  I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
    DATA:  I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
    INITIALIZATION.
      V_REPID = SY-REPID.
      PERFORM BUILD_FIELDCATLOG.
      PERFORM EVENT_CALL.
      PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATLOG
          Fieldcatalog has all the field details from ekko
    FORM BUILD_FIELDCATLOG.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'AEDAT'.
      WA_FIELDCAT-SELTEXT_M = 'DATE.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'LIFNR'.
      WA_FIELDCAT-NO_OUT    = 'X'.
      WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    EXCEPTIONS
       LIST_TYPE_WRONG       = 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.                    "EVENT_CALL
    *&      Form  POPULATE_EVENT
         Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-NAME.
      ENDIF.
    ENDFORM.                    "POPULATE_EVENT
    *&      Form  data_retrieval
      retreiving values from the database table ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
    ENDFORM.                    "data_retrieval
    *&      Form  bUild_listheader
          text
         -->I_LISTHEADEtext
    FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
      DATA HLINE TYPE SLIS_LISTHEADER.
      HLINE-INFO = 'this is my first alv pgm'.
      HLINE-TYP = 'H'.
    ENDFORM.                    "build_listheader
    *&      Form  display_alv_report
          text
    FORM DISPLAY_ALV_REPORT.
      V_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = V_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
         I_GRID_TITLE                      = I_TITLE_EKKO
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         = ALV_LAYOUT
         IT_FIELDCAT                       = I_FIELDCAT[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
        i_default                         = 'ZLAY1'
         I_SAVE                            = 'A'
        is_variant                        = i_variant
         IT_EVENTS                         = V_EVENTS
        TABLES
          T_OUTTAB                          = IT_EKKO
    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  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
          PERFORM BUILD_FIELDCATLOG_EKPO.
          PERFORM EVENT_CALL_EKPO.
          PERFORM POPULATE_EVENT_EKPO.
          PERFORM DATA_RETRIEVAL_EKPO.
          PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
          PERFORM DISPLAY_ALV_EKPO.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_EKPO
          text
    FORM BUILD_FIELDCATLOG_EKPO.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELP'.
      WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MENGE'.
      WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MEINS'.
      WA_FIELDCAT-SELTEXT_M = 'UOM'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'NETPR'.
      WA_FIELDCAT-SELTEXT_M = 'PRICE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG_EKPO
    *&      Form  event_call_ekpo
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL_EKPO.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.                    "event_call_ekpo
    *&      Form  POPULATE_EVENT
           Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT_EKPO.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      ENDFORM.                    "POPULATE_EVENT
    *&      Form  TOP_OF_PAGE
          text
    FORM F_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM DATA_RETRIEVAL_EKPO.
    SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
    ENDFORM.
    FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: HLINE1 TYPE SLIS_LISTHEADER.
    HLINE1-TYP = 'H'.
    HLINE1-INFO = 'CHECKING PGM'.
    ENDFORM.
    FORM DISPLAY_ALV_EKPO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = V_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = 'F_USER_COMMAND'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = I_TITLE_EKPO
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = I_FIELDCAT[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         =
       I_SAVE                            = 'A'
      IS_VARIANT                        =
       IT_EVENTS                         = V_EVENTS
      TABLES
        T_OUTTAB                          = IT_EKPO
    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.

  • ALV Reports versus ABAP drilldown or high volume data

    Which is better with regards to performance? An ALV grid or an ABAP drilldown ?
    I am very concerned about performance given the high volume of data and therefore not sure if I should use ALV?
    input is appreciated
    J

    hi JJ,
    ALV reporting is always having lot of advantages over abap reproting in many ways,
    performace increases due to the use of
    object oriented cocepts like classes, objects and methods
    by using the line type and row type internable declarations..
    and user friendly out put
    Regards,
    GUDURI

  • Alv drilldown-fields are hiding in secondary list-when layout option used

    hey guys,
    i displayed alv grid using fms.
    the basic list has default layout option.
    but when user gives a deault layout,and try to see secondary list,the fields appear as hidden.
    one has to unhide them manualy to see.

    Kumar,
      Check the Field catalog Before displaying Secondary list, If NO_OUT is set for Hidden fields.
    Thanks,
    Kishore

  • ALv drilldown to standard report

    hello,
    My requirement is to drill down an ALV to access/execute a standard report. KUNNR and BUKRs are displayed in my ALV report, when the user clicks on a line, it has to call RFITEMAR passing the customer and company code and execute it... will i be able to do it using hotspots and parameter ids ?

    hi
    Using Parameter ID You can excute it.
    DATA:  it_sel  TYPE TABLE OF rsparams,
            wa_sel LIKE LINE OF it_sel,
            wa1_sel LIKE LINE OF it_sel,
            wa2_sel LIKE LINE OF it_sel.
    SELECT-OPTIONS : s_custac FOR kna1-kunnr,
                    s_cmpcod FOR knb1-bukrs.
      SET PARAMETER ID 'KUNNR' FIELD wa_sel-low.
      SET PARAMETER ID 'BUK' FIELD wa1_sel-low.
       "SET PARAMETER ID 'PA_STIDA' FIELD wa2_sel-low.
      SUBMIT rfitemar WITH SELECTION-TABLE it_sel
                       VIA SELECTION-SCREEN AND RETURN.
    Thanks

  • Drilldown + ALV + List

    hi,
       iam working on ALV. could any body send an example  on  <b>drill down  to use ALV with  lists</b>. any documents on that.
               urgent.
                       chandu

    hi please check the code below, copy paste and run it, thiw will run both for Grid And List Display
    Drill down in ALV
    PLease note the code marked in BOLD
    REPORT  Z_50657_ALV_EX5 NO STANDARD PAGE HEADING
            LINE-COUNT 65(3)
            LINE-SIZE 220
            MESSAGE-ID ZZ.
                                Type Pools                               *
    TYPE-POOLS: SLIS, ICON.
                                 Tables                                  *
    TABLES : VBRK,  "Billing Master table
             VBRP.  "Billing Item table
                            VARIABLES DECLARATION                        *
    DATA: STR_DATE LIKE SY-DATUM.
    DATA: X_FIELDCAT_VBRK TYPE SLIS_FIELDCAT_ALV,
          IT_FIELDCAT_VBRK TYPE SLIS_T_FIELDCAT_ALV.
    DATA: X_FIELDCAT_VBRP TYPE SLIS_FIELDCAT_ALV,
          IT_FIELDCAT_VBRP TYPE SLIS_T_FIELDCAT_ALV.
    DATA: L_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: CUR_VBELN(15), CUR_VBELN_VALUE(15).
    DATA: TEMP_VBELN(10).
    DATA: CTAB LIKE SY-TABIX.
                            Internal Tables                              *
    Internal table to hold data from VBRK
    DATA: BEGIN OF IT_VBRK OCCURS 0,
          VBELN LIKE VBRK-VBELN,
          WAERK LIKE VBRK-WAERK,
          VKORG LIKE VBRK-VKORG,
          FKDAT LIKE VBRK-FKDAT,
          BUKRS LIKE VBRK-BUKRS,
          BUTXT LIKE T001-BUTXT,
          CHECK(1) TYPE C,
          END OF IT_VBRK.
    Internal table to hold data from VBRP
    DATA: BEGIN OF IT_VBRP OCCURS 0,
          VBELN LIKE VBRP-VBELN,
          POSNR LIKE VBRP-POSNR,
          FKIMG LIKE VBRP-FKIMG,
          VRKME LIKE VBRP-VRKME,
          NETWR LIKE VBRP-NETWR,
          MATNR LIKE VBRP-MATNR,
          ARKTX LIKE VBRP-ARKTX,
          END OF IT_VBRP.
    DATA: BEGIN OF IT_T001 OCCURS 0,
          BUKRS LIKE T001-BUKRS,
          BUTXT LIKE T001-BUTXT,
          END OF IT_T001.
                          Selection-Screen                               *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN,
                    S_FKDAT FOR VBRK-FKDAT,
                    S_MATNR FOR VBRP-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    PARAMETERS : LIST RADIOBUTTON GROUP G1,
                 GRID  RADIOBUTTON GROUP G1 DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK B2.
               INITIALIZATION         ********************
    INITIALIZATION.
      STR_DATE = SY-DATUM - 200.
      S_FKDAT-LOW = STR_DATE.
      S_FKDAT-HIGH = SY-DATUM.
      S_FKDAT-SIGN = 'I'.
      APPEND S_FKDAT.
                        At  Selection-Screen Output                      *
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN.
        IF SCREEN-NAME = 'S_FKDAT-HIGH'.
          SCREEN-INPUT = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
                        At  Selection-Screen                             *
    AT SELECTION-SCREEN.
      PERFORM VALIDATION.
                          Start of Selection                             *
    START-OF-SELECTION.
    *POPULATION OF DATA INTO INTERNAL TABLE IT_VBRK AND IT_VBRP
      PERFORM GET_DATA_VBRK.
      PERFORM FIELDCATALOG_CHANGE.
    *ALV GRID/LIST DISPLAY
      PERFORM FIRST_SCREEN_DISPLAY.
    *&      Form  VALIDATION
          text
    FORM VALIDATION.
      IF S_VBELN[] IS NOT INITIAL.
        SELECT SINGLE VBELN
                      FROM VBRK
                      INTO VBRK-VBELN
                      WHERE VBELN IN S_VBELN.
        IF SY-SUBRC <> 0.
          MESSAGE A000 WITH 'PLEASE ENTER CORRECT BILLING DOCUMENT'.
          STOP.
        ENDIF.
      ENDIF.
      IF S_FKDAT[] IS INITIAL.
        MESSAGE I000 WITH 'PLEASE ENTER ALL THE MANDATORY FIELDS'.
        STOP.
      ENDIF.
      IF S_MATNR[] IS NOT INITIAL.
        SELECT SINGLE MATNR
                      FROM MARA
                      INTO VBRP-MATNR
                      WHERE MATNR IN S_MATNR.
        IF SY-SUBRC <> 0.
          MESSAGE I000 WITH 'PLEASE ENTER CORRECT MATERIAL NUMBER'.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    "VALIDATION
    *&      Form  GET_DATA_VBRK
          text
    FORM GET_DATA_VBRK.
      SELECT VBELN
             WAERK
             VKORG
             FKDAT
             BUKRS
             FROM VBRK INTO TABLE IT_VBRK
             WHERE VBELN IN S_VBELN
                   AND FKDAT IN S_FKDAT.
      SORT IT_VBRK BY VBELN BUKRS.
      SELECT BUKRS
             BUTXT
             FROM T001 INTO TABLE IT_T001
             FOR ALL ENTRIES IN IT_VBRK
             WHERE BUKRS = IT_VBRK-BUKRS.
      LOOP AT IT_VBRK.
        CTAB = SY-TABIX.
        LOOP AT IT_T001 WHERE BUKRS = IT_VBRK-BUKRS.
          IF SY-SUBRC  = 0.
            IT_VBRK-BUTXT = IT_T001-BUTXT.
            MODIFY IT_VBRK INDEX CTAB.
            CLEAR CTAB.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.                    "GET_DATA
    *&      Form  FIELDCATALOG_CHANGE
          text
    FORM FIELDCATALOG_CHANGE.
    *Layout Change
      L_LAYOUT-ZEBRA = 'X'.
    L_LAYOUT-BOX_FIELDNAME = 'CHECK'.
    *Define seperate Color for the fields
      X_FIELDCAT_VBRK-COL_POS = 1.
      X_FIELDCAT_VBRK-FIELDNAME = 'CHECK'.
      X_FIELDCAT_VBRK-SELTEXT_M = 'chek'.
      X_FIELDCAT_VBRK-CHECKBOX = 'X'.
      X_FIELDCAT_VBRK-INPUT = 'X'.
      X_FIELDCAT_VBRK-EDIT = 'X'.
      APPEND X_FIELDCAT_VBRK TO  IT_FIELDCAT_VBRK.
      CLEAR X_FIELDCAT_VBRK.
      X_FIELDCAT_VBRK-COL_POS = 2.
      X_FIELDCAT_VBRK-TABNAME = 'IT_VBRK'.
      X_FIELDCAT_VBRK-FIELDNAME = 'VBELN'.
      X_FIELDCAT_VBRK-EMPHASIZE = 'C301'.
      X_FIELDCAT_VBRK-OUTPUTLEN = 15.
      APPEND X_FIELDCAT_VBRK TO IT_FIELDCAT_VBRK.
      CLEAR X_FIELDCAT_VBRK.
      X_FIELDCAT_VBRK-TABNAME = 'IT_VBRK'.
      X_FIELDCAT_VBRK-FIELDNAME = 'WAERK'.
      X_FIELDCAT_VBRK-EMPHASIZE = 'C201'.
      X_FIELDCAT_VBRK-OUTPUTLEN = 15.
      APPEND X_FIELDCAT_VBRK TO IT_FIELDCAT_VBRK.
      CLEAR X_FIELDCAT_VBRK.
      X_FIELDCAT_VBRK-TABNAME = 'IT_VBRK'.
      X_FIELDCAT_VBRK-FIELDNAME = 'VKORG'.
      X_FIELDCAT_VBRK-EMPHASIZE = 'C300'.
      X_FIELDCAT_VBRK-OUTPUTLEN = 15.
      APPEND X_FIELDCAT_VBRK TO IT_FIELDCAT_VBRK.
      CLEAR X_FIELDCAT_VBRK.
      X_FIELDCAT_VBRK-TABNAME = 'IT_VBRK'.
      X_FIELDCAT_VBRK-FIELDNAME = 'FKDAT'.
      X_FIELDCAT_VBRK-EMPHASIZE = 'C600'.
      X_FIELDCAT_VBRK-OUTPUTLEN = 15.
      APPEND X_FIELDCAT_VBRK TO IT_FIELDCAT_VBRK.
      CLEAR X_FIELDCAT_VBRK.
      X_FIELDCAT_VBRK-TABNAME = 'IT_VBRK'.
      X_FIELDCAT_VBRK-FIELDNAME = 'BUKRS'.
      X_FIELDCAT_VBRK-EMPHASIZE = 'C400'.
      X_FIELDCAT_VBRK-OUTPUTLEN = 15.
      APPEND X_FIELDCAT_VBRK TO IT_FIELDCAT_VBRK.
      CLEAR X_FIELDCAT_VBRK.
      X_FIELDCAT_VBRK-TABNAME = 'IT_VBRK'.
      X_FIELDCAT_VBRK-FIELDNAME = 'BUTXT'.
      X_FIELDCAT_VBRK-EMPHASIZE = 'C500'.
      X_FIELDCAT_VBRK-OUTPUTLEN = 15.
      APPEND X_FIELDCAT_VBRK TO IT_FIELDCAT_VBRK.
      CLEAR X_FIELDCAT_VBRK.
    ENDFORM.                    "FIELDCATALOG_CHANGE
    *&      Form  FIRST_SCREEN_DISPLAY
          text
    FORM FIRST_SCREEN_DISPLAY.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME         = SY-REPID
          I_INTERNAL_TABNAME     = 'IT_VBRK'
          I_INCLNAME             = SY-REPID
        CHANGING
          CT_FIELDCAT            = IT_FIELDCAT_VBRK
        EXCEPTIONS
          INCONSISTENT_INTERFACE = 1
          PROGRAM_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.
    CHECK RADIO BUTTON SELECTION AND ACCORDINGLY DISPLAY LIST OR GRID ALV
      IF LIST = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
           I_CALLBACK_PROGRAM             = SY-REPID
           I_CALLBACK_PF_STATUS_SET       = 'STATUS'
           I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
           IS_LAYOUT                      = L_LAYOUT
           IT_FIELDCAT                    = IT_FIELDCAT_VBRK
          IT_EVENTS                      =
          TABLES
            T_OUTTAB                       = IT_VBRK
         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.
        CLEAR LIST.
      ENDIF.
      IF GRID = 'X'.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM             = SY-REPID
           I_CALLBACK_PF_STATUS_SET       = 'STATUS'
           I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
            IS_LAYOUT                      = L_LAYOUT
            IT_FIELDCAT                    = IT_FIELDCAT_VBRK
          IT_EVENTS                      =
           TABLES
             T_OUTTAB                       = IT_VBRK
          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.
        CLEAR GRID.
      ENDIF.
    ENDFORM.                    "FIRST_SCREEN_DISPLAY
    *&      Form  STATUS
          text
         -->P_EXTAB    text
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STATUS' EXCLUDING P_EXTAB.
    ENDFORM.                    "STATUS
    <b>&----
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    ----</b>
    <b>FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                                   RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'BACK' OR 'CANC' OR 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN '&IC1'.
          IF RS_SELFIELD-FIELDNAME = 'VBELN'.
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
              EXPORTING
                INPUT  = RS_SELFIELD-VALUE
              IMPORTING
                OUTPUT = TEMP_VBELN.
         TEMP_VBELN = RS_SELFIELD-VALUE.
            PERFORM GET_DATA_VBRP.
            PERFORM GET_SECOND_SCREEN_DISPLAY.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND</b>
    *&      Form  GET_DATA_VBRP
          text
    FORM GET_DATA_VBRP.
      SELECT VBELN
             POSNR
             FKIMG
             VRKME
             NETWR
             MATNR
             ARKTX
             FROM VBRP INTO TABLE IT_VBRP
             WHERE VBELN = TEMP_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH ' NO BILLING DETAILS FOUND'.
        EXIT.
      ELSE.
        MESSAGE S000 WITH 'SUCCESSFUL'.
          ENDIF.
    ENDFORM.                    "GET_DATA_VBRP
    <b>&----
    *&      Form  GET_SECOND_SCREEN_DISPLAY
          text
    FORM GET_SECOND_SCREEN_DISPLAY.</b>
    FIELDCATALOG CALL
    <b>  X_FIELDCAT_VBRP-TABNAME = 'IT_VBRP'.
      X_FIELDCAT_VBRP-FIELDNAME = 'VRKME'.
      X_FIELDCAT_VBRP-EMPHASIZE = 'C500'.
      X_FIELDCAT_VBRP-OUTPUTLEN = 10.
      APPEND X_FIELDCAT_VBRP TO IT_FIELDCAT_VBRP.
      CLEAR X_FIELDCAT_VBRP.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME         = SY-REPID
          I_INTERNAL_TABNAME     = 'IT_VBRP'
          I_INCLNAME             = SY-REPID
        CHANGING
          CT_FIELDCAT            = IT_FIELDCAT_VBRP
        EXCEPTIONS
          INCONSISTENT_INTERFACE = 1
          PROGRAM_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.
    CHECK RADIO BUTTON SELECTION AND ACCORDINGLY DISPLAY LIST OR GRID ALV
      IF LIST = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
           I_CALLBACK_PROGRAM             = SY-REPID
           I_CALLBACK_PF_STATUS_SET       = 'STATUS'
           I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
           IS_LAYOUT                      = L_LAYOUT
           IT_FIELDCAT                    = IT_FIELDCAT_VBRP
           I_SCREEN_START_COLUMN          = 1
           I_SCREEN_START_LINE            = 1
           I_SCREEN_END_COLUMN            = 100
           I_SCREEN_END_LINE              = 10
          IT_EVENTS                      =
          TABLES
            T_OUTTAB                       = IT_VBRP
         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.
      ENDIF.</b>
      IF GRID = 'X'.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
           I_CALLBACK_PROGRAM             = SY-REPID
           I_CALLBACK_PF_STATUS_SET       = 'STATUS'
           I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
           IS_LAYOUT                      = L_LAYOUT
           IT_FIELDCAT                    = IT_FIELDCAT_VBRP
           I_SCREEN_START_COLUMN          = 1
           I_SCREEN_START_LINE            = 1
           I_SCREEN_END_COLUMN            = 100
           I_SCREEN_END_LINE              = 10
          IT_EVENTS                      =
           TABLES
             T_OUTTAB                       = IT_VBRP
          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.
      ENDIF.
    ENDFORM.                    "GET_SECOND_SCREEN_DISPLAY

  • ALV drilldown not possible in report once i apply layout save option

    Hi All,
    I have developed one ALV report.
    Firstly i use drill down in the report means call transaction by double click event.
    Then i apply layout save option in same report.
    But as soon as i apply layout save option the call transaction is not possible.
    How to resolve this problem.
    Regards,
    Deepak.

    Hi,
    when you applied save button did you use any other PF status apart froms standard ALV pf-status..
    if so...
    go to the pf-status which you have declared ...
    then go to the function keys...
    under Recommended Function Key Settings for the F2 key  set the function code as
    &IC1
    this will resolve your issue
    Regards,
    Siddarth

  • Drilldown reports

    Hi
    I have defined a drilldown report using transaction IMD1(report painter).
    The user wants an ALV list instead of the graphic control.When I get the ALV list and when I double click on a coloumn it should take me to a transaction.
    I couldnt find any setting where I can say this.The code is a generated code and so I cannot modify the code also..Can you please suggest any workaround for this.
    Thanks and Regards,
    Siva

    Hi Jaysree,
    I hope u have done the ALV creation part and the output is coming.
    Under :
    CLASS lcl_event_receiver DEFINITION.
    Hot Spot Click
           handle_hotspot
             FOR EVENT hotspot_click OF cl_gui_alv_grid
                IMPORTING e_row_id
                          e_column_id
                          es_row_no.
    ENDCLASS.
    Under:
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
    METHOD HANDLE_HOTSPOT.
      CASE E_COLUMN_ID.
           WHEN 'ur_col_id_name'.
        DATA: lw_ITAB LIKE LINE OF I_ITAB.
        READ TABLE i_ITAB INTO lw_ITAB INDEX E_ROW_ID.
        IF SY-SUBRC EQ 0.
           SET PARAMETER ID 'QLS' FIELD lw_ITAB-PRUEFLOS .
           CALL TRANSACTION 'QA13' AND SKIP FIRST SCREEN .
        ENDIF.
       WHEN 'EXIDV'.
       DATA: lw_ITAB LIKE LINE OF I_ITAB.
       data lv like lw_itab-exidv.
       read table i_ITAB into lw_ITAB index E_ROW_ID.
       if sy-subrc eq 0.
       CALL TRANSACTION 'HUMO'AND SKIP FIRST SCREEN.
      endif.
      ENDCASE.
    ENDMETHOD.
    U need to:
    Set the event handlers that are defined in the class here
        set handler event_receiver->handle_toolbar      for alv_grid.
        set handler event_receiver->handle_user_command for alv_grid.
        set handler event_receiver->HANDLE_HOTSPOT for alv_grid.
    I hope this gives u some idea how to proceed.
    If not, please get back.
    Regards,
    Anjali

  • How to add the dril down functionality in alv report.

    Hi All,
    I have a ALV report and now i want to add drill down functionality in this ALV report.
    See my code below:
    FORM f0002_build_field_catalog.
    Build the field catalog
    CLEAR ws_layout.
    ws_layout-colwidth_optimize = 'X'.
    ws_layout-edit = ' '.
      ws_field_catalog-col_pos = '1'.
      ws_field_catalog-fieldname = 'BUKRS'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l = 'Company Code'.
      ws_field_catalog-seltext_m = 'CCode'.
      ws_field_catalog-seltext_s = 'CCode'.
    ws_field_catalog-fix_column = 'X'.
    ws_field_catalog = 'X'.
    ws_fieldcat-ref_tabname  = 'VBKPF'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '2'.
      ws_field_catalog-fieldname = 'BELNR'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Document no.'.
      ws_field_catalog-hotspot = 'V'.
      ws_field_catalog-seltext_m    = 'Doc.no.'.
      ws_field_catalog-seltext_s    = 'Doc.no.'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '3'.
      ws_field_catalog-fieldname = 'GJAHR'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Year'.
      ws_field_catalog-seltext_m    = 'Year'.
      ws_field_catalog-seltext_s    = 'Year'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '4'.
      ws_field_catalog-fieldname = 'BSTAT'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Status'.
      ws_field_catalog-seltext_m    = 'Status'.
      ws_field_catalog-seltext_s    = 'Status'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '5'.
      ws_field_catalog-fieldname = 'FLAG'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Open/Cleared'.
      ws_field_catalog-seltext_m    = 'Open/Cleared'.
      ws_field_catalog-seltext_s    = 'Open/Cleared'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '6'.
      ws_field_catalog-fieldname = 'BLART'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Doc.Type.'.
      ws_field_catalog-seltext_m    = 'Doc.Type'.
      ws_field_catalog-seltext_s    = 'Doc.Type'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '7'.
      ws_field_catalog-fieldname = 'WRBTR'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Total Amount'.
      ws_field_catalog-seltext_m    = 'Total Amount'.
      ws_field_catalog-seltext_s    = 'Total Amount'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '8'.
      ws_field_catalog-fieldname = 'WAERS'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Currency.'.
      ws_field_catalog-seltext_m    = 'Currency'.
      ws_field_catalog-seltext_s    = 'Currency'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '9'.
      ws_field_catalog-fieldname = 'LIFNR'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Vendor'.
      ws_field_catalog-seltext_m    = 'Vendor'.
      ws_field_catalog-seltext_s    = 'Vendor'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '10'.
      ws_field_catalog-fieldname = 'NAME1'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Vendor Name'.
      ws_field_catalog-seltext_m    = 'Name 1'.
      ws_field_catalog-seltext_s    = 'Name 1'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '11'.
      ws_field_catalog-fieldname = 'UZAWE'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Payment Method Supplement'.
      ws_field_catalog-seltext_m    = 'PmtMthSuppl'.
      ws_field_catalog-seltext_s    = 'PmtMthSuppl'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
      ws_field_catalog-col_pos = '12'.
      ws_field_catalog-fieldname = 'XBLNR'.
      ws_field_catalog-tabname = 'I_OUTPUT'.
      ws_field_catalog-seltext_l    = 'Reference'.
      ws_field_catalog-seltext_m    = 'Ref. No.'.
      ws_field_catalog-seltext_s    = 'Ref. No.'.
      APPEND ws_field_catalog TO lt_fieldcat.
      CLEAR: ws_field_catalog.
    g_variant-report  = sy-repid.
       CLEAR struct_extab.
      MOVE '&XPA' TO struct_extab-fcode.
      APPEND struct_extab TO i_extab.
      MOVE '&OMP' TO struct_extab-fcode.
      APPEND struct_extab TO i_extab.
    Display the list
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
          i_callback_program      = ws_repid
          i_callback_user_command = 'HANDLE_USER_COMMAND'
         is_layout               = ws_layout
          it_fieldcat             = lt_fieldcat[]
          it_excluding            = i_extab[]
         i_default                = 'X'
         i_save                  =  'U'  "For user variants
         is_variant              = g_variant
        TABLES
          t_outtab                = i_output.
    ENDFORM.                    "f0002_build_field_catalog
    *&      Form  f0038_pf_status
          text
         -->I_EXTAB    text
    FORM f0038_pf_status USING i_extab TYPE slis_t_extab.       "#EC CALLED
      CLEAR struct_extab.
      MOVE '&XPA' TO struct_extab-fcode.
      APPEND struct_extab TO i_extab.
      MOVE '&OMP' TO struct_extab-fcode.
      APPEND struct_extab TO i_extab.
      SET PF-STATUS 'Z_PFSTATUS2' EXCLUDING i_extab.
    ENDFORM.                     "f0038_pf_status
    Pls tell me how i use this below dril down ability functionality in my code.
    See the requirement below.
    The Document Number, aka Accounting Document Number (BELNR) of each row will take the user to the appropriate document to edit as follows:
    For Parked documents:-
    If VBKPF-AWTYP (Reference Procedure) = “RMRP”, then the drilldown functionality should be to MIR4 using the Object ID in VBKPF- AWKEY. In this scenario the Object ID represents a Invoice Document Number, not an Accounting Document Number. Not the Object ID is a combination of Invoice Document Number and Fiscal Year
    If VBKPF-AWTYP = Any other value, then the drilldown functionality should be to FBV2 using the Object ID in VBKPF-AWKEY. In this scenario the Object ID represents a true Accounting Document Number. Note the Object ID is a combination of Company Code (VBKPF-BUKRS), Accounting Document Number (VBKPF-BELNR) and Fiscal Year (VBKPF-GJAHR)
    For Posted, not Cleared documents:-
    Drilldown ability should be to FB02. The combination of Company Code (BSIK-BUKRS), Accounting Document Number (BSIK-BELNR) and Fiscal Year (BSIK-GJAHR) will be used to open/drilldown to the correct document in FB02.
    For Cleared documents:-
    Drilldown ability should be to FB03. The combination of Company Code (BSIK-BUKRS), Accounting Document Number (BSIK-BELNR) and Fiscal Year (BSIK-GJAHR) will be used to open/drilldown to the correct document in FB03.
    Its very urgent, pls help on this.
    Thanks!
    Vipin

    Pls refer :
    https://wiki.sdn.sap.com/wiki/display/Snippets/ABAPInteractiveALVwithCallTransaction%28usingParameterID%29
    https://wiki.sdn.sap.com/wiki/display/Snippets/ABAPInteractiveALV+Program
    Regards,
    Anish Thomas
    Pls reward all useful answers

  • Reg:user command in oops alv...

    hi all,
           i have creeated an alv report using container, and by calling the method set table for first display.the output is coming,wat i want is,
         i have  placed a hotspot on document number field,if users clicks it,it has to call fb03 transaction code and the corresponding document shoud open...
    i have did this type in ordinary alv report,but how to do this using oops concept,
    plz give me a solution along with coding ore sample
             thx in advance.....
    regards,
    balaji.s

    hi balaji for any thing in alv oops look at this,
    oops_beginers
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ALV Gird Control (BC-SRV-ALE)
    SAP Container
    SAP Control Framework
    or Thread New To OOPs ABAP
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    General Tutorial for OOPS
    check all the below links
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    Check these links.
    http://www.henrikfrank.dk/abapuk.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Go through the below links,
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    OO ABAP links:
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    go through these links
    http://www.erpgenie.com/abap/index.htm
    http://sic.fh-lu.de/sic/bic.nsf/(vJobangebote)/EC8AD2AE0349CE92C12572200026FDB8/$File/Intern%20or%20Working%20Student%20as%20ABAB%20OO%20Developer.pdf?Open
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
    DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
    DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
    DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
    DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
    DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
    DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ALVOOPS
    http://www.abap4.it/download/ALV.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    http://www.erpgenie.com/abap/controls/alvgrid.htm
    OOPS with ABAP
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    http://www.sapgenie.com/abap/OO/
    For understanding COntrol Frameworks in OO ABAP, check this.
    http://www.sapgenie.com/abap/controls/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    ALVOOPS
    http://www.erpgenie.com/abap/controls/alvgrid.htm
    OOPS with ABAP
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    http://www.sapgenie.com/abap/OO/
    For understanding COntrol Frameworks in OO ABAP, check this.
    http://www.sapgenie.com/abap/controls/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Regarding  ALV Grid  Control using OOPs concepts
    Regarding  ALV Grid  Control using OOPs concepts
    OOPS – OO ABAP
    http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    DIRLL DOWN AND INTERACTIVE REPORT
    http://www.sap-img.com/abap/difference-between-drilldown-report-and-interactive-report.htm
    PAGE BREAK FOR ALV LIST
    check out this link
    http://www.abap4.it/download/ALV.pdf
    good book on ABAP objects(OOPS)
    http://www.esnips.com/doc/bc475662-82d6-4412-9083-28a7e7f1ce09/Abap-Objects---An-Introduction-To-Programming-Sap-Applications
    How to check Cluster Table Data
    https://forums.sdn.sap.com/click.jspa?searchID=5215473&messageID=3520315
    http://www.sap-img.com/abap/the-different-types-of-sap-tables.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    COLOURING Single Columan
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Check this thread to get more idea about ALVs.
    Interactive ALV
    Check the following link for ALV Block List
    http://www.sap-basis-abap.com/abap/sample-program-on-block-lists.htm
    Check the following link for ALV Hierarchial
    http://www.sap-img.com/abap/how-to-use-alv-for-hierarchical-lists.htm
    regards,
    venkat.

  • Intractive alv report while adding coloums of cost element of G/L account

    Hi guys,
    i have a proble with interactive alv report.
    i did all the things. its working fine also.  now they r asking me to add some coloums
    which are from COSP-KSTAR this is cost element.
    i need to ristrict perticular cost element according to the company code and fiscal year.
    i don't know how we can take the cost elements and how to pass them.
    plz any of u help me to come out of this problem.
    Thanks & Regards,
    Lakshmi..

    so   ,  write   a   select   query to  table   cosp   in to it_cospt   internal table  .
    where  condition   
    WRTTP
    VERSN
    GJAHR .
    the  above   should   hard coded the  data   by asking the   Function consultant   like  version  &   value type   .,
    then    loop at   your   final  internal table    .
    read table   of   it_cospt   where   gjahr  =  gjahr 
    IF   final-KOSTL  CA   it_cospt-OBJNR .  for Costcenter  validate
    because  it stores the  Costcenter  only in the   COSP-OBJNR   , IF you check table data in BSEG  and  COSP  , even AUFNR ( Internal order )  also  to the same  field . so that   the   cost center  gets validated   in the  if  condition   ,   for your information  if they ask   you costelement  then  it  include  internal  order also  if  you want   ask question to  you FI consultant   about   cost center  and  Internal order difference ***************
    <b>move all  your  fresh  data  to  your  new  internal table       your   it_cospt-KSTAR    </b> data  also.
    <b>append   new  internal table  </b> .
    Elseif final-AUFNR  CA   it_cospt-OBJNR .  for INTERNAL ORDER  validate
    b]move all  your  fresh  data  to  your  new  internal table       your   it_cospt-KSTAR    </b> data  also.
    <b>append   new  internal table  </b> .
    ENDIF
    **********like   that  for   project  id    if there is any   PS module  integration data then .********************
    so that your  new  internal table will have all  data   including  cost element   also .
    now after this   , loop you new  internal table  
    hide technque   for drilldown.
    Regards  ,
    Girish
    regard ,
    Girish

  • How to use drill down ability in ALV report.

    Hi All,
    I have a ALV report and now i want to add  drill down functionality in this ALV report.
    See the requirement below.
    The Document Number, aka Accounting Document Number (BELNR) of each row will take the user to the appropriate document to edit as follows:
    For Parked documents:-
    If VBKPF-AWTYP (Reference Procedure) = “RMRP”, then the drilldown functionality should be to MIR4 using the Object ID in VBKPF- AWKEY.    In this scenario the Object ID represents a Invoice Document Number, not an Accounting Document Number.  Not the Object ID is a combination of Invoice Document Number and Fiscal Year
    If VBKPF-AWTYP = Any other value, then the drilldown functionality should be to FBV2 using the Object ID in VBKPF-AWKEY. In this scenario the Object ID represents a true Accounting Document Number.  Note the Object ID is a combination of Company Code (VBKPF-BUKRS), Accounting Document Number (VBKPF-BELNR) and Fiscal Year (VBKPF-GJAHR)
    For Posted, not Cleared documents:-
    Drilldown ability should be to FB02.   The combination of Company Code (BSIK-BUKRS), Accounting Document Number (BSIK-BELNR) and Fiscal Year (BSIK-GJAHR) will be used to open/drilldown to the correct document in FB02.
    For Cleared documents:-
    Drilldown ability should be to FB03.   The combination of Company Code (BSIK-BUKRS), Accounting Document Number (BSIK-BELNR) and Fiscal Year (BSIK-GJAHR) will be used to open/drilldown to the correct document in FB03.
    Its very urgent, pls help on this.
    Thanks!
    Vipin

    Hi Vipin,
    Please look at the reference code.
    You need to use the FM 'REUSE_ALV_EVENTS_GET' and in the user command event u need to pass the name of the form that u need to write.
    Please find the ollowing code:
    REPORT ZSOURAVICON NO STANDARD PAGE HEADING.
    type-pools: slis.
    tables: vbap.
    data: begin of itab occurs 0,
          chk,
          lights,
          vbeln like vbap-vbeln,
          posnr like vbap-posnr,
          matnr like vbap-matnr,
          kwmeng like vbap-kwmeng,
          end of itab.
    data: P_LIGNAM TYPE SLIS_FIELDNAME VALUE  'LIGHTS'.
    data: v_repid like sy-repid.
    data: t_fld type slis_t_fieldcat_alv,
          ws_fld like t_fld with header line,
          t_sort type slis_t_sortinfo_alv,
          ws_sort like t_sort with header line,
          ws_layout type slis_layout_alv,
          t_event type slis_t_event,
          ws_event like t_event with header line,
          c_topup TYPE slis_t_listheader,
          ws_topup like c_topup with header line.
    constants: c_top type slis_formname value 'TOP_OF_PAGE',
               c_pfs type slis_formname value 'PF_STATUS_SET',
               c_ucomm type slis_formname value 'USER_COMMAND'.
    initialization.
      v_repid = sy-repid.
    select vbeln posnr matnr kwmeng from vbap into corresponding fields of
                                             table itab.
      loop at itab.
        if itab-kwmeng lt 500.
          itab-lights = '2'.
        elseif itab-kwmeng = 500.
          itab-lights = '1'.
        else.
          itab-lights = '3'.
        endif.
        modify itab.
      endloop.
    HERE WE ARE POPULATING THE FIELD CATALOG
      ws_fld-col_pos = '3'.
      ws_fld-fieldname = 'VBELN'.
      ws_fld-KEY = 'X'.
      ws_fld-tabname = ITAB.
      ws_fld-reptext_ddic = 'SALES DOC'.
      append ws_fld to t_fld.
      clear ws_fld.
      ws_fld-col_pos = '4'.
      ws_fld-fieldname = 'POSNR'.
      ws_fld-tabname = 'ITAB'.
      ws_fld-reptext_ddic = 'SALES ITEM'.
      append ws_fld to t_fld.
      clear ws_fld.
      ws_fld-col_pos = '5'.
      ws_fld-fieldname = 'MATNR'.
      ws_fld-tabname = 'ITAB'.
      ws_fld-reptext_ddic = 'MATERIAL NO'.
      append ws_fld to t_fld.
      clear ws_fld.
      ws_fld-col_pos = '6'.
      ws_fld-fieldname = 'KWMENG'.
      ws_fld-tabname = 'ITAB'.
      ws_fld-reptext_ddic = 'UNIT'.
      ws_fld-do_sum = 'X'.
      append ws_fld to t_fld.
      clear ws_fld.
      ws_sort-spos = '1'.
      ws_sort-fieldname = 'MATNR'.
      ws_sort-tabname = 'ITAB'.
      ws_sort-subtot  = 'X'.
      append ws_sort to t_sort.
      clear ws_sort.
      ws_layout-zebra = 'X'.
    ws_layout-detail_popup = 'X'.
    ws_layout-f2code = '&ETA'.
      ws_layout-totals_text(60) = 'TOTAL'.
      ws_layout-subtotals_text(60) = 'SUB TOTAL'.
      ws_layout-box_fieldname = 'CHK'.
      ws_layout-lights_fieldname = P_LIGNAM.
      ws_layout-box_tabname = ITAB.
      ws_layout-edit = 'X'.
      clear ws_event.
      ws_event-name = c_top.
      ws_event-form = c_top.
      append ws_event to t_event.
      ws_event-name = c_pfs.
      ws_event-form = c_pfs.
      append ws_event to t_event.
      clear ws_event.
      ws_event-name = c_ucomm.
      ws_event-form = c_ucomm.
      append ws_event to t_event.
      clear ws_event.
      CLEAR ws_topup.
      ws_topup-typ  = 'H'.
      ws_topup-info = 'Purchase Order Report'.
      APPEND ws_topup TO c_topup.
      CLEAR ws_topup.
      ws_topup-typ  = 'H'.
      ws_topup-info = 'An ALV Report '.
      APPEND ws_topup TO c_topup.
      ws_topup-TYP = 'S'.
      ws_topup-KEY = 'CURRENT PROGRAM NAME:'.
      ws_topup-INFO = v_repid.
      APPEND ws_topup TO c_topup.
      CLEAR ws_topup.
      ws_topup-TYP = 'S'.
      ws_topup-KEY = 'DATE:'.
      write SY-DATUM to ws_topup-INFO.
      APPEND ws_topup to c_topup.
      CLEAR ws_topup.
      ws_topup-TYP = 'S'.
      ws_topup-KEY = 'TIME:'.
      write SY-UZEIT to ws_topup-INFO.
      APPEND ws_topup TO c_topup.
      CLEAR ws_topup.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = v_repid
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = ws_layout
         IT_FIELDCAT                    = t_fld
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
         IT_SORT                        = t_sort
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
         IT_EVENTS                      = t_event
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = itab[]
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
          FORM top_of_page                                              *
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = c_topup
          I_LOGO                   = 'LOGO'
      I_END_OF_LIST_GRID       =
    ENDFORM.
          FORM PF_STATUS_SET                                            *
    -->  RT_EXTAB                                                      *
    FORM PF_STATUS_SET using rt_extab type slis_t_extab.
      set pf-status 'STD'. "EXCLUDING RT_EXTAB.
    set pf-status 'STANDARD'.
    endform.
          FORM user_command                                             *
    form USER_COMMAND using r_ucomm like sy-ucomm
                            rs_selfield type slis_selfield.
      data: begin of itab_temp occurs 0,
            VBELN LIKE VBAP-VBELN,
            POSNR LIKE VBAP-POSNR,
            MATNR LIKE VBAP-MATNR,
            kwmeng like vbap-kwmeng,
            end of itab_temp.
      DATA: t_fld1  TYPE SLIS_T_FIELDCAT_ALV,
            ws_fld1  LIKE t_fld1  WITH HEADER LINE.
      case r_ucomm.
        when 'SHOW'.
          loop at itab where chk = 'X'.
            move-corresponding itab to itab_temp.
            append itab_temp.
            clear itab.
          endloop.
          ws_fld1-col_pos = '1'.
          ws_fld1-fieldname = 'VBELN'.
          ws_fld1-tabname = ITAB_TEMP.
          ws_fld1-reptext_ddic = 'SALES DOC'.
         ws_fld1-key = 'X'.
          append ws_fld1 to t_fld1.
          clear ws_fld1.
          ws_fld1-col_pos = '2'.
          ws_fld1-fieldname = 'POSNR'.
          ws_fld1-tabname = ITAB_TEMP.
          ws_fld1-reptext_ddic = 'SALES ITEM'.
         ws_fld1-key = ' '.
          append ws_fld1 to t_fld1.
          clear ws_fld1.
          ws_fld1-col_pos = '3'.
          ws_fld1-fieldname = 'MATNR'.
          ws_fld1-tabname = ITAB_TEMP.
          ws_fld1-reptext_ddic = 'MATERIAL NO'.
         ws_fld1-key = ' '.
          append ws_fld1 to t_fld1.
          clear ws_fld1.
          ws_fld1-col_pos = '4'.
          ws_fld1-fieldname = 'KWMENG'.
          ws_fld1-tabname = ITAB_TEMP.
          ws_fld1-reptext_ddic = 'UNIT'.
         ws_fld1-key = ' '.
          ws_fld1-do_sum = 'X'.
          append ws_fld1 to t_fld1.
          CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
            EXPORTING
             I_TITLE                       =  'my report'
            I_SELECTION                   = ' '
            I_ZEBRA                       = ' '
            I_SCREEN_START_COLUMN         = 0
            I_SCREEN_START_LINE           = 0
            I_SCREEN_END_COLUMN           = 0
            I_SCREEN_END_LINE             = 0
            I_CHECKBOX_FIELDNAME          =
            I_LINEMARK_FIELDNAME          =
            I_SCROLL_TO_SEL_LINE          = 'X'
              I_TABNAME                     = ITAB_TEMP
             I_STRUCTURE_NAME              = 'VBAP'
             IT_FIELDCAT                   = t_fld1
            IT_EXCLUDING                  =
             I_CALLBACK_PROGRAM            = v_repid
            I_CALLBACK_USER_COMMAND       =
             IS_PRIVATE                    = GS_PRIVATE
          IMPORTING
             ES_SELFIELD                   = RS_SELFIELD
             E_EXIT                        = G_EXIT
            TABLES
              T_OUTTAB                      = ITAB_TEMP[]
          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.
      endcase.
    ENDFORM.
    Thanks and Regards,
    Saurabh

Maybe you are looking for

  • HT4859 How do I back up contacts to icloud?

    How do I back up contacts from Lotus Notes to icloud?

  • Bug 10.5.9

    Hi, After Update Director 11.5.9. AS2 and AS3(Classic Text box ) cursor was Disappear.I use More Flash Text box in my project. Any Solution.

  • From where are values of BEB CESS ECS captured in J1IIN for Export

    Hi , In export sale,we dont mention BED CESS ECS condition type in pricing procedure. While creating J1IIN we get excise details of BED CESS ECS in excise invoice. From where does this value come. parsad

  • Enter a date as a parameter tp a PreparedStatement

    Hey everyone, I'm trying to get some info form an access database on the basis of the value on a date field. I'm getting the following error: Data Type mismatch in criteria expression. Here's my code: private static String STRING_SQL = "SELECT * FROM

  • Tomcat startup error: can't start server

    Hi! I got Jbuilder 8, it contains Tomcat 3.1, Tomcat 4.0, Tomcat 4.1 servers. When I develop in the IDE, the JBuilder 8 can start any of these servers. But if I want to use Tomcat 4.1 alone (independent from JBuilder), it doesn't works. I followed th