Interactive Report Events

Hi Friends,
Can any one give sample programs  of below Interactive Report Events ?
AT PF<nn> (obsolete)
AT LINE-SELECTION
AT USER-COMMAND
points for sure..
Regards
Vijaya

Hi see the below program.
Hope this helps you.
But make sure that the Gui is also created and activated.
To do this just double click at at pf-status <b>statusname.</b>
REPORT  Z_EVENTS LINE-SIZE 250.
Description : This Program accepts accept a range of Airline carrier *
              ID and Flight connection numbers from the user and     *
              display SPFLI data.Develop a user interface for the    *
              basic list with two pushbuttons.It Sorts when the User *
              clicks on the  sort and sort by push buttons           *
TABLES:
  SPFLI.                               " Flight schedule
"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK
  CARR_CONN.
SELECT-OPTIONS:
  S_CARRID FOR SPFLI-CARRID,           " Carrier Id
  S_CONNID FOR SPFLI-CONNID.           " Connection Id
SELECTION-SCREEN END OF BLOCK
  CARR_CONN.
Dat declaration of the structure to hold spfli data
DATA:
  W_LINE_DATA(255) TYPE C.             " Line Content
DATA:
  BEGIN OF FS_SPFLI,
    CARRID    LIKE SPFLI-CARRID,       " Carrier Id
    CONNID    LIKE SPFLI-CONNID,       " Connection Id
    CITYFROM  LIKE SPFLI-CITYFROM,     " Departur City
    CITYTO    LIKE SPFLI-CITYTO,       " Arrival City
    AIRPFROM  LIKE SPFLI-AIRPFROM,     " Departure Airport
    AIRPTO    LIKE SPFLI-AIRPTO,       " Arrival Airport
    COUNTRYFR LIKE SPFLI-COUNTRYFR,    " Departure Country
    COUNTRYTO LIKE SPFLI-COUNTRYTO,    " Arrival Country
  END OF FS_SPFLI.
*Internal Table  to hold FLIGHT_DETAILS                                *
DATA:
  T_SPFLI LIKE
STANDARD TABLE                        " FS_SPFLI like Structure
       OF FS_SPFLI,
W_FIELD(180) TYPE C.
*" Data declarations...................................................
Work variables                                                      *
DATA:
  W_BOX TYPE C.                        " Check Box in the window
                     START OF SELECTION EVENT                        *
START-OF-SELECTION.
  PERFORM SELECT_DETAILS.
Set PF-Status
  SET PF-STATUS 'BUTTON_SORT'.
                     AT USER COMMAND EVENT                           *
AT USER-COMMAND.
  GET CURSOR FIELD W_FIELD.
  W_FIELD = W_FIELD+9(10).
  CASE SY-UCOMM.
    WHEN 'SORT'.
      SORT T_SPFLI STABLE BY (W_FIELD) ASCENDING.
      PERFORM DISPLAY_DETAILS.
    WHEN 'SORTDATABY'.
      PERFORM DISPLY_FIELDS.
    WHEN 'SORTASCEN'.
      PERFORM SORT_ASC_FIELD.
    WHEN 'SORTDESCEN'.
      PERFORM SORT_DES_FIELD.
    WHEN OTHERS.
      WRITE 'Invalid Command'(002).
  ENDCASE.                             " CASE SY-UCOMM.
                     END  OF SELECTION EVENT                         *
END-OF-SELECTION.
  PERFORM DISPLAY_DETAILS.
*&      Form  SELECT_DETAILS                                           *
  This Sub routine Retriebes the Details From SPFLI Table            *
There are no interface parameters to be passed to this subroutine.   *
FORM SELECT_DETAILS .
  SELECT CARRID                        " Carrier Id
         CONNID                        " Connection Id
         CITYFROM                      " Departur City
         CITYTO                        " Arrival City
         AIRPFROM                      " Departure Airport
         AIRPTO                        " Arrival Airport
         COUNTRYFR                     " Departure Country
         COUNTRYTO                     " Arrival Country
    FROM SPFLI
    INTO TABLE T_SPFLI
  WHERE CARRID IN S_CARRID AND
    CONNID IN S_CONNID.
  IF SY-SUBRC NE 0.
    WRITE'No Records Available'(001).
  ENDIF.                               " IF SY-SUBRC NE 0.
ENDFORM.                               " SELECT_DETAILS
*&      Form  DISPLAY_DETAILS                                          *
This subroutine displays the SPFLI data on the basic list            *
There are no interface parameters to be passed to this subroutine.   *
FORM DISPLAY_DETAILS .
  MOVE 0 TO SY-LSIND .
  LOOP AT T_SPFLI INTO FS_SPFLI.
    AT FIRST.
      WRITE:
        /  'Carrier Id'(003),
        15 'Connection Id'(004),
        30 'Departur City'(005),
        45 'Arrival City'(006),
        60 'Dept Airport'(007),
        75 'Arri Airport'(008),
        90 'Dept Country'(009),
        105 'Arri Country'(010).
        ULINE.
    ENDAT.
    WRITE:
      /01  FS_SPFLI-CARRID,            " Carrier Id
       15  FS_SPFLI-CONNID,            " Connection Id
       30  FS_SPFLI-CITYFROM,          " Departur City
       45  FS_SPFLI-CITYTO,            " Arrival City
       60  FS_SPFLI-AIRPFROM,          " Departure Airport
       75  FS_SPFLI-AIRPTO,            " Arrival Airport
       90  FS_SPFLI-COUNTRYFR,         " Departure Country
       105 FS_SPFLI-COUNTRYTO.         " Arrival Country
  ENDLOOP.                             " LOOP AT T_SPFLI INTO FS_SPFLI
ENDFORM.                               " DISPLAY_DETAILS
*&      Form  DISPLY_FIELDS                                            *
This Subroutine displays All Fields names in displayed list          *
There are no interface parameters to be passed to this subroutine.   *
FORM DISPLY_FIELDS.
  SET PF-STATUS  'WINDOW'.
  WINDOW STARTING AT 3 10
         ENDING   AT 15 60.
  WRITE:
    /1  W_BOX AS CHECKBOX,
      5 'CARRID',
    /1 W_BOX AS CHECKBOX,
      5 'CONNID',
    /1 W_BOX AS CHECKBOX,
      5 'CITYFROM',
    /1 W_BOX AS CHECKBOX,
      5'CITYTO',
    /1 W_BOX AS CHECKBOX,
      5 'AIRPFROM',
    /1  W_BOX AS CHECKBOX,
      5 'AIRPTO',
    /1 W_BOX AS CHECKBOX,
      5 'COUNTRYFR',
    /1 W_BOX AS CHECKBOX,
      5 'COUNTRYTO'.
