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

F4 Help for Multiple fields in Modulepool - Process on Value request

Former Member
0 Likes
3,715

Hi ,

I am trying to add F4 help depending upon input in the first field.

Ex :  First Fields is  STUD COUNTRY : USA, IND...etc

                                   STD  STATE       : CT    - F4 Help - CT, NJ, Maharastra ...etc

                                    STD CITY        :  Plainville , Mumbai

                                     STD ADD       :   Southington...AIROLI, etc....

I have written the code but the cursor is not at all triggering to get multiple on Value request.

  PROCESS ON VALUE-REQUEST.

  field  TABLE-STATE MODULE get_data_state.
      field  TABLE-CITY MODULE get_data_city.

When I debug, cursor is going to module get_data_state but it is not passing to get_data_city...even after putting the hard break point in there...

Any suggestions will be appreciated!

Best Regards,

KC

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,141

Hi,

It doesn't works like that.

Each field f4 will trigger when F4 is pressed on that field.

If you want to do what you described, call other f4 help modules from inside the first field f4 module.

6 REPLIES 6
Read only

rajkumarnarasimman
Active Contributor
0 Likes
2,141

Hi Krishna,

During debugging, if code doesn't execute means in such case, only the activation may be the problem.

Activate all the objects(Screen, Include) related to the program.

Regards

Rajkumar Narasimman

Read only

Former Member
0 Likes
2,142

Hi,

It doesn't works like that.

Each field f4 will trigger when F4 is pressed on that field.

If you want to do what you described, call other f4 help modules from inside the first field f4 module.

Read only

0 Likes
2,141

Hi All,

Thank you for your response!

Can anybody help...how I can put F4 Help valules for Multiple fields.

Ex : As explained above.... F4 help entries  for second field should depend upon first Field entry and

                                                                          - Third field  should depend upon second field entry and

                                                                          -  Fourth Field should depend upon thris field entry.

Any help or suggestions will be apprecaited!

Best Regards,

KC

Read only

0 Likes
2,141

Hi,

  1. Create an internal table to display in f4 help.
  2. Read the field values which are to be used to display f4 help list using FM DYNP_VALUES_READ.
  3. Use the values to fetch the required data into the internal table for f4
  4. Use FM F4IF_INT_TABLE_VALUE_REQUEST to display f4 help using the internal table that was prepared in the step above
  5. Update the required field based on the selection in f4

Regards,

Ashish

Read only

Former Member
0 Likes
2,141

Hi,

Use the statement set parameter id and get parameter id when the fields having the parameter id's.

Read only

Former Member
0 Likes
2,141

Hi KC,

Since the field transport mechanism between the dynpro and the program memory has not yet happened when the value-request modules are executed, you need to read the values from the screen instead of just relying on what's in the program's memory.  You have to use function DYNP_VALUES_READ in order to read the country value before showing the values for State for example. 

Sample coding:


  data:

      lv_country type land1,

     lv_repid                  type syrepid,

     lt_dynp_value             type standard table of dynpread.

   field-symbols:

     <dynp_value>              type dynpread.

   append initial line to lt_dynp_value assigning <dynp_value>.

   <dynp_value>-fieldname = 'TABLE-COUNTRY'.

   lv_repid = sy-repid.

   call function 'DYNP_VALUES_READ'

     exporting

       dyname     = lv_repid

       dynumb     = '1000'

     tables

       dynpfields = lt_dynp_value.

   read table lt_dynp_value assigning <dynp_value> with key fieldname = 'TABLE-COUNTRY'.

   if sy-subrc = 0.

     lv_country = <dynp_value>-fieldvalue.

   endif.


Jim