Application Development 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: 

Problem in getting data form serch help .

naval_bhatt4
Contributor
0 Kudos

Hi experts ,

i am using function module F4IF_FIELD_VALUE_REQUEST to ge the values in a button click .

i want to fill the values to be filled in the screen fields automatically when i click of a perticular line.

please help me out.

thanks in advance .

Naval bhatt

5 REPLIES 5

Former Member
0 Kudos

Hi,

DATA : v_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.

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

**--Value help for service provider

PERFORM value_help_serprovider USING c_add c_low.

FORM value_help_serprovider USING p1_field p1_text.

SELECT werks INTO TABLE i_t001w

FROM t001w.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WERKS'

dynpprog = ws_repid

dynpnr = sy-dynnr

value_org = 'S'

TABLES

value_tab = i_t001w

return_tab = v_return

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.

ENDIF.

This the main point to get the selected line into selection screen.

s_plant1-low = v_return-fieldval.

ENDFORM. " Value_Help_Serprovider

0 Kudos

in this function module it just select one value .

i want more than one value ..

i am using function module .

HELP_VALUES_GET_RETURN_VALUES

DATA:

sel_tab TYPE TABLE OF shvalue,

all_tab TYPE TABLE OF shvalue,

already_sel_vals TYPE TABLE OF help_info-fldvalue.

CALL FUNCTION 'HELP_VALUES_GET_RETURN_VALUES'

EXPORTING

cucol = 1

curow = 1

display = ' '

tabname = 'ZOBJECT_TABLE'

selectfield = 'OBEJECT'

titel = 'Objectives'

write_selectfield_in_colours = 'X'

show_all_values_at_first_time = ' '

TABLES

selection_tab = sel_tab

all_values_selection_tab = all_tab

user_marked_values = already_sel_vals

  • structure_of_vals =

EXCEPTIONS

table_not_in_ddic = 1

no_selectfield_given = 2

error_from_database = 3

more_then_one_selectfield = 4

no_selectfield = 5

no_tablefields_in_dictionary= 6

OTHERS = 7.

could you please tell me why the values are not coming in the return tables "sel_tab", "all_tab" ,"already_sel_vals".

0 Kudos

i am calling this program in a BADI and i have to update the fields in the screen of the main program which is calling this BADI (HRHAP00_ENHANCE_FREE).

This BADI is called at the button click .

ZOBJECT_TABLE is a Z- table with values out which we have to select the value.

and the value should be filled in the screen field as we select the record from the help.

please suggest me according to the present scenario .

Former Member
0 Kudos

Hi,

Given Example Definatelly work.

TYPES: BEGIN OF TY_F4HELP,

ENAME TYPE PA0001-ENAME,

PERNR TYPE PA0001-PERNR,

END OF TY_F4HELP.

Data: IT_F4HELP TYPE STANDARD TABLE OF TY_F4HELP WITH HEADER LINE.

  • Add F4 in Parameter field Ename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_ENAME.

DATA: IT_RETURN_TAB TYPE ddshretval OCCURS 0 WITH HEADER LINE . " Return table for F4 help

SELECT DISTINCT ename pernr

FROM PA0001

INTO TABLE IT_F4HELP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'ENAME'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_F4HELP

RETURN_TAB = it_return_tab

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

READ TABLE it_return_tab INDEX 1.

IF SY-SUBRC <> 0.

ENDIF.

IF sy-subrc = 0.

MOVE it_return_tab-fieldval TO P_ename.

ENDIF.

CLEAR: it_return_tab.

*End of add F4 in Parameter field Ename.

Regards,

Mehul Shah.

naval_bhatt4
Contributor
0 Kudos

Not answered ....