3
Home Trainings Quiz Tips Tutorials Functional Cert Q's Interview Q's Jobs Testimonials Advertise Contact Us SAP Virtual/Onsite Trainings Document Categories: ABAP TM Adobe Forms ABAP-HR ALE & IDocs ALV BAPI BASIS BSP Business Objects Business Workflow CRM NEW LSMW SAP Script/Smart Forms BI/BW eXchange Infrastructure (XI) Enterprise Portals (EP) eCATT Object Oriented Programming SAP Query Userexits/BADIs WebDynpro for Java/ABAP TM Others What's New? ABAP Test Cockpit HOT SAP ABAP Pragmas Understanding SE32 (ABAP Text Element Maintenance) Creating an IDoc File on SAP Application Server Understanding “Advance with dialog” option of SAP Workflow SAP Workflow Scenario: Maintenance Notification Approval Enhancements to a standard class Working with Floating Field in Adobe Forms Inserting data from Internal Table into the step “Send Mail” Display GL Account long text using enhancement framework Differences between polymorphism in JAVA and ABAP Passing multiline parameters from an ABAP Class event to a Workflow container Concept of Re-evaluate agents for active work items in SAP Workflow Dynamic creation of component usage in ABAP WebDynpro Adobe Forms: Display symbols like copyright and others Deactivate Hold functionality in Purchase order (ME21N) Quiz on OOABAP Add fields in FBL5N using BADIs Tutorial on Wide casting Defining a Range in Module Pool Program Copy fields from one structure/table into another structure/table Side Panel Usage in NWBC Contribute? Sample Specs What's Hot? Web Dynpro for ABAP Tutorials Join the Mailing List Enter name and email address below: Name: Email: Subscribe Unsubscribe Developing simple interactive report By Vakada Raghava, Mouri Tech Solutions “In this scenario, we would take an example of a material and develop an interactive report. Once you click on require “material no” on the basic list, the corresponding material information on the secondary list.” Following is a sample interactive report developed for our demo purpose: REPORT zintractive . TYPES : BEGIN OF str_mard, matnr TYPE mard-matnr, lgort TYPE mard-lgort, werks TYPE mard-werks, END OF str_mard. DATA : wa_mard TYPE str_mard, it_mard TYPE TABLE OF str_mard. TYPES : BEGIN OF str_makt, matnr TYPE makt-matnr, maktg TYPE makt-maktg, END OF str_makt. DATA : wa_makt TYPE str_makt, it_makt TYPE TABLE OF str_makt. TYPES : BEGIN OF str_mara, matnr TYPE mara-matnr, ersda TYPE mara-ersda, ernam TYPE mara-ernam, laeda TYPE mara-laeda, mtart TYPE mara-mtart, matkl TYPE mara-matkl, meins TYPE mara-meins, END OF str_mara. DATA : wa_mara TYPE str_mara, it_mara TYPE TABLE OF str_mara. TYPES : BEGIN OF str_final, matnr TYPE mara-matnr, ersda TYPE mara-ersda, ernam TYPE mara-ernam, laeda TYPE mara-laeda, mtart TYPE mara-mtart, matkl TYPE mara-matkl, meins TYPE mara-meins, lgort TYPE mard-lgort, werks TYPE mard-werks, END OF str_final. DATA: wa_final TYPE str_final, it_final TYPE TABLE OF str_final. PARAMETERS : plant TYPE mard-werks, stor LIKE mard-lgort. SELECT matnr lgort werks FROM mard INTO TABLE it_mard WHERE lgort = stor AND werks = plant. . SELECT matnr maktg FROM makt INTO TABLE it_makt FOR ALL ENTRIES IN it_mard WHERE matnr = it_mard-matnr AND spras = 'E'. SELECT matnr ersda ernam laeda mtart matkl meins FROM mara INTO TABLE it_mara FOR ALL ENTRIES IN it_makt WHERE matnr = it_makt-matnr. LOOP AT it_makt INTO wa_makt. WRITE : /1 wa_makt-matnr COLOR 1, 40 wa_makt-maktg COLOR 2. HIDE wa_makt-matnr. ENDLOOP. CLEAR wa_mard-matnr. AT LINE-SELECTION. REFRESH it_final. CLEAR wa_final. ULINE. IF sy-lsind = 1. WRITE : /1 'MATERIAL NO' COLOR 2, 20 'CREATION DATE' COLOR 3, 32 'PERSON CREATED', 50 'DATE OF LIST' , 65 'MATERIALTYPE', 80 'MATGROUP' , 90 'UNITOFMEASURE', 110 'STORLOCATION' COLOR 4, 130 'PLANT' COLOR 5. ULINE. ENDIF. SAPTechnical.COM - Developing a simple interactive report http://www.saptechnical.com/Tutorials/ABAP/InteractiveReport/Demo.htm 1 of 3 5/22/2015 12:07 AM

