12-06-2013 5:02 PM
Hi experts,
I want to assign a space to a field symbol, so just to make the field not to be null. I coded as below, but I keep getting dump. Am I missing anyting or assign a space to field symbol is not possible.
FIELD-SYMBOLS: <fs1>.
<fs1> = ' '.
UNASSIGN <fs1>.
Thanks in advance.
12-06-2013 5:18 PM
HI
The field-symbol is a pointer, so you need to assign a variable to it, if this variable is blank, the field-symbol will be blank too
Max
12-06-2013 5:15 PM
12-06-2013 5:45 PM
12-06-2013 5:18 PM
HI
The field-symbol is a pointer, so you need to assign a variable to it, if this variable is blank, the field-symbol will be blank too
Max
12-06-2013 5:46 PM
12-06-2013 5:52 PM
Hi
DATA L_SPACE(1) TYPE C.
FIELD-SYMBOLS: <FS1> TYPE ANY.
ASSIGN L_SPACE TO <FS1>.
It works.
Max
12-06-2013 5:23 PM
12-06-2013 5:55 PM
Hi Kiran,
Thank you and it works without giving me dump. But the ultimate problem I want to fix still there, see the screen shot below, there is a very narrow empty column between first and second column, I don't want it, but I am not sure how to get rid of it, seems ASSIGN space to <fs1> doesn't help.
12-06-2013 6:10 PM
Hi Blue,
How you are getting this output, is it in ALV grid. can you paste the relevant code.
12-06-2013 6:19 PM
12-06-2013 6:20 PM
Hi Kiran,
This is a dynamic ALV, the displays columns depends on the user input.
I think the problem happens if there is no data value or null data value in the cells of second column, then that little narrow columns appears. I tested, it all the cells under second column have data, then the little narrow column won't display.
Here is part of the code:
READ TABLE t_alldata WITH KEY quotdate = wa_alldata-quotdate
quotname = gw_dyn_fcat-fieldname INTO wa_alldata1.
IF sy-subrc = 0." and NOT wa_alldata1-pricequot is INITIAL.
ASSIGN COMPONENT gw_dyn_fcat-fieldname OF STRUCTURE <gfs_line> TO <fs1>.
if NOT wa_alldata1-pricequot is INITIAL.
PERFORM FORMAT_DECIMAL USING wa_alldata1-pricequot CHANGING prc.
<fs1> = prc.
else.
ASSIGN space to <fs1>.
endif.
UNASSIGN <fs1>.
flgref = 0.
ENDIF.
CLEAR : wa_alldata1.
12-06-2013 6:23 PM