Classical report

  • 172 views
Uploaded on

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

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

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
172
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 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. 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. 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. 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. * 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. 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.