Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Field-Symbol Problem

Former Member
0 Kudos

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."

1 ACCEPTED SOLUTION

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

This is because you are checking IF <FS> = cw_dokob without assigning values for field symbols.

8 REPLIES 8

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

This is because you are checking IF <FS> = cw_dokob without assigning values for field symbols.

Former Member
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Assign some structure to <FS>.

Only then the field-symbol becomes meaningful enough to be used.

regards,

Sandeep Josyula

*Mark helpful answers

Former Member
0 Kudos

you need to assign adress to the "pointer"

for example :

ASSIGN (FIELD) TO <F_FS4>.

<F_FS4> = ST_ITAB-RAST1.

Former Member
0 Kudos

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