08-09-2012 10:36 AM
Hi experts,
I have four variables , i am concatenating these 4 variables into one variable but i am getting the output continually , But i want the output as following.This is report program using for mail triggering.
Examples:
t1 = 'Material was dispatched, Your invoice number is:'.
t2 = invoiceno.
t3 = 'Thanks for your co-operation,'.
t4 = 'Regards,'.
t5 = 'Sales Division'.
concatenate t1 t2 t3 t4 t5 into t6.
write t6.
Output
Material was dispatched, Your invoice number is: 987764 Thanks for your co-operation, Regards, Sales Division
Expected Output
Material was dispatched, Your invoice number is: 987764
Thanks for your co-operation.
Regards,
Sales Division.
Please Help me for my need.
Regards,
Linganathan.K
Moderator Message: Please search for the available material before posting your question.
Message was edited by: Suhas Saha
08-09-2012 10:39 AM
Hello,
use the constant CL_ABAP_CHAR_UTILITIES=>CR_LF between your variables:
CONCATENATE
t1 t2 CL_ABAP_CHAR_UTILITIES=>CR_LF
t3 CL_ABAP_CHAR_UTILITIES=>CR_LF
CL_ABAP_CHAR_UTILITIES=>CR_LF
CL_ABAP_CHAR_UTILITIES=>CR_LF
t4 CL_ABAP_CHAR_UTILITIES=>CR_LF
t5
INTO t6.
If you are working on 7.30 you can use the string-patterns which makes those operations much easier.
Kind regards,
Hendrik
08-09-2012 10:48 AM
Dear Hendrik brandes,
I tried your code but i am getting output like following.
Material was dispatched, Your invoice number is:987764##Thanks for your co-operation,######Regards,#
08-09-2012 10:50 AM
08-09-2012 10:52 AM
In ABAP editor's output (se38) only i am checking the result.
Regards,
Linganathan.K
08-09-2012 10:56 AM
Hi,
within SE38 you cannot see CR_LF. Just export the output via System -> List -> Save and see the result in a normal text-editor.
Kind Regards,
Hendrik
08-09-2012 11:05 AM
Dear Hendrik brandes,
Your answer is helpful, i am eager to give points to you, But i cant because my post was closed by moderator. Anyway thanks for your reply.
Regards,
Linganathan.k