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

F4 help for select options.

Former Member
0 Likes
1,591

Hi all,

I got a requirement from client to creat f4 help for select-options field.

The field is APNAM from table CATSDB(Data base table for time sheet).

It has used in CADO standard transaction.

Please tell me the solution.

Thanks,

Naveen.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,486

APNAM is just the username , you can get it from table USR01

no need of writing special code for that , just declare like this

tables : usr01.
select-options : s_apnam  for usr01-bname.

Hi all,

I got a requirement from client to creat f4 help for select-options field.

The field is APNAM from table CATSDB(Data base table for time sheet).

It has used in CADO standard transaction.

Please tell me the solution.

Thanks,

Naveen.

12 REPLIES 12
Read only

Former Member
0 Likes
1,486

hi

F4IF_FIELD_VALUE_REQUEST u use this function module on ur field it completes ur work

for f4 help we use this function modules

F4IF_INT_TABLE_VALUE_REQUEST Display internal table as search help (documented in SAP)

F4IF_INT_VALUE_REQUEST Display internal table as search help (documented in SAP)

Message was edited by:

sunil kumar

Read only

Former Member
0 Likes
1,486

Hi,

Go through the test program.

REPORT Ztest_HELP .

TABLES : MARA.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS : P_MATNR(10) TYPE C.

SELECTION-SCREEN END OF BLOCK B1.

DATA : BEGIN OF ITAB OCCURS 0,

MATNR TYPE MATNR,

END OF ITAB.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.

SELECT MATNR

FROM MARA

INTO TABLE ITAB

UP TO 10 ROWS.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'MATERIAL NUMBER'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_MATNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = ITAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

reward if useful.

Regards,

Anji

Read only

Former Member
0 Likes
1,486

See the following ex:

TYPES: BEGIN OF TY_MBLNR,

MBLNR LIKE MKPF-MBLNR,

END OF TY_MBLNR.

DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.

data: it_ret like ddshretval occurs 0 with header line.

At selection-screen on value-request for s_mat-low.

Select MBLNR from mkpf into table it_mblnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'MBLNR'

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_MBLNR

  • FIELD_TAB =

RETURN_TAB = IT_RET

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

IF SY-SUBRC = 0.

read table it_ret index 1.

move it_ret-fieldval to S_mat-low.

ENDIF.

At selection-screen on value-request for s_mat-high.

Select MBLNR from mkpf into table it_mblnr.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

RETFIELD = 'MBLNR'

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = IT_MBLNR

  • FIELD_TAB =

RETURN_TAB = IT_RET

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

IF SY-SUBRC = 0.

read table it_ret index 1.

move it_ret-fieldval to S_mat-high.

ENDIF.

Read only

Former Member
0 Likes
1,487

APNAM is just the username , you can get it from table USR01

no need of writing special code for that , just declare like this

tables : usr01.
select-options : s_apnam  for usr01-bname.

Read only

0 Likes
1,486

Thanks for reply chandrasekar.

I have tried for usr01-bname.But it is not giving f4 help

Read only

0 Likes
1,486

use this

tables : usr02.
select-options : s_apnam  for usr02-bname.

Read only

0 Likes
1,486

Thanks chandrasekar.

It is giving the f4 help.But the field apnam is 'person who approved the data'.

for my requirement the client has given some test data.when i use usr02 table i could not find some fields which the client has given.

Thanks,

Naveen.

Read only

0 Likes
1,486

Hi Naveen,

Please let me know where can i find that field inm transaction CADO

Read only

0 Likes
1,486

Hi chandrashekar

Thanks for reply.The field is not there in cado roport.

I have copied the transaction as zcado as per client requirement and added apnam field from catsdb table in the selection screen.

Read only

former_member404244
Active Contributor
0 Likes
1,486

Hi,

do like this...This is enough

select-options : s_apnam for usr01-bname.

Regards,

nagaraj

Read only

Former Member
0 Likes
1,486

it has not been answared

Read only

Clemenss
Active Contributor
0 Likes
1,486

Hi naveen,

in data dictionary (SE11), create search help: Enter Table name, field name, set import and export for the field, activate. It's easy.

Then

SELECT-OPTIONS selcrit FOR f ... MATCHCODE OBJECT <name if search help>

Regards,

Clemens