Interactive report timestamp precision display

Hi all,
I converted old "date" data-type to "timestamp(1) with local time zone" in the database tables.
when I display these fields in interactive report it displayed with 6 digits precision (oracle default), but when I use SQL command under APEX it display them with only 1 digit precision as the database column definition.
APEX all the time see these columns as type DATE !?
anybody know how to display these columns as they stored in the database? (i.e. 1 digit precision)
and how can I alter session time zone inside Apex to check that new columns working properly?
thanks,
Edited by: whYMe on Feb 3, 2010 11:38 AM

What about Column type that written beside the column header & column name under report attributes tab? I see it "DATE" for all related date datatypes.
what about checking that APEX pages are recognize this data type locally on the client PC.
I currently make an application which will be used over 4 different time zones, and I want each time zone see their local time in all date/time fields.
How can I check that?

Similar Messages

  • Interactive report: How to display "count" column on total data set?

    Hi,
    I'm a relative newbie to APEX and would appreciate some help with the following:
    I have an interactive report that will usually contain around 8000 rows.
    I need to report the total number of distinct values in one of the columns - but I need to get around the limitation of APEX where it only counts the number of rows displayed on the screen.
    I thought to create a separate region and use a separate SQL query to show the full total regardless of the number of rows displayed - however, I've now got the problem of not being able to access the interactive report "query", so, for example, if someone running the report adds a filter, I need the total to report with this new filter applied.
    Does anyone know if I can:
    a) get around the the limitation of only counting the number of rows displayed?
    or, if not,
    b) how to access the interactive report "query" that is being run?
    or
    c) any other way of doing this!?
    I do hope this makes sense. Thanks in advance for any help....
    Helen

    Hi all,
    Thanks for your responses. They really are much appreciated.
    I had hoped to spend some time on this over the weekend - but haven't got round to it. I'll work on it again tomorrow and will certainly look at the thread you mentioned Tony.
    Sorry I'm not being very clear about what I want. Why are these things always so hard to explain in words :o)
    I'll have another go....
    I have an interactive report that would report around, say, 8000 rows. Obviously I don't want to display all 8000 on the screen so I'll probably display them in chunks of 15 rows. If I use the aggregation function on the report, I can add a count of the distinct account numbers to the bottom of the display, but it will only count the ones displayed on the screen. I need the count to be of all the rows - so 8000 instead of 15 - but still displaying only 15 rows. When a user then applies a filter to the report, I need the count to change in accordance with the filter - so if the number of rows returned as a result of the filter is now 4000 instead of 8000, I need the count to now say 4000 instead of 8000 even though still only 15 rows are actually displayed on the screen.
    I'll try and pre-empt the questions...
    1) There will always be duplicate account numbers in there so the count will never be the actual number of rows - but I'm simplifying above to help explain the problem better
    2) Why would they want 8000 rows? Don't ask. I'm sure it's something to do with exporting the lot into an excel spreadsheet but they'll never admit it :o)
    I hope this makes more sense......
    Thanks again!!
    Helen
    P.S. Almost forgot again... I'm using Apex 4.1 on the Oracle hosted environment which I assume is 11g.

  • Interactive Report - How to display Aggregate values in first row

    Hi,
    I have an interactive report in which I have included aggregate for count.
    But the count doesn't show until I navigate to the last page of the report.
    Any idea how to display all the aggregate values on the top(in first row), so that the user doesn't have to click next to see these values.
    Also when I downloaded the report the aggregate columns are not exported into csv. Any thoughts on this highly appreciated.
    Thanks,
    Raj.

    Any help on this guys ?

  • Control which Interactive Report is initially displayed.

    Hi,
    I have a page with an Interactive Report which has a default page and a saved public page called 'My Cases'. The interactive report is accessed from several different pages and I want to be able to display either the default page or the public page depending on where the user calls the page from.
    For example, if the user accesses the page from Page 1, it displays the default interactive report, and if they access it from Page 2, it displays the saved public report.
    I can see that the interactive report as an onchange="gReport.pull(this.value,'REPORT_CHANGED')" which is called when you change the Reports selection which is refreshing the report and displaying the relevant report. So I have tried to change the value when the page loads to the report I want by adding this
    $('#apexir_SAVED_REPORTS').val('23219303448909609'); I realise the report id will change by session, but have hardcoded it just to see if I can get it to work.
    I also tried adding apex.event.trigger('#report_id','apexrefresh') aswell but it doesn't seem to work
    Any ideas on how I can achieve this?
    Cheers
    Paul

    Hi ProfessorFudger,
    According to your description, you want to create a report that the end user could enter the comment, then the comment could be sent to the report creator, right?
    Reporting Services is used for rendering the report with data retrieved from datasource. In Reporting Services, we can retrieve data from the datasource then design a report, after the report processed, data is fixed on the report. So it’s not supported
    to have the end users enter comment and fed back to report creator. For your requirement, it can’t be achieved currently.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • How to limit an Interactive Report Region from displaying.

    I have a page which is an interactive report. When you call that page from another one it takes a while as it is selecting all rows (over 10k). Once those rows are retrieved and the user adds a filter criteria it's relatively fast. How do I limit the report from running when I call the page until the user adds a filter?
    thanks
    John

    I'm not sure how this works. If I set it to a really small number say 5 rows it shows only 5 rows upon rendering of that page. However, when I subsequently click on Go for all rows or any other larger number I don't get the larger number. How do I get that portion to work as well?
    thanks

  • Number of rows displayed per page in an interactive report

    Hi,
    I'd like to know if it's possible to change the values of the select list called 'Rows' in an interactive report (which is displayed in the search bar).
    Indeed, I want to display 16 rows per page and I can only choose among the values 1, 5, 10, 15, 20, 25, 30, 50, 100, 200...
    Thank you for your reply.
    Emilie.

    Hi Tobias,
    Thank you for your help.
    I had already tried this but it's not what I want. What your are saying only limits the values in the select list (for example, if I set to 16, I can't choose values higher than 16 in the select list 'Rows' of the search bar).
    I want to limit the number of rows displayed in the interactive report to 16 per page.
    Any other idea?
    Emilie.
    Hi Emilie,
    Go: Home>Application Builder>Application 301>Page 51>Interactive Report Attributes>Search Bar>Maximum Rows Per Page
    Set to = 16
    Oracle help description: Defines the maximum number to display in Rows Per Page Selector in the search bar.
    Greetings,
    Tobias

  • Custom jQuery overlay tool in Interactive Reports not rendering

    As the subject says, I got a problem in rendering jQuery on an Interactive Report. It is working on a non-paginated pages, like forms, and also in Interactive Reports, but whenever the data is getting paginated, after you go to the next page, the jQuery won't work.
    Here is the scenario:
    I have an Interactive Reports page that displays the Files in my table (all of it are images.)
    SELECT
    ('<img src="#OWNER#.DISPLAY_IMAGE_PROC?image_id='
    ||f.image_id
    ||'" width="64" height="48" rel="#img'||f.image_ID||'" />') AS IMAGE
    FROM TABLE_NAME
    The rel attribute of the image is the one that I am using to get the jQuery to work.
    The src of the image is a procedure to get the path of the image. (Based in Denes Demo Application)
    On the Interactive Reports Page, it displays the image correctly.
    When you click the Image it will display an overlay image with the size of 640x480.
    But when you go to the next page, the function will not work, and there are no errors given (javascript / oracle error / any other).
    If you don't know how to implement a simple overlay tool in jQuery go here: http://jquerytools.org/demos/overlay/index.html
    anybody experience something like this?
    -Philip
    Edited by: 942717 on Jun 25, 2012 2:44 PM

    You need to enable overlay on after refresh event of the report
    Create a dynamic action
    Event: After Refresh
    Selection Type: Region > and select your IR region
    Action: Execute JavaScript Code
    Code: add your overlay code something like below
    $("img[rel]").overlay();

  • Is it possible to sort an interactive report with a default column ?

    Hi,
    I have a nice request used with an interactive report.
    select "ID",
    "DATE_CREATION",
    "SERVICE",
    "RESPONSABLE",
    "NATURE_CONTRAT",
    "SOCIETE",
    "DATE_DEBUT",
    "DATE_FIN",
    "DELAI_RENOUVELLEMENT"
    from "#OWNER#"."CONTRATS_MAINTENANCE"
    order by DATE_FIN descUnfortunately, the interactive report does not displays using the order into the SLQ query.
    I tried to de select the "sort" option of each other columns into the Column attributes Section, but without any improvement. If I remove the order statement from the SQL query, nothing changes in the order.
    Do you have an idea on how to display the lines in the order of the sql query ?
    Thank you for your knid answers !
    Chrstian

    Christian,
    This can be a little tricky at first. Try this:
    1. Remove the order by clause from the query.
    2. Log out of the application, not the builder, just the application.
    3. Log back in and try using the options in the interactive report to sort the information.
    Does it work? If so:
    4. Get the order the way you would like it as the default. Note: you get more sort options if you use the Action Menu (grind wheel) and selecting Sort over just clicking the column headers.
    5. Save the report by selecting the Save Report option from the Action Menu. If you see a drop down, save the report as the "default".
    6. Log out of the application again and back in.
    Does it work?
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • How to pass ITEM:VALUE pair in ICON view link of Interactive Report

    When Icon View is enabled in an interactive report, you can display graphic images (blob data that are stored in the database) in 3 different views.
    1) View Icons
    2) View Report
    3) View Detail
    When you click on the displayed image in views 1 and 3 you navigate to a form to manage the row data and the image. By default it only passes the PK id of the row.
    How do I pass additional ITEM:VALUE pairs when navigating to the detail form page? I want to pass &APP_PAGE_ID. to the form page as well.
    There is an attribute under ICON VIEW called "Link Column" but if I put the "item:value" pair in the fields for this item's "ColumnLink" attributes, there is no effect.
    Also for bonus points...
    how do you make the ICON VIEW attributes, "HTML ALT Text" and "HTML TITLE Text" dynamic e.g. &ITEM. doesn't work here.
    thanks in advance
    Paul P

    For your link column, parse a link column in your query like so
    apex_util.prepare_url('f?p=M:53:'||:APP_SESSION||'::::P53_IMAGE_ID:'||i.image_id)Scott

  • Interactive Reports and menu list translations

    Can anyone tell me how to translate the menu items contained in the interactive reports menu list (ie Select Columns, Filter, Sort....) ? I have translated an application into french and when I switch to that language the menu items in the interactive reports are still displayed in english yet the rest of my application is french. The translation file does not contain these items to translate. Can I make these french somehow? Its a pretty powerful tool, but not not if you can't make it language specific. Our french users would not accept this in english.

    Hello,
    >> Can anyone tell me how to translate the menu items contained in the interactive reports menu list …
    The following section of the documentation explains exactly that - http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/global.htm#BABHCAAH .
    For complete translation of the IR, you’ll need to translate all the string messages in table 16-4.
    Regards,
    Arie.
    Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

  • Multiple Interactive Reports

    .Hi,
    Can't we add multiple interactive report based on conditional display i tryed doing I get error saying only one report per page. please suggest me is there any way we can add multiple reports.
    Please suggest.
    Thanks
    Sudhir

    Hello Sudhir,
    I don't know if it still works in last version.
    I am using ApEx version 3.1.2.00.02 .
    And there you can create a second interactive report by copying the region of the first one.
    Change the SQL-query on the region definition page.
    Check the settings made for the interactive report (column order, display etc.).
    VERY IMPORTANT: the display conditions have to be disjunct.
    You can not display both reports simultaneously.
    Regards, Tine.

  • 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

  • How do i find music on iphone that is not from the cloud

    The list of songs on my iphone is endless, but most of that music is still in the cloud.   Is there a way to get the phone to display only the music that is actually physically downloaded onto my phone already?  TIA

  • Are the new Sony camcorders with a micro USB multi-terminal LANC compatible? (the ones under $800)

    I've noticed that one of the Sony recommended accessories for some of the new camcorders on their website include the Sony wired remote with a zoom rocker. However it isn't specified if this connection is actually LANC compatible and, if so, could an

  • [Solved] how to write german "umlaute" on US keyboard?

    Hi, I am German, but I use an US-keyboard since it I like it better for writing code. Is there a simple way to map key-combinations to "Umlaute". e.g. like o+windows-key for an "ö". I'd be happy with a sollution for thunderbird but in case there is a

  • Tracking of RAW MATERIAL

    Dear, My client has a retail business but same as trading business means we purchased finished goods from the manufacturer and directly sell it in the market. Directly we don't care for the raw material. Client don't purchased raw material but provid

  • Really weird sound problem

    I have a 1st gen 32 GB iPod touch running iPhone os 3.1.3. and I am having a very strange problem where I cannot hear any vocal track on movies or music. I can hear any sound effects or music just fine, but talking or singing cannot be heard. On some