Application Development and Automation 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: 
Read only

replacing 'HELP_VALUES_GET' with CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUES

Former Member
0 Likes
986

FORM currency_value_help_display.

CONSTANTS:

lc_table_name_currency LIKE help_info-tabname VALUE 'TCURC',

lc_field_name_currency LIKE help_info-fieldname VALUE 'WAERS'.

  • Start of NSN P20 upgrade Change - 20110708

data : lv_tab type TABLE OF help_info.

DATA : lv_field TYPE dfies-fieldname ,

lv_tabname type tabname.

DATA: li_return type ddshretval occurs 0 with header line,

li_help_fields like dfies occurs 0 with header line.

lv_field = lc_field_name_currency.

lv_tabname = LC_TABLE_NAME_CURRENCY.

  • CALL FUNCTION 'HELP_VALUES_GET'

  • EXPORTING

  • DISPLAY = FALSE

  • FIELDNAME = LC_FIELD_NAME_CURRENCY

  • TABNAME = LC_TABLE_NAME_CURRENCY

  • IMPORTING

  • SELECT_VALUE = P_WAERS

  • EXCEPTIONS

  • NO_HELP_FOR_FIELD = 1

  • OTHERS = 2.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

DDIC_STRUCTURE = lv_tabname

retfield = lv_field

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

  • VALUE_ORG = 'C'

  • MULTIPLE_CHOICE = ' '

DISPLAY = FALSE

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

value_tab = lv_tab

  • FIELD_TAB =

RETURN_TAB = li_return

  • DYNPFLD_MAPPING =

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc EQ 0.

IF li_return[] is not Initial.

Read table li_return index 1.

P_WAERS = li_return-fieldval.

ENDIF.

ENDIF.

  • End of NSN P20 upgrade Change - 20110708

IF sy-subrc > 1.

MESSAGE x083(eip) WITH '012'.<=== HERE I AM GETTING ERROR THAT SY-SUBRC >1 .So please help me how to replace the parameters in f4if_int_table_value_request.PLEASE GUIDE ME.

ENDIF.

ENDFORM. "currency_value_help_display

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
792

Hi Suhas,

Just add a select query before the FM call and correct the type of the internal table lv_tab.

Data: lv_tab type table of tcurc.
  SELECT * FROM tcurc INTO TABLE lv_tab.

FORM currency_value_help_display.

CONSTANTS:

lc_table_name_currency LIKE help_info-tabname VALUE 'TCURC',

lc_field_name_currency LIKE help_info-fieldname VALUE 'WAERS'.

  • Start of NSN P20 upgrade Change - 20110708

data : lv_tab type TABLE OF help_info.

DATA : lv_field TYPE dfies-fieldname ,

lv_tabname type tabname.

DATA: li_return type ddshretval occurs 0 with header line,

li_help_fields like dfies occurs 0 with header line.

lv_field = lc_field_name_currency.

lv_tabname = LC_TABLE_NAME_CURRENCY.

  • CALL FUNCTION 'HELP_VALUES_GET'

  • EXPORTING

  • DISPLAY = FALSE

  • FIELDNAME = LC_FIELD_NAME_CURRENCY

  • TABNAME = LC_TABLE_NAME_CURRENCY

  • IMPORTING

  • SELECT_VALUE = P_WAERS

  • EXCEPTIONS

  • NO_HELP_FOR_FIELD = 1

  • OTHERS = 2.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

DDIC_STRUCTURE = lv_tabname

retfield = lv_field

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

  • VALUE_ORG = 'C'

  • MULTIPLE_CHOICE = ' '

DISPLAY = FALSE

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

value_tab = lv_tab

  • FIELD_TAB =

RETURN_TAB = li_return

  • DYNPFLD_MAPPING =

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc EQ 0.

IF li_return[] is not Initial.

Read table li_return index 1.

P_WAERS = li_return-fieldval.

ENDIF.

ENDIF.

  • End of NSN P20 upgrade Change - 20110708

IF sy-subrc > 1.

MESSAGE x083(eip) WITH '012'.<=== HERE I AM GETTING ERROR THAT SY-SUBRC >1 .So please help me how to replace the parameters in f4if_int_table_value_request.PLEASE GUIDE ME.

ENDIF.

ENDFORM. "currency_value_help_display

5 REPLIES 5
Read only

Former Member
0 Likes
792

Hi,

the parameter table

value_tab = lv_tab

is wrong, lv_tab is empty.

Regards,

Klaus

Read only

Former Member
0 Likes
792

HI AS THE VALUE_TAB IS MANDATARY FIELD SO,SO HOW TO PASS VALUE TO PARAMETER.

Read only

Former Member
0 Likes
793

Hi Suhas,

Just add a select query before the FM call and correct the type of the internal table lv_tab.

Data: lv_tab type table of tcurc.
  SELECT * FROM tcurc INTO TABLE lv_tab.

Read only

Former Member
0 Likes
792

hi thanks

Read only

Former Member
0 Likes
792

helpfull