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

divide one internal table to two diff

Former Member
0 Likes
789

HI,

i have internal table with to types of data and i want to separate it to to diff tables ,

what is the best way to do that?

i do like that:

loop at it_h assigning <fs_h>.
    if <fs_hier>-report = 'B_AP' .
      assign <fs_hier> to <bsp>.
      append <bsp> to it_bsp.
    elseif <fs_hier>-report = 'W_AP'.
      assign <fs_hier> to <wd_app>.
      append <wd_app> to it_wd.
    endif.
  endloop.

Regards

1 ACCEPTED SOLUTION
Read only

abdul_hakim
Active Contributor
0 Likes
764

Hi Vijay,

Your code is perfect. Go ahead.

Cheers,

Hakim

6 REPLIES 6
Read only

abdul_hakim
Active Contributor
0 Likes
764

Hi

For me this looks fine. Are you facing any performance problem due to this?

Cheers,

Hakim

Read only

0 Likes
764

HI Abdul,

Thanks,

no i just want to now that i am in the right way.

Regards

Read only

0 Likes
764

yes you are vijay.

-

Read only

Former Member
0 Likes
764

Hi This is fine, you can go ahead with this.

Amresh

Read only

abdul_hakim
Active Contributor
0 Likes
765

Hi Vijay,

Your code is perfect. Go ahead.

Cheers,

Hakim

Read only

rainer_hbenthal
Active Contributor
0 Likes
764

If hyou have for sure only B_AP and W_AP entries in your table, you can save some CPU seconds by eliminating the elseif to else avoiding an unnecessary comparison.