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: 

Screen Programming

Former Member
0 Kudos

Hi all,

I am doing a screen programing.

In that I have 2 fields.

field1 and field2.

Field1 has F4 help.I will select the data for field1 from the F4 help.

Based on the value of Field1 Field2 should have f4 help values..

If I select Albhabet, then field2 should have F4 values as A,B,C,etc...

if I choose Numeric the its should have f4 values as 1,2,3,etc...

how to achieve this...

Initially the field2 doesnt have F4 help..But based on the input in field1 I will display the field2 F4 values...

How to achieve this....

2 REPLIES 2

naveen_inuganti2
Active Contributor
0 Kudos

Hi....

You can do this in POV event.

But here you want to get F4 help for Field2 wrt Filed1 input.

So here you have to use DYNP_VALUES_READ function module.

Check this sample code..,

data: dyname like d020s-prog value 'PROGRAM NAME',
          dynumb like d020s-dnum value 'SCREEN NUMBER'.
  data: begin of dynpfields occurs 3.
          include structure dynpread.
  data: end of dynpfields.
  move 'FIELD1' to dynpfields-fieldname.
  append dynpfields.

  call function 'DYNP_VALUES_READ'                          
    exporting
      dyname               = dyname
      dynumb               = dynumb
      translate_to_upper   = 'X'
    tables
      dynpfields           = dynpfields
    exceptions
      invalid_abapworkarea = 01
      invalid_dynprofield  = 02
      invalid_dynproname   = 03
      invalid_dynpronummer = 04
      invalid_request      = 05
      no_fielddescription  = 06
      undefind_error       = 07.

So here you can have FIELD1 entry in dynpfields-fieldvalue. So you can develop for search help

for FIELD2 based on dynpfields-fieldvalue.

All the above cod ein POV event..,

process on value-request.
 field FILED2 module f4_FIELD2.

Thanks,

naveen.I

Former Member
0 Kudos

Hi,

First u got the F4 help. In the select statement move the data into an internal table. Now based on the first field conditions go and check the field2.

Regards,

Kasuladevi