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

F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Likes
2,082

Hi All,

I dont get any values returned when I use the FM below,

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = LW_RETFIELD ->field for the f4 help dislpay

  • PVALKEY = ' '

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = LTB_VALUES ->table with values for F4 help display

  • FIELD_TAB =

RETURN_TAB = LTB_RETURN

  • DYNPFLD_MAPPING =

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

I am not getting any exception. But when I click on the F4 help, there are no values displayed. The F4 help is blank. I dont know if I have to pass anything more.

The field that I need to display in the F4 help is not a dictionary field.

Please let me know if anyone know why this is happening.

Thanks,

Sruthy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,796

hi sruthi,

concept is: get the data from database table into int table and pass this table to value_table in the function module.

see below sample code...

SELECT werks prctr matgp FROM zprctr INTO TABLE i_matgp.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'S_MATGP_LOW'

pvalkey = 'S_MATGP-LOW'

dynpprog = p_v_syrepid "sy-repid

dynpnr = sy-dynnr

dynprofield = 'S_MATGP-LOW'

value_org = 'S'

callback_program = p_v_syrepid "sy-repid

TABLES

value_tab = i_matgp

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

and please do the changes accordingly then ur problme will solve.

thanks,

maheedhar

16 REPLIES 16
Read only

Former Member
0 Likes
1,797

hi sruthi,

concept is: get the data from database table into int table and pass this table to value_table in the function module.

see below sample code...

SELECT werks prctr matgp FROM zprctr INTO TABLE i_matgp.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'S_MATGP_LOW'

pvalkey = 'S_MATGP-LOW'

dynpprog = p_v_syrepid "sy-repid

dynpnr = sy-dynnr

dynprofield = 'S_MATGP-LOW'

value_org = 'S'

callback_program = p_v_syrepid "sy-repid

TABLES

value_tab = i_matgp

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

and please do the changes accordingly then ur problme will solve.

thanks,

maheedhar

Read only

0 Likes
1,796

Hi Maheedhar,

I did the changes as u had said but the F4 help still shows no output.

I am not selecting from the database.

I have defined the field locally as i am passing a couple of fixed values to the F4 help.

TYPES: BEGIN OF TY_VALUES,

XXXX(20) TYPE C,

END OF TY_VALUES.

For the field XXX, I need an F4 help.

Thansk,

Sruthy

Read only

0 Likes
1,796

Hi,

Check the below code.

SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME.

PARAMETERS: p_date(10) TYPE c.

SELECTION-SCREEN: END OF BLOCK main.

  • For Run date

DATA: BEGIN OF it_laufd OCCURS 0,

laufd LIKE reguh-laufd, "Run date

END OF it_laufd.

*----


  • Validation Section

*----


INITIALIZATION.

SELECT DISTINCT laufd FROM reguh INTO TABLE it_laufd.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_date.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'LAUFD'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_DATE'

value_org = 'S'

TABLES

value_tab = it_laufd

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Read only

0 Likes
1,796

Sruthy,

Change the TYPES declaration as shown below

TYPES: BEGIN OF TY_VALUES,

<b>XXXX TYPE CHAR20,</b>

END OF TY_VALUES.

Also check this thread

Message was edited by:

Rajesh

Read only

0 Likes
1,796

Hi Rajesh,

Thank you so much...Its working now!!

The heading is displayed as "Char20". Can you tell me how to change that?

Thanks,

Sruthy

Read only

0 Likes
1,796

Hi,

<i>The heading is displayed as "Char20". Can you tell me how to change that?</i>

To change header use the link i provided earlier

Regards,

Samson Rodrigues.

Read only

0 Likes
1,796

If you want to change the description then either populate the <b>TABLES</b> parameter <b>FIELD_TAB</b> or change the declaration of the internal table so that it refers to a dictionary field which has a description of ur choice.

Read only

Former Member
0 Likes
1,796
Read only

Former Member
0 Likes
1,796

Hi,

Go thru this solved thread.

Regards,

Samson Rodrigues.

Read only

0 Likes
1,796

Hi Samson,

I have defined a local internal table which has the field I need to have displayed in the F4 help.

I passed the values to the table as shown below,

MOVE 'ABCD' TO LT_VALUES-VALUE.

APPEND LWA_ID_VALUES TO LT_VALUES.

MOVE 'EFGH' TO LT_VALUES-VALUE.

APPEND LWA_ID_VALUES TO LT_VALUES.

I then passed this table, LT_values to the 'VALUE_TAB' in the function module.

Do I have to use the ''Field Tab" option? if yes, since it is of type, DFIES, can you tell me which fields have to be populated as there are so many fields in DFIES.

Thanks,

Sruthy

Read only

Former Member
0 Likes
1,796

hi,

Where you call this FM.

You should call this FM under PROCESS ON VALUE-REQUEST

Check this Sample Code,

PROCESS ON VALUE-REQUEST.

FIELD D0200_FIELD_TAB-BUFFER MODULE D0200_VALUE_REQU.

MODULE d0200_value_requ.

"call the FM here.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = tabname

fieldname = fname

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

  • dynpprog = progname

  • dynpnr = dynnr

  • dynprofield = ' '

  • stepl = dynp_stepl

value = value_bef_f4

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

callback_program = progname

callback_form = 'CALLBACK_F4'

TABLES

return_tab = return_tab

EXCEPTIONS

field_not_found = 1

no_help_for_field = 2

inconsistent_help = 3

no_values_found = 4

OTHERS = 5.

....

........

..........

ENDMODULE. "d0200_value_requ

regards,

Read only

0 Likes
1,796

Hi all,

I am using this Func module under the veent, POV. It is a module pool program.

Thanks,

Sruthy

Read only

Former Member
0 Likes
1,796

Hi,

call this FM under....

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_orderno-low.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'ORDERNO'

dynpprog = 'ZTEST'

dynpnr = '1010'

dynprofield = 'S_ord-LOW'

TABLES

value_tab = orders

EXCEPTIONS

parameter_error = 1

NO_VALUES_FOUND = 2

others = 3.

Regards,

Read only

Former Member
0 Likes
1,796

Hi Sruthi,

if not mistaken try to declare ur Internal table with Data statement.

in the below code u have declared with Types statement.

If ur Declare with Type only the structure is created no memory is created so no values will be stored in the Internal Table.

use

data:begin of itab,

field(300),

end of itab.

instead of

types:begin of itab,

field(300),

end of itab.

Read only

0 Likes
1,796

Hi,

I have defined an internal table using DATA:.

I just defined the structure using TYPES.

Thanks,

Sruthy

Read only

Former Member
0 Likes
1,796

Hi Sruthy,

Follw this Procedure.

If you are writing the Report program do the following in the Event "at selection-screen on value Request" or if you are writing the Code for Module pool program do the following in the Event "Process on value request".

1.Select the data from the database table that you want to display in the F4 Help.

2. Pass this internal table in the function module 'F4IF_INT_TABLE_VALUE_REQUEST'

Reward if it is helpful.

Regards,

Ashok.