Interactive Report Display

When a report is grouped by one column, is there anyway to have that column display once instead of for each record? I can do this easily in Crystal and we're in the process of loading BI Publisher...just wonder if it's possible in coding the reports directly in the Apex report display.

Thanks to both of you!!
Just new learned how to write complex collections (thanks BLARMAN!!) and then the simple stuff I don't know...
All the best,
A

Similar Messages

  • Interactive Report - Display New/Changed Columns

    Hi,
    when I add or change a column in Interactive Reports, APEX doesn't show me the new column automatically.
    Everytime the user log in, he has to go on "Actions" and "Select Columns" manually, otherwise the new/changed column won't be displayed.
    How can I do that the column is displayed automatically after login?
    I am using APEX 4.0.2.00.07.
    Regards,
    Marc

    Either you, as a Developer, can save the report as Public.
    Or an aithorized user can save the report as a General/Shared Report.
    Or the user can save the report as a Private one.
    Pick the columns you/user wants to see. Then [Action -> Save]

  • Interactive Reports: Display data on two lines per row?

    Is it somehow possible to display a single row across two lines in an interactive report?
    Something like this:
    Row1 Field 1, Row1 Field 2, Row1 Field 3
    Row1 Field 4 (spanning across the other fields)
    Row2 Field 1, Row2 Field 2, Row2 Field 3
    Row2 Field 4 (spanning across the other fields)
    Row3 Field 1, Row3 Field 2, Row3 Field 3
    Row3 Field 4 (spanning across the other fields)
    ... etc
    For example, I have a "Remarks" column that would look better on its own line, rather than being squeezed into the same row with the other columns.
    I realize that this layout might not be possible out-of-the-box, but I was thinking that perhaps some javascript/jQuery trick could be used. Unfortunately, my jQuery-fu is not strong yet, so I'm asking for help...
    (I also know that this type of layout is possible using a classic report with a custom template, but I would prefer to use the Interactive Report if at all possible.)
    - Morten

    Hi,
    Try this to page HTML header
    <style>
    .apexir_WORKSHEET_DATA td{white-space:nowrap!important;}
    </style>At least it work with firefox 3.5 for me
    Br, Jari

  • Interactive Report Displaying Multiple Values (Chart)

    Hi guys,
    Is there a way to display multiple values into a chart report. Normally there is a combobox and you can only select one value. But i want to display multiple values into one chart and i have to use interactive report because sql report is not enough for me.
    Apex product build is 4.0.2.00.07.
    Thanks

    Any ideas ?
    Thanks.

  • Apex4.2 - Interactive report display more than 15 rows

    How is it possible to show more than 15 rows?
    If I set up in repoert attributes the row number less than 15 it works but e.g. 100
    it only show me 15 and the page button to the next page.
    How is it possible to work with 120 records so that 100 will be shown
    and 20 on the next page?

    Hi,
    When you run your page where is IR, you can from action menu control how many rows are displayed per page
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ir_using.htm#sthref1354
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Interactive Report download not matching displayed data

    Hi
    I have an interactive report with a simple where clause in:
    select * from table etc
    where a.entry_date > :P2_DATE
    P2_DATE is a select list with redirect, with 2 options. Selecting the first option (the default) should return ~200 rows, the second should return ~800 rows. This functionality works correctly in the interactive report display, however the download to csv option only ever exports the ~200 rows - as if the IR download is fixed to the original query results. I'm using version 3.1.2.00.02.
    Is this a known bug?
    Thanks
    -Marc

    Hi
    Have you tried changing it to a Select List with Submit?
    Typically, this sort of behaviour means that the value selected from the list is not being stored in the session, so the report does not know that value - only the preivious value.
    Also, how are you setting the default? I tend to do this using a page computation (conditional on the item being null)
    Andy

  • JavaScript error on Interactive Report

    When clicking on the Magnifying glass of my interactive report search bar, I receive a JavaScript error.
    Line: 2 Char: 15193 Error: Syntax Error
    The page that I am navigating to has 2 regions. The first is an interactive report and the second is an html region that has an Iframe reference to another interactive report. Based upon the selection of a radio group, the corresponding region(interactive report) displays. All other interactive reports work fine when their pages don't have a region with a Iframe reference.
    If I navigate to another page after the error occurs and then come back to the page, everything then works fine. The error only happens on the first use. I have installed the latest patch set for Apex 3.2 I currently am running 3.2.1.00.11. I read a bug on Metalink that referenced this javascript error, but applying the patch set does not seem to fix the issue. The bug was 8568894.
    Any help would be appreciated.

    This might be useful for others also...
    After hours and hours of debugging headers and responses and comparing pages to others which work, I realised that this interactive report's display condition is based on REQUEST = SUBMIT.
    As such, the actions menu will NOT set the Request parameter when clicking in the actions menu and the Apex engine refuses to send anything back to the browser - not even an error message.
    I'll raise a bug for this via Oracle Support.
    Cheers, Pete

  • Link to interactive report with filter values containing : or %

    Hi,
    I have an application written in PL/SQL. The application takes input from users, and then constructs a URL for an interactive report, concatenating the user input as filter values for the report. Sometimes, the input values contain characters such as the colon (:) or the percent sign (%). In these instances, APEX appears to ignore the rest of the URL beyond the first colon or percent sign in the filter values. For example, in the following URL, the first filter value is "Oracle Database 11g: Workshop I":
    http://abc.oracle.com/pls/apex/f?p=129:8::::8,CIR:IRC_TITLE,IR_PROJECT_STATUS:Oracle Database 11g: Workshop I,Completed
    The Interactive Report displayed for this URL shows all courses whose title contains "Oracle Database 11g" -- in other words, more records are displayed than should have been if the complete set of filters were applied in the query (i.e., TITLE = Oracle Database 11g: Workshop I, and PROJECTS_STATUS = Completed).
    How should I construct the URL so that the colons (:) and percent signs (%) which may be part of the filter values are treated correctly?
    Thanks,
    Jenny

    Thanks to Joel Kallman, here's the answer:
    The ‘f’ procedure has a parameter named p_sep. This is the separator used for the arguments in the ‘p’ parameter in the call to the ‘f’ procedure. The default value for this separator is ‘:’, obviously.
    If you have data values that contain the separator, then you can use a different character for your separator (you may need to manually specify the URL instead of using the declarative link attributes of a column in a report).
    Using the pipe symbol ‘|’, I was able to take:
    http://st-curr.us.oracle.com/pls/apex/f?p=129:8::::8,CIR:IRC_ROWFILTER:Database 11g: Administration Workshop I
    and change it to:
    http://st-curr.us.oracle.com/pls/apex/f?p=129|8||||8,CIR|IRC_ROWFILTER|Database 11g: Administration Workshop I&p_sep=|
    which now works.

  • Does not appear possible to use date formatting in interactive reports

    I've an interactive report displaying a column of data type = date. When populated with the result of "select (sysdate) from dual;", regardless of what data type conversion (to_char/to_date) or what time formatting is used (attempting DD-MON-YYYY HH:MIPM), the displayed time is always 12:00AM.
    Thanks!
    Paul

    Can you post a small example of what you are trying to do on the hosted instance of APEX from Oracle? You are trying to get the following:
    SELECT TO_CHAR(SYSDATE,'DD-MON-YYYY HH:MI PM') test_col FROM DUAL to format properly?
    It returns: 18-NOV-2010 09:51 PM in a one column report for me..
    Thank you,
    Tony Miller
    Webster, TX
    You can get more with a kind word and a two-by-four than you can with just a kind word
    Anla-shok Marcus from Babylon 5

  • Interactive Report with html tags --- Data saved in Excel with html tags

    Hello,
    I am using APEX 4.0. I have an interactive report that displays some of the columns bold and / or colors using html tags. As an example,
    SELECT
    '''<font color="green"><b>'' || SERIAL_NUMBER || ''</b></font>'' SERIAL_NUMBER,'||chr(10)||
    'PRODUCT_NAME,'||chr(10)||
    '''<font color="teal"><b>'' || PRODUCT_DESC || ''</b></font>'' DESC,'||chr(10)||
    'QUANTITY,'||chr(10)||
    FROM
    <Table name>
    At runtime, the Interactive Report displays the fonts, colors correctly; however, when I save the data of the Interactive Report in an Excel format, it saves the Html tags along in the EXCEL spreadsheet. For example, the column serial number from the above SELECT statement is extracted in an Excel column as ---
    <font color="green"><b>123456789</b></font>
    Is there another way to render the column data so that extracted data will not display the HTML tags or is removing the html font color tags from the SELECT statement the only option?
    Thanks in advance.
    Ed

    Hello,
    I have a feeling all your problems are related take a look at this thread. I found it in 10 seconds of searching the forum.
    strange tags
    It's always best to do a quick search first most likely you are not the first person to have this problem.
    Carl

  • Change source (sql) of interactive report based on column value?

    I've got an Interactive report displaying 10 columns. What I'd like to do is show different columns depending on the value of the first column. All the rows in the result will have the same value in the first column.
    If value in column 1 (on any row) = 'aaaa' then
    display columns 1,2,3,4, 9, 10
    If value in column 1 (on any row) = 'bbbb' then
    display columns 1,2,3,4, 7, 8
    If value in column 1 (on any row) = 'cccc' then
    display columns 1,2,3,4, 5, 6
    Should i somehow make the sql query dynamically change or can I use apex to dynamically hide the columns I don't want in the interactive report?
    Appreciate if you could point me in the right direction...
    /A

    Hello Andy,
    You can solve that in your SQL query:
    select col1, col2, col3, col4
    ,   case col1
        when 'aaaa' then col9
        when 'bbbb' then col7
        when 'cccc' then col5
    end newcol5
    from tableYou may have to use to_char or to_number conversions when the datatypes of the col5,7 and 9 are different.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • 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

  • 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>

  • Interactive report for displaying customer information

    hi,
        how to create an   interactive report for displaying customer information based on selection smade ,and corresponding bank details.

    pls check the sample code
    Use the tables Kna1 and knbk to get the customer details.
    ***extract the data into internal table
    select * from dbtab into itab.
    *In the loop hide the field you want to trigger the interactive list.
    loop at itab.
    write: / itab-kunnr, itab-name1.
    Hide itab-kunnr.
    endloop.
    use at line selecton to get desired output based on the condition
    at line-selection.
    select * fro dbab into itab where field = itab-kunnr.
    awards points if help ful.

  • Interactive report: third screen not displaying

    Hi Experts,
    I am doing a interactive report in ALV grid...and my requirement is
    when the user clicks on SPMON which is displayed on the initial screen the first screen
    should display and in first screen when the user clicks LIFNR second screen should display..
    I am able to display initial and first screen but second screen is not displaying...I am
    pasting a pinch of my code please have a look and advice me..
    FORM USER_COMM USING P_UCOMM LIKE SY-UCOMM
                               R_SELFIELD TYPE SLIS_SELFIELD.
      DATA : OK_CODE TYPE SY-UCOMM.
      OK_CODE = P_UCOMM.
      CASE OK_CODE.
        WHEN '&IC1'.
          IF R_SELFIELD-FIELDNAME = 'SPMON'.
            READ TABLE IT_TAB INDEX R_SELFIELD-TABINDEX.
            REFRESH IT_TAB_1[].
            CLEAR IT_TAB_1.
            LOOP AT IT_FIRST WHERE WERK EQ IT_TAB-WERK AND SPMON EQ IT_TAB-SPMON
                               AND ART = IT_TAB-ART.
              MOVE IT_FIRST-WERK       TO  IT_TAB_1-WERK.
              MOVE IT_FIRST-LIFNR      TO  IT_TAB_1-LIFNR.
              MOVE IT_FIRST-MEANQ      TO  IT_TAB_1-MEANQ.
              MOVE IT_FIRST-BASME_QM   TO  IT_TAB_1-BASME_QM.
               APPEND IT_TAB_1.
              CLEAR: IT_FIRST, IT_TAB_1.
            ENDLOOP.
            REFRESH IT_FIELDCAT1[].
            S_LAYOUT-ZEBRA = 'X' .
            S_LAYOUT-COLWIDTH_OPTIMIZE = 'X' .
            PERFORM FIELD_CATALOG1 TABLES IT_FIELDCAT1
            USING:
              'IT_TAB_1' 'WERK' ' ' 'PLANT' ' ' ' ',
              'IT_TAB_1' 'LIFNR' ' ' 'VENDOR NUMBER' ' ' ' ',
              'IT_TAB_1' 'MEANQ' ' ' 'MEANQSCORE' ' ' ' ',
              'IT_TAB_1' 'BASME_QM' ' ' 'BuM' ' ' ' ',
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
               I_CALLBACK_PROGRAM                = SY-CPROG
               I_CALLBACK_USER_COMMAND             = 'USER_COMM_1'
               IS_LAYOUT                         = S_LAYOUT
               IT_FIELDCAT                       = IT_FIELDCAT1[]
             TABLES
                T_OUTTAB                          = IT_TAB_1[]
          ENDIF.
      ENDCASE.
    ENDFORM.                    "USER_COMM
    For second screen : which is not working
    FORM USER_COMM_1 USING P_UCOMM LIKE SY-UCOMM
                               R_SELFIELD TYPE SLIS_SELFIELD.
      DATA : OK_CODE TYPE SY-UCOMM.
      OK_CODE = P_UCOMM.
      CASE OK_CODE.
        WHEN '&IC2'.
          IF R_SELFIELD-FIELDNAME = 'LIFNR'.
            READ TABLE IT_TAB_1 INDEX R_SELFIELD-TABINDEX.
            REFRESH IT_TAB_2[].
            CLEAR IT_TAB_2.
            LOOP AT IT_SECOND WHERE WERK EQ IT_TAB_1-WERK AND
    SPMON EQ IT_TAB_1-SPMON AND ART = IT_TAB_1-ART AND LIFNR = IT_TAB_1-LIFNR.
              MOVE IT_SECOND-ART        TO  IT_TAB_2-ART.
              MOVE IT_SECOND-SPMON      TO  IT_TAB_2-SPMON.
              MOVE IT_SECOND-MATNR      TO  IT_TAB_2-MATNR.
                   APPEND IT_TAB_2.
              CLEAR: IT_SECOND, IT_TAB_2.
            ENDLOOP.
            REFRESH IT_FIELDCAT2[].
            S_LAYOUT-ZEBRA = 'X' .
            S_LAYOUT-COLWIDTH_OPTIMIZE = 'X' .
            PERFORM FIELD_CATALOG1 TABLES IT_FIELDCAT2
                    USING:
                      'IT_TAB_2' 'MATNR' ' ' 'MATERIAL NUMBER' ' ' ' ',
                      'IT_TAB_2' 'MEANQ' ' ' 'MEANQSCORE' ' ' ' ',
                      'IT_TAB_2' 'BASME_QM' ' ' 'BuM' ' ' ' ',
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
               I_CALLBACK_PROGRAM                = SY-CPROG
               IS_LAYOUT                         = S_LAYOUT
               IT_FIELDCAT                       = IT_FIELDCAT2[]
              TABLES
                T_OUTTAB                          = IT_TAB_2[]
          ENDIF.
      ENDCASE.
    ENDFORM.                    "USER_COMM_1
    Please advice
    Karthik
    Edited by: Karthik R on Apr 29, 2009 12:22 PM

    Use both conditions in USER_COMM.
    FORM USER_COMM USING P_UCOMM LIKE SY-UCOMM
                               R_SELFIELD TYPE SLIS_SELFIELD.
      DATA : OK_CODE TYPE SY-UCOMM.
      OK_CODE = P_UCOMM.
      CASE OK_CODE.
        WHEN '&IC1'.
          IF R_SELFIELD-FIELDNAME = 'SPMON'.                      " Field name SPMON
            READ TABLE IT_TAB INDEX R_SELFIELD-TABINDEX.
            REFRESH IT_TAB_1[].
            CLEAR IT_TAB_1.
            LOOP AT IT_FIRST WHERE WERK EQ IT_TAB-WERK AND SPMON EQ IT_TAB-SPMON
                               AND ART = IT_TAB-ART.
              MOVE IT_FIRST-WERK       TO  IT_TAB_1-WERK.
              MOVE IT_FIRST-LIFNR      TO  IT_TAB_1-LIFNR.
              MOVE IT_FIRST-MEANQ      TO  IT_TAB_1-MEANQ.
              MOVE IT_FIRST-BASME_QM   TO  IT_TAB_1-BASME_QM.
               APPEND IT_TAB_1.
              CLEAR: IT_FIRST, IT_TAB_1.
            ENDLOOP.
            REFRESH IT_FIELDCAT1[].
            S_LAYOUT-ZEBRA = 'X' .
            S_LAYOUT-COLWIDTH_OPTIMIZE = 'X' .
            PERFORM FIELD_CATALOG1 TABLES IT_FIELDCAT1
            USING:
              'IT_TAB_1' 'WERK' ' ' 'PLANT' ' ' ' ',
              'IT_TAB_1' 'LIFNR' ' ' 'VENDOR NUMBER' ' ' ' ',
              'IT_TAB_1' 'MEANQ' ' ' 'MEANQSCORE' ' ' ' ',
              'IT_TAB_1' 'BASME_QM' ' ' 'BuM' ' ' ' ',
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
               I_CALLBACK_PROGRAM                = SY-CPROG
               I_CALLBACK_USER_COMMAND             = 'USER_COMM_1'
               IS_LAYOUT                         = S_LAYOUT
               IT_FIELDCAT                       = IT_FIELDCAT1[]
             TABLES
                T_OUTTAB                          = IT_TAB_1[]
          ELSEIF R_SELFIELD-FIELDNAME = 'LIFNR'.              " ELSE FIELDNAME LIFNR
            READ TABLE IT_TAB_1 INDEX R_SELFIELD-TABINDEX.
            REFRESH IT_TAB_2[].
            CLEAR IT_TAB_2.
            LOOP AT IT_SECOND WHERE WERK EQ IT_TAB_1-WERK AND
            SPMON EQ IT_TAB_1-SPMON AND ART = IT_TAB_1-ART AND LIFNR = IT_TAB_1-LIFNR.
              MOVE IT_SECOND-ART        TO  IT_TAB_2-ART.
              MOVE IT_SECOND-SPMON      TO  IT_TAB_2-SPMON.
              MOVE IT_SECOND-MATNR      TO  IT_TAB_2-MATNR.
                   APPEND IT_TAB_2.
              CLEAR: IT_SECOND, IT_TAB_2.
            ENDLOOP.
            REFRESH IT_FIELDCAT2[].
            S_LAYOUT-ZEBRA = 'X' .
            S_LAYOUT-COLWIDTH_OPTIMIZE = 'X' .
            PERFORM FIELD_CATALOG1 TABLES IT_FIELDCAT2
                    USING:
                      'IT_TAB_2' 'MATNR' ' ' 'MATERIAL NUMBER' ' ' ' ',
                      'IT_TAB_2' 'MEANQ' ' ' 'MEANQSCORE' ' ' ' ',
                      'IT_TAB_2' 'BASME_QM' ' ' 'BuM' ' ' ' ',
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
               I_CALLBACK_PROGRAM                = SY-CPROG
               IS_LAYOUT                         = S_LAYOUT
               IT_FIELDCAT                       = IT_FIELDCAT2[]
              TABLES
                T_OUTTAB                          = IT_TAB_2[]
          ENDIF.
      ENDCASE.
    ENDFORM.                    "USER_COMM
    Regards,
    Gurpreet

Maybe you are looking for

  • What is the correct sequence to link 3 Airport Express units in a WDS?

    I have 3 AE units set up in a WDS. I currently have unit #1 as a main base. Unit #2 is an extended base station. Unit #3 is a remote base station. I have unit #1 connected to the iMac for the internet on the first floor via an ethernet connection. It

  • Acrobat 9 Pro serial Key fails

    Hello all, I have received 3 different serial keys for Acrobat 9 Pro for my adobe creative suite 3 web premium.  All keys say they are invalid.  Any ideas?  I thought that there was some issue in the registry keys that could be cause this issue, but

  • Cannot download latest version of Itunes

    Itunes website does not show the option to download Itunes . Tries 3 machines today. Any suggestions would help.

  • How much is 500MB?

    I'm on Pay as you go on the iPhone 4. When I top up £10 I get 300 Text and 500MB. Is 500MB a lot? How does it work? Say I go on Google.com is that like 100KB or whatever lol? Also how do I check like, how many text I text and how much MB I used? I do

  • Animation layers not appearing

    Hi, I am using PS CS5 and having trouble keeping layers visible when using animation. I find that after setting animation sequencing for layers using the green bars in the animation window that the layer does not reappear even after I reset all green