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: 

How to create dynamically changing F4 help in selection screen

Former Member
0 Kudos

Hi Dear friends

In my report i have two input flds at selection screen i.e. sales order no and date description.Now based on sales order no the F4 help in the fld date description should change dynamically.eg. if there are two sales document number 001 and 002 and the corresponding date description for 001 are 123 and 234 and for 002 are 987 and 876 .Then if i select 001 the F4 help in date description should contain 123,234 and for 002 it should contain 987,876 before pressing the execute button.How to achieve this. Plz help me. i tried to use AT-SELECTION SCREEN ON VALUE REQUEST event but its not giving any out put as in the SELECT query i putted a WHERE condition where sales document of the database table equals to the sales order inserted in the selection screen. But when i debugg the input sales order parameter shows blank.

2 REPLIES 2

swaroop_g2
Explorer
0 Kudos

Use at selection-screen on value request and then do Dynpro read, find code sample below....provide marks if solution works

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_tanum.

PERFORM get_f4help1. " Getting F4 help for p_tanum

FORM get_f4help1 .

****************************************

  • DYNPRO READ - Start

****************************************

DATA : BEGIN OF it_validation OCCURS 0.

INCLUDE STRUCTURE dynpread.

DATA END OF it_validation.

it_validation-fieldname = 'P_LGNUM'.

APPEND it_validation.

CLEAR it_validation.

*Picking Input value of domain

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = 'YSDS_SUMMARY_R01'

dynumb = '1000'

TABLES

dynpfields = it_validation.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT it_validation.

IF it_validation-fieldname = 'P_LGNUM'.

p_lgnum = it_validation-fieldvalue.

EXIT.

ENDIF.

ENDLOOP.

TRANSLATE p_lgnum TO UPPER CASE.

****************************************

  • DYNPRO READ - END

Endform

0 Kudos

Thank u