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

Code for F4 in Dialog Program

Former Member
0 Likes
1,713

Hi,

How to get f4 in dialog programs?

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,170

one of the examples of F4 help.

Parameters file LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = repid

IMPORTING

file_name = file.

Thanks,

siddu

5 REPLIES 5
Read only

Former Member
0 Likes
1,170

Create a search help in se11, and then attach it to the particular field in the screen editor.

Regards,

sasi

Read only

Former Member
0 Likes
1,170

Hi,

Data : begin of irejcode occurs 0,
        descr like yyw013-descr,
        code like yyw013-code,
       end of irejcode.
select * from yyw013 into corresponding fields of table irejcode
                             where codetype = '0008'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         = ' '
    RETFIELD               = 'ITAB-REJCODE'
*   PVALKEY                = ' '
   DYNPPROG               =  SY-REPID
   DYNPNR                 =  SY-DYNNR
   DYNPROFIELD            = 'ITAB-REJCODE'
*   STEPL                  = 0
   WINDOW_TITLE           =  'List of Rejection Codes'
*   VALUE                  = ' '
   VALUE_ORG              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
  TABLES
    VALUE_TAB              = irejcode
*   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.

Regards,

V.Balaji

Reward if Usefull...

Read only

Former Member
0 Likes
1,171

one of the examples of F4 help.

Parameters file LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = repid

IMPORTING

file_name = file.

Thanks,

siddu

Read only

Former Member
0 Likes
1,170

Hi,

1) First write process on value-request in flow logic after process after input.

process on value-request.

field ztable-fieldname module rec_help.

2) Now double click on module rec_help for code.

3)

module rec_help input.

data : begin of it_tmp occurs 2,

fieldname like ztable-fieldname

fieldname2 like ztable-fieldname2

data : end of it_tmp.

data: progname like sy-repid,

dynnum like sy-dynnr.

data : t_return like ddshretval occurs 0 with header line.

refresh it_tmp.

select * from ztable client specified

where mandt = sy-mandt

and fieldname2= ztable1-fieldname2.

move-corresponding ztable to it_tmp.

append it_tmp.

endselect.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'fieldname1'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'fieldname1'

value_org = 'S'

tables

value_tab = it_tmp

return_tab = t_return

endif.

if sy-subrc = 0.

read table t_return index 1.

ztable-fieldname1 = t_return-fieldval.

endif.

Reward if helpful...

Madhavi.

Read only

Former Member
0 Likes
1,170

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'