SAP details:     Events  -  News -   Training  -  World wide sites  -  Sap Labs   -   SAP Magazine  -   SAP Screen saver -   Stock Price

Download ABAP source code

Program name  Program function  Author Date Added 
Z_Interactive_report_1
Version: 3.0 & above
Interactive reporting 
Module: FI
   
 

REPORT Z_Interactive_report_1  NO STANDARD PAGE HEADING.
TABLES: LFA1, LFB1, BSIK.
DATA: BEGIN OF DOCTAB OCCURS 100,
              BELNR LIKE BSIK-BELNR,
              BUDAT LIKE BSIK-BUDAT,
              GSBER LIKE BSIK-GSBER,
              DMBTR LIKE BSIK-DMBTR,
            END OF DOCTAB.

START-OF-SELECTION.
GET LFB1.
    WRITE: LFA1-LIFNR, LFB1-BUKRS, (20) LFA1-NAME1, (20) LFA1-ORT01.
    HIDE: LFA1-LIFNR, LFB1-BUKRS.

TOP-OF-PAGE DURING LINE-SELECTION.
    WRITE: SY-LISEL.
    ULINE. SKIP.
    WRITE: 'COMPANY CODE:'(001), LFB1-BUKRS.
    WRITE: / 'DOC. NO. POST.DATE BA LOCAL CURRENCY'(002).
    ULINE /(45).
 
END-OF-SELECTION.
CLEAR LFA1-LIFNR.

AT PF13.
    WRITE: 'PF13 SY-LSIND = ', SY-LSIND.
    CHECK NOT LFA1-LIFNR IS INITIAL.
    SELECT * FROM BSIK WHERE LIFNR = LFA1-LIFNR AND BUKRS EQ LFB1-BUKRS.
          WRITE: / BSIK-BELNR, BSIK-BUDAT DD/MM/YYYY, BSIK-GSBER, 23 BSIK-DMBTR.
          DOCTAB-BELNR = BSIK-BELNR.
          DOCTAB-BUDAT = BSIK-BUDAT.
          DOCTAB-GSBER = BSIK-GSBER.
          DOCTAB-DMBTR = BSIK-DMBTR.
        APPEND DOCTAB.
         CLEAR DOCTAB.
     ENDSELECT.
     IF SY-SUBRC NE 0.
         SKIP 5.
         WRITE: '*** NO DOCUMENTS AVAILABLE. ***'(003).
     ENDIF.
     CLEAR LFA1-LIFNR.

AT PF14.
    WRITE: 'AT PF14 SY-LSIND = ', SY-LSIND.
    SY-LSIND = SY-LSIND - 1.
    SORT DOCTAB BY BUDAT.
    PERFORM DOCPRINT.

AT PF16.
     WRITE: 'AT PF16 SY-LSIND = ', SY-LSIND.
     SY-LSIND = SY-LSIND - 1.
     SORT DOCTAB BY DMBTR.
     PERFORM DOCPRINT.

FORM DOCPRINT.
    LOOP AT DOCTAB.
        WRITE: / DOCTAB-BELNR, DOCTAB-BUDAT DD/MM/YYYY, DOCTAB-GSBER,
                   23 DOCTAB-DMBTR.
    ENDLOOP.
ENDFORM.

 

 

 
 









   
 
PlanetSAP.com

Home     Post a article   Suggestion   Contact  

Disclaimer    Copyright; 1998-2001 Softron Systems, Inc. All rights reserved.