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 is not assigned issue - method

Former Member
0 Kudos

Short dump error:

Runtime Errors GETWA_NOT_ASSIGNED

Short text

Field symbol has not yet been assigned.

error in this method comb_data

 68       <arr_return>-NETSALES = <arr_return>-NETSALES + <arr_s502
  69
  70     else.
  71 * new line to the output table
  72       clear arr_return.
  73
  74 *      assign <arr_s502>-SSOUR to <arr_return>-SSOUR.
  75            <arr_s502>-SSOUR = <arr_return>-SSOUR.
>>>>            <arr_s502>-VRSIO = <arr_return>-VRSIO.  ***error is on this line***

complete list of code in combine_data method

method COMBINE_DATA.

  • data declarions as field-symbols.

  field-symbols: <arr_return> type ZSD_S502_S503_LEVEL0, 

<arr_s502> type s502,

<arr_s503> type s503.

  • *new row as a value

data: arr_return type ZSD_S502_S503_LEVEL0.

  • data: arr_RETURN_DATA type ZSD_S502_S503_LEVEL0.

*return data is the data which is the returning parameter of this method

clear RETURN[].

Loop at me->s502_raw[] assigning <arr_s502>.

    read table return[] with key 

DATE = <arr_s502>-SPTAG

STORE = <arr_s502>-VKBUR

VRSIO = <arr_s502>-VRSIO

ZZSLSEMP = <arr_s502>-ZZSLSEMP01

  • ** key of the table

assigning <arr_return>.

if sy-subrc eq 0.

  • record exists - therefore add values

  • this should never happen in the first run!

<arr_s502>-SSOUR = <arr_return>-ssour.

<arr_s502>-VRSIO = <arr_return>-vrsio.

  • <arr_s502>-VKBUR = <arr_return>-VKBUR.

<arr_s502>-ZZSLSEMP01 = <arr_return>-zzslsemp.

<arr_s502>-SPTAG = <arr_return>-date.

<arr_return>-TOTALSALES = <arr_return>-TOTALSALES + <arr_s502>-ZZNETWR.

< else.

  • new line to the output table

clear arr_return.

  • assign <arr_s502>-SSOUR to <arr_return>-SSOUR.

<arr_s502>-SSOUR = <arr_return>-SSOUR.

       <arr_s502>-VRSIO = <arr_return>-VRSIO. ****error on this line*** 

  • move <arr_s502>-VKBUR to <arr_return>-VKBUR.

<arr_s502>-ZZSLSEMP01 = <arr_return>-ZZSLSEMP.

<arr_s502>-SPTAG = <arr_return>-date.

<arr_return>-TOTALSALES = <arr_return>-TOTALSALES + <arr_s502>-ZZNETWR.

append arr_return to return[].

endif.

endloop.

   
  Loop at me->s503_raw[] assigning <arr_s503>.

read table return[] with key

DATE = <arr_s503>-SPTAG

STORE = <arr_s503>-VKBUR

VRSIO = <arr_s503>-VRSIO

ZZSLSEMP = <arr_s503>-ZZSLSEMP02

assigning <arr_return>.

       if sy-subrc eq 0.

  • record exists - therefore add values

  • this should never happen in the first run!

<arr_s503>-SSOUR = <arr_return>-SSOUR.

<arr_s503>-VRSIO = <arr_return>-VRSIO.

  • move <arr_s503>-VKBUR to <arr_return>-VKBUR.

<arr_s503>-ZZSLSEMP02 = <arr_return>-ZZSLSEMP.

<arr_s503>-SPTAG = <arr_return>-date.

<arr_return>-TOTALSALES = <arr_return>-TOTALSALES + <arr_s503>-ZZNETWR.

else.

  • new line to the output table

clear arr_return.

<arr_s503>-VRSIO = <arr_return>-VRSIO.

  • move <arr_s503>-VKBUR to <arr_return>-VKBUR.

<arr_s503>-ZZSLSEMP02 = <arr_return>-ZZSLSEMP.

<arr_s503>-SPTAG = <arr_return>-date.

append arr_return to return[].

endif.

endloop.

endmethod...

4 REPLIES 4

Former Member
0 Kudos

HI,

I am getting value in S502_raw[] when i check in debug mode.

I am not getting any value in return[] table

If any help reg. this I will appreciate that.

Former Member
0 Kudos

HI,

I have changed in Read table ie type of arr_return from <fs> to structure and solved.

But i do not like this solution.

any one has better idea...plz throw some inputs reg. this

any way i keep this thread open for some time.

  • data declarions as field-symbols.

 field-symbols: <arr_return> type ZSD_S502_S503_LEVEL0,

   <arr_s502>   type s502,

    <arr_s503>   type s503.

  • *new row as a value

 data: arr_return type ZSD_S502_S503_LEVEL0.

 read table return[] with key

   DATE      = <arr_s502>-SPTAG

   STORE     = <arr_s502>-VKBUR

  • ** key of the table

into arr_return.

0 Kudos

Hi,

The statement

ZZSLSEMP = <arr_s503>-ZZSLSEMP02

assigning <arr_return>. assigns <arr_retun> to zzslsemp field...

wherein you are using the statement

append arr_return to return[].

That is the reason you are not getting any data into return table because arr_return is empty...

Instead of the above statement try the statement given below....

append <arr_return> to return[].

Regards,

Siddarth

Former Member
0 Kudos

HI,

Thanks for ur answer