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

URGENT------F4IF_INT_TABLE_VALUE_REQUEST function module

Former Member
0 Likes
807

Hi,

Could you tell me what the function module F4IF_INT_TABLE_VALUE_REQUEST does and what do the mandatory parameters mean.

Regards,

Saurabh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
774

Here is the example program for the F4 impelemting to the Selection Parameter ..

REPORT demo_dynpro_f4_help_module .

TYPES: BEGIN OF values,
         carrid TYPE spfli-carrid,
         connid TYPE spfli-connid,
       END OF values.

DATA: carrier(3) TYPE c,
      connection(4) TYPE c.

DATA: progname TYPE sy-repid,
      dynnum   TYPE sy-dynnr,
      dynpro_values TYPE TABLE OF dynpread,
      field_value LIKE LINE OF dynpro_values,
      values_tab TYPE TABLE OF values.

CALL SCREEN 100.

MODULE init OUTPUT.
  progname = sy-repid.
  dynnum   = sy-dynnr.
  CLEAR: field_value, dynpro_values.
  field_value-fieldname = 'CARRIER'.
  APPEND field_value TO dynpro_values.
ENDMODULE.

MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.

MODULE value_carrier INPUT.

  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
       EXPORTING
            tabname     = 'DEMOF4HELP'
            fieldname   = 'CARRIER1'
            dynpprog    = progname
            dynpnr      = dynnum
            dynprofield = 'CARRIER'.

ENDMODULE.

MODULE value_connection INPUT.

  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            dyname             = progname
            dynumb             = dynnum
            translate_to_upper = 'X'
       TABLES
            dynpfields         = dynpro_values.

  READ TABLE dynpro_values INDEX 1 INTO field_value.

  SELECT  carrid connid
    FROM  spfli
    INTO  CORRESPONDING FIELDS OF TABLE values_tab
    WHERE carrid = field_value-fieldvalue.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = 'CONNID'
            dynpprog    = progname
            dynpnr      = dynnum
            dynprofield = 'CONNECTION'
            value_org   = 'S'
       TABLES
            value_tab   = values_tab.

ENDMODULE.

reward points if it is usefull ...

Girish

7 REPLIES 7
Read only

Former Member
0 Likes
774

Hi,

This function module is used to bring a F4 help in the code..with out having to create a search help in SE11

check this example


TABLES: T005T.

DATA: BEGIN OF t_t005 OCCURS 0,
        land1 TYPE t005-land1,
      END OF t_t005.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
PARAMETERS: p_land1  TYPE t005-land1.

SELECTION-SCREEN COMMENT 13(35) v_text1.
SELECTION-SCREEN END OF LINE.

INITIALIZATION.
  v_text = 'Country'.
  v_text1 = ' '.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.

  REFRESH: t_t005.

  SELECT land1
         INTO TABLE t_t005
         FROM t005.


  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
*            DDIC_STRUCTURE   = 'T005'
            PVALKEY          = ' '
            retfield         = 'LAND1'
            dynpprog         = sy-repid
            DYNPNR           = sy-dynnr
            dynprofield      = 'P_LAND1'
            callback_program = sy-repid
            value_org        = 'S'
       TABLES
            value_tab        = t_t005
       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.

Thanks

Naren

Read only

0 Likes
774

same thread.

Read only

Former Member
0 Likes
774

I am not using a selection screen.

So how do I use this code?

I have now given this code in the PBO and is not working.

Do I need to create a search help exit?

Regards,

Saurabh

Read only

Former Member
0 Likes
774

Hi,

You have to give this code in a module in the event PROCESS ON VALUE-REQUEST

PROCESS ON VALUE-REQUEST.

FIELD ztable-fieldname MODULE F4.

In the module F4 call the function module..

THanks

Naren

Read only

Former Member
0 Likes
774

Hi,

the function module F4IF_INT_TABLE_VALUE_REQUEST is mainly used for giving F4 help for any field in ur report.

Mandatory Parameters are nothing but thpse fields which are compulsorily to be entered at the selection screen while executing a report.i hope u were asking abt this mandatory parameters only.

check out my code,i hav used the same func module F4IF_INT_TABLE_VALUE_REQUEST .

types: begin of ty_seg,

sector type p9025-sector,

end of ty_seg.

data: it_seg type table of ty_seg.

constants:

c_zcode TYPE dfies-fieldname VALUE 'ZCODE',

c_segment TYPE help_info-dynprofld VALUE 'PR_SECT',

c_s TYPE c VALUE 'S' .

***F4 help for segment field.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_sect.

SELECT zcode

FROM zcmt015_clevelf4

INTO TABLE it_seg

WHERE zfield = 'SECTOR'.

SORT it_seg BY sector.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = c_zcode

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = c_segment

value_org = c_s

TABLES

value_tab = it_seg

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc IS NOT INITIAL.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

I hope this helps,

******Reward points if helpful

Read only

Former Member
0 Likes
775

Here is the example program for the F4 impelemting to the Selection Parameter ..

REPORT demo_dynpro_f4_help_module .

TYPES: BEGIN OF values,
         carrid TYPE spfli-carrid,
         connid TYPE spfli-connid,
       END OF values.

DATA: carrier(3) TYPE c,
      connection(4) TYPE c.

DATA: progname TYPE sy-repid,
      dynnum   TYPE sy-dynnr,
      dynpro_values TYPE TABLE OF dynpread,
      field_value LIKE LINE OF dynpro_values,
      values_tab TYPE TABLE OF values.

CALL SCREEN 100.

MODULE init OUTPUT.
  progname = sy-repid.
  dynnum   = sy-dynnr.
  CLEAR: field_value, dynpro_values.
  field_value-fieldname = 'CARRIER'.
  APPEND field_value TO dynpro_values.
ENDMODULE.

MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.

MODULE value_carrier INPUT.

  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
       EXPORTING
            tabname     = 'DEMOF4HELP'
            fieldname   = 'CARRIER1'
            dynpprog    = progname
            dynpnr      = dynnum
            dynprofield = 'CARRIER'.

ENDMODULE.

MODULE value_connection INPUT.

  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            dyname             = progname
            dynumb             = dynnum
            translate_to_upper = 'X'
       TABLES
            dynpfields         = dynpro_values.

  READ TABLE dynpro_values INDEX 1 INTO field_value.

  SELECT  carrid connid
    FROM  spfli
    INTO  CORRESPONDING FIELDS OF TABLE values_tab
    WHERE carrid = field_value-fieldvalue.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield    = 'CONNID'
            dynpprog    = progname
            dynpnr      = dynnum
            dynprofield = 'CONNECTION'
            value_org   = 'S'
       TABLES
            value_tab   = values_tab.

ENDMODULE.

reward points if it is usefull ...

Girish

Read only

Former Member
0 Likes
774

Use POV event .

Call the Module for the field.

sytax to call module under POV,,,,,

field xx module xyz.

and inside the module call the function module 'F4IF_INT_TABLE_VALUE_REQUEST' and pass the required paramaters to it.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FABGR.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = mara

fieldname = matnr

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • VALUE = ' '

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • SELECTION_SCREEN = ' '

  • IMPORTING

  • USER_RESET =

  • TABLES

  • RETURN_TAB =

  • EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 4

  • OTHERS = 5

.

Don't forget to reward if useful...