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: 

You attempted to access an unassigned field symbol

Former Member
0 Kudos

Hi experts,

My code is as below.

*data declaration

types begin of ty_final.

         include structure zcla_star.

field-symbols : <fs_final> type ty_final


ls_cla      type zcla_star,.


*Logic


clear lv_betrw.

       lv_betrw = ls_cla-tax_amt.

       if lv_betrw is not initial.

         <fs_final> = ls_cla.-------------------------> runtime error

         <fs_final>-amt_type = 'T'.

         append <fs_final> to lt_final.

       endif.


This error may occur if

- You address a typed field symbol before it has been set with

   ASSIGN

- You address a field symbol that pointed to the line of an

   internal table that was deleted

- You address a field symbol that was previously reset using

   UNASSIGN or that pointed to a local field that no

   longer exists

- You address a global function interface, although the

   respective function module is not active - that is, is

   not in the list of active calls. The list of active calls

   can be taken from this short dump.

can you please let me know the reaason..?

thanks in advance

regards

niru

4 REPLIES 4

Former Member
0 Kudos

HI,

field symbol we have to assign otherwise it will return the short dump to avoid you have to write the code.

without assign we can't use them.

if <fs_final> is not assingned.

exit.

Juwin
Active Contributor
0 Kudos

Where is the assign statement for <fs_final>?

Thanks,

Juwin

rajkumarnarasimman
Active Contributor
0 Kudos

Hi..

Use Assign statement as like below. Else Field not assigned dump will throw.

ASSIGN ls_cla to <fs_final>


Regards


Rajkumar Narasimman

Former Member
0 Kudos

Hi NK,

<fs_final> = ls_cla.

         <fs_final>-amt_type = 'T'.


Replace it with


assign ls_cla to <fs_final>.

assign 'T' to <fs_final>-amt_type.


Regards,

Raju