EVENT in report

Hi All,
Events in classical report?
Thanks & Regards,
<b>Anil Kumar</b>

Hi
Event Blocks in Executable Programs                       
The following events occur when you run a typical executable program with a logical database:
INITIALIZATION
Before the standard selection screen is displayed
AT SELECTION-SCREEN
After user input on a selection screen has been processed, but while the selection screen is still active
START-OF-SELECTION
After the standard selection screen has been processed, before data is read from the database
GET <TABLE>
After the logical database has read an entry from the node <table>
GET <TABLE> LATE
After all of the nodes of the logical database have been processed that are below <table> in the database hierarchy
END-OF-SELECTION
After all data has been read by the logical database
TOP-OF-PAGE
In list processing when a new page starts
END-OF-PAGE
        - In list processing when a page ends 
reward if usefull

Similar Messages

  • Training & Event Management - Reports

    Dear Guru's
    I am implimenting TEM for my client for the first and am very new to the module. I have completed the configuration and testing.
    ISSUE: now when i try to extract a report based on feedback/Appraisals via PD/TEM - infosystems, i am only getting the header of the reports. Once i double click the template name only its leading to show the ratings and feedback.
    this will not work for my customer. i need a report which can extract the ratings per business event.
    Is there any way i can get these reports output in Grid format, similar to OM n PA reports and extract to an excel??.
    It will work for me even if i can get event wise report with all the ratings and feedback and if it could be extracted into a spreadsheet. as year end there would be a analysis done on the performances of the trainings conducted and attendees.
    Request you all if there is any standard process to get the expected details. if not...help me with some process that can be induced to get the expected.
    Apprecaite your quick responce.
    THanks in Advance.
    Priya R

    Hi Sandeep,
    i used S_PH9_46000451 as advised in the forum and this only gives the header info but not the individual ratings per event or employee.
    learn that FM HRHAP_DOCUMENT_GET_DETAIL can be used to get the appropriate report with ratings.
    Correct and help me if i have to do any thing else to get the result.
    Thanks,
    Priya

  • Which is the mandatory event in report program?

    which is the mandatory event in report program?
    Plz its urgent

    Hi,
    Its true, there is no mandatory event in a report program as such. You use events to organize your statements and control the flow of your program.
    For eg, following are some of the events used with their purpose :
    First event -
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    at user-command
    And If the program contains no explicitly defined event blocks, all the statements in the program form the entire event block START-OF-SELECTION, which need not be defined explicitly but is taken by default.
    Hope it helps.

  • Proper use of END-OF-SELECTION event in report programme

    Hi,
    If we will write "WRITE" statements in side START-OF-SELECTION then it will help me to display the output.Then what is the need of END-OF-SELECTION .
    Can any body please tell me the <b>proper use of END-OF-SELECTION event in report programme.</b>

    This is the last of the events called by the runtime environment to occur. It is triggered after all of the data has been read from the logical database, and before the list processor is started.
    <b>In report programs using LDB for every value selected the program issues the output, to control this you would use END-OF-SELECTION.</b> Now if you call your output in this event, the output is made only after all the values are selected as per the selection criteria.
    suppose while coding, u need a logic like below:
    if a condition is satisfied continue with the report
    and if not satisfied, then display a message and end the report.
    then u can code like below.
    start-of-slection.
    if a = <condition>.
    do the following.......
    else.
    stop.
    end-of-selection.
    write: 'THIS IS END'.
    stop command triggers end-of-slection from anywhere.
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Events of reports

    hi gurus,
           what are events in reports and when there are triggering.

    HI
    Event related to reports are not triggered based on any statements in ABAP.  
    The event are triggered depended on the way the output is generated . 
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen / <field> : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    <b>interactive report events.</b>
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen / <field> : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    events in reports
    events of reports
    check the above threads
    Sail

  • WHAT ARE SUBEVENTS OF DIFFERENT EVENTS IN REPORTS ?

    WHAT ARE SUBEVENTS OF DIFFERENT EVENTS IN REPORTS ?
    BEST REGARDS,
    RYAN

    hi,
    output events are.........
    <b>start-of-selection.</b>
    using this event we can genarate basic list.
    <b>end-of-selection.</b>
    we can use this event also for genarating basic list
    <b>top-of-page</b>.
    this event is related to list, we can use this event to providing list header.
    <b>end-of-page.</b>
    this event is related to list, we can use this event to providing list footer.
    if our program reading data from logical database, in that case GET and
    GET LATE events triggered to  genarate report.
    <u><b>interactive repotrs.</b></u>
    we use <b>AT LINE -SELECTION</b> and <b>AT USER-COMMAND</b> events to genarate secondary events based on user actions.
    <b>TOP-OF-PAGE DURING LINE-SELECTION</b> EVENT, provides page heading to all secondary lists.
    PBO and PAI   events also used to genarating list.
    regards,
    AshokReddy.

  • WHAT ARE SUB EVENTS OF EVENTS IN REPORTS ?

    WHAT ARE SUB EVENTS OF EVENTS IN REPORTS I.E INITIALIZATION, AT SELECTION SCREEN, START OF SELECTION, END OF SELECTION. WHAT ALL EVENTS HAVE SUB EVENTS ? PLEASE EXPLAIN IN DETAIL.
    REWARD POINTS GUARENTEED FOR ANSWERS!!

    hi,
    Check out these:
    Processing time Meaning Default setting
    __BEGIN_OF_PROCESSING__ Before the beginning of
    data processing
    (blank)
    __BEGIN_OF_TRANSACTION__ Before the beginning of
    transaction data
    processing
    (blank)
    __BEGIN_OF_RECORD__ Before applying the
    conversion rules for a
    source structure
    Initialize the structure <segment>
    (Name of target structure)
    Batch Input, Direct Input:
    <segment> = init_<segment>.
    BAPI, IDoc:
    g_edidd_segnam = '...'.
    g_edidd_segnum = '....'.
    g_edidd_psgnum = '......'.
    g_edidd_hlevel = '..'.
    Clear <segment>.
    __END_OF_RECORD After applying the
    conversion rules for a
    source structure
    Transfer_record.
    __END_OF_TRANSACTION__ After finishing transaction
    processing
    Transfer_transaction.
    __END_OF_PROCESSING__ After finishing data
    processing
    (blank)
    transfer_record. Transfers the current record (i.e. for the current target
    structure) to the output buffer.
    transfer_this_record '...'. Transfers a record of another target structure to the output
    buffer. The name of the target structure has to be specified as
    argument in single quotes.
    at_first_transfer_record. Transfers the current record to the output buffer, if it is the first
    transaction.
    on_change_transfer_record. Transfers the current record to the output buffer, if it has
    changed compared to the last record.
    transfer_transaction. Writes the current transaction to an output file. All records of
    Legacy System Migration Workbench
    38
    the output buffer are transferred to the output file.
    skip_record. The current record is not transferred to the output buffer.
    skip_transaction. The current transaction is not written to the output file.

  • Tell me 'events in reports' in order wise

    tell me 'events in reports' in order wise
    whether it is same as interactive and ALV's ?

    Hi
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen / <field> : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    Rgds,
    Prajith

  • Priority events in reports

    what is the seq of events that will trigger in reports

    Event related to reports are not triggered based on any statements in ABAP.
    The event are triggered depended on the way the output is generated .
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen / <field> : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen / <field> : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    events in reports
    events of reports
    check the above threads
    plz reward if found useful
    Message was edited by:
            p498863

  • Problem in Event driven report

    Dear Gurus...I created the following procedure to implement Event Driven Reporting:
    CREATE OR REPLACE procedure ABC.eve_drv_rep as
    myPlist system.SRW_PARAMLIST;
    myIdent system.SRW.Job_Ident;
    BEGIN
    myPlist := system.SRW_PARAMLIST(system.SRW_PARAMETER('',''));
    system.srw.add_parameter(myPlist,'GATEWAY','http://192.168.1.133/reports/rwservlet);
    system.srw.add_parameter(myPlist,'SERVER','rep_appsrv_frhome1');
    system.srw.add_parameter(myPlist,'REPORT','y:\02\02\Gry_02_01.rep');
    system.srw.add_parameter(myPlist,'USERID','def/xyz@nml');
    system.srw.add_parameter(myPlist,'DESTYPE','email');
    system.srw.add_parameter(myPlist,'DESFORMAT','PDF');
    system.srw.add_parameter(myPlist,'DESNAME','[email protected]');
    myIdent := system.srw.run_report(myPlist);
    EXCEPTION
    when others then
    raise_application_error(-20001,'Error sending email.Error: '||sqlerrm);
    --Dbms_Put.Put_Line('Error sending email.Error: '||dbms_util.get_detailed_sqlerrm);
    END;
    Procedure is created successfully but when I execute this procedure, I get the following error:
    ORA-20001'Error sending email.Error: ORA-20999
    ORA-06512: at "Nml.Eve_Drv_Rep", line 17
    ORA-06512: at line 1
    Can u guess where is the problem?
    2ndly I want to know that whether I should give IP address or Application Server Machine Name in GATEWAY parameter?
    And in SERVER parameter either I should give the Application Server Machine Name or Report Server name installed on Application Server Machine?
    Lastly from where I can get the complete list of Parameters to be added in SRW.Add_Parameter like SERVER, GATEWAY etc.
    Please note that we r using Database 10g Rel.2 and Forms and Reports services on Application Services and the report being called was developed in Reports 10g.

    Hi,
    Consider this corrected code.
    REPORT zztest
    NO STANDARD PAGE HEADING
    LINE-COUNT 36(3)
    LINE-SIZE 250.
    DATA: BEGIN OF itab OCCURS 0,
    carrid TYPE sbook-carrid,
    connid TYPE sbook-connid,
    fldate TYPE sbook-fldate,
    custtype TYPE sbook-custtype,
    class TYPE sbook-class,
    bookid TYPE sbook-bookid,
    END OF itab.
    DATA a TYPE i.
    SELECT carrid connid fldate custtype class bookid
    FROM sbook INTO CORRESPONDING FIELDS OF TABLE itab.
    SORT itab.
    ULINE.
    WRITE :1 'CARRID', 20'BOOK ID', 37'CLASS'.
    ULINE.
    LOOP AT itab .
    <b>  AT NEW carrid.
        WRITE: 1 itab-carrid.
      ENDAT.
      WRITE : 20 itab-bookid.
      WRITE : 40 itab-class.</b>
      AT END OF carrid.
        ULINE.
      ENDAT.
    ENDLOOP.
    <b>Your problem was.</b>
      AT NEW carrid.
        WRITE: 1 itab-carrid.
      ENDAT.
      WRITE : <b>/</b>20 itab-bookid. "New Line <b>/</b>
      WRITE : 40 itab-class.
    Regards,
    Arun Sambargi.

  • Regarding Intialisation event in reports

    Hi..
    Plz explain me the usage of Intialisation event in reports. I have read somewhere by using intialisation event we can do 2 things
    1) can provide default values in selection screen.
    2) can provide authorizations on report.
    But I am unable to understand what we meant by providing authorizations. plz help me in this regard.
    Regards
    veerendra

    Hi,
    initialization events helps us in
    giving default values
    to any variable
    that may be the selction screen field values
    parameters: P_matnt type mara-matnr
    initialization.
    p_matnr = '777777'.
    then when you see the selection screen this value will be seen
    2) can provide authorizations on report.
    yes we can provide authorizations on report in this event
    also
    we usually check the sy-uname
    and we will maintain a ztable for authorizations
    and if we found that user name and some code associated with the uname
    then we will allow him to go ahead
    other wise we will give a message that
    'you are not authorized'/
    thanks & regards,
    Venkatesh

  • Error in event driven reporting

    Dear Gurus...I created the following procedure to implement Event Driven Reporting:
    CREATE OR REPLACE procedure ABC.eve_drv_rep as
    myPlist system.SRW_PARAMLIST;
    myIdent system.SRW.Job_Ident;
    BEGIN
    myPlist := system.SRW_PARAMLIST(system.SRW_PARAMETER('',''));
    system.srw.add_parameter(myPlist,'GATEWAY','http://192.168.1.133/reports/rwservlet);
    system.srw.add_parameter(myPlist,'SERVER','rep_appsrv_frhome1');
    system.srw.add_parameter(myPlist,'REPORT','y:\02\02\Gry_02_01.rep');
    system.srw.add_parameter(myPlist,'USERID','def/xyz@nml');
    system.srw.add_parameter(myPlist,'DESTYPE','email');
    system.srw.add_parameter(myPlist,'DESFORMAT','PDF');
    system.srw.add_parameter(myPlist,'DESNAME','[email protected]');
    myIdent := system.srw.run_report(myPlist);
    EXCEPTION
    when others then
    raise_application_error(-20001,'Error sending email.Error: '||sqlerrm);
    --Dbms_Put.Put_Line('Error sending email.Error: '||dbms_util.get_detailed_sqlerrm);
    END;
    Procedure is created successfully but when I execute this procedure, I get the following error:
    ORA-20001'Error sending email.Error: ORA-20999
    ORA-06512: at "Nml.Eve_Drv_Rep", line 17
    ORA-06512: at line 1
    Can u guess where is the problem?
    2ndly I want to know that whether I should give IP address or Application Server Machine Name in GATEWAY parameter?
    And in SERVER parameter either I should give the Application Server Machine Name or Report Server name installed on Application Server Machine?
    Lastly from where I can get the complete list of Parameters to be added in SRW.Add_Parameter like SERVER, GATEWAY etc.
    Please note that we r using Database 10g Rel.2 and Forms and Reports services on Application Server on Widows Server-2003 platform and the report being called was developed in Reports 10g.

    A few remarks:
    Remove the exception handler, since it masks the exact error.
    Turn on debugging, because it will give you better information about the error.
    srw.start_debugging;
    srw.stop_debugging;Did you configure an smtp server in server_name.conf?
    Are you able to run the report directly from your browser with the same URL?
    where I can get the complete list of Parameters to be added in SRW.Add_Parameter like SERVER, GATEWAY etc.Oracle has manuals for everything.
    http://download.oracle.com/docs/cd/E12839_01/bi.1111/b32121/pbr_evnt001.htm#i1007523

  • Training and Event Management - report on list of cancelled courses

    Hi All,
    Is there any standard report available to get the list of cancelled courses (be it business event grp , type or business event) Would appreciate your inputs on this.
    Kind regards
    Sathya

    S_AHR_61016216 - Cancellations per Attendee , i think there is no standard report for cencelation of business events, type and group.
    for cancellations per attendee reports is available in the system.
    good luck
    Devi

  • Events in Reports

    hi ,
    can any one help me the events or any sample codes used for the below reports
    1) ABAP Query Report
    2) Report Writer / Report Painter
    3) logical database reports
    thanks
    Edited by: Alvaro Tejada Galindo on Feb 4, 2008 2:43 PM

    ABAP/4 Queries
    Many times a need arises for SAP Users and Functional Consultants to generate quick reports without getting any ABAP coding done – time taken to complete the coding in development, transport and test it in QA system and then transport to production – is sometimes too long. In such cases, ABAP/4 query is a tool provided by SAP for generating these kind of reports.
    This document aims at explaining the concept of ABAP/4 query in a simple and straight forward manner. The reader of this document should have a moderate knowledge of ABAP concepts and authorizations for understanding the concept of ABAP query.
    Type of Report Desired
    Before starting to write an ABAP query, its advisable to decide the type of report that the user wants. ABAP query provides the following type of reports:
    Basic List        Simple report
    Statistics         Report containing statistical functions like Average &Percentage
    Ranked List     Report written for analytical purpose
    Check this link for more details.
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Report Writer / Report Painter
    Initially, both tools were only available to the FI/CO modules. Later, with the introduction of the Logistics Information System and Flexible Analyses in Release 3.x, the functionality of these tools was further expanded. It still is not widely known that the Report Painter/Writer can be used for reporting against structures other than those delivered in FI and CO
    A common misconception in the user community is that Report Painter/Report Writer can only be used to report against a single table. However, some reporting structures do report against multiple tables. For example, CCSS (for Cost Center Accounting) refers to tables COSP, COSS and more, depending on the key figure configuration. Similarly, FI-SL (Special Purpose Ledger) reporting structures include summary and line-item tables (the key figure set determines where the data comes from).
    To configure other table joins, views may be created joining the necessary tables, and views can be added to the control tables, via Flexible Analyses in LIS. Report Painter/Report Writer can be used in almost any application area in R/3 to report on currencies and quantities.
    CHeck this for more details.
    http://sapabap.iespana.es/sap/info/report_painter/report_painter_02.htm
    logical database reports
    Logical database is another tool for ABAP reports. Using LDB we can provide extra features for ABAP reports.
    While using LDB there is no need for us to declare Parameters.
    Selection-screen as they will be generated automatically.
    We have to use the statement NODES in ABAP report.
    If there are many tables the Performance will be slow as all the table data will be read from top node to bottom node .
    Check this link.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db99b435c111d1829f0000e829fbfe/content.htm
    Also check this link
    http://wiki.ittoolbox.com/index.php/How_many_types_of_reports_are_there_in_ABAP_and_what_is_the_difference_between_them%3F

  • Regarding events in reports

    Hi guys,
    i got a doubt in reports on events
    how many events are there in reports.....
    and what's the function of them...can any one help me plzzzz
    regards
    venu

    hi,
    events:
    http://www.sap-img.com/abap/events-related-to-reporting.htm
    Events in Classical Reports
    Initialization.
    At selection-screen.
    At selection-screen on <field>.
    Start-of-selection.
    Top-of-page.
    End-of-page.
    End-of-selection.
    Initialization.
    We can initialize the selection-screen with calculated default values under this event.
    Initialization.
    s_date-high = sy-datum.
    s_date-low = sy-datum - 15.
    Append s_date.
    At selection-screen.
    We can validate all the inputs on selection screen fields under this event.
    At selection-screen.
    If s_carrid-low is initial or s_connid-low is initial or s_date is initial.
    < ... code for validation... >.
    Endif.
    At selection-screen on <field>.
    We can validate a particular field input on selection screen under this event.
    At selection-screen on s_carrid.
    If s_carrid-low < > &#37521;H&#12539;
    <&#12539;code for validation&#12539;
    Endif.
    Start-of-selection.
    By default the program is under this event.
    If any of the other event comes before
    &#20840;elect&#12539;ndselect.&#12539;statements, then to break
    that event, we require this S-O-S event.
    Start-of-selection.
    Select * from &#12539;
    &#12539;&#12539;
    Endselect.
    Top-of-page.
    If we need some portion of the output (like
    column headings) to appear in all the pages,
    then we use this event.
    Top-of-page.
    Write:/ &#33307;arrier&#12539;10 &#33307;onnection&#12539;20 &#33337;ate&#12539;
    If there is no external output statement before
    &#31109;op-of-page&#12539;event, then this event will not
    work.
    End-of-page.
    Once the cursor reaches the last line of the
    page, automatically this event will be triggered.
    Report Zxxx line-count 25(3).
    In this case line numbers 23, 24 and 25 are
    reserved for footer.
    Once the cursor reaches 23rd line, this event
    will be triggered.
    End-of-page.
    Write:/ sy-uline(75).
    Write:/ &#31109;his is end of page:&#12539;sy-pagno.
    Write:/ sy-uline(75).
    End-of-selection.
    This event is used for concluding part of List.
    End-of-selection.
    Write:/ &#31109;his is end of the Report&#12539;
    Additional events in interactive reports
    The following additional events are applicable to secondary lists.
    Top-of-page during line-selection.
    At line-selection.
    At user-command.
    These additional events are triggered when u perform some action on the basic lists.
    example:
    REPORT zwk22671 LINE-COUNT 40(3)
    LINE-SIZE 200
    NO STANDARD PAGE HEADING.
    TABLES : mkpf , "MATERIAL DOCUMENT
    mseg , "DOCUMENT SEGMENT : MATERIAL
    t156t , "MOVEMENT TYPE TEXT
    makt. "MATERIAL DESCRIPTIONS
    *STRUCTURE OF INTERNAL TABLES
    DATA : BEGIN OF xtab,
    mblnr TYPE mkpf-mblnr , "DOCUMENT NUMBER
    mjahr TYPE mkpf-mjahr , "YEAR
    budat TYPE mkpf-budat , "POST DATE
    blart TYPE mkpf-blart , "DOCUMENT TYPE
    END OF xtab.
    DATA : BEGIN OF ytab,
    mblnr TYPE mseg-mblnr , "DOCUMENT NUMBER
    mjahr TYPE mseg-mjahr , "YEAR
    zeile TYPE mseg-zeile , "ITEM NUMBER
    bwart TYPE mseg-bwart , "MOVEMENT TYPE
    btext TYPE t156t-btext , "MOVEMENT DESCRIPTION
    matnr TYPE mseg-matnr , "MATERIAL NUMBER
    maktx TYPE makt-maktx , "MATERIAL DESCRIPTION
    meins TYPE mseg-meins , "UNIT OF MEASURE
    menge TYPE mseg-menge , "QUANTITY
    dmbtr TYPE mseg-dmbtr , "AMOUNT
    END OF ytab.
    *INTERNAL TABLE DECLARATION
    DATA : i_tab1 LIKE STANDARD TABLE OF xtab WITH HEADER LINE. "INTERNAL TABLE 1 : CONTAINS MATERIAL DETAILS
    DATA : i_tab2 LIKE STANDARD TABLE OF ytab WITH HEADER LINE. "INTERNAL TABLE 2 : CONTAINS ITEMWISE MATERIAL DETAILS
    *VARIABLES
    DATA : v_color TYPE sy-tabix , "FOR SETTING COLOR FORMATS DURING GENERATING REPORT
    v_field(20) , "FOR STORING THE CLICKED FIELD NAME
    v_value(20) , "FOR STORING THE CLICKED FIELD VALUE
    v_mblnr TYPE mkpf-mblnr , "FOR VALIDATING DOCUMENT NUMBER
    v_mjahr TYPE mkpf-mjahr , "FOR VALIDATING DOCUMENT YEAR
    v_bwart TYPE mseg-bwart , "FOR VALIDATING MOVEMENT TYPE
    v_matnr TYPE mseg-matnr . "FOR VALIDATING MATERIAL NUMBER
    **SELECTION-SCREEN
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_mblnr FOR mkpf-mblnr , "DOCUMENT NUMBER
    s_mjahr FOR mkpf-mjahr OBLIGATORY, "DOCUMENT YEAR
    s_bwart FOR mseg-bwart NO INTERVALS NO-EXTENSION, "MOVEMENT TYPE
    s_matnr FOR mseg-matnr . "MATERIAL NUMBER
    SELECTION-SCREEN : END OF BLOCK blk1.
    AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
    PERFORM validation. "PERFORMS VALIDATION OF SELECTION-SCREEN FIELDS
    *TOP-OF-PAGE
    TOP-OF-PAGE.
    PERFORM header. "CREATES HEADER FOR THE BASIC LIST
    *END-OF-PAGE
    END-OF-PAGE. "CREATES FOOTER FOR THE BASIC AND SECONDARY LIST
    PERFORM footer.
    *START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM generation_basic. "GENERATES REPORT FOR BASIC LIST WHICH CONTAINS DOCUMENT NO , DOCUMENT YEAR
    "POST DATE , DOCUMENT TYPE.
    *END-OF-SELECTION
    END-OF-SELECTION.
    PERFORM report_basic. "DISPLAY REPORT FOR BASIC LIST
    *AT LINE-SELECTION
    AT LINE-SELECTION.
    PERFORM generation_secondary. "GENERATES REPORT FOR SECONDARY LIST BASED ON THE DOCUMENT NUMBER AND DOCUMENT YEAR
    "WHICH CONTAINS DOCUMENT NO , YEAR , ITEM NO , MOVEMENT TYPE , MOVEMENT DESCRIPTION ,
    "MATERIAL NUMBER , MATERIAL DESC , UNIT OF MEASURE , QUANTITY AND AMOUNT
    *TOP-OF-PAGE DURING LINE-SELECTION
    TOP-OF-PAGE DURING LINE-SELECTION.
    PERFORM header_secondary. "CREATES HEADER FOR THE SECONDARY LIST
    *AT USER-COMMAND
    AT USER-COMMAND.
    PERFORM user_secondary. "SUBROUTINE FOR HANDLING USER EVENTS
    FORM validation .
    *VALIDATING MATERIAL DOCUMENT NUMBER
    SELECT SINGLE mblnr
    INTO v_mblnr
    FROM mkpf
    WHERE mblnr IN s_mblnr.
    IF sy-subrc NE 0.
    MESSAGE 'ENTER CORRECT DOCUMENT NUMBER' TYPE 'E'.
    ENDIF.
    *VALIDATING MATERIAL DOCUMENT YEAR
    SELECT SINGLE mjahr
    INTO v_mjahr
    FROM mkpf
    WHERE mjahr IN s_mjahr.
    IF sy-subrc NE 0.
    MESSAGE 'ENTER CORRECT MATERIAL DOCUMENT YEAR' TYPE 'E'.
    ENDIF.
    *VALIDATING MOVEMENT TYPE
    SELECT SINGLE bwart
    INTO v_bwart
    FROM mseg
    WHERE bwart IN s_bwart.
    IF sy-subrc NE 0.
    MESSAGE 'ENTER CORRECT MOVEMENT TYPE' TYPE 'E'.
    ENDIF.
    *VALIDATING MATERIAL NUMBER
    SELECT SINGLE matnr
    INTO v_matnr
    FROM mseg
    WHERE matnr IN s_matnr.
    IF sy-subrc NE 0.
    MESSAGE 'ENTER CORRECT MATERIAL NUMBER' TYPE 'E'.
    ENDIF.
    ENDFORM. " VALIDATION
    FORM header .
    WRITE :/30 'MATERIAL DOCUMENTS' COLOR 1. "TITLE OF BASIC LIST
    WRITE :/1(89) sy-uline.
    FORMAT COLOR 1.
    WRITE :/1 sy-vline ,
    3 'DOCUMENT NUMBER' ,
    23 sy-vline ,
    25 'YEAR' ,
    45 sy-vline ,
    47 'POST DATE' ,
    67 sy-vline ,
    69 'DOCTYP' ,
    89 sy-vline .
    FORMAT RESET.
    WRITE :/1(89) sy-uline.
    ENDFORM. " HEADER
    FORM footer .
    IF sy-lsind EQ 0. "CHECKS WHICH LIST IS IT BASIC LIST OR SECONDARY (AND NO. OF SECONDARY LIST)
    WRITE :/1(89) sy-uline.
    ELSEIF sy-lsind EQ 1.
    WRITE :/1(192) sy-uline.
    ENDIF.
    ENDFORM. " FOOTER
    FORM generation_basic .
    SELECT mkpf~mblnr "DOCUMENT NUMBER
    mkpf~mjahr "DOCUMENT YEAR
    mkpf~budat "POST DATE
    mkpf~blart "DOCUMENT TYPE
    INTO TABLE i_tab1
    FROM mkpf INNER JOIN mseg ON mkpfmjahr EQ msegmjahr AND
    mkpfmblnr EQ msegmblnr
    WHERE mkpf~mblnr IN s_mblnr
    AND mkpf~mjahr IN s_mjahr
    AND mseg~bwart IN s_bwart
    AND mseg~matnr IN s_matnr.
    IF sy-subrc NE 0.
    WRITE :/ 'MATERIAL DATA NOT FOUND'.
    ENDIF.
    DELETE ADJACENT DUPLICATES FROM i_tab1 COMPARING mblnr mjahr.
    ENDFORM. " GENERATION_BASIC
    FORM report_basic .
    LOOP AT i_tab1.
    v_color = sy-tabix MOD 2.
    IF v_color EQ 0.
    FORMAT COLOR 1 INTENSIFIED OFF.
    ELSE.
    FORMAT COLOR 2 INTENSIFIED OFF.
    ENDIF.
    WRITE :/1 sy-vline ,
    3 i_tab1-mblnr ,
    23 sy-vline ,
    25 i_tab1-mjahr ,
    45 sy-vline ,
    47 i_tab1-budat ,
    67 sy-vline ,
    69 i_tab1-blart ,
    89 sy-vline .
    HIDE : i_tab1-mblnr , i_tab1-mjahr. "STORING THE VALUE OF FIELDS CLICKED IN SYSTEM AREA
    ENDLOOP.
    FORMAT RESET.
    WRITE :/1(89) sy-uline.
    ENDFORM. " REPORT_BASIC
    FORM generation_secondary .
    IF sy-lsind EQ 1.
    SET PF-STATUS 'DISPLAY'.
    GET CURSOR FIELD v_field VALUE v_value. "GET THE FIELD VALUE AND NAME WHERE THE CURSOR WAS CLICKED
    CASE v_field.
    WHEN 'I_TAB1-MBLNR'. "DISPLAYS SECONDARY LIST ONLY IF DOCUMENT NUMBER IS CLICKED
    SELECT mseg~mblnr "DOCUMENT NUMBER
    mseg~mjahr "DOCUMENT YEAR
    mseg~zeile "ITEM NUMBER
    mseg~bwart "MOVEMENT TYPE
    t156t~btext "MOVEMENT DESCRIPTION
    mseg~matnr "MATERIAL NUMBER
    makt~maktx "MATERIAL DESCRIPTION
    mseg~meins "UNIT OF MEASURE
    mseg~menge "QUANTITY
    mseg~dmbtr "AMOUNT
    INTO TABLE i_tab2
    FROM ( ( mseg INNER JOIN t156t
    ON msegbwart EQ t156tbwart )
    INNER JOIN makt
    ON msegmatnr EQ maktmatnr )
    WHERE mseg~mblnr EQ i_tab1-mblnr
    AND mseg~mjahr EQ i_tab1-mjahr
    AND t156t~spras EQ sy-langu
    AND makt~spras EQ sy-langu.
    DELETE ADJACENT DUPLICATES FROM i_tab2 COMPARING mblnr mjahr.
    WHEN OTHERS.
    MESSAGE 'SELECT DOCUMENT NUMBER' TYPE 'E'.
    ENDCASE.
    LOOP AT i_tab2.
    v_color = sy-tabix MOD 2.
    IF v_color EQ 0.
    FORMAT COLOR 1 INTENSIFIED OFF.
    ELSE.
    FORMAT COLOR 2 INTENSIFIED OFF.
    ENDIF.
    WRITE :/1 sy-vline ,
    3 i_tab2-mblnr ,
    12 sy-vline ,
    14 i_tab2-mjahr ,
    19 sy-vline ,
    21 i_tab2-zeile ,
    30 sy-vline ,
    32 i_tab2-bwart ,
    40 sy-vline ,
    42 i_tab2-btext ,
    72 sy-vline ,
    74 i_tab2-matnr ,
    94 sy-vline ,
    96 i_tab2-maktx ,
    146 sy-vline ,
    148 i_tab2-meins ,
    153 sy-vline ,
    155 i_tab2-menge ,
    170 sy-vline ,
    172 i_tab2-dmbtr ,
    192 sy-vline .
    ENDLOOP.
    WRITE :/1(192) sy-uline.
    FORMAT RESET.
    ELSEIF sy-lsind EQ 2.
    GET CURSOR FIELD v_field VALUE v_value. "GET THE FIELD VALUE AND NAME WHERE THE CURSOR WAS CLICKED
    CASE v_field.
    WHEN 'I_TAB2-MBLNR'. "DISPLAYS SECONDARY LIST ONLY IF DOCUMENT NUMBER IS CLICKED
    SET PARAMETER ID : "SETTING PARAMETER ID FOR DOCUMENT NUMBER AND YEAR.
    'MBN' FIELD i_tab2-mblnr ,
    'MJA' FIELD i_tab2-mjahr.
    CALL TRANSACTION 'MB03' AND SKIP FIRST SCREEN. "CALLING TRABSACTION CODE 'MBO3'.
    WHEN OTHERS.
    MESSAGE 'SELECT DOCUMENT NUMBER' TYPE 'E'.
    ENDCASE.
    ENDIF.
    ENDFORM. " GENERATION_SECONDARY
    FORM header_secondary .
    WRITE :/50 'ITEMWISE MATERIAL DOCUMENTS' COLOR 1.
    WRITE :/1(192) sy-uline.
    FORMAT COLOR 1.
    WRITE :/1 sy-vline ,
    3 'DOCUMENT NO' ,
    12 sy-vline ,
    14 'YEAR' ,
    19 sy-vline ,
    21 'ITEM NO.' ,
    30 sy-vline ,
    32 'MOV TYP' ,
    40 sy-vline ,
    42 'MOV DESCRIPTION' ,
    72 sy-vline ,
    74 'MATERIAL NO' ,
    94 sy-vline ,
    96 'MATERIAL DESCRIPTION' ,
    146 sy-vline ,
    148 'UOM' ,
    153 sy-vline ,
    155 'QUANTITY' ,
    170 sy-vline ,
    172 'AMOUNT' ,
    192 sy-vline .
    WRITE :/1(192) sy-uline.
    FORMAT RESET.
    ENDFORM. " HEADER_SECONDARY
    *FORM user_secondary .
    IF sy-ucomm EQ 'DISPLAY'. "EXECUTES ONLY IF 'DISPLAY DOCUMENTS' ITEM IS CLICKED ON APPLICATION TOOL BAR.
    IF sy-lsind EQ 2.
    GET CURSOR FIELD v_field VALUE v_value. "GET THE FIELD VALUE AND NAME WHERE THE CURSOR WAS CLICKED
    CASE v_field.
    WHEN 'I_TAB2-MBLNR'. "DISPLAYS SECONDARY LIST ONLY IF DOCUMENT NUMBER IS CLICKED
    SET PARAMETER ID :
    'MBN' FIELD i_tab2-mblnr ,
    'MJA' FIELD i_tab2-mjahr.
    CALL TRANSACTION 'MB03' AND SKIP FIRST SCREEN.
    WHEN OTHERS.
    MESSAGE 'SELECT DOCUMENT NUMBER' TYPE 'E'.
    ENDCASE.
    ENDIF.
    LEAVE PROGRAM.
    ENDIF.
    ENDFORM. " USER_SECONDARY

  • Need help on event based report scheduling on webi 3.2

    Hi All,
    I need to add/remove trigger events on scheduled report instances.
    I have around 100 scheduled report instances and want to add a event trigger.
    I do not want to reschedule all the instances one by one with new event trigger.
    Is there any way that i can add event trigger to all the instances at once ?
    Thanks,
    Alorika

    Hi
    Can you please tel me hoe to view these report properties in R3.
    If I go to schedule, It allows to set a new schedule but I want to view the existing settings.
    Please guide.
    Thanks ,

