Skip to Content
0
Former Member
Apr 16, 2010 at 03:52 AM

problem with field catalog

46 Views

Hi

I 'm getting correct values in the final internal table i_outtab .But whenpass this Internal table into the REUSE_ALV_GRID_DISPLAy , i'm not getting the correct value for one column . it is taking values from the preceeding column .

The following code shows the field catalog im populating

PERFORM f_build_table USING:

c_pname1 lc_pname1_txt c_space c_space,

c_pname2 lc_pname2_txt c_space c_space,

c_pname3 lc_pname3_txt c_space c_space,

c_ernam lc_ernam_txt c_ernam c_vbmtv,

c_pernr lc_zvpartner c_pernr c_vbpa.

FORM f_build_table USING p_var1 p_var2 p_var3 p_var4.

CONSTANTS: lc_l TYPE c VALUE 'L'.

wa_fieldcat-fieldname = p_var1.

wa_fieldcat-seltext_l = p_var2.

wa_fieldcat-seltext_m = p_var2.

wa_fieldcat-col_pos = 0.

wa_fieldcat-ddictxt = lc_l.

wa_fieldcat-no_convext = space.

IF p_var3 NE c_space.

wa_fieldcat-ref_tabname = p_var4 .

wa_fieldcat-ref_fieldname = p_var3.

ENDIF.

" Start of addition HPQC 1757, USBILJ00

IF p_var1 EQ c_zcst_kwert OR

p_var1 EQ c_zv6d_kwert. "Set the data type

wa_fieldcat-datatype = 'CURR'.

wa_fieldcat-inttype = 'P'.

wa_fieldcat-intlen = 13.

ENDIF.

IF p_var1 EQ c_zsmr_kbetr. "Set the data type

wa_fieldcat-datatype = 'CURR'.

wa_fieldcat-inttype = 'P'.

wa_fieldcat-intlen = 14.

ENDIF.

" End of addition HPQC 1757, USBILJ00

  • Start of add USGUMR00

IF p_var1 EQ c_zbacko OR

p_var1 EQ c_zvoidh. "Set the data type

wa_fieldcat-datatype = 'DATS'.

wa_fieldcat-inttype = 'D'.

wa_fieldcat-intlen = 8.

ENDIF.

  • End of Addition, USGUMR00

APPEND wa_fieldcat TO i_fieldcat.

CLEAR wa_fieldcat.

ENDFORM. " F_BUILD_FIELD_CATALOG

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_interface_check = ' '

i_callback_program = lv_repid

i_callback_user_command = c_f_user_command

i_callback_pf_status_set = c_f_set_pf_status

is_layout = wa_layout

it_fieldcat = i_fieldcat

it_excluding = i_excluding

i_callback_html_top_of_page = 'F_HTML_TOP_OF_PAGE'

i_save = lv_save

is_variant = wa_variant2

it_events = i_events

it_event_exit = i_event_exit

TABLES

t_outtab = i_outtab

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • No required processing.

ENDIF.

but i'm not getting values for the last column which i have passedin to the field catalog . But i can see the correct values in the i_outtab which is my final internal table .

There is some problem in the field catalog .

I have checked the data declarations and constant declarations . I could not figure out the bug .

So Can anybody help me in fixng this issue .

Thanks in advance

pavan