07-20-2005 10:55 AM
Hi,
In my list output, I want to print a sy-vline after a value without any blank space in between.
Eg.
Current Output: abcd | sdaasfd | 2143 |
Requird Output: abcd|sdaasfd|2143|
Please Advise.
Rgards,
shobhit
07-20-2005 10:59 AM
Hi Shobhit,
Try using concatenate as
CONCATENATE 'abcd'
sy-vline
'sdaasfd'
sy-vline
'2143'
sy-vline.
INTO x.
Write 😕 x.
Thanks and Warm Regards.
Pras
07-20-2005 10:59 AM
Hi Shobhit,
Try using concatenate as
CONCATENATE 'abcd'
sy-vline
'sdaasfd'
sy-vline
'2143'
sy-vline.
INTO x.
Write 😕 x.
Thanks and Warm Regards.
Pras
07-20-2005 11:05 AM
Hi,
You could also try this to delete blank gaps in a char variable.
CONDENSE x NO-GAPS.
Or if you are making differents Write, try this:
write: 'A' no-gap, sy-vline no-gap, 'B'.
Output; A|B
Cheers,
Jordi Pons
Message was edited by: Jordi Pons
07-20-2005 11:14 AM
07-20-2005 12:26 PM
Hi shobhit,
WRITE: / 'abcd' NO-GAP, sy-vline NO-GAP...
as Jordi writes is correct.
but if you've big structures with 10 or 20 fields it's
better to code it dynamic:
data h_field type string.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE rec TO <f>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
CONCATENATE h_field <f> sy-vline INTO h_field.
ENDDO.
WRITE: / h_field COLOR 6.
regards Andreas