interactive report1.pdf

Embed Size (px)

Citation preview

  • Ho me Trainings Quiz T ips T utor ials Func tional Cert Q's Interview Q's Jobs Te stimonials Adver tise Contact Us

    SAP Virtual/Onsite

    Trainings

    Document Categories:

    ABAPTM

    Adobe Forms

    ABAP-HR

    ALE & IDocs

    ALV

    BAPI

    BASIS

    BSP

    Business Objects

    Business Workflow

    CRM NEW

    LSMW

    SAP Script/Smart Forms

    BI/BW

    eXchange Infrastructure (XI)

    Enterprise Portals (EP)

    eCATT

    Object Oriented Programming

    SAP Query

    Userexits/BADIs

    WebDynpro for Java/ABAPTM

    Others

    What's New?

    ABAP Test Cockpit HOT

    SAP ABAP Pragmas

    Understanding SE32 (ABAP TextElement Maintenance)

    Creating an IDoc File on SAPApplication Server

    Understanding Advance withdialog option of SAP Workflow

    SAP Workflow Scenario:Maintenance Notification Approval

    Enhancements to a standard class

    Working with Floating Field in AdobeForms

    Inserting data from Internal Tableinto the step Send Mail

    Display GL Account long text usingenhancement framework

    Differences between polymorphismin JAVA and ABAP

    Passing multiline parameters froman ABAP Class event to a Workflowcontainer

    Concept of Re-evaluate agents foractive work items in SAP Workflow

    Dynamic creation of componentusage in ABAP WebDynpro

    Adobe Forms: Display symbols likecopyright and others

    Deactivate Hold functionality inPurchase order (ME21N)

    Quiz on OOABAP

    Add fields in FBL5N using BADIs

    Tutorial on Wide casting

    Defining a Range in Module PoolProgram

    Copy fields from one structure/tableinto another structure/table

    Side Panel Usage in NWBC

    Contribute?

    Sample Specs

    What's Hot?

    Web Dynpro for ABAP Tutorials

    Join the Mailing List

    Enter name and email address below:

    Name:

    Email:

    Subscribe Unsubscribe

    Developing simple interactive report

    By Vakada Raghava, Mouri Tech Solutions

    In this scenario, we would

    take an example of a material

    and develop an interactive

    report. Once you click on

    require material no on the

    basic list, the correspondingmaterial information on the

    secondary list.

    Following is a sample interactivereport developed for our demopurpose:

    REPORT zintractive .

    TYPES : BEGIN OF str_mard, matnr TYPE mard-matnr, lgort TYPE mard-lgort, werks TYPE mard-werks, END OF str_mard.

    DATA : wa_mard TYPE str_mard, it_mard TYPE TABLE OF str_mard.

    TYPES : BEGIN OF str_makt, matnr TYPE makt-matnr, maktg TYPE makt-maktg,

    END OF str_makt.

    DATA : wa_makt TYPE str_makt, it_makt TYPE TABLE OF str_makt.

    TYPES : BEGIN OF str_mara, matnr TYPE mara-matnr, ersda TYPE mara-ersda, ernam TYPE mara-ernam, laeda TYPE mara-laeda, mtart TYPE mara-mtart, matkl TYPE mara-matkl, meins TYPE mara-meins, END OF str_mara.

    DATA : wa_mara TYPE str_mara, it_mara TYPE TABLE OF str_mara.

    TYPES : BEGIN OF str_final, matnr TYPE mara-matnr, ersda TYPE mara-ersda, ernam TYPE mara-ernam, laeda TYPE mara-laeda, mtart TYPE mara-mtart, matkl TYPE mara-matkl, meins TYPE mara-meins, lgort TYPE mard-lgort, werks TYPE mard-werks, END OF str_final.

    DATA: wa_final TYPE str_final, it_final TYPE TABLE OF str_final.

    PARAMETERS : plant TYPE mard-werks, stor LIKE mard-lgort.

    SELECT matnr lgort werksFROM mardINTO TABLE it_mardWHERE lgort = stor AND werks = plant..

    SELECT matnr maktgFROM maktINTO TABLE it_makt FOR ALL ENTRIES IN it_mardWHERE matnr = it_mard-matnr AND spras = 'E'.

    SELECT matnr ersda ernam laeda mtart matkl meinsFROM maraINTO TABLE it_mara FOR ALL ENTRIES IN it_maktWHERE matnr = it_makt-matnr.

    LOOP AT it_makt INTO wa_makt. WRITE : /1 wa_makt-matnr COLOR 1, 40 wa_makt-maktg COLOR 2. HIDE wa_makt-matnr.ENDLOOP.

    CLEAR wa_mard-matnr.

    AT LINE-SELECTION. REFRESH it_final. CLEAR wa_final. ULINE. IF sy-lsind = 1. WRITE : /1 'MATERIAL NO' COLOR 2, 20 'CREATION DATE' COLOR 3, 32 'PERSON CREATED', 50 'DATE OF LIST' , 65 'MATERIALTYPE', 80 'MATGROUP' , 90 'UNITOFMEASURE', 110 'STORLOCATION' COLOR 4, 130 'PLANT' COLOR 5. ULINE. ENDIF.

    SAPTechnical.COM - Developing a simple interactive report http://www.saptechnical.com/Tutorials/ABAP/InteractiveReport/Demo.htm

    1 of 3 5/22/2015 12:07 AM

  • LOOP AT it_mara INTO wa_mara WHERE matnr = wa_makt-matnr.

    wa_final-matnr = wa_mara-matnr. wa_final-ersda = wa_mara-ersda. wa_final-ernam = wa_mara-ernam. wa_final-laeda = wa_mara-laeda. wa_final-mtart = wa_mara-mtart. wa_final-matkl = wa_mara-matkl. wa_final-meins = wa_mara-meins.

    READ TABLE it_mard INTO wa_mard WITH KEY matnr = wa_makt-matnr.

    wa_final-lgort = wa_mard-lgort. wa_final-werks = wa_mard-werks.

    APPEND wa_final TO it_final.

    ENDLOOP.

    LOOP AT it_final INTO wa_final.

    WRITE : /1 wa_final-matnr COLOR 2, 20 wa_final-ersda COLOR 3, 37 wa_final-ernam, 50 wa_final-laeda , 70 wa_final-mtart , 85 wa_final-matkl , 95 wa_final-meins, 115 wa_final-lgort COLOR 4, 130 wa_final-werks COLOR 5. ENDLOOP.

    TOP-OF-PAGE. WRITE : /1 'MATERIAL NO' COLOR 1, 40 'DISCRIPTION' COLOR 2. ULINE .

    Result

    Enter the Plant and Storage Location

    Press the Execute Button.

    Double Click on require Material No which displays secondary list to corresponding materialinformation.

    The result shown below

    Please send us your feedback/suggestions at [email protected]

    Home Contribute About Us Privacy Terms Of Use Disclaimer Safe Companies: Advertise on SAPTechnical.COM | Post Job Contact Us

    2006-2007 SAPTechnical.COM. All rights reserved.All product names are trademarks of their respective companies. SAPTechnical.COM is in no way affiliated with SAP AG.

    SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver, and and any other SAP trademarks are registered trademarks of SAP AG in Germany and in several other countries.Every effort is made to ensure content integrity. Use information on this site at your own risk.

    Graphic Design by Round the Bend Wizards

    SAPTechnical.COM - Developing a simple interactive report http://www.saptechnical.com/Tutorials/ABAP/InteractiveReport/Demo.htm

    2 of 3 5/22/2015 12:07 AM

  • SAPTechnical.COM - Developing a simple interactive report http://www.saptechnical.com/Tutorials/ABAP/InteractiveReport/Demo.htm

    3 of 3 5/22/2015 12:07 AM