01-11-2006 11:39 AM
Hi all
here i have a funnny doubt. Is it possible to CONCATENATE values in column wise instead of row wise
example:i want to CONCATENATE 120, 121,122 like this
120
121
122
01-11-2006 11:40 AM
Why don't you append this to an internal table instead of concatenating?
01-11-2006 12:00 PM
Hi
here my problem is i want to print payment order numbers in the last page in a script.last page do not contain Main window.if we pass all the values into an internal table we can't loop them as the last page do not contain any main window it will only once after completion of all windows and only last payment order is printing.if it is possibli to CONCATENATE in column wise that works for my case.
01-11-2006 12:05 PM
01-11-2006 12:17 PM
Hi sreenivasa,
1. Last page can contain main window.
Then u can ofcourse loop and show.
regards,
amit m.
01-11-2006 12:33 PM
hey,
is your problem solved ?? or still have it ??
let us know..
regards
srikanth
01-11-2006 12:35 PM
Why don't you insert the MAIN to the last page?
You can write a code to manage to write the payment order numbers only at the end. Before writing them you can force a skip to next page, so you always make sure to print it in the last page.
Max
01-11-2006 11:41 AM
01-11-2006 11:43 AM
Hi,
No it is not possible.. CONCATENATE is only at FIELD level for CHAR type fields and not records.. It might be possible to get what you want using other techniques..
Regards,
Suresh Datti
01-11-2006 11:44 AM
Hi
?????
Do you mean you want to append these values to internal table?
If it so you can try to use SPLIT command:
DATA: STRING(20) VALUE '120 121 122'.
DATA ITAB(3) OCCURS 0 WITH HEADER LINE.
SPLIT STRINGH AT SPACE INTO TABLE ITAB.
Max
01-11-2006 11:55 AM
Hi Sreenivasa,
As we are storing the result of Concatenation in a field which is of String type and string always have only row there exist no column so if you wanna display your result column wise then the idea of using internal table is the best.
reward point if useful.
Regards,
Siddarth
01-11-2006 11:59 AM
assume you have 3 fields in the internal table
data :v_f1(1000) type c,
v_f2(1000) type c,
v_f3(1000) type c.
loop at itab.
concatenate v_f1
itab-f1
into v_f1."(use SEPARATED BY ,if you want)
concatenate v_f2
itab-f2
into v_f2."(use SEPARATED BY ,if you want)
concatenate v_f3
itab-f3
into v_f3."(use SEPARATED BY ,if you want)
endloop.
NOW V_F1,V_F2,V_F3 will have 1st 2nd 3rd columns concatentaed values.
regards
srikanth
01-11-2006 12:03 PM
hey,
here is the full code to work out.
data : begin of itab occurs 0,
f1(10),
f2(10),
f3(10),
end of itab.
data :v_f1(1000) type c,
v_f2(1000) type c,
v_f3(1000) type c.
itab-f1 = 1.
itab-f2 = 2.
itab-f3 = 3.
append itab.
itab-f1 = 2.
itab-f2 = 3.
itab-f3 = 4.
append itab.
itab-f1 = 5.
itab-f2 = 6.
itab-f3 = 7.
append itab.
break-point.
loop at itab.
condense : itab-f1, itab-f2, itab-f3.
*--this condense is to remove unnecessary blank spaces.
concatenate v_f1
itab-f1
into v_f1."(use SEPARATED BY ,if you want)
concatenate v_f2
itab-f2
into v_f2."(use SEPARATED BY ,if you want)
concatenate v_f3
itab-f3
into v_f3."(use SEPARATED BY ,if you want)
endloop.
<b>output :</b>
v_f1 125
v_f2 236
v_f3 347
printed output of the program
Message was edited by: Srikanth Kidambi Maruthi