cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize Value search help - Depending on Criteria

former_member374952
Participant
0 Kudos

Hi ,

I have a Form UIBB  containing 2  Input fields assigned  with data dictionary value search help . Now depending on the Value  of the first field the value

search  help for the 2nd field need to be filtered . say For Example  2 Fields like  Country  & States  are added in the form GUIBB . Now which ever


country is  selected in the first  field its corresponding states need to be loaded in the search help of other field  .

My Issue is when the form is loaded none of the method like process event , get_definition or Get_data is triggered . The Value search help for all the

fields are initialized in the get_definition method when the form is loaded initially  for the first time .  

I am not sure which interface need to be added in the feeder class of my Form GUIBB .

Regards,

Vicky

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_singh12
Participant
0 Kudos

Whenever a GUIBB is initialized GET_DATA is always called. You can then minipulate your fields with that. If the form gets initialized at the start of you application you will get FPM_START event in GET_DATA.

former_member374952
Participant
0 Kudos

Hi Vaibhav,

I have embedded the Form UIBB in a dialog box . So the GET_DATA method is triggered just once

initially when the dialog box is loaded . Search Help for all the fields are initialized and it is static .

Now I need to channge the value search help of one of the fields in the runtime . Search help of the

fields need to be dynamic. My issue is I cannot find any methods of FORM interface getting triggered


during runtime.

vaibhav_singh12
Participant
0 Kudos

I'm guessing field 1 is a dropdown if so have you binded an event on field 1 so that an event is triggered when you change the field, only then flush, process_event and get_data will be triggered.

If in case field 1 is a input field you need to implement FPM ovs interface IF_FPM_GUIBB_OVS.

AbhishekSharma
Active Contributor
0 Kudos

Hi Vicky,

Have you implemented Interface IF_FPM_GUIBB_OVS.

There you will find 4 different methods as follows you can write your logic in.

IF_FPM_GUIBB_OVS~HANDLE_PHASE_0

IF_FPM_GUIBB_OVS~HANDLE_PHASE_1

IF_FPM_GUIBB_OVS~HANDLE_PHASE_2

IF_FPM_GUIBB_OVS~HANDLE_PHASE_3

Hope this will help.

Thanks-

Abhishek

former_member374952
Participant
0 Kudos

Hi Vaibhav,

I have changed the First Field to Dropdown . Now am able to trigger the get_data method on runtime. But Is there any way I can restrict standard  value search help of 2nd field without implementation of IF_FPM_GUIBB_OVS.

Regards,

Vicky

former_member374952
Participant
0 Kudos

Hi Abhishek,

No I have not implemented IF_FPM_GUIBB_OVS. I have a dropdown and input field embedded in the Dialog Box . Am trying to modify sap standard value search help by triggering get_data method at runtime .

Best Regards,

Vicky

vaibhav_singh12
Participant
0 Kudos

Hi Vicky,

If your requirement is to replace the standard search help you can provide a custom search help in ET_FIELD_DESCRIPTION for your field using the field DDIC_SHLP_NAME.

If you want to suppress the search help, i would suggest you creating a custom types replacing the field with domain without any search help. For. e.g if the field is country use char02.

Best Regards

Vaibhav

former_member374952
Participant
0 Kudos

Hi Vaibhav,

My requirement was to filter the standard search help on change of value in the dropdown. So am modifying  FIXED_VALUES property of CT_FIELD_USAGE because get_definition does not get triggered during runtime.

Thanks for the help.

Regards,

Vicky

Answers (1)

Answers (1)

jens_boeckenhauer
Active Participant
0 Kudos

Hi Vicky,

use a DDIC structure with these two fields and assigned value help, using both components as parameters. (If such a DDIC structure does not exist yet, create your own one.)

In GET_DEFINITION, create the field catalog out of the entire DDIC structure, but not out of single components. (Use e.g.

  EO_FIELD_CATALOG ?= CL_ABAB_TYPEDESCR=>DESCRIBE_BY_DATA( LS_DATA )

or similar.)

Then the context sensitive F4 help will work out of the box.

Regards, Jens

former_member374952
Participant
0 Kudos

Hi Jens,

I dont have such value search help in my DDIC structure  .  I have mainted two different value tables

for both the fields . I can create such structure with both components . But How  Can I restrict the


Values  of value search help of the 2nd Field During runtime ? Can you please elaborate further ? 

Regards,

Vicky

jens_boeckenhauer
Active Participant
0 Kudos

Hi Vicky,

if the DDIC search help has this restriction logic (e.g. if the import parameter COUNTRY has value 'US' it only provides the US states for REGION results) and it is assigned correctly with these parameters to the DDIC structure, you don't need to do anything in the feeder class. This is done automatically by the Web Dynpro F4 processor, and it would work the same way with a freestyle WD component if the DDIC structure is attached to the relevant context node.

Regards, Jens

former_member374952
Participant
0 Kudos

Hi Jens,

In my scenario I cannot add both the components  COUNTRY and States in the structure of value search help. So as Vaibhav suggested  in the thread I have changed the FIELD1 as dropdown to trigger the get_data method .

Regards,

Vicky