Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to read a source code into itab?

Former Member
0 Likes
886

Iam using READ REPORT Statement to read the source to itab. but only 10 lines are inserted in the itab. how to declare the itab for this and proceed?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
855

Check with the following logic. It is working.

DATA itab TYPE string OCCURS 0 WITH HEADER LINE.

READ REPORT <prog> INTO itab.

LOOP AT itab.

IF sy-tabix = 25.

EXIT.

ELSE.

WRITE:/ itab.

ENDIF.

ENDLOOP.

Regards,

Prasanth

7 REPLIES 7
Read only

Former Member
0 Likes
856

Check with the following logic. It is working.

DATA itab TYPE string OCCURS 0 WITH HEADER LINE.

READ REPORT <prog> INTO itab.

LOOP AT itab.

IF sy-tabix = 25.

EXIT.

ELSE.

WRITE:/ itab.

ENDIF.

ENDLOOP.

Regards,

Prasanth

Read only

0 Likes
855

the itab reads only 10 lines of code. can u please tell us how to get all the coding into itab.

Sathya

Read only

0 Likes
855

please check the program code what you are reading should be in ACTIVE status.else your old active code will be read into ITAB.

may be our old active program have 10 lines.so its reading them. so check the PROGRAM you are reading is ACTATIVATED or not.

regards

srikanth

Message was edited by: Srikanth Kidambi

Read only

0 Likes
855

Thank you. that was the problem. now the problem is solved.

Read only

Former Member
0 Likes
855

Hi sathyabama,

1. BEGIN OF ITAB OCCURS 0,

LINE(72) TYPE C,

END OF ITAB.

regards,

amit m.

Read only

Former Member
0 Likes
855

I have tried foolllwing piece of code just now and its working fine..

Some credit points will be nice if found useful

TYPES: BEGIN OF T_TYPE,

LINE(72),

END OF T_TYPE.

DATA: PROGRAM LIKE SY-REPID VALUE 'ZVRU4001',

T TYPE STANDARD TABLE OF T_TYPE WITH

NON-UNIQUE DEFAULT KEY INITIAL SIZE 500.

READ REPORT PROGRAM INTO T.

IF SY-SUBRC <> 0.

...

ENDIF.

Regs,

Ags..

Read only

Former Member
0 Likes
855

Hello,

you can do like this.

DATA: BEGIN OF g_t_lines OCCURS 1000,

LINE(72),

END OF g_t_lines.

READ REPORT <Report Name> INTO g_t_lines.

Thanks,

Krishnakumar