Skip to Content
author's profile photo Former Member
Former Member

Interactive report

Hello friends

I have to make an interactive report, on first page material number with its details in columnar format after clicking at material number some same and some new details should display according to a layout suggested by client.

How should I do this?

Thanks

Bhavna

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 07:43 AM

    Hi Bhavna,

    You can do that by creating <b>LAYOUT VARIANTS</b>.

    Thanks,

    shreya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 07:43 AM

    You can use the help of following code. You have to use 'HIDE' command for that purpose..

    REPORT demo_list_hide NO STANDARD PAGE HEADING.
    
    TABLES: spfli, sbook.
    
    DATA: num TYPE i,
          dat TYPE d.
    
    START-OF-SELECTION.
    
      num = 0.
      SET PF-STATUS 'FLIGHT'.
    
    GET spfli.
    
      num = num + 1.
      WRITE: / spfli-carrid, spfli-connid,
               spfli-cityfrom, spfli-cityto.
      HIDE:    spfli-carrid, spfli-connid, num.
    
    END-OF-SELECTION.
    
      CLEAR num.
    
    TOP-OF-PAGE.
    
      WRITE 'List of Flights'.
      ULINE.
      WRITE 'CA  CONN FROM                 TO'.
      ULINE.
    
    TOP-OF-PAGE DURING LINE-SELECTION.
    
      CASE sy-pfkey.
        WHEN 'BOOKING'.
          WRITE sy-lisel.
          ULINE.
        WHEN 'WIND'.
          WRITE:  'Booking', sbook-bookid,
               /  'Date   ', sbook-fldate.
          ULINE.
      ENDCASE.
    
    AT USER-COMMAND.
    
      CASE sy-ucomm.
        WHEN 'SELE'.
          IF num NE 0.
            SET PF-STATUS 'BOOKING'.
            CLEAR dat.
            SELECT * FROM sbook WHERE carrid = spfli-carrid
                                AND   connid = spfli-connid.
              IF sbook-fldate NE dat.
                dat = sbook-fldate.
                SKIP.
                WRITE / sbook-fldate.
                POSITION 16.
              ELSE.
                NEW-LINE.
                POSITION 16.
              ENDIF.
              WRITE sbook-bookid.
              HIDE: sbook-bookid, sbook-fldate, sbook-custtype,
                    sbook-smoker, sbook-luggweight, sbook-class.
            ENDSELECT.
            IF sy-subrc NE 0.
              WRITE / 'No bookings for this flight'.
            ENDIF.
            num = 0.
            CLEAR sbook-bookid.
          ENDIF.
        WHEN 'INFO'.
          IF NOT sbook-bookid IS INITIAL.
            SET PF-STATUS 'WIND'.
            SET TITLEBAR 'BKI'.
            WINDOW STARTING AT 30 5 ENDING AT  60 10.
            WRITE: 'Customer type   :', sbook-custtype,
                 / 'Smoker          :', sbook-smoker,
                 / 'Luggage weigtht :', sbook-luggweight UNIT 'KG',
                 / 'Class           :', sbook-class.
          ENDIF.
      ENDCASE.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.