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

Read statement into an internal table

Former Member
0 Likes
626

Hi Experts,

In my report i have several read statements, now my requirement is i want to put all the read statements into an internal table, how do i achieve it???

Thank you!

6 REPLIES 6
Read only

Former Member
0 Likes
605

Hi,

Can you be more specific regarding ur issue.

As per my understanding u want to read different tables with some conditon and if that condition is satisfied then another table is to populated....is that rite?

If yes then after read stmt use the stmt modify internal table from workarea....

Hope this will help.

Regards,

Rohan.

Read only

0 Likes
605

Thanks, but i want to know how many number of times the read statement is used .

Read only

0 Likes
605

There is no restriction for that

Read only

0 Likes
605

I think you can use counter variable and increment 1 for every successful read statement (sy-subrc = 0) or depending on your requirement

Read only

0 Likes
605

Hello Maya,

 i want to know how many number of times the read statement is used .

Two ways:

1. use a counter after each read statement in your program and increase it by 1 everytime there is read statement and display the final value of the counter in the report that you want.

2. If you just want to know press (CNTRL + F) enter "READ" , select the radio button "In Main program" and then you will get all the read statement and can count it manually.

Hope I have not answered your question wrong. But if I have, please be more specific about your requirement so that many an help you.

Thanks,

Jayant Sahu.

Read only

Former Member
0 Likes
605

Hi Maya,

If you want to read collect the rows which are read to a separate int table then,

READ TABLE itab INTO wa_tab WITH KEY f1 =  .. f2 = ...
IF sy-subrc  EQ 0.
  APPEND wa_tab TO itab2.
ENDIF.

Regards,

Manoj Kumar P