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: 

f4 needed for me on my selection screen

Former Member
0 Kudos

Hi

could any one help me in making f4 for my selections screen my requirement is as follows

parameters : p_lname type p0002-nachn.

my selection screen:

last name:

for the last name when i press F4 i need to get only last names for all pernrs and repitions should not be displayed

please help with code

points rewarded every useful answer

Regards

sachin

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

Here is the code.

TYPES: BEGIN OF ty_nachn,

nachn TYPE pa0002-nachn,

END OF ty_nachn.

DATA: t_nachn TYPE STANDARD TABLE OF ty_nachn.

PARAMETERS: p_nachn TYPE pa0002-nachn.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_nachn.

SELECT nachn

FROM pa0002

INTO TABLE t_nachn.

SORT t_nachn BY nachn.

DELETE ADJACENT DUPLICATES FROM t_nachn COMPARING nachn.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'NACHN'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'P_NACHN'

value_org = 'S'

TABLES

value_tab = t_nachn.

Please assign points.

7 REPLIES 7

Former Member
0 Kudos

hi use this.

Put values in table it_year.

important: type of fields of table it_year shpuld be in refrence with some table.

use delete adjecent duplicate to delete duplicate entries.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR: s_year-low.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'G_YEAR'

  • PVALKEY = ' '

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'S_YEAR'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

value_org = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

TABLES

value_tab = it_year

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

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.

reward if useful

Former Member
0 Kudos

Hi,

Use the below code.

tables: P0002, PA0002.

parameters : p_lname type p0002-nachn.

data: begin of itab occurs 0,

lname like p0002-nachn,

end of itab.

initialization.

select distinct nachn from pa0002 into table itab.

at selection-screen on value-request for p_lname.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'LNAME'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_LNAME'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = ITAB

  • RETURN_TAB = 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.

Former Member
0 Kudos

HI,

AT SELECTION-SCREEN ON VALUE-REQUEST FOR

p_file[UR FIELD OR FILENAME] .

incase u need it for filE USE fm F4_FILENAME.

REWARD IF USEFUL

MANO

Former Member
0 Kudos

if it is field use FM,

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

reward if useful

mano

Former Member
0 Kudos

Hi,

U can use the following code.

data: begin of i_pernr,

nachn like pa0002-nachn,

end of i_pernr.

DATA: t_return1 LIKE ddshretval OCCURS 0 WITH HEADER LINE.

at selection-screen on value-request for p_lname.

select distinct nachn from pa0002 into table itab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'NACHN'

value_org = 'S'

TABLES

value_tab = i_pernr

return_tab = t_return1.

p_lname = t_return1-fieldval.

if it is helpfull pls reward pts.

Regards

Srimanta

Former Member
0 Kudos

U CAN DO AS SAID BY EVERYBODY IN FORUM ALSO

U CAN USE MATCH CODE OBJECTS LIKE

parameters : p_lname type p0002-nachn matchcode object (search_help).

go to se11 and define a search help

Former Member
0 Kudos

hi

Here is the code.

TYPES: BEGIN OF ty_nachn,

nachn TYPE pa0002-nachn,

END OF ty_nachn.

DATA: t_nachn TYPE STANDARD TABLE OF ty_nachn.

PARAMETERS: p_nachn TYPE pa0002-nachn.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_nachn.

SELECT nachn

FROM pa0002

INTO TABLE t_nachn.

SORT t_nachn BY nachn.

DELETE ADJACENT DUPLICATES FROM t_nachn COMPARING nachn.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'NACHN'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'P_NACHN'

value_org = 'S'

TABLES

value_tab = t_nachn.

Please assign points.