2006 Oct 24 11:13 AM
D/A,
Please help me out in analyzing the root cause of the error appearing when i am trying to execute a module pool program.
Top Include :
constants cw_dokob type drad-dokob value 'ASMD'.
Short Txt column on the Table control
DATA: W_DKTXT TYPE MCDOK-DKTXT.
To store the dynpro column info
DATA: T_TAB TYPE TABLE OF CXTAB_COLUMN.
to populate T_TAB at first run of this program
DATA: W_FIRST_RUN TYPE XFELD VALUE 'X'.
constants cw_dokob2 type drad-dokob value 'PLKO'.
MODULE call_object_pbo
FIELD-SYMBOLS <FS> TYPE ANY.
CLEAR W_DYNNR.
clear w_dokob.
On first run of this program Store the Table control configuration
IF W_FIRST_RUN = 'X'.
CLEAR W_FIRST_RUN.
T_TAB[] = TAB_X1-COLS[].
ENDIF.
IF <FS> = cw_dokob.
W_DYNNR = '9001'.
W_DOKOB = CW_DOKOB.
ELSEIF <FS> = cw_dokob2.
W_DYNNR = '9002'.
W_DOKOB = CW_DOKOB2.
endmodule.
Thanx,
Akhil
when i m executing this piece of code,dump is being thrown with a reason that "Field symbol has not yet been assigned."
2006 Oct 24 11:15 AM
Hi,
This is because you are checking IF <FS> = cw_dokob without assigning values for field symbols.
2006 Oct 24 11:15 AM
Hi,
This is because you are checking IF <FS> = cw_dokob without assigning values for field symbols.
2006 Oct 24 11:15 AM
U need to assign value/data to Field symbol before using it.
example
ASSIGN (w_cwdokob) to <FS>.
In the above it would assign the value of variable w_cwdokob to the field-symbol.
Message was edited by: Anurag Bankley
2006 Oct 24 11:17 AM
Hi Akhil,
You haven't assigned any value to the field symbol but directly using it in a If condition.
YOu must assign some value before you use it.
Regards,
ravi
2006 Oct 24 11:17 AM
FIELD-SYMBOLS <FS> TYPE ANY.
CLEAR W_DYNNR.
clear w_dokob.
On first run of this program Store the Table control configuration
IF W_FIRST_RUN = 'X'.
CLEAR W_FIRST_RUN.
T_TAB[] = TAB_X1-COLS[].
ENDIF.
IF <FS> = cw_dokob.
W_DYNNR = '9001'.
u declared the fs fine..but u never assigned it to any varible. but u have used it in a logical expression. you need to assign a field to a fs which then will act as a pointer. look for 'ASSIGN' key word in f1 help
santhosh
2006 Oct 24 11:19 AM
Assign some structure to <FS>.
Only then the field-symbol becomes meaningful enough to be used.
regards,
Sandeep Josyula
*Mark helpful answers
2006 Oct 24 11:19 AM
you need to assign adress to the "pointer"
for example :
ASSIGN (FIELD) TO <F_FS4>.
<F_FS4> = ST_ITAB-RAST1.
2006 Oct 24 11:20 AM
Hi,
dump is due comparison of value
fields symbol before assigning .
assign fld1 to <FS>.
<b> IF <FS> = cw_dokob.</b>
W_DYNNR = '9001'.
W_DOKOB = CW_DOKOB.
<b>ELSEIF <FS> = cw_dokob2.</b>
W_DYNNR = '9002'.
W_DOKOB = CW_DOKOB2.
endmodule.
Regards
amole
2006 Oct 24 11:24 AM