Maybe you are looking for

  • How do I use my MacBook to organize the apps on my iPhone

    I know that I was able to organize my apps on the iPhone by moving them around on my MacBook.  There was an excellent page that made it fairly simple to move apps around, getting similar ones together.  That allows apps to be moved into folders where

  • How do i set up a template for a double sided 3 hole binder book?

    I am trying to set up a template for a directory using double-sided pages in a loose leaf binder. How do I set up the margins, etc. for both sides of the page accounting for the holes to be punched. I'm at a loss in understanding how this is to be do

  • CD/DVD Drive won't mount disks

    My Mac Mini (early 2009) won't seem to mount any disks. I have tried recordable DVDs I recorded a while ago and shop bought DVDs also pre recorded CDs. Just whirrs a bit and then ejects. It will mount a blank DVD, but that is all. I tried recording s

  • Help! "Recording#68.aif not found"

    Hey everyone, I was just in the middle of recording guitar for a song when I noticed GarageBand wasn't recording anymore and I couldn't hear myself play. All of my equipment was hooked up properly and all volumes were up. So I saved and quit GarageBa

  • DB Adapter polling is stopped because of SQLServerException

    Hi I am doing a DB adapter polling to MS SQL server database. If I am decreasing my polling frequency too low say 5 seconds, I am getting the below error some times and the polling process is getting stopped. Query name: [Poll_xworlds_eventsSelect],