Skip to Content
author's profile photo
Former Member

how to generate classical report

Hi guys,

I need a help from you. how to generate classical report can you guide me please.

Thanks guys.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Posted on Sep 28, 2007 at 06:45 AM

    Vijay,

    To generate a report, follow the steps below

    1) Determine the desired output for End-user

    2) Based on the desired output, write a program with data declarations for all the variales u will display in the report

    3) Write extraction routines to fetch data from the DB tables

    4) Read extracted data and bind the data for final output

    5) Output data

    here's a simple example for your ref

    *****************************

    report ztest.

    • Table declaration

    data: it_mara type table of mara with header line.

    • SELECTION SCREEN

    parameters: p_matnr like mara-matnr.

    start-of-selection.

    select * from mara into table it_mara where matnr = p_matnr.

    end-of-selection.

    loop at it_mara.

    write: it_mara-matnr, it_mara-mtart, it_mara-mbrsh.

    endloop.

    *****************************

    reward if helpful,

    Karthik

    Message was edited by:

    Karthik

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 06:49 AM

    hi,

    1 Prepare selection screen for user.

    2 fetch data in an itnernal table through query using the selection screen values entered by user.

    3.loop your final internal table

    4. then make use of WRITE stmt to dislay data as output.

    eg:

    loop at itab into wa.

    write:/01 wa-ebeln, 20 wa-ebelp, 60 wa-vbeln.

    endloop.

    Add comment
    10|10000 characters needed characters exceeded