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

Regarding F4 help

sreeramkumar_madisetty
Active Contributor
0 Likes
1,659

Hi Folks

I was created an Delivery Block field as Parameter in the selection screen.

I want to create the F4 help on that field .

Reference field for the same is : vbak-lifsk.

Can anybody give me the code.

Points are assured for correct answers.

Regards,

Sreeram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,615

Hi Sree,

You declare the parameter of type vbak-lifsk and F4 help will come automatically.

PARAMETERS : v_lifsk LIKE vbak-lifsk.

This is a standard F4 help which is populated from table TVLS.

You can get the F4 help the way you want by using FM F4IF_INT_TABLE_VALUE_REQUEST

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lifsk.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'LIFSK'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'P_LIFSK'

value_org = 'S'

TABLES

value_tab = i_lifsk

i_lifsk is the internal table which you can populater to display in F$ help.

Regards,

Pankaj Sharma

Hi Folks

I was created an Delivery Block field as Parameter in the selection screen.

I want to create the F4 help on that field .

Reference field for the same is : vbak-lifsk.

Can anybody give me the code.

Points are assured for correct answers.

Regards,

Sreeram

12 REPLIES 12
Read only

Former Member
0 Likes
1,615

See the following simple ex: Change the fields & table as per your reqirement.

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 p_mat.

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 p_mat.

ENDIF.

Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
1,615

Hi,

For example, look at this code

=====================================================

TABLES : MARD.

DATA: BEGIN OF IT_MARD OCCURS 0,

WERKS LIKE MARD-WERKS,

LGORT LIKE MARD-LGORT,

END OF IT_MARD.

DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.

parameters : P_WERKS LIKE MARD-WERKS.

parameters : P_LGORT LIKE MARD-LGORT.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WERKS.

SELECT WERKS LGORT FROM MARD UP TO 10 ROWS INTO table IT_MARD.

DELETE ADJACENT DUPLICATES FROM IT_MARD COMPARING WERKS.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'WERKS'

DYNPPROG = SY-REPID

DYNPNR = '1000'

DYNPROFIELD = 'P_WERKS'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_MARD

RETURN_TAB = T_RETURN

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

if sy-subrc = 0.

read table it_mard index 1. "transporting werks.

move it_mard-lgort to p_lgort.

endif.

Cheers,

Simha.

Reward all the helpful answers..

Read only

Former Member
0 Likes
1,615

You will get the F4 help automatically

chk this

REPORT ztest.

TABLES : vbak.

PARAMETERS : v_lifsk LIKE vbak-lifsk.

Read only

Former Member
0 Likes
1,615

Hi,

parameters

p_lifsk like vbak-lifsk. it will give f4 help.

if you want to create own f4 help for that field use

<b>F4IF_INT_TABLE_VALUE_REQUEST</b> fm

regards,

ananth

Read only

Former Member
0 Likes
1,615

you can refer to dictionary field it will show the f4 help for that field defined in dictionary

or

you have to do like this.

at selection-screen on value-request for p_lifsk.

here call the fm F4IF_SHLP_EXIT or popup_with_table or like that.

regards

shiba dutta

Read only

Former Member
0 Likes
1,615

parameters p_lifsk type VBAK-LIFSK.

Read only

Former Member
0 Likes
1,615

hi,

refer to this sample code

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,

Santosh

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,615

The field VBAK-LIFSK is attached to data element LIFSK domain LIFSP which has a table of value TVLS and a text table TVLST.

So if your refer your parameter/Select-optinos with the correct field, a F4 help is automatically generated.

  TABLES vbak.
  PARAMETERS p_lifsk LIKE vbak-lifsk.
  SELECT-OPTIONS so_lifsk FOR vbak-lifsk.

Regards

Read only

Former Member
0 Likes
1,616

Hi Sree,

You declare the parameter of type vbak-lifsk and F4 help will come automatically.

PARAMETERS : v_lifsk LIKE vbak-lifsk.

This is a standard F4 help which is populated from table TVLS.

You can get the F4 help the way you want by using FM F4IF_INT_TABLE_VALUE_REQUEST

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lifsk.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'LIFSK'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'P_LIFSK'

value_org = 'S'

TABLES

value_tab = i_lifsk

i_lifsk is the internal table which you can populater to display in F$ help.

Regards,

Pankaj Sharma

Read only

Former Member
0 Likes
1,615

Hi

Use this, It may helpful to you

parameter : p_lifsk like vbak-lifsk.

data : begin of i_lifsk occurs 0,

lifsk type lifsk,

end of i_lifsk.

DATA: return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.

select lifsk from vbak into table i_lifsk.

at selection-screen on value request for <delivery block field>

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = i_lifsk-lifsk

dynpprog = sy-repid

dynprofield = <Delivery Block field>P_lifsk.

value_org = 'S'

TABLES

value_tab = i_lifsk

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.

READ TABLE return_tab INDEX 1.

MOVE return_tab-fieldval TO p_lifsk.

Read only

Former Member
0 Likes
1,615

Hi ,

you will get the help automatically when u declare the paramter by using the field in the table.

parameters : p_matnr like mara-matnr.

reward if is helpful

regards,

Sangeetha.A

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,615

Hi

It's Answered.