‎2008 Jul 03 6:34 AM
Hi all,
I have implemented an ALV in OOPS concept and whenevr I am executing it I am getting a runtime error as GET WA NOT ASSIGNED
Error analysis:
You attempted to access an unassigned field symbol
(data segment 32821).
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.
Trigger Location of Runtime Error
Program SAPLSLVC
Include LSLVCF36
Row 3.231
Module type (FORM)
Module Name FILL_DATA_TABLE
3201 alv_style_align_center_top.
3202 endif.
3203
3204 append ls_lvc_data to ct_lvc_data.
3205 endif.
3206
3207 ************************************
3208 * Column per Fieldcat Entry
3209 ************************************
3210 loop at it_fcat_local assigning <ls_fcat>.
3211 clear: ls_lvc_data-href_hndl,
3212 ls_lvc_data-drdn_hndl,
3213 ls_lvc_data-style,
3214 ls_lvc_data-style2,
3215 ls_lvc_data-style3,
3216 ls_lvc_data-style4,
3217 ls_lvc_data-maxlen.
3218
3219 clear: lt_color_lvc, lt_color_slis.
3220
3221 add 1 to ls_lvc_data-col_pos.
3222
3223 if not <ls_fcat>-indx_field is initial.
3224 assign component <ls_fcat>-indx_field
3225 of structure <ls_data> to <l_field_value>.
3226 else.
3227 assign component <ls_fcat>-fieldname
3228 of structure <ls_data> to <l_field_value>.
3229 endif.
3230
>>>> macro_cell_data_get
3232 <ls_fcat>
3233 <ls_data>
3234 <l_field_value>
3235 ls_lvc_data-value.
3236
3237 *>>> new API
3238 if ir_salv_adapter is bound.
3239 clear ls_lvc_data-style.
3240
3241 * color
3242 if g_gui_type ne 1.
3243 if <ls_fcat>-key eq abap_true.
3244 ls_lvc_data-style = alv_style_color_int_key.
3245 elseif l_style_color is initial
3246 and ( <ls_fcat>-emphasize is initial or
3247 <ls_fcat>-emphasize = '$' ).
3248 if <ls_stin>-counter is initial.
3249 ls_lvc_data-style = alv_style_color_normal.
3250 else.
Please help me to sort out this issue
‎2008 Jul 03 6:36 AM
Sharan,
check you fieldcatalouge.
either you had declear fields in small letters it shoud be in caps.
Amit.
‎2008 Jul 03 6:37 AM
Hi Sharan
Can u please send your full code so that we can check . May be the problem is with ur field catalog
Regards
Hitesh
‎2008 Jul 03 6:50 AM
FORM s_build_fldctlg .
v_repid = sy-repid.
DATA lw_fldctlg TYPE lvc_s_fcat.
REFRESH i_fldctlg[].
v_cpos = 0.
* Column 1
lw_fldctlg-col_pos = v_cpos.
lw_fldctlg-row_pos = c_1.
lw_fldctlg-ref_table = 'I_OUTPUT'.
lw_fldctlg-fieldname = c_unlpt.
lw_fldctlg-coltext = 'Unloading Point'. "Unloading Point
APPEND lw_fldctlg TO i_fldctlg.
CLEAR lw_fldctlg.
* Column 2
v_cpos = v_cpos + 1.
lw_fldctlg-col_pos = v_cpos.
lw_fldctlg-row_pos = c_1.
lw_fldctlg-ref_table = 'I_OUTPUT'.
lw_fldctlg-fieldname = c_vdrloc. "Vendor Location
lw_fldctlg-coltext = text-003.
APPEND lw_fldctlg TO i_fldctlg.
CLEAR lw_fldctlg.
* Column 3
v_cpos = v_cpos + 1.
lw_fldctlg-col_pos = v_cpos.
lw_fldctlg-row_pos = c_1.
lw_fldctlg-ref_table = 'I_OUTPUT'.
lw_fldctlg-fieldname = c_nopkgs. "No of packages
lw_fldctlg-coltext = text-004.
APPEND lw_fldctlg TO i_fldctlg.
CLEAR lw_fldctlg.
* Column 4
v_cpos = v_cpos + 1.
lw_fldctlg-col_pos = v_cpos.
lw_fldctlg-row_pos = c_1.
lw_fldctlg-ref_table = 'I_OUTPUT'.
lw_fldctlg-fieldname = c_delnote. "Delivery Note
lw_fldctlg-coltext = text-005.
APPEND lw_fldctlg TO i_fldctlg.
CLEAR lw_fldctlg.
* Column 5
v_cpos = v_cpos + 1.
lw_fldctlg-col_pos = v_cpos.
lw_fldctlg-row_pos = c_1.
lw_fldctlg-ref_table = 'I_OUTPUT'.
lw_fldctlg-fieldname = c_reason. "Reason
lw_fldctlg-coltext = text-006.
APPEND lw_fldctlg TO i_fldctlg.
CLEAR lw_fldctlg.
* Column 6
v_cpos = v_cpos + 1.
lw_fldctlg-col_pos = v_cpos.
lw_fldctlg-row_pos = c_1.
lw_fldctlg-ref_table = 'I_OUTPUT'.
lw_fldctlg-fieldname = c_status.
lw_fldctlg-coltext = text-007.
APPEND lw_fldctlg TO i_fldctlg.
CLEAR lw_fldctlg.
ENDFORM. " S_BUILD_FLDCTLGThis is my code.
When i execute it without any values in my final table the ALV is getting displayed.
But when I put some data in the final table I am getting this error
‎2008 Jul 03 6:54 AM
make sure dat constants which u r using to specify field names hold names in CAPS..i.e all field names should be in capital letters.
if dis doesnt help, try replacing constants by actual field names in capital letters and enclosed in single quotes..