Upcoming SlideShare
×

# Classical report

474 views

Published on

This is a Classical ABAP Report for ABAP Beginners. I think it will help a lot to ABAP Beginers.

Published in: Education, Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
474
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
13
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Classical report

1. 1. *&---------------------------------------------------------------------* *& Report ZREP_004 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZREP_004. TABLES: LFA1. TYPES: BEGIN OF T_PA0001, EBELN TYPE EKKO-EBELN, BUKRS TYPE EKKO-BUKRS, BSTYP TYPE EKKO-BSTYP, BSART TYPE EKKO-BSART, BSAKZ TYPE EKKO-BSAKZ, LOEKZ TYPE EKKO-LOEKZ, STATU TYPE EKKO-STATU, AEDAT TYPE EKKO-AEDAT, ERNAM TYPE EKKO-ERNAM, PINCR TYPE EKKO-PINCR, END OF T_PA0001.
2. 2. TYPES: BEGIN OF T_TEST, A TYPE I, B TYPE C, C TYPE STRING, END OF T_TEST. DATA: IT_A TYPE T_PA0001 OCCURS 0 WITH HEADER LINE, IT_B TYPE TABLE OF LFA1, WA_B LIKE LFA1, IT_C TYPE TABLE OF T_TEST, WA_C TYPE T_TEST, MIKE TYPE PFACH. CLEAR: WA_C. WA_C-A = 1. WA_C-B = 'M'. WA_C-C = 'Mayur'. WRITE: /10 WA_C-A, /30 WA_C-B, /40 WA_C-C. SKIP 6.
3. 3. CLEAR: WA_C. WA_C-A = 1. WA_C-B = 'R'. WA_C-C = 'Ravi'. WRITE: /10 WA_C-A, /30 WA_C-B, /40 WA_C-C. SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: MAYUR FOR LFA1-KUNNR. "OBLIGATORY no intervals. PARAMETERS: R_BTN1 RADIOBUTTON GROUP R1 DEFAULT 'X' USER-COMMAND UC, R_BTN2 RADIOBUTTON GROUP R1, R_BTN3 RADIOBUTTON GROUP R1. PARAMETERS: CHK1 AS CHECKBOX DEFAULT 'X' MODIF ID TT. PARAMETERS: CHK2 AS CHECKBOX DEFAULT 'X' MODIF ID MM. PARAMETERS: CHK3 AS CHECKBOX DEFAULT 'X' MODIF ID RR. PARAMETERS P_CARRID TYPE SPFLI-CARRID AS LISTBOX VISIBLE LENGTH 10 USER-COMMAND LL DEFAULT 'LH'.
4. 4. PARAMETERS P_KUNNR TYPE PA0002-GESCH AS LISTBOX VISIBLE LENGTH 20 USER-COMMAND ONLI DEFAULT '1'. SELECTION-SCREEN END OF BLOCK B1. AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN. IF R_BTN1 = 'X'. CASE SCREEN-GROUP1. WHEN 'TT'. SCREEN-ACTIVE = 1. WHEN 'MM'. SCREEN-ACTIVE = 0. WHEN 'RR'. SCREEN-ACTIVE = 0. ENDCASE. MODIFY SCREEN. * * * * * IF SCREEN-GROUP1 = 'TT'. SCREEN-ACTIVE = 1. ELSEIF SCREEN-GROUP1 = 'MM'. SCREEN-ACTIVE = 0. ELSEIF SCREEN-GROUP1 = 'RR'.
5. 5. * SCREEN-ACTIVE = 0. * MODIFY SCREEN. * ENDIF. ELSEIF R_BTN2 = 'X'. IF SCREEN-GROUP1 = 'TT'. SCREEN-ACTIVE = 0. ELSEIF SCREEN-GROUP1 = 'MM'. SCREEN-ACTIVE = 1. ELSEIF SCREEN-GROUP1 = 'RR'. SCREEN-ACTIVE = 0. ENDIF. MODIFY SCREEN. ELSEIF R_BTN3 = 'X'. IF SCREEN-GROUP1 = 'TT'. SCREEN-ACTIVE = 0. ELSEIF SCREEN-GROUP1 = 'MM'. SCREEN-ACTIVE = 0. ELSEIF SCREEN-GROUP1 = 'RR'. SCREEN-ACTIVE = 1. ENDIF. MODIFY SCREEN. ENDIF.
6. 6. ENDLOOP. *SELECTION-SCREEN SKIP 5. *SKIP 5. * *SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002. * *SELECT-OPTIONS: RAVI FOR LFA1-KUNNR. "OBLIGATORY no intervals. * ** parameters: Ravi like lfa1-kunnr obligatory. * *SELECTION-SCREEN END OF BLOCK B2.