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: 

Currency field makes dump when I wrote something on ALV.

Former Member
0 Kudos

Hi gurus!

I just faced a problem with ALV.

I'm using source code as below.

The point is blue one.

When I add a row and write something on 'ZINVAMT' field with 'CFIELDNAME' and press enter, dump occurs.

And when I use 'CURRENCY', dump is not occrued.

I'm using

  CALL METHOD g_grid->refresh_table_display.

method after add a row.

Thanks for your reply.

Field Catalog code

PERFORM fill_field_category_detail USING :

      'S' 'FIELDNAME'   'ZINVAMT',

      ' ' 'COLTEXT'     'INV. AMT',

*      ' ' 'REF_TABLE'   'ZMM223',

*      ' ' 'REF_FIELD'   'ZINVAMT',

      ' ' 'EDIT'        'X',

*      ' ' 'CFIELDNAME'  'ZWAERS',

*      ' ' 'CURRENCY'    'USD',

      'E' 'OUTPUTLEN'   '11',

FORM fill_field_category_detail USING :

  DATA l_col(40).
  FIELD-SYMBOLS <fs>.
  CONCATENATE 'GS_FCAT-' p_fname  INTO l_col.
  ASSIGN      (l_col)         TO       <fs>.
  MOVE         p_con          TO       <fs>.

  IF p_gub = 'E'.
    APPEND gs_fcat TO gt_fieldcat.
  ENDIF.

error message

Runtime Errors         GETWA_NOT_ASSIGNED

  Error in the ABAP Application Program

  The current ABAP program "CL_GUI_ALV_GRID===============CP" had to be
   terminated because it has
  come across a statement that unfortunately cannot be executed.

You attempted to access an unassigned field symbol
(data segment 32782).

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.

If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:

"GETWA_NOT_ASSIGNED" " "
"CL_GUI_ALV_GRID===============CP" or "CL_GUI_ALV_GRID===============CM03B"
"SPLIT_GOOD_AND_BAD"

If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:

1. The description of the current problem (short dump)

    To save the description, choose "System->List->Save->Local File
(Unconverted)".

2. Corresponding system log

    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".

3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
    In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".

4. Details about the conditions under which the error occurred or which
actions and input led to the error.

  209

  210 *   If field has not DDIC referencen

  211     if ls_fieldcat-ref_table is initial.

  212 *--   Formal field check without DDIC reference

>>>>>       call method me->formal_field_check_no_ddic

  214         exporting

  215           i_currency    = <l_currency>

  216           i_value       = ls_cells-value

  217           i_row_id      = ls_cells-row_id

  218           i_tabix       = l_tabix

  219           is_fieldcat   = ls_fieldcat

  220         importing

  221           eflg_invalid  = eflg_invalid

  222         changing

  223           c_field       = <l_field>

  224           ct_good_cells = et_good_cells

  225           ct_mod_cells  = et_mod_cells.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You have a mismatch in the fields you have in internal table and the fieldcatlog you have populated.

Make sure all the fields are in Fieldcatlog and vice-versa.

4 REPLIES 4

Former Member
0 Kudos

Hi,

you can use

*  FIELDCATALOG-DATATYPE = 'CURR'.

in your field catalog.

Avirat

Former Member
0 Kudos

Just Pass Variable &

don't pass pointer easily your solution is done.

store your data in local variable & pass..

Former Member
0 Kudos

You have a mismatch in the fields you have in internal table and the fieldcatlog you have populated.

Make sure all the fields are in Fieldcatlog and vice-versa.

Saha_Arpan
Explorer
0 Kudos

OK just one error, your way of doing it via field symbol is fine:

Always pass the reference table, field, data type, currency table & field, in case you want something more than just display functionality in your ALV.

For this fill the field catalog structure in exactly the same way as 'LVC_FIELDCATALOG_MERGE' does (Use F4 help if I have messed up the name )