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

Problem with

Former Member
0 Likes
490

I'm using the below function to attach the search help to 1 of my field.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = ZDISPOSITION

DYNPPROG = 'SAPLZ10_TEST'

DYNPNR = '0200'

DYNPROFIELD = P_DISP_FIELD

VALUE_ORG = 'S'

DISPLAY = 'F'

TABLES

VALUE_TAB = I_DISP

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

I my internal table I_DISP, I have only 2 fields, DISPOSITION_IND (type ZDISPOSITION) & DISP_DESC (type ZDESC). When I run my program, and click on f4, the search help display without any problem. However, when I select an entry, the DISP_DESC is displayed in my screen field instead of DISPOSITION_IND.

How can this happen since I have defined in the function parameter that the DISPOSITION_IND need to be returned to the screen field? Thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
460

Hi

generally we pass a single field internal table for the fun module

see the sample code below and do accordingly

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.

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.

if you wants to have both fields help create a search help in se11 and use with multiple fields

Regards

Anji

Read only

0 Likes
460

Hi Anji,

THanks for your reply, but previously, I was able to pass multiple fields internal table to this FM and it works well. Just that this time it's not working well and I can't seems to find any variants between my old program and this one, which I think is weird.

Read only

0 Likes
460

Hello Mil,

Try to create search help instead of using Function module,i always prefer Search help instead of F4 Function module.

You will have multiple option and use search help name in screen layout directlly.

I think there might be some change since it is working earlier and it is not working now.

check the Version management.

Thanks

Seshu

Read only

Former Member
0 Likes
460

Hi,

It seems that you have stored the return field and dynpro field names in variables and passing to function module.

In debug mode check the values stored in the variables ZDISPOSITION and P_DISP_FIELD. May be mistake lies in the values stored in these variables.

As far as multiple column F4 help is concerned, it very well works. It is not compulsory that F4 help should display only one field.

Award points if answer is helpful.

Regards,

Hema