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

Appending data from the fieldstring into itab

Former Member
0 Likes
682

Hi, Dear All,

*Write out data from table.

Loop at <dyn_table> into <dyn_wa>.

do.

assign component sy-index of structure <dyn_wa> to <dyn_field>.

if sy-subrc <> 0.

exit.

endif.

*if sy-index = 1.

  • write:/ <dyn_field>.

*else.

  • write: <dyn_field>.

*endif.

if sy-index = 1.

LOG = <dyn_field>.

else.

LOG = <dyn_field>.

endif.

APPEND LOG.

enddo.

endloop.

In the above logic, i was getting all the records into the LOG within a single line, but i'm expeting to get the records by rows and columns into the LOG just like they are in <dyn_table>, and even i'm getting exact expected format, when i uncomment the write:/ statement to display as a list.

How do i get like 001 M001 ABC

instead of

001

M001

ABC.

Here LOG is the structure of TAB512.

pl.give me some inputs.

with regards

Mahesh

5 REPLIES 5
Read only

Former Member
0 Likes
663

Hi,

I think my question is clear, if not, pl.let me know.

with best regards

Mahesh

Read only

Former Member
0 Likes
663

Mahesh,

do n times.

do p_flds times.

assign component sy-index of structure <dyn_wa> to <dyn_field>.

LOG = <dyn_field>..

enddo.

enddo.

Here <b>p_flds</b> is the no of columns in the Dynamic internal table and <b>n</b> is the number of rows of the Dynamic internal table which can be obtained by apllying <b>describe</b> command on the the Dynamic internal table.

Reward If found use full.

Regards,

Rama Murthy.P

Read only

0 Likes
663

Mahesh,

The above code of mine should definitely serve your purpose.

Regards,

Rama Murthy.P

Read only

Former Member
0 Likes
663

Hi,,

i got it by a simple move.

thank you

bye

Read only

Former Member
0 Likes
663

thank you