Wednesday, May 7, 2008

SAP ABAP Drill Drill Down Report Concept

SAP ABAP Drill Down Report Concept (Double click to get the secondary list.)

In ABAP if you wish to get the secondary list by double clicking any of the lines of a report then you can make use of the event

AT LINE-SELECTION

as follows

REPORT ZEX_DOUBLECLICK .

*&---------------------------------------------------------------------*
*& ABAPLOVERS: Example of Double Click to get secondary List
*&---------------------------------------------------------------------*

* Table Declaration
TABLES: VBAK,
        VBAP.

* Start-Of-Selection
START-OF-SELECTION.
  SELECT single vbeln INTO (VBAK-VBELN) FROM VBAK.
    WRITE / VBAK-VBELN.

* Single click
AT LINE-SELECTION.
  Select Single posnr
                matnr
                INTO (VBAP-POSNR,
                      VBAP-MATNR) from vbap
                            where VBELN = VBAK-VBELN.


 Write:/ VBAK-VBELN, VBAP-POSNR, VBAP-MATNR.

No comments:

Post a Comment