2007 Feb 06 3:44 PM
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?
2007 Feb 06 3:49 PM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |