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

loop problem

Former Member
0 Likes
323

Hi,

i'm fetching vendor with holding tax types from lfbw table. If a vendor contains more than one withholding tax type then i need to display all the tax types in one line in the o/p like below

Vendor Code WH Tax Type 1 WH Tax Type 2 WH Tax Type 2 WH Tax Type 3 WH Tax Type 4 WH Tax Type 5........

How to get this. Please sugest me.

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
294

Fetch all the entries from table, then loop and concatenate.

loop at itab into wa.

if sy-tabix = 1.

wa_string = wa-field.

else.

concatenate wa_string wa-field1 into wa_string.

endif.

endloop.

1 REPLY 1
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
295

Fetch all the entries from table, then loop and concatenate.

loop at itab into wa.

if sy-tabix = 1.

wa_string = wa-field.

else.

concatenate wa_string wa-field1 into wa_string.

endif.

endloop.