ENDFORM.                               " DISPLY_FIELDS
*&      Form  SORT_ASC_FIELD                                           *
  This subroutine sorts the list by selected fields in ascending     *
   order                                                             *
There are no interface parameters to be passed to this subroutine   *
FORM SORT_ASC_FIELD .
  DATA:
    LW_CHECK TYPE C,                   " Check Box
    LW_FIELD(255) TYPE C,              " Field
    LW_F_VALUE(10) TYPE C,             " Field Value
    LW_FIELD1(10) TYPE C,              " Field Value
    LW_FIELD2(10) TYPE C,              " Field Value
    LW_FIELD3(10) TYPE C,              " Field Value
    LW_FIELD4(10) TYPE C,              " Field Value
    LW_FIELD5(10) TYPE C,              " Field Value
    LW_FIELD6(10) TYPE C,              " Field Value
    LW_FIELD7(10) TYPE C,              " Field Value
    LW_FIELD8(10) TYPE C.              " Field Value
  DO 8 TIMES.
    READ LINE SY-INDEX.
    LW_CHECK = SY-LISEL+0(1).
    LW_F_VALUE = SY-LISEL+4(10).
    IF LW_CHECK = 'X'.
      CASE SY-INDEX.
        WHEN 1.
          LW_FIELD1 = LW_F_VALUE.
        WHEN 2.
          LW_FIELD2 = LW_F_VALUE.
        WHEN 3.
          LW_FIELD3 = LW_F_VALUE.
        WHEN 4.
          LW_FIELD4 = LW_F_VALUE.
        WHEN 5.
          LW_FIELD5 = LW_F_VALUE.
        WHEN 6.
          LW_FIELD6 = LW_F_VALUE.
        WHEN 7.
          LW_FIELD7 = LW_F_VALUE.
        WHEN 8.
          LW_FIELD8 = LW_F_VALUE.
      ENDCASE.
    ENDIF.
  ENDDO.
  SORT T_SPFLI STABLE BY
    (LW_FIELD1)  ASCENDING
    (LW_FIELD2)  ASCENDING
    (LW_FIELD3)  ASCENDING
    (LW_FIELD4)  ASCENDING
    (LW_FIELD5)  ASCENDING
    (LW_FIELD6)  ASCENDING
    (LW_FIELD7)  ASCENDING
    (LW_FIELD8)  ASCENDING.
  PERFORM DISPLAY_DETAILS.
ENDFORM.                               " SORT_ASC_FIELD
*&      Form  SORT_DES_FIELD
  This subroutine sorts the list by selected fields in descending    *
   order                                                             *
There are no interface parameters to be passed to this subroutine   *
FORM SORT_DES_FIELD .
  DATA:
  LW_CHECK TYPE C,
  LW_FIELD(255) TYPE C,
  LW_F_VALUE(10) TYPE C,
  LW_FIELD1(10) TYPE C,LW_FIELD2(10)
    TYPE C,
  LW_FIELD3(10) TYPE C,LW_FIELD4(10)
    TYPE C,
  LW_FIELD5(10) TYPE C,LW_FIELD6(10)
    TYPE C,
  LW_FIELD7(10) TYPE C,LW_FIELD8(10)
    TYPE C.
  DO 8 TIMES.
    READ LINE SY-INDEX.
    LW_CHECK = SY-LISEL+0(1).
    LW_F_VALUE = SY-LISEL+4(10).
    IF LW_CHECK = 'X'.
      CASE SY-INDEX.
        WHEN 1.
          LW_FIELD1 = LW_F_VALUE.
        WHEN 2.
          LW_FIELD2 = LW_F_VALUE.
        WHEN 3.
          LW_FIELD3 = LW_F_VALUE.
        WHEN 4.
          LW_FIELD4 = LW_F_VALUE.
        WHEN 5.
          LW_FIELD5 = LW_F_VALUE.
        WHEN 6.
          LW_FIELD6 = LW_F_VALUE.
        WHEN 7.
          LW_FIELD7 = LW_F_VALUE.
        WHEN 8.
          LW_FIELD8 = LW_F_VALUE.
      ENDCASE.                         " CASE sy-index.
    ENDIF.                             " IF lw_check = 'X'.
  ENDDO.                               " DO 8 TIMES.
  SORT T_SPFLI STABLE BY
    (LW_FIELD1)  DESCENDING
    (LW_FIELD2)  DESCENDING
    (LW_FIELD3)  DESCENDING
    (LW_FIELD4)  DESCENDING
    (LW_FIELD5)  DESCENDING
    (LW_FIELD6)  DESCENDING
    (LW_FIELD7)  DESCENDING
    (LW_FIELD8)  DESCENDING.
  PERFORM DISPLAY_DETAILS.
ENDFORM.                               " SORT_DES_FIELD
Regards,
Rama chary.Pammi

