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

Check Values....F4 functionalities

Former Member
0 Likes
1,417

Hi all

PARAMETERS:code LIKE bkpf-bukrs OBLIGATORY .

PARAMETERS:year LIKE bkpf-gjahr OBLIGATORY.

PARAMETERS:pernr1 LIKE zissue_master-pernr OBLIGATORY.

PARAMETERS:bookn LIKE zissue_master-bookno OBLIGATORY.

PARAMETERS:new LIKE zissue_master-pernr OBLIGATORY.

In the above code am getting the F4 functioanlities(list of values) only for code the remaining values am not having the F4 functionalities and i have to enter the values manually.....

1 ACCEPTED SOLUTION
Read only

gopi_narendra
Active Contributor
0 Likes
1,367

Use the same for the different Z fields of your issue master table.

See below the example for PERNR1 being implemented.

* F4 on PERNR1
at selection-screen on value-request for PERNR1.

  select PERNR from ZISSUE_MASTER
           into IT_F4PERNR.
  if SY-SUBRC = 0.
    sort IT_F4PERNR by PERNR.
  endif.

  if not IT_F4PERNR[] is initial.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
      exporting
        RETFIELD        = 'PERNR1'
        WINDOW_TITLE    = 'Personal Number'
        VALUE_ORG       = 'S'
      tables
        VALUE_TAB       = IT_F4PERNR
        RETURN_TAB      = IT_RETURN
      exceptions
        PARAMETER_ERROR = 1
        NO_VALUES_FOUND = 2
        others          = 3.

    if SY-SUBRC <> 0.
    else.
      read table IT_RETURN into IS_RETURN
                           with key FIELDNAME = 'F0001'.
      if SY-SUBRC = 0.
        PERNR1 = IS_RETURN-FIELDVAL.
        clear : IS_RETURN.
      endif.
    endif.
  endif.

Regards

Gopi

11 REPLIES 11
Read only

Former Member
0 Likes
1,367

HI...,

This F4 help will come from the dictionary properties of the field ......

Check the table <b>bkpf</b> and the field <b>bukrs</b> whether it is having the Search help attatched to it or not !!!

Go to SE11, open the table BKPF and click on the tab <b>ENTRY/HELP CHECK...</b>

Check for the other fields also....whether they are having either of the Search help or check table or the fixed values in the domain.....

<b>This F4 help comes from either of the below properties defined in the ABAP dictianary...

1) Search help attached to that field..

2) Fixed values attached to the domain of that field..

3) From the Check table (Foreign key relation)</b>

regards,

sai ramesh

Read only

Former Member
0 Likes
1,367

HI vijay

The rest of the parameters you have deined are being picked up from the Z tables. so by default they will not have F4 help tagged with them. You need to explictly assign F4 help for each parameter.

Pls check out this thread on how to do so:

PS: Reward pints if useful.

Thanks & regards

Ravish Garg

Message was edited by:

Ravish Garg

Read only

former_member196299
Active Contributor
0 Likes
1,367

hi ,

The F4 functionality you will get only if that key is a foreign key( or if a search help is attached to it ) ... check for that aspect, i think that might be the reason ...

Reward if helpful !

Regards,

Ranjita

Read only

gopi_narendra
Active Contributor
0 Likes
1,368

Use the same for the different Z fields of your issue master table.

See below the example for PERNR1 being implemented.

* F4 on PERNR1
at selection-screen on value-request for PERNR1.

  select PERNR from ZISSUE_MASTER
           into IT_F4PERNR.
  if SY-SUBRC = 0.
    sort IT_F4PERNR by PERNR.
  endif.

  if not IT_F4PERNR[] is initial.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
      exporting
        RETFIELD        = 'PERNR1'
        WINDOW_TITLE    = 'Personal Number'
        VALUE_ORG       = 'S'
      tables
        VALUE_TAB       = IT_F4PERNR
        RETURN_TAB      = IT_RETURN
      exceptions
        PARAMETER_ERROR = 1
        NO_VALUES_FOUND = 2
        others          = 3.

    if SY-SUBRC <> 0.
    else.
      read table IT_RETURN into IS_RETURN
                           with key FIELDNAME = 'F0001'.
      if SY-SUBRC = 0.
        PERNR1 = IS_RETURN-FIELDVAL.
        clear : IS_RETURN.
      endif.
    endif.
  endif.

Regards

Gopi

Read only

0 Likes
1,367

Hi Gopi

Please tell me how to declare it_f4pernr.

vijay

Read only

0 Likes
1,367
* Data declarations for table F4 on RFQ
types : begin of TY_F4PERNR,
          PERNR type ZISSUE_MASTER-PERNR,
        end of TY_F4PERNR.
data : IT_F4PERNR type standard table of TY_F4PERNR initial size 0.

* Declaration for Return table on F4 for PERNR
data : IT_RETURN type standard table of DDSHRETVAL initial size 0,
       IS_RETURN type DDSHRETVAL.

Regards

Gopi

Read only

0 Likes
1,367

Hi gopi

am getting an error here i,e;

select pernr from ZISSUE_MASTER

into IT_F4PERNR.

and the error is "You cannot use an internal table as an work area"..please help

Vijay

Read only

0 Likes
1,367

what about matchcode object?

parameter: abc type <type something> matchcode object <object name>

Read only

0 Likes
1,367

you use <b>TABLE</b> infront of the internal table.

select pernr from ZISSUE_MASTER
into table IT_F4PERNR.

Sorry for any inconvenience.

Please reward all useful answers

Regards

Gopi

Read only

Former Member
0 Likes
1,367

Hi Vijay,

You can either create a <b>search help</b> to get the f4 functionalities or try using this code


DATA: I_FILETABLE TYPE FILETABLE,
V_RC TYPE I.

PARAMETERS: P_FILE LIKE RLGRAP-FILENAME. "local file with contracts

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Find File'
DEFAULT_EXTENSION = 'C:'
DEFAULT_FILENAME = ''
FILE_FILTER = ',*.*.'
* INITIAL_DIRECTORY =
* MULTISELECTION =
* WITH_ENCODING =
CHANGING
FILE_TABLE = I_FILETABLE
RC = V_RC
* USER_ACTION =
* FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE I_FILETABLE INTO P_FILE INDEX 1.

<b>reward pts if found usefull.:)</b>

Regards

Sathish

Read only

0 Likes
1,367

Hi Vijay,

You can also try with this


data: begin of isys_tabl occurs 0.
        include structure msxxlist.
data: end of isys_tabl.
 
parameters: p_serv type msxxlist-host .
 
 
at selection-screen on value-request for p_serv.
 
  call function 'TH_SERVER_LIST'
       tables
            list   = isys_tabl
       exceptions
            others = 99.
 
 
 
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'HOST'
            dynprofield = 'P_SERV'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = isys_tabl.

Regards

Sathish