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: 

f4 help for parameters on selecton screen *<removed_by_moderator>*

Former Member
0 Kudos

Hi friends,

I have following reqment.

Parameters :mtart like mara-mtart obligatory.

I wnt to provide f4 help with only 2 values.

those are MTART = HAWA and ERSA.

can u help me with coding.

Edited by: Julius Bussche on Jul 16, 2008 8:41 AM

14 REPLIES 14

naveen_inuganti2
Active Contributor
0 Kudos

Hi....

Just pass those two entries in one internal table field by hard coding....

And pass that in ternal table into tables parameter of F4IF_INT_TABLE_VALUE_REQUEST function module...

under the at selection-screen on value request for <parameter name>

One thing while declaring the field in the internal table better to declare as like <db-f'name>

Get back to me if you are not aware of that function module...

Thanks,

Naveen.I

Former Member
0 Kudos

Hi,

For F4 Help you Can use Funtion Module

F4IF_INT_table_VALUE_REQUEST.

Pass the field you want F4 help.

Try this code:


To control F4 help in a selection screen use the

AT SELECTION-SCREEN ON VALUE-REQUEST FOR 
event.

Note that for ranges both the low and high value of the field
must have there own ON VALUE-REQUEST

Example:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-low.
PERFORM f4_help_prctr.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-high.
PERFORM f4_help_prctr.

REPORT f4help.

PARAMETERS:
p_auart LIKE vbak-auart.

START-OF-SELECTION.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_auart.
PERFORM f4_help_aaurt.

*u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014*
* FORM f4_help_auart *
*u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014*
* u2026u2026.. *
*u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014*

FORM f4_help_auart.
CALL FUNCTION u2018F4IF_FIELD_VALUE_REQUESTu2019
EXPORTING
tabname = u2018VBAKu2019
fieldname = u2018AUARTu2019
* SEARCHHELP = u2018 u2018
* SHLPPARAM = u2018 u2018
* DYNPPROG = u2018 u2018
* DYNPNR = u2018 u2018
* DYNPROFIELD = u2018 u2018
* STEPL = 0
* VALUE = u2018 u2018
* MULTIPLE_CHOICE = u2018 u2018
* DISPLAY = u2018 u2018

* SUPPRESS_RECORDLIST = u2018 u2018
* CALLBACK_PROGRAM = u2018 u2018
* CALLBACK_FORM = u2018 u2018
* TABLES
* RETURN_TAB =
* EXCEPTIONS
* FIELD_NOT_FOUND = 1
* NO_HELP_FOR_FIELD = 2
* INCONSISTENT_HELP = 3
* NO_VALUES_FOUND = 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.

ENDFORM. 

Regards,

Sujit

Former Member
0 Kudos

Use the FM F4IF_FIELD_VALUE_REQUEST'

  • Tabname/fieldname is the name of the table and field

  • for which F4 should be shown.

*

  • Dynprog/Dynpnr/Dynprofield are the names of the Progran/Dynpro/Field

  • in which the f4 value should be returned.

*

  • Value: The value of the Dynpro field when calling the F4 help.

  • You can limit the values shown, by inseting a value in this parameter

  • e.g '50*' to show only values beginning with 50

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'ZSD00003'

fieldname = 'PRCTR'

  • SEARCHHELP = ' '

  • SHLPPARAM = ' '

dynpprog = 'ZSD00002_BRUGERKONV_LISTE'

dynpnr = '0100'

dynprofield = 'IT_ZSD00003-PRCTR'

  • STEPL = 0

value = '50*'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • SUPPRESS_RECORDLIST = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • TABLES

  • RETURN_TAB =

  • EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 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.

Regards,

Joy.

former_member673464
Active Contributor
0 Kudos

hi,

You can use the function module F4IF_FIELD_VALUE_REQUEST for displaying the required f4 help on selection-screen on value request .

Regards,

Veeresh

Former Member
0 Kudos

Hi,

pass these two values to an itnternal table

and pass the itab to this FM 'F4IF_INT_TABLE_VALUE_REQUEST'

Former Member
0 Kudos

Hi jyo,

1. HAWA and ERSA

This program will do exactly the way you want.

2. Just copy paste

3.




REPORT ABC.

*----------------------------
DATA : BEGIN OF ITAB OCCURS 0,
mtart like mara-mtart ,
END OF ITAB.


data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
data : RETURN_wa LIKE DDSHRETVAL .


*---------------------------
Parameters :mtart like mara-mtart obligatory.

*-----------------------------------------
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MTART.

ITAB-MTART = 'HAWA'. APPEND ITAB.
ITAB-MTART = 'ERSA'. APPEND ITAB.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'ITAB-MTARt'
* PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'A'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
tables
value_tab = ITAB
* FIELD_TAB = FTAB
RETURN_TAB = return_tab
* DYNPFLD_MAPPING =
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3

.

break-point.

regards,

amit m.

Former Member
0 Kudos

Hi Jyo.

You have used Unappropriate Subject Line - "URGENT".

Your thread can be locked.

Please read rules of engagement.

Hope you take things positively.

Good Luck & Regards.

Harsh Dave

Former Member
0 Kudos

Hi try this code...

DATA : BEGIN OF itab OCCURS 0,

mtart4),

END OF itab.

AT SELECTION-SCREEN ON VALUE-REQUEST for mtart.

itab-mtart = 'HAWA'.

APPEND itab.

itab-mtart = 'ERSA'.

APPEND itab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'MTART'

DYNPPROG = repid

DYNPNR = dynnr

DYNPROFIELD = 'ITAB-MTART'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab.

Former Member
0 Kudos

Hi,

The best way to restrict the values in F4 help will be to create your own z data element and domain. In the domain you can specify the two values that you intend to have in your F4 help. Assign this domain to your data element. Use this data elemnt to define the parameter value in your selection screen.

Please follow the below steps.

Create a zdata element ZMARA_MTART with the domain (i have used same name) ZMARA_MTART.

In the domain please fill the fixed values HAWA and ERSA. Please assign T134 as value table in the domain.

In the program code -->

PARAMETER mara type ZMARA_MTART OBLIGATORY.

I hope this will serve the purpose.

Former Member
0 Kudos

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = ''

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = ''

value_org = ''

tables

value_tab = it_tab

  • field_tab = lt_field

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.

append only that to values into that internal table........

i think this will help u...

Regards

Anbu

Former Member
0 Kudos

hi all thank you very much

Former Member
0 Kudos

hi all thank you very much

Former Member
0 Kudos

hi all thank you very much