10-12-2013 3:17 PM
WRITE:/ sy-vline, 'At the end of:' , ITAB-ERNAM , 'Total count is:' ,I.
the above thing i m mentioning in my prg and in output there is space between 'total count is:' and the variable I,
there is also space between the value of itab-ernam and the msg 'total count is'....
pls help me to remove the space...
i tried with condense and replace command but it's not working...
10-14-2013 10:30 AM
hi,
create a char field and then condense the count field with no gaps to this char field. And then display this char field. This should work for you.
Regards,
Anil
10-12-2013 3:27 PM
Hi
The Numeric values are always right justified. So there you see the space between the label and the value.
If you do not want space, you can use the justification option in the Write Statement.
Regards,
Venkat
10-12-2013 7:25 PM
Hi,
Try NO-GAP addition.
Regards.
From:
http://help.sap.com/saphelp_45b/helpdata/en/34/8e732f6df74873e10000009b38f9b8/frameset.htm
WRITE: 'A' NO-GAP, 'B' NO-GAP, 'C'. "Output: ABC
If NO-GAP was not specified here, the output would have been "A B C " because one blank is always implicitly generated between consecutive output fields.
10-12-2013 8:59 PM
10-12-2013 9:36 PM
This can be the reason because for Integer value. Integer, float and Packed data type are right Justified.
You had tried with condense statement, Right, Condense statement removes more then one space but one space will be there .
So try with CONDENSE <c> [NO-GAPS]. This will remove all space.
data lv_string type string.
concatenate Total count is:' ,I into lv_string.
condense lv_string no-gaps.
WRITE:/ sy-vline, 'At the end of:' , ITAB-ERNAM , lv_string.
And if you want to remove leading zero form I for this you can use 'CONVERSION_EXIT_ALPHA_OUTPUT' function module.
10-13-2013 6:50 AM
It would work fine with NO-GAP addition.
WRITE:/ sy-vline, 'At the end of:' , ITAB-ERNAM , 'Total count is:' NO-GAP , I.
http://help.sap.com/saphelp_470/helpdata/en/9f/db9e3d35c111d1829f0000e829fbfe/content.htm
10-14-2013 10:05 AM
Hello,
In addition of using the NO-GAP and CONDENSE abap statements, you must also ensure that the datatype you using is appropriate.
For example:
data g_type_i type i.
g_type_i = 01.
WRITE:/ sy-vline, 'At the end of:' , sy-uname , 'Total count is:' , g_type_i.
WRITE:/ sy-vline, 'At the end of:' , sy-uname , 'Total count is:' NO-GAP , g_type_i.
data g_type_n type n.
g_type_n = 01.
WRITE:/ sy-vline, 'At the end of:' , sy-uname , 'Total count is:' , g_type_n.
WRITE:/ sy-vline, 'At the end of:' , sy-uname , 'Total count is:' NO-GAP , g_type_n.
In this example the type i contains space compared to the type n.
Thanks and Kind Regards,
Yovish.
10-14-2013 10:30 AM
hi,
create a char field and then condense the count field with no gaps to this char field. And then display this char field. This should work for you.
Regards,
Anil
10-14-2013 10:58 AM
Try writing to a variable of type char, condense the variable an write it to screen
10-14-2013 1:04 PM
thanks all for replying your help really helped me to solve my prob....
10-14-2013 7:04 PM
If your problem resolve. Then kindly close this thread by marking correct and helpful ans., so that if someone having same doubt can directly look at that correct ans.