‎2007 May 25 3:53 PM
Hello friends,
I am a problem in writing the result in the proper alignment.
My code is
LOOP AT tmp_caufv.
CONCATENATE 'Total number of records for'
tmp_caufv-dsnam '=' tmp_caufv-succ_mrp
INTO report SEPARATED BY space.
WRITE : / report.
ENDLOOP.The output is,
Total number of records for ABCDEFGH = 2
Total number of records for ABCD = 3
Total number of records for ABCDEFGHIJKLM = 2
However I want my output as
Total number of records for ABCDEFGH = 2
Total number of records for ABCD = 3
Total number of records for ABCDEFGHIJKLM = 2( The last number in the proper vertical alingment)
tmp_caufv-dsnam is a 18 character field.
Any suggestions.
Ster.
‎2007 May 25 3:59 PM
You can do this:
LOOP AT tmp_caufv.
CONCATENATE 'Total number of records for'
<b>tmp_caufv-dsnam '='</b> INTO report SEPARATED BY space.
WRITE : / report, <b>70 tmp_caufv-succ_mrp</b>.
ENDLOOP.
70 is the 70th character in the line. 70 is just an example. You can check the program and give appopriate number.
‎2007 May 25 3:59 PM
You can do this:
LOOP AT tmp_caufv.
CONCATENATE 'Total number of records for'
<b>tmp_caufv-dsnam '='</b> INTO report SEPARATED BY space.
WRITE : / report, <b>70 tmp_caufv-succ_mrp</b>.
ENDLOOP.
70 is the 70th character in the line. 70 is just an example. You can check the program and give appopriate number.
‎2007 May 25 4:01 PM
Hi,
LOOP AT tmp_caufv.
CONCATENATE 'Total number of records for'
tmp_caufv-dsnam '=' INTO report SEPARATED BY space.
write: /1 report,
50 tmp_caufv-succ_mrp.
ENDLOOP.
Regards,
Vidya.
Message was edited by:
Vidya Chowdhary
‎2007 May 25 4:01 PM
Hi,
When you use CONCATENATE instruction you will have only one space between each part.
Try to write your numbers at a specific position.
Regards,
Mathieu
Message was edited by:
Mathieu ILHE
‎2007 May 25 4:03 PM
If you use separated by space it will take one space.
loop at tmp_caufv.
write:/ 1 'Total number of records for' ,20 tmp_caufv-dsnam ,35 '=',39 tmp_caufv-succ_mrp
endloop.
Reward Points if it is helpful
Thanks
Seshu
‎2007 May 25 4:36 PM
‎2007 May 25 4:06 PM
HI
instead of concatenate u can use write statement like this.
LOOP AT tmp_caufv.
CONCATENATE 'Total number of records for', tmp_caufv-dsnam, '=' tmp_caufv-succ_mrp
INTO report SEPARATED BY space.
write:/ 'Total number of records for',27 tmp_caufv-dsnam,45 '=', tmp_caufv- succ_mrp
ENDLOOP.
provide ur reward points if ur satisfy.
Regards
Ravi