Similar Messages

  • Which is first event triggred in interactive report

    pls let me know

    <b>The event are triggered depended on the way the output is generated . </b>
    for eg:
    "Initialization :
    triggered when the report is loaded in memory.
    "At selection-screen output :
    triggered when the selection screen is loaded in memory before being displayed.
    "At selection-screen / <field> :
    before leaving the selection screen.
    "start-of-selection :
    the first event for displaying the report.
    "end-of-selection :
    after the start-of-selection is completed.
    "classiscal report events.
    "top-of-page :
    every time a new page is started in the list.
    "end-of-page :
    every time the list data reaches the footer region of the page.
    "interactive report events.
    "top of page during line selection :
    top of page event for secondary list.
    "at line-selection :
    evey time user dbl-clicks(F2) on the list data.
    "at pF<key> :
    function key from F5 to F12 to perform interactive action on the list.
    reward  points if it is   usefull ....
    Girish

  • What are the events in interactive reports?

    what are the events in interactive reports?
    could plz explain

    hi,
    First event -
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    This event keyword defines an event block whose event is triggered by the ABAP runtime environment
    when calling the executable program selection screen processing of a selection screen.
    In an executable program, all statements that are not declarations,
    and are listed before the first explicit processing block, are assigned to this event block.
    If the program does not contain an explicitly defined event block START-OF-SELECTION,
    these statements form the complete event block START-OF-SELECTION.
    If a program contains an explicitly defined event block START-OF-SELECTION,
    these statements are added to the beginning of the event block.
    If the program contains no explicitly defined event blocks,
    these statements form the entire event block START-OF-SELECTION.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    at user-command
    <b>http://help.sap.com/saphelp_47x200/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm</b>
    Rgds
    Anver

  • Regarding Interactive reports

    Hi All,
    Yesterday i submitted a query regarding Interactive reports.and i recieved lots of reply .But the replies are all about ALV interactive report.I want to know just about the interactive reports where ew use AT LINE OF SELECTION, HIDE e.c.
    PLZ send methe documents related that.
    Thanks and Regards
    RASHMI

    Hi
    Interactive Reports
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers. And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21). Events associated with Interactive Reports are: 1. AT LINE-SELECTION 2. AT USER-COMMAND 3. AT PF<key> 4. TOP-OF-PAGE DURING LINE-SELECTION. HIDE statement holds the data to be displayed in the secondary list. sy-lisel : contains data of the selected line. sy-lsind : contains the level of report (from 0 to 21)
    Interactive Report Events:
    AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
    AT PFn: For predefined function keys...
    AT USER-COMMAND : It provides user functions keys.
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    LOOP AT SCREEN.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    ENDLOOP.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    Regards
    Anji

  • What is interactive report , difference bet interactive and classic report

    what is interactive report , difference bet interactive and classic report

    Hi
    Check this thread to get more idea about ALVs.
    Interactive ALV
    DIRLL DOWN AND INTERACTIVE REPORT
    http://www.sap-img.com/abap/difference-between-drilldown-report-and-interactive-report.htm
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
    Events associated with Interactive Reports are:
    AT LINE-SELECTION
    AT USER-COMMAND
    AT PF<key>
    TOP-OF-PAGE DURING LINE-SELECTION.
    HIDE statement holds the data to be displayed in the secondary list.
    sy-lisel : contains data of the selected line.
    sy-lsind : contains the level of report (from 0 to 21)
    Interactive Report Events:
    AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
    AT PFn: For predefined function keys...
    AT USER-COMMAND : It provides user functions keys.
    TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.
    http://abapprogramming.blogspot.com/search/label/INTERACTIVE%20REPORT%20BASICS

  • Difference between class report and interactive report

    please give me the differences between  classical report and interactive report

    Hi,read the following :
    In ABAP, there are a total of 7 types of reports. They are:
    Classical Reports
    Interactive Reports
    Logical Database Reports
    ABAP query
    ALV Reports (ALV stands for ABAP List Viewer)
    Report Writer/Report Painter
    Views (There are different types of views also)
    Classical Reports
    These are the most simple reports. It is just an output of data using the Write statement inside a loop.
    Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT
    Interactive Reports
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
    Logical Database Reports
    Logical database is another tool for ABAP reports. Using LDB we can provide extra features for ABAP reports.
    While using LDB there is no need for us to declare Parameters.
    Selection-screen as they will be generated automatically.
    We have to use the statement NODES in ABAP report.
    ABAP Query Reports
    ABAP query is another tool for ABAP. It provides efficency for ABAP reports. These reports are very accurate.
    Transaction Code : SQ01
    Report Writer / Report painter
    Super users and end users can use Report Painter/Report Writer tools to write their own reports.
    Giving them the ability to report on additional fields at their discretion shifts the report maintenance burden to them, saving SAP support groups time and effort normally spent creating and maintaining the reports.
    ALV reports
    Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length.
    In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output.
    The report output can contain up to 90 columns in the display with the wide array of display options.
    There is no difference between drill down and interactive report, they are the same.
    With drilldown reporting, SAP provides you with an interactive information system to let you evaluate the data collected in your application. This information system is capable of analyzing all the data according to any of the characteristics that describe the data. You can also use any key figures you wish to categorize your data. You can display a number of objects for a given key figure, or a number of key figures for a given object. In addition, the system lets you carry out any number of variance analyses (such as plan/actual comparisons, fiscal year comparisons, comparisons of different objects, and so on).
    *More on Classical Vs Interactive*
    Classical Reports
    These are the most simple reports. Programmers learn this one first. It is just an output of data using the Write statement inside a loop.
    Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT.
    Events In Classical Reports.
    INTIALIZATION: This event triggers before selection screen display.
    AT-SELECTION-SCREEN: This event triggers after proccesing user input still selection screen is in active mode.
    START OF SELECTION: Start of selection screen triggers after proceesing selection screen.
    END-OF-SELECTION : It is for Logical Database Reporting.
    Interactive Reports
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
    Events associated with Interactive Reports are:
    1. AT LINE-SELECTION
    2. AT USER-COMMAND
    3. AT PF<key>
    4. TOP-OF-PAGE DURING LINE-SELECTION.
    HIDE statement holds the data to be displayed in the secondary list.
    sy-lisel : contains data of the selected line.
    sy-lsind : contains the level of report (from 0 to 21)
    Interactive Report Events:
    AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
    AT PFn: For predefined function keys...
    AT USER-COMMAND : It provides user functions keys.
    TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.
    Reward if found helpful

  • Difference between Interactive report and ALV Interactive report.

    What is the difference between Interactive report and ALV Interactive report.
    i think there is no much difference the same Interactive report Events and functionality we will implement with ALV.
    Experts guide me.

    Hi,
    ALV interactive report gives many advantages than interactive report like sorting, summing and getting graphics.
    An interactive report generally basic list displayed. User double clicks on any valid line or user selects a line and presses as button on the tool bar. Then the corresponding event is triggered
    refer
    http://www.sapgenie.com/abap/drill_down_reports.htm
    You can find a interactive ALV report here
    http://www.sap-img.com/abap/an-interactive-alv-report.htm
    also refer
    Below threads consist of number of interactive ALV codes:
    interactive ALV code
    ALV-INTERACTIVE.
    Interactive ALV
    Regards

  • Interactive reports list

    &#61656;     Reports: I want to jump from 2nd detail list to 10th list. Is it possible? How?
    &#61656;     Suppose Iam in 10th list , I want to move to 3nd list directly? How?

    Hi
    Interactive Reports
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
    Events associated with Interactive Reports are:
    AT LINE-SELECTION
    AT USER-COMMAND
    AT PF<key>
    TOP-OF-PAGE DURING LINE-SELECTION.
    HIDE statement holds the data to be displayed in the secondary list.
    sy-lisel : contains data of the selected line.
    sy-lsind : contains the level of report (from 0 to 21)
    Interactive Report Events:
    AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
    AT PFn: For predefined function keys...
    AT USER-COMMAND : It provides user functions keys.
    TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.
    MAX we can go for 20 SECONDARY LIST AND ONE BASIC LIST TOTAL 21
    sy-lsind EQ 5.
    sy-lsind = 9.
    endif.
    Ex:
    REPORT demo_list_interactive_2 .
    START-OF-SELECTION.
    WRITE: 'Basic List, SY-LSIND =', sy-lsind.
    AT LINE-SELECTION.
    IF sy-lsind = .5
    sy-lsind = 9.
    ENDIF.
    WRITE: 'Secondary List, SY-LSIND =', sy-lsind.
    I just gave an example at this link for filling and retrieving data to a text editor.
    Save the text from Text Editor to customised table
    reward if usefull.

  • Multiple event not working in interactive report

    Hi Experts,
    I am developing a interactive report used Set-PFstatus '100' , AT user-command and At line-selection in a single program.
    Here At line-selection is not working but at user-command is working fine.
    After commenting set-PF ststus '100' event at line selection is working.
    Ii want at to use at-user command and at line-selection both to work with set pf-status.
    Please help me out.

    Hi,
    You can use these events together but in case while
    creating your GUI status for your program you have
    to give Function Code 'PICK' with F2 short cut key
    because for at line selectino double click 'PICK' function
    code is trigerred.
    hope it helps,
    Regards
    Mansi

  • Catch the onClick event on Interactive Report to access columns content

    Hi,
    I am using Apex 4
    I would like to display some rows into an interactive report. I have define a dynamic action on that report in order to catch the Mouse OnClick Event.
    The Goal is to display the detail of the row in a form region in the sidebar.
    To do this, I would like to get the content of a column of the row clicked and then execute a pl/sql block to get the detail of my row.
    I am stuck to get the content of the column I have clicked within the dynamic action to pass it to execute the pl/sql block.
    Any idee?
    Many thanks
    jko
    Edited by: user617942 on 29-Jul-2010 04:19

    Hello,
    Did I ask something stupid :-)
    Jko
    Edited by: user617942 on 29-Jul-2010 04:19
    Edited by: user617942 on 29-Jul-2010 08:34

  • *what are the step by step events trigger in interactive report*

    Hi gurus,
    pls explain event by event triggers in interactive report.
    points will be rewarded.
    Thanks,
    Balakrishna.

    Hi,
    Interactive reporting allows the user to participate in retrieving and presenting data at each level during the session.  Instead of presenting one extensive and detailed list with cluttered information, with interactive reporting you can create a condensed basic list from which the user can call detailed information by positioning the cursor and entering commands.
    Detailed information is presented in secondary lists. A secondary list may either overlay the basic list completely or appear in an additional dialog window on the same screen.  The secondary list can itself be interactive again. The basic list is not deleted when secondary list is created.
    User can interact with the system by:
    u2022     Double clicking or pressing F2
    u2022     Selecting menu option
    Like classical report, the interactive report is also event driven. Both the action mentioned above trigger events and code is written to handle these events.  The events triggered by this action are as follows:
    u2022     At line-selection
    u2022     At user-command
    u2022     Top-of-Page During Line-Selection for Secondary Page Header info
    Interactive report consists of one BASIC list and 20 secondary list. Basic list is produced by START-OF-SELECTION event. When the user double clicks on the basic list or chooses the menu option, the secondary list is produced. All the events associated with classical report except end-of-page are applicable only to basic list.
    AT LINE-SELECTION event
    Double clicking is the way most users navigate through programs. Double clicking on basic list or any secondary list triggers the event AT LINE-SELECTION. SY-LSIND denotes the index of the list currently created. For BASIC list it is always 0.  Following piece of code shows how to handle the event.
    Start-of-selection.
    Write: / u2018this is basic listu2019.
    At line-selection.
    Write : u2018this is first secondary listu2019.
    In this case the output will be displayed on basic list i.e.
    This is basic list.
    When user double clicks on this line, the event at line-selection gets triggered and secondary list is produced, i.e. This is first secondary list.
    You can go back to basic list by clicking on F3 or back icon on the standard tool bar.  For this list, the value of sy-lsind will be 1.
    HIDE technique
    In this case thins are much simpler. Consider the case, wherein you display fields from table sflight in basic list. When user double clicks on any sflight-carrid, you are displaying the detailed information related to that particular carrid on secondary list.  Hence there is a need to store the clicked carrid in some variable.  So that you can access this carrid for next list. ABAP/4 has facility; a statement called HIDE, which provides the above functionality.
    HIDE command temporarily stores the content of clicked field in system area.
    Syntax:
    HIDE <FIELDS>.
    This statement stores the contents of variable <f> in relation to the current output line (system field SY-LINNO) internally in the so-called HIDE area. The variable <f> must not necessarily appear on the current line.
    You have to place the HIDE statement always directly after the output statement i.e., WRITE for the variable <f>.  As when you hide the variable, control is passed to next record.  While writing, WRITE statement takes that record from header and writes it on to the list, but when writing onto your interactive list you will miss out 1st record.
    To hide several variables, use chain HIDE statement.
    As soon as the user selects a line for which you stored HIDE fields, the system fills the variables in the program with the values stored.  A line can be selected.
    u2022     By an interactive event.
    For each interactive event, the HIDE fields of the line on which the cursor is positioned during the event are filled with the stored values.
    The HIDE area is a table, in which the system stores the names and values of all HIDE fields for each list and line number.  As soon as they are needed, the system reads the values from the table.  (Please try to find the name of this table.)
    Sy-lsind indicates the index of the list and can be used to handle all the secondary lists.  When the user double clicks on the line or presses F2, sy-lsind is increased by one and this new sy-lsind can be handled.  For example:
    Write: / u2018this is basic listu2019.
    u2022     Will create a basic list.
    If sy-lsind = 1.
    Write: / u2018this is first secondary listu2019.
    Elseif sy-lsind = 2.
    Write: / u2018This is second secondary listu2019.
    Endif.
    When this code is executed,
    u2022     Basic list is produced.
    u2022     When the user clicks on the basic list, sy-lsind becomes one.
    u2022     AT LINE-SELECTION event is triggered.
    u2022     Whatever is written under IF Sy-lsind = 1, gets executed.
    u2022     Secondary list is produced.
    u2022     Again if user clicks on this list, sy-lsind becomes two.
    u2022     AT LINE-SELECTION gets triggered.
    u2022     Code written under IF Sy-lsind = 2, gets executed.
    A sample program for AT LINE-SELECTION.
    AT USER-COMMAND
    When the user selects the menu item or presses any function key, the event that is triggered is AT USER-COMMAND, and can be handled in the program by writing code for the same. The system variable SY-UCOMM stores the function code for the clicked menu item or for the function key and the same can be checked in the program.  Sample code would look like
    AT USER-COMMAND.
    Case sy-ucomm.
    When u2018DISPu2019.
            Select * from sflight.
            Write sflight-carrid, sflight-connid.
            Endselect.
    When u2018EXITu2019.
         LEAVE.
    If GUI status, suppose you have set menu bar for two items and the function code is u2018DISPu2019 and u2018EXITu2019 respectively. If the user clicks the menu item u2018DISPLAYu2019, then function code u2018DISPu2019 is stored in the sy-ucomm and whatever is written under the when u2018DISPu2019, gets executed. This is applicable for EXIT as well.
    Sy-lsind for the screen increases when the user clicks the menu item.
    Usually you have combination of all the three navigations in your user interface, i.e., you have to create menu bar, assign function code for the function keys and write code to handle all this in addition to handling double clicking.
    Things to remember while using all the combinations:
    u2022     Sy-lsind increases even if you select menu-item.
    u2022     When the user double clicks on particular line, value of sy-ucomm is u2018PICK.
    u2022     If you set sy-lsind = 2 for your 4th secondary list, when control is transferred to the 2nd secondary list, all the other lists after 2nd are lost or memory allocated to them is lost.
    u2022     Sy-lisel also gives you the value of clicked line but in this case you cannot differentiate between field. To retrieve the exact field, you have to know the field length of each field.
    u2022     If you use statement SY-LSIND = 1.
    The system reacts to a manipulation of SY-LSIND only at the end of an event, directly before displaying the secondary list. So, if within the processing block, you use statements whose INDEX options access the list with the index SY-LSIND, make sure that you manipulate the SY-LSIND field only after processing these statements. The best way is to have it always at the `as the last statementu2019 of the processing block.
    Regards,
    Bhaskar

  • Interactive report column filters to display differently than column values

    Greetings...
    We use images a lot in our interactive reports to provide a visual representation to a status, or something locked for update, or what-have-you. By default, when a user clicks the column heading of a column which contains images, the drop-down list that shows up displays the actual images, which is nice for the user to identify exactly which thing they want to filter on. The problem is when the user selects on of the options in the filtering drop-down, the resulting condition that is displayed under the interactive report search bar is the HTML code of the image. I'd like something else to display there because showing the user the HTML code is atrocious.
    I didn't think what I want is possible, but then I came across the Page Locks page within ApEx (page 4000:291 in ApEx 4.0.1) which displays a list of all the pages of an application and whether they are locked or not. It also allows you to bulk lock or bulk unlock a bunch of pages. That page uses an interactive report with a column called "Status" which contains images that represent whether the page is locked or not. When you click the "Status" column heading to filter, instead of seeing the images of an open and closed lock, you see the words "Page Locked" and "Page Unlocked." And even better... when you select on of them, the condition that is displayed to the user is very user-friendly.
    Can someone tell me how this is done so I can replicate it in my own apps?
    Shane.

    Why not create the IR using the text you require e.g. 'Lock', 'Unlock' and then use JQuery to replace the text in the report with the image you want. All the filters should then show the plain text and the report will display the image. e.g.
    http://apex.oracle.com/pls/apex/f?p=46801:1
    Here's what I did:
    Firstly make sure the IR has a region template.
    Then create a Dynamic Action with the following attributes:
    1. Advanced
    2. Event: After Refresh
    3. Selection Type: Region
    4. Region: [select the IR Region]
    5. Action: Execute JS Code
    6. Fire on page load: [checked]
    7. Code:
    $('td [headers="TEST"]').each(function(index) {
      if ($(this).text() == 'Lock') {
        $(this).empty().html('<img src="/i/htmldb/icons/locked_small.gif" alt="Lock" />');
      else {
        $(this).empty().html('<img src="/i/htmldb/icons/unlocked_small.gif" alt="Unlock" />');
    });Where TEST is the column name.
    That's it, this may also be of interest:
    http://simonhunt.blogspot.com/2011/10/adjusting-interactive-report-column.html
    I hope it helps
    Shunt

  • Error while scheduling a Hyperion Interactive Report

    Hi,
    I'm trying to run a scheduled Hyperion Interactive Report (version 9.3.1). The report is scheduled to run for 1st of every month. After the report is scheduled. When a user tries to run the report on demand.
    The error log states as follows:
    $ view server_messages_IRJobService.log
    "server_messages_IRJobService.log" [Read only] 38 lines, 2688 characters
    <event logger="com.brio.one.services.bqservice.SERVICE" method="ThrID(7) Logger(ZDbgPrint)" timestamp="1247269603142" level="ERROR" thread="[ORB=_it_orb_id_1,Pool=1]::id-6" sequence_no="74">^M
    <time>10 Jul 2009 16:46:43,142</time>^M
    <context subject="TIPAdmin" session_id="zRMz99t6-00000122670ef701-0000-8197-0a3f0708" originator_type="IRJobService" originator_name="InteractiveReportingService" host="tsbrit02">^M
    <info type="RESOURCE">IBQServiceImpl::runJob Job Identifier: TIPPFSMRPT Service Name: JF1_tsbrit02 Cycle Name: Cycle_0</info>^M
    <info type="RESOURCE_ID">000001225ef102a5-0000-8197-0a3f0708</info>^M
    </context>^M
    <message><![CDATA[TCApp::ExecuteJavaScript failed: ]]></message>^M
    </event>^M
    ^M
    But when the report is uploaded and when the user tries running it. It runs without any problem.
    The report has 3 filters(drop downs) on runtime.
    Could anyone please help me in this regard.
    Regards,
    Sadiq

    check your discoverer user role using:
    select granted_role from dba_role_privs where grantee=upper('<username>');
    from your database. the database to which the desktop is connecting.
    check for connect, resouce, multiorg roles.

  • I Need Interactive Report for displaying vendor information. Based on the s

    Interactive Report for displaying vendor information. Based on the selection made by the corresponding Vendor Bank Details are listed such that the line selected in the basic list was visible along with the secondary list.

    hi
    Hi
    Use the Table LFA1 and LFB1 in the basic list
    and LFBK table details in the secondary list
    see the sample code related to customer Sales orders
    modify it with the Vendor tables
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    LOOP AT SCREEN.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    ENDLOOP.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    <b>Vendor performance report</b>
    See this sample code
    *"Table declarations...................................................
    TABLES:
    EKKO, " Purchasing Document Header
    CDHDR, " Change document header
    SSCRFIELDS. " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
    S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
    S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
    S_EKGRP FOR EKKO-EKGRP, " Purchasing group
    S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
    S_UDATE FOR CDHDR-UDATE. " Creation date of the change
    " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number *
    DATA:
    BEGIN OF FS_EBELN,
    EBELN(90) TYPE C, " Purchase Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
    " the Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EBELN,
    Field String to hold Purchase Document Header *
    BEGIN OF FS_EKKO,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor *
    BEGIN OF FS_LFA1,
    LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
    NAME1 TYPE LFA1-NAME1, " Name1
    END OF FS_LFA1,
    Field String to hold Change date and the name of the user *
    BEGIN OF FS_CDHDR,
    OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
    OBJECTID TYPE CDHDR-OBJECTID, " Object value
    CHANGENR TYPE CDHDR-CHANGENR, " Document change number
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    END OF FS_CDHDR,
    Field String to hold Change document items *
    BEGIN OF FS_CDPOS,
    OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
    OBJECTID(10) TYPE C, " Object Value
    CHANGENR TYPE CDPOS-CHANGENR, " Document change number
    TABNAME TYPE CDPOS-TABNAME, " Table Name
    FNAME TYPE CDPOS-FNAME, " Field Name
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_CDPOS,
    Field String to hold Date Element Name *
    BEGIN OF FS_DATAELE,
    TABNAME TYPE DD03L-TABNAME, " Table Name
    FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
    ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
    END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element *
    BEGIN OF FS_TEXT,
    ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid *
    BEGIN OF FS_OUTTAB,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    WERKS TYPE LFA1-WERKS, " Plant
    NAME1 TYPE LFA1-NAME1, " Name1
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number *
    T_EBELN LIKE STANDARD TABLE
    OF FS_EBELN,
    Internal table to hold Purchase Document Header *
    T_EKKO LIKE STANDARD TABLE
    OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header *
    T_EKKO_TEMP LIKE STANDARD TABLE
    OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor *
    T_LFA1 LIKE STANDARD TABLE
    OF FS_LFA1,
    Internal Table to hold Change date and the name of the user *
    T_CDHDR LIKE STANDARD TABLE
    OF FS_CDHDR,
    Internal Table to hold Change document items *
    T_CDPOS LIKE STANDARD TABLE
    OF FS_CDPOS,
    Temp. Internal Table to hold Change document items *
    T_CDPOS_TEMP LIKE STANDARD TABLE
    OF FS_CDPOS,
    Internal Table to hold Data Element Name *
    T_DATAELE LIKE STANDARD TABLE
    OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name *
    T_DATAELE_TEMP LIKE STANDARD TABLE
    OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element *
    T_TEXT LIKE STANDARD TABLE
    OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid *
    T_OUTTAB LIKE STANDARD TABLE
    OF FS_OUTTAB.
    C L A S S D E F I N I T I O N *
    CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables *
    DATA:
    W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
    W_VALUE TYPE EKKO-EBELN, " Reflected Value
    W_SPACE VALUE ' ', " Space
    W_FLAG TYPE I, " Flag Variable
    W_VARIANT TYPE DISVARIANT, " Variant
    *--- ALV Grid
    W_GRID TYPE REF TO CL_GUI_ALV_GRID,
    *--- Event Handler
    W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    *--- Field catalog table
    T_FIELDCAT TYPE LVC_T_FCAT.
    AT SELECTION-SCREEN EVENT *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
    PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
    PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
    PERFORM VALIDATE_PUR_GRP.
    START-OF-SELECTION EVENT *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
    PERFORM SELECT_PO.
    CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
    PERFORM SELECT_OBJ_ID.
    CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
    PERFORM SELECT_CHANGED_VALUE.
    CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
    PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
    PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
    PERFORM DESCRIPTION.
    END-OF-SELECTION EVENT *
    END-OF-SELECTION.
    IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
    PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
    PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
    CALL SCREEN 100.
    ENDIF. " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    HANDLE_HOTSPOT_CLICK
    FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
    METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
    PERFORM GET_CELL_INFO.
    SET PARAMETER ID 'BES' FIELD W_VALUE.
    CALL TRANSACTION 'ME23N'.
    ENDMETHOD. " HANDLE_HOTSPOT_CLICK
    ENDCLASS. " LCL_EVENT_HANDLER
    *& Module STATUS_0100 OUTPUT
    PBO Event
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'OOPS'.
    SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
    PERFORM FILL_VARIANT.
    IF W_GRID IS INITIAL.
    CREATE OBJECT W_GRID
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = CL_GUI_CONTAINER=>SCREEN0
    I_APPL_EVENTS =
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    OTHERS = 5.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC <> 0
    CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT = W_VARIANT
    I_SAVE = 'A'
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = T_OUTTAB
    IT_FIELDCATALOG = T_FIELDCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF. " IF SY-SUBRC <> 0.
    ENDIF. " IF W_GRID IS INITIAL
    CREATE OBJECT W_EVENT_CLICK.
    SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    PAI Event
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form PREPARE_FIELD_CATALOG
    Subroutine to build the Field catalog
    <--P_T_FIELDCAT Field Catalog Table
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
    DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
    LS_FCAT-FIELDNAME = 'EKGRP'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Number...
    LS_FCAT-FIELDNAME = 'EBELN'.
    LS_FCAT-REF_TABLE = 'EKKO' .
    LS_FCAT-EMPHASIZE = 'C411'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-HOTSPOT = 'X'.
    APPEND LS_FCAT TO PT_FIELDCAT .
    CLEAR LS_FCAT .
    Name of Person who Created the Object...
    LS_FCAT-FIELDNAME = 'ERNAM'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-OUTPUTLEN = '15' .
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Date...
    LS_FCAT-FIELDNAME = 'BEDAT'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Vendor's account number...
    LS_FCAT-FIELDNAME = 'LIFNR'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
    LS_FCAT-FIELDNAME = 'NAME1'.
    LS_FCAT-REF_TABLE = 'LFA1'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Vendor Name'(001).
    LS_FCAT-SELTEXT = 'Vendor Name'(001).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Creation date of the change document...
    LS_FCAT-FIELDNAME = 'UDATE'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Change Date'(002).
    LS_FCAT-SELTEXT = 'Change Date'(002).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    User name of the person responsible in change document...
    LS_FCAT-FIELDNAME = 'USERNAME'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Modified by'(003).
    LS_FCAT-SELTEXT = 'Modified by'(003).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
    LS_FCAT-FIELDNAME = 'DDTEXT'.
    LS_FCAT-REF_TABLE = 'DD04T'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '15'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Old contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_OLD'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    New contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_NEW'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    ENDFORM. " PREPARE_FIELD_CATALOG
    *& Form SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
    SELECT EBELN " Purchasing Document Number
    ERNAM " Name of Person who Created
    " the Object
    LIFNR " Vendor's account number
    EKGRP " Purchasing group
    BEDAT " Purchasing Document Date
    FROM EKKO
    PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
    WHERE EBELN IN S_EBELN
    AND BEDAT IN S_BEDAT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S401(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDFORM. " SELECT_PO
    *& Form SELECT_OBJ_ID
    Subroutine to select Object ID
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
    SELECT OBJECTCLAS " Object Class
    OBJECTID " Object value
    CHANGENR " Document change number
    USERNAME " User name
    UDATE " Creation date
    FROM CDHDR
    INTO TABLE T_CDHDR
    FOR ALL ENTRIES IN T_EBELN
    WHERE OBJECTID EQ T_EBELN-EBELN
    AND UDATE IN S_UDATE
    AND TCODE IN ('ME21N','ME22N','ME23N').
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Header Not Found'(031).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EBELN IS INITIAL
    ENDFORM. " SELECT_OBJ_ID
    *& Form SELECT_CHANGED_VALUE
    Subroutine to select Changed Values
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
    SELECT OBJECTCLAS " Object class
    OBJECTID " Object value
    CHANGENR " Document change number
    TABNAME " Table Name
    FNAME " Field Name
    VALUE_NEW " New contents of changed field
    VALUE_OLD " Old contents of changed field
    FROM CDPOS
    PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
    FOR ALL ENTRIES IN T_CDHDR
    WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
    AND OBJECTID EQ T_CDHDR-OBJECTID
    AND CHANGENR EQ T_CDHDR-CHANGENR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Item Not Found'(032).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_CDHDR IS INITIAL
    T_CDPOS_TEMP[] = T_CDPOS[].
    ENDFORM. " SELECT_CHANGED_VALUE
    *& Form SELECT_PUR_DOC
    Subroutine to select Purchase Order Details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_EBELN BY EBELN.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
    FS_CDPOS-OBJECTID BINARY SEARCH.
    IF SY-SUBRC NE 0.
    DELETE TABLE T_EBELN FROM FS_EBELN.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDLOOP. " LOOP AT T_CDPOS...
    LOOP AT T_EBELN INTO FS_EBELN.
    MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
    MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
    MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
    MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
    MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
    APPEND FS_EKKO TO T_EKKO.
    ENDLOOP. " LOOP AT T_EBELN...
    T_EKKO_TEMP[] = T_EKKO[].
    ENDIF. " IF NOT T_CDPOS IS INITIAL
    ENDFORM. " SELECT_PUR_DOC
    *& Form SELECT_VENDOR
    Subroutine to select Vendor details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
    IF NOT T_EKKO IS INITIAL.
    SORT T_EKKO_TEMP BY LIFNR.
    DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
    SELECT LIFNR " Account Number of Vendor or
    " Creditor
    NAME1 " Name 1
    FROM LFA1
    INTO TABLE T_LFA1
    FOR ALL ENTRIES IN T_EKKO_TEMP
    WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
    IF SY-SUBRC NE 0.
    MESSAGE S002(M8) WITH 'Master Details'(033).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EKKO IS INITIAL
    ENDFORM. " SELECT_VENDOR
    *& Form DESCRIPTION
    Subroutine to get the description
    There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_CDPOS_TEMP BY TABNAME FNAME.
    DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
    SELECT TABNAME " Table Name
    FIELDNAME " Field Name
    ROLLNAME " Data element
    FROM DD03L
    INTO TABLE T_DATAELE
    FOR ALL ENTRIES IN T_CDPOS_TEMP
    WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
    AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
    IF NOT T_DATAELE IS INITIAL.
    T_DATAELE_TEMP[] = T_DATAELE[].
    SORT T_DATAELE_TEMP BY ROLLNAME.
    DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
    SELECT ROLLNAME " Data element
    DDTEXT " Short Text Describing R/3
    " Repository Objects
    FROM DD04T
    INTO TABLE T_TEXT
    FOR ALL ENTRIES IN T_DATAELE_TEMP
    WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
    AND DDLANGUAGE EQ SY-LANGU.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_DATAELE IS INITIAL.
    ENDIF. " IF NOT T_CDPOS IS INITIAL.
    ENDFORM. " DESCRIPTION
    *& Form FILL_OUTTAB
    Subroutine to populate the Outtab
    There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
    SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
    SORT T_EKKO BY EBELN.
    SORT T_LFA1 BY LIFNR.
    SORT T_DATAELE BY TABNAME FIELDNAME.
    SORT T_TEXT BY ROLLNAME.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
    OBJECTCLAS = FS_CDPOS-OBJECTCLAS
    OBJECTID = FS_CDPOS-OBJECTID
    CHANGENR = FS_CDPOS-CHANGENR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
    MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
    READ TABLE T_EKKO INTO FS_EKKO WITH KEY
    EBELN = FS_CDHDR-OBJECTID
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
    MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
    MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
    MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
    MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
    READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
    LIFNR = FS_EKKO-LIFNR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
    MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
    READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
    TABNAME = FS_CDPOS-TABNAME
    FIELDNAME = FS_CDPOS-FNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    READ TABLE T_TEXT INTO FS_TEXT WITH KEY
    ROLLNAME = FS_DATAELE-ROLLNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    APPEND FS_OUTTAB TO T_OUTTAB.
    CLEAR FS_OUTTAB.
    ENDLOOP.
    ENDFORM. " FILL_OUTTAB
    *& Form GET_CELL_INFO
    Subroutine to get the Cell Information
    --> W_VALUE Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
    CALL METHOD W_GRID->GET_CURRENT_CELL
    IMPORTING
    E_ROW =
    E_VALUE = W_VALUE
    E_COL =
    ES_ROW_ID =
    ES_COL_ID =
    ES_ROW_NO =
    ENDFORM. " GET_CELL_INFO
    *& Form VALIDATE_PD_NUM
    Subroutine to validate Purchase Document Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
    IF NOT S_EBELN[] IS INITIAL.
    SELECT EBELN " Purchase Document Number
    FROM EKKO
    INTO W_EBELN
    UP TO 1 ROWS
    WHERE EBELN IN S_EBELN.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E717(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EBELN[]...
    ENDFORM. " VALIDATE_PD_NUM
    *& Form VALIDATE_VEN_NUM
    Subroutine to validate Vendor Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
    IF NOT S_LIFNR[] IS INITIAL.
    SELECT LIFNR " Vendor Number
    FROM LFA1
    INTO W_LIFNR
    UP TO 1 ROWS
    WHERE LIFNR IN S_LIFNR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E002(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_LIFNR[]...
    ENDFORM. " VALIDATE_VEN_NUM
    *& Form VALIDATE_PUR_GRP
    Subroutine to validate the Purchase Group
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
    IF NOT S_EKGRP[] IS INITIAL.
    SELECT EKGRP " Purchase Group
    FROM T024
    INTO W_EKGRP
    UP TO 1 ROWS
    WHERE EKGRP IN S_EKGRP.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E622(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EKFRP[]...
    ENDFORM. " VALIDATE_PUR_GRP
    *& Form FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
    W_VARIANT-REPORT = SY-REPID.
    W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM. " FILL_VARIANT
    <b>Reward if usefull</b>

  • Remove HTML from Interactive report download

    I have interactive reports where the column link on a specific column has to be dynamic, that means, it cannot be hard coded in the column link attributes. The following is an example of one such report query:
    case when d.object_type_description ='Business Service' then
    '< href="f?p='||:app_id||':183:'||:app_session||'::::P183_OBJECT_ID:'||d.id||'">'||d.object_name||'</>'
    when d.object_type_description = 'Real Time Event' then
    '< href="f?p='||:app_id||':162:'||:app_session||'::::P162_OBJECT_ID:'||d.id||'">'||d.object_name||'</>'
    else
       null
    end as "OBJECT NAME"As you see in the above example, the link on the "Object Name" column could either redirect to page 183 or to page 162 based on the "Object Type Description" column.
    The column attribute of the "Object Name" column has "Display Type" set to "Standard Report Column". That works perfectly fine in the UI of the report. However, if I download the IR data (in any format) from the Actions -> Download menu, the object name column values are downloaded with the HTML characters as:
    < href="f?p=15548:183:6072319179284::::P183_OBJECT_ID:255245470513999672860510787772603748464">JP010000</>where JP010000 is the object name.
    Is there a way I can strip the HTML from the column values in the downloaded files?
    I am using Apex 4.1.

    Rohit,
    You can define the link in the query, make it hidden, use the value as column link URL. So, your query will look like the following:
    d.object_name,
    case when d.object_type_description ='Business Service' then
        'f?p='||:app_id||':183:'||:app_session||'::::P183_OBJECT_ID:'||d.id
    when d.object_type_description = 'Real Time Event' then
        'f?p='||:app_id||':162:'||:app_session||'::::P162_OBJECT_ID:'||d.id
    else
       null
    end linkChange the display type of LINK column to Hidden. In column link, enter #OBJECT_NAME# as Link Text. Select URL as Target. Enter #LINK# as URL value. In APEX 4.2, you can do this in easier way by defining HTML Column Expression.
    Regards,
    Christina
    Edited by: cbcho on Sep 27, 2012 11:35 AM

Maybe you are looking for

  • Crystal Report 9 - Can't Display UTF-8 Data

    Dear Sir, I am using PHP with Crystal Report 9.2 and has problem displaying UTF-8 data from MSSQL field. It shows weird characters instead. I am very sure the data stored in database is in UTF-8 because when I ouput it into the web browser with encod

  • How do I change the font size for all incoming mail in my e-mail?

    For whatever reason the size of the font in my e-mail inbox keeps decreasing - I can barely read it! edit

  • CRC failed in Java and ABAP Trial Version on Linux - VMware Edition part02

    I download SAP NetWeaver 70 - Java and ABAP VMware Trial and I couldn't install it because part02 rar file has reported a checksum error. -  SAP NetWeaver 70 - Java and ABAP VMware Trial.part02.rar: CRC failed in SLES10SP1_Test_Drive(2)-s003.vmdk. Th

  • RE:Reading SOAP Element in java

    Hi All, I am calling one web service in java the output of web service is SOAP Element when i tried to print that it gave the follwing o/p <CheckKeyActivationResult xmlns="http://tempuri.org/"> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www

  • Zeppelin Air and Airplay

    So I am thinking of buying one of these but the Airplay part is £100 more than the non-air and I am not sure if I will use it. I currently have a Time Capsule and Macbook Pro (both bought in Sept 2010 new) along with an iPad 1, iPhone 4 and latest iP