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: 

How to use fieldtab with Function Module F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Kudos

Hi,

I'm using the function module F4IF_INT_TABLE_VALUE_REQUEST to build a matchcode in a selection screen parameter.

The internal table that I use have 3 fields:

GROUPID like APQI-GROUPID,

CREDATE like APQI-CREDATE,

STATE type string.

STATE is not in ABAP dictionary, so the function doesn't show this field. I need this field having field label 'STATUS'

I have tried to use table FIELDTAB, but I cannot resolv the problem.

Can anyone help me?

Kind Regards

3 REPLIES 3

Former Member
0 Kudos

Hi

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.

Regards

Anji

Former Member
0 Kudos

Hi,

Following steps should be followed for implementing F4 HELP :-

The Function Module used for this purpose : ‘F4IF_INT_TABLE_VALUE_REQUEST’

AT SELECTION-SCREEN ON VALUE-REQUEST FOR <INPUT-FIELD NAME>

  • Populate internal table with value(s) that you want on request.(T_INT)

  • Building the Structure of the Seach Help.

tab-tabname = 'YXXXXX'. (Name of the table)

tab-fieldname = 'FXXXXX'. (Name of the field)

APPEND tab. (type dfies )

  • Function Used to provide Search Help.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'FXXXXX'

dynpprog = sy-repid

dynpnr = sy-dynnr

window_title = 'Function' (Window Title)

TABLES

value_tab = t_int

field_tab = tab.

<b>reward points if useful.</b>

regards,

Vinod Samuel.

Former Member
0 Kudos

Hi Mayte,

Check program RSWNSENDMAIL1 to know how FM F4IF_INT_TABLE_VALUE_REQUEST works.

Hope it helps.

Lokesh

PS. Please reward helpful posts.