Skip to Content
0
Former Member
Jun 17, 2015 at 10:18 AM

Use of field_tab in F4IF_INT_TABLE_VALUE_REQUEST

1477 Views

if i'm passing the itab with no standard columns, then how to modify the column heading in f4 help window?

getting the error- ASSIGN WITH LENGTH 0 in program 'SAPLSDH4'.

My CODE:-

PARAMETERS:

p_name TYPE char10,

p_date TYPE dats.

types: BEGIN OF ty_f4help,

name TYPE char10,

date TYPE dats,

END OF ty_f4help.


DATA : it_f4help TYPE TABLE OF ty_f4help,

wa_f4help TYPE ty_f4help .



DATA:

it_dynpmap TYPE STANDARD TABLE OF dselc,

wa_map TYPE dselc.

DATA: lw_field_tab TYPE dfies,

li_field_tab type STANDARD TABLE OF dfies.



wa_map-fldname = 'F0001'. "Field for Position 1

wa_map-dyfldname = 'P_name'.

APPEND wa_map TO it_dynpmap.

wa_map-fldname = 'F0002'. "Field for Position 2

wa_map-dyfldname = 'P_date'.

APPEND wa_map TO it_dynpmap.


lw_field_tab-fieldname = 'F0001'.

lw_field_tab-position = 1.

lw_field_tab-fieldtext = 'F0001'. "Field name you want to give

lw_field_tab-reptext = 'Name'. "Field name you want to give

APPEND lw_field_tab TO li_field_tab.

lw_field_tab-fieldname = 'F0002'.

lw_field_tab-position = 2.

lw_field_tab-fieldtext = 'F0002'. "Field name you want to give

lw_field_tab-reptext = 'Date'. "Field name you want to give

APPEND lw_field_tab TO li_field_tab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'name'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_name'

value_org = 'S'

TABLES

value_tab = it_f4help

dynpfld_mapping = it_dynpmap

return_tab = it_return_tab

field_tab = li_field_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc = 0.

* Do nothing

ENDIF.