2009 Feb 19 6:10 AM
Hi all,
I have a table with four columns . One column is of data type NUMC and has an initial value set in the standard table.
I need to display the table with values, and the initial values should be displayed as blank.
Thanks
Priya
HI
For NUMC fileds by defalut it will take '0'
Do one thing use the following .
if <UR filed name> = '0' .
replace '0' by space.
endif.
2009 Feb 19 6:15 AM
loop at itab.
if itab-value is initial.
itab-value = ' '.
endif.
endloop.
2009 Feb 19 6:18 AM
Great!!
@Priya:It depends how you are showing your values?ALV?Classical? or what?
2009 Feb 19 6:18 AM
Hi,
You can try this code to write blank ---
DATA : W_N TYPE N .
WRITE W_N NO-ZERO.Regards
Pinaki
2009 Feb 19 6:20 AM
Hi,
If u want to show that blank.
Replace the value with space.
Regrds
2009 Feb 19 6:36 AM
hi all,
I m working with table control.
the column displays initial value 0 , if no value exists .
2009 Feb 19 7:00 AM
HI
For NUMC fileds by defalut it will take '0'
Do one thing use the following .
if <UR filed name> = '0' .
replace '0' by space.
endif.
2009 Feb 19 6:46 AM
Hi,
Move it to the variable of char type and chk if it is 0, display space.
As shown in the below eg.
data: i type n,
c type c.
c = i.
if c = 0.
c = ' '.
endif.
write c.
2009 Feb 19 6:50 AM
Eg. With internal Table
DATA:BEGIN OF itab OCCURS 0,
id type n,
name type char10 ,
END OF itab.
data: l_id(8) type c.
*itab-id = 1.
itab-name = 'aa'.
append itab.
itab-id = 2.
itab-name = 'bb'.
append itab.
loop at itab.
l_id = itab-id.
if l_id = 0.
l_id = ''.
endif.
write:/ l_id, itab-name.
endloop.
2009 Feb 19 7:08 AM
i have solve the issue
i assigned the numc field to character field
Thanks all
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |