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

fieldstring to internal table

Former Member
0 Likes
457

how do i transfer the data from field string into an internal table.

when does an field string end.

for example:

we do the loop with the field string as:

loop.

item-bukrs = fieldstring-bukrs.

endloop.

can some one help me with this.

thanks.

3 REPLIES 3
Read only

former_member156446
Active Contributor
0 Likes
437

hi Sanjana

I used to do like this: If its a tab space in between the field..


DATA : BEGIN OF in_file OCCURS 0,
data(1000),
END OF in_file.

-----

LOOP AT in_file.
SPLIT in_file AT c_tab INTO
wa_citm_b-type
wa_citm_b-vbeln
wa_citm_b-posnr
wa_citm_b-uepos
APPEND wa_citm_b TO lt_citm_b.
ENDLOOP.

Read only

Former Member
0 Likes
437

hi sadaram,

thank you for the reply, it gets me to know about split.

but i have a fields symbol, which means, it might have variable number of columns for each row, then i cannot use split right?

do u know of anyother way round.

Read only

Former Member
0 Likes
437

Hi,

Try this

Assign component 'BUKRS' of structure <Fs> to <FS1>

itab-bukrs = <FS1>

this is for field symbols , but i am not sure for field strings