Wednesday, December 29, 2010
REPORT ztest_notepad. DATA:it_nfal TYPE STANDARD TABLE OF nfal WITH HEADER LINE. DATA:total_records TYPE i. DATA: c1 TYPE cursor, c2 TYPE cursor, c3 TYPE cursor. DATA:cgh_flag TYPE c, kkh_flag TYPE c, sgh_flag TYPE c. START-OF-SELECTION. SELECT COUNT( * ) FROM nfal INTO total_records. OPEN CURSOR:c1 FOR SELECT * FROM nfal WHERE einri = 'CGH', c2 FOR SELECT * FROM nfal WHERE einri = 'KKH', c3 FOR SELECT * FROM nfal WHERE einri = 'SGH'. DO. IF cgh_flag NE 'X'. FETCH NEXT CURSOR c1 APPENDING TABLE it_nfal. IF sy-subrc <> 0. CLOSE CURSOR c1. cgh_flag = 'X'. ENDIF. ENDIF. IF kkh_flag NE 'X'. FETCH NEXT CURSOR c2 APPENDING TABLE it_nfal. IF sy-subrc <> 0. CLOSE CURSOR c2. kkh_flag = 'X'. ENDIF. ENDIF. IF sgh_flag NE 'X'. FETCH NEXT CURSOR c3 APPENDING TABLE it_nfal. IF sy-subrc <> 0. CLOSE CURSOR c3. sgh_flag = 'X'. ENDIF. ENDIF. IF cgh_flag = 'X' AND kkh_flag = 'X' AND sgh_flag = 'X'. EXIT. ENDIF. ENDDO.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.