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

write work area to file

Former Member
0 Likes
428

Hi all,

I have an itab with associated work area. I want to iterate over the itab using the work area...writing the fileds of the work area to a tab delimited row in an output file. What would be the most concise way to perform this operation? I started looking at using a field symbol to perform the write...but it occured to me that there is probably a way to write the entire work area to a tab delimited string in one fell swoop...gotta love this ABAP!!! Anyone have an idea?

Hi all,

I have an itab with associated work area. I want to iterate over the itab using the work area...writing the fileds of the work area to a tab delimited row in an output file. What would be the most concise way to perform this operation? I started looking at using a field symbol to perform the write...but it occured to me that there is probably a way to write the entire work area to a tab delimited string in one fell swoop...gotta love this ABAP!!! Anyone have an idea?

1 REPLY 1
Read only

Former Member
0 Likes
380

Hello Mathew,

U could do like this:

DATA: OUTPUT TYPE STRING.

<b>CONSTANTS: CON_TAB TYPE X VALUE '09'.

LOOP AT ITAB INTO WA_ITAB.

CONCATENATE WA_ITAB-F1 WA_ITAB-F2 WA_ITAB-F1 INTO OUTPUT SEPARATED BY CON_TAB.

TRANSFER OUTPUT TO P_FILE.

ENDLOOP.</b>

Vasanth