2007 Aug 23 1:00 PM
Dear All,
There is one internal table itab with fields matnr lgort.
the data is like this
matnr lgort
100 103
101 501
102 600
now i want to keep all the matnr in a variable say Line
Line = 100, 101, 102
how to get this.
Note: line is not an internal table.It is variable of type C with length 100.
after moving all the matnrs of itab then LINE = 100, 101, 102.
finally i need to dispaly message
'Materals' LINE 'sent on ' sy-datum.
Please let me know how to get this.
Dear All,
There is one internal table itab with fields matnr lgort.
the data is like this
matnr lgort
100 103
101 501
102 600
now i want to keep all the matnr in a variable say Line
Line = 100, 101, 102
how to get this.
Note: line is not an internal table.It is variable of type C with length 100.
after moving all the matnrs of itab then LINE = 100, 101, 102.
finally i need to dispaly message
'Materals' LINE 'sent on ' sy-datum.
Please let me know how to get this.
2007 Aug 23 1:03 PM
Hi,
try this:
LOOP AT itab INTO structure.
CONCATENATE line structure-matnr INTO line
SEPARATED BY SPACE.
ENDLOOP.
Arne
2007 Aug 23 1:07 PM
Hi Shoban,
You can use the following code,
LOOP at ITAB into LS_ITAB.
<b>if sy-tabix eq 1.</b>
MOVE LS_ITAB to LINE.
<b>ELSE.</b>
CONCATENATE LS_ITAB into LINE
SEPERATED BY 'comma' (comma would be a constant declared).
<b>ENDIF.</b>
ENDLOOP.
<b>Reward points for helpful answers</b>.
Best Regards,
Ram.
2007 Aug 23 1:13 PM
hI..
CLEAR LINE.
LOOP AT itab INTO WA.
CONCATENATE WA-matnr LINE INTO LINE
SEPARATED BY ','.
ENDLOOP.
WRITE:/ 'Materials ' , LINE , 'Sent on' , Sy-datum.
<b>Reward if Helpful</b>
2007 Aug 23 2:20 PM
Hello,
U can use CONCATENATE
<b>CONCATENATE f1 ... fn INTO g [ SEPARATED BY h ]</b>
It combines the fields f1 to fn (n >= 2) and places them in g.
Like all string processsing statements, you can only use character-type operands here.If the type of an operand is not STRING, the operand is treated like a type C field, regardless of its actual type, even though no actual conversion takes place.
regards,
LIJO JOHN
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |