Application Development 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: 

Logic for storing messages in internal table

SrihariNerella
Participant
0 Kudos
133

Hi All,

I have created one structure with several fields & in last I have created 20 messages . I want to store the messages in the internal table based on two checks.

In the first check I am passing messages to internal table successfully and increasing the value of a local variable "count" by 1 to get the count of messages.

In the second check I want to start from count +1 (For eg: If I get count = 4 after first check. then want to store the messages from 5th position) and want to store rest of the messages from work area to internal table.

Please suggest solution for it.

Regards,

SriHari

3 REPLIES 3

brad_bohn
Active Contributor
0 Kudos
57

Where is your code? I'm not sure I understand what's so difficult with that requirement. What happened to the value of COUNT? Why do you need it at all?

SrihariNerella
Participant
0 Kudos
57

We are moving the two tables records into one table . Then based on that we are retriving the o/p messages .

Former Member
0 Kudos
57

hi sir,

try this sir by giving after select statement For first CHECK if sy-subrc = 0. than count = count + 1 else message e001 "data not present

endif.

second CHECK

if count > 4

loop at itab in to wa.

endloop.endif.

or you can use subrountines in the codes

thanking you