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 in Dynpro

Former Member
0 Likes
6,913

Hello Experts,

I have a screen which I am trying to change. Basically there is a field that has input help associated to it currently using foreign key releationship and I debugged the program to find out that FM DD_SHLP_CALL_FROM_DYNP used, that is the standard method is used. Now the requirement is to add new input help with few extra fields to be taken in account. SO i guess I will have to use 'F4IF_INT_TABLE_VALUE_REQUEST', but the issue is what is the event in my dynpro that will trigger this FM, do I have to write a different event or its a part of PBO, or Process ON Value has to be implemented?

thanks and regards,

Gaurav

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,909

Hi ,

I think this will be an event in your PAI and not PBO.

Regards,

Sunmit.

7 REPLIES 7
Read only

Former Member
0 Likes
2,909

Hi Gaurav,

For Search Help in DynPro... Many techniques are available...

1. You can Create Search Help (USING SE11)and attach with it in SCREEN... If u see property of your field in SCREEN PAINTER >> SCREEN PAINTER ATTRIBUTES ...You will find search help field at the bottom. Write Search Help name there.

2. Create Domain With Value table... or VAlue range it will become search help for the field containing that domain.

Hope this will help.

DARSHAN

Read only

Former Member
0 Likes
2,909

Refer this code

http://sap.niraj.tripod.com/id27.html

F4IF_INT_TABLE_VALUE_REQUEST
       This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB. 
       If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
 
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            RETFIELD           = field from int table whose value will be returned 
            DYNPPROG        = SY-CPROG
            DYNPNR             = SY-DYNNR
            DYNPROFIELD    = 'screen field'
            VALUE_ORG       = 'S'
       TABLES
            VALUE_TAB        = internal table whose values will be shown.
            RETURN_TAB      = internal table of type DDSHRETVAL  
       EXCEPTIONS
            parameter_error    = 1
            no_values_found   = 2
            others                  = 3.

-


parameters: p_bukrs(4) type c,
            p_butxt(50) type c.

data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.

at selection-screen on value-request for p_bukrs.

  call function 'F4IF_FIELD_VALUE_REQUEST'
       exporting
            tabname           = 'T001'
            fieldname         = 'BUKRS'
            dynpprog          = sy-cprog
            dynpnr            = sy-dynnr
            dynprofield       = 'P_BUKRS'
       tables
            return_tab        = return
       exceptions
            field_not_found   = 1
            no_help_for_field = 2
            inconsistent_help = 3
            no_values_found   = 4
            others            = 5.

  read table return with key fieldname = 'P_BUKRS'.

* Add it back to the dynpro.
  dynfields-fieldname = return-retfield.
  dynfields-fieldvalue =  return-fieldval.
  append dynfields.

* Get the company code from db and add to dynpro
  dynfields-fieldname = 'P_BUTXT'.
  select single butxt into dynfields-fieldvalue
          from t001
                where bukrs = return-fieldval.
  append dynfields.

* Update the dynpro values.
  call function 'DYNP_VALUES_UPDATE'
       exporting
            dyname     = sy-cprog
            dynumb     = sy-dynnr
       tables
            dynpfields = dynfields
       exceptions
            others     = 8.

start-of-selection.

Read only

0 Likes
2,909

thanks Darshan and Judith for your help again,

but let me be more specific; may be you can understand me better than, basically I am having a field subty, that has input help associated to it, what i want is that now a new field subty1 has come into action, hence I want to change the help request and manually code it such as it would give me only values I select using my query. hence I feel that 'F4IF_INT_TABLE_VALUE_REQUEST' would be enuf. what do u suggest?

thansk and regards,

Gaurav

Read only

Former Member
0 Likes
2,910

Hi ,

I think this will be an event in your PAI and not PBO.

Regards,

Sunmit.

Read only

former_member196299
Active Contributor
0 Likes
2,909

Hi Gaurav,

As per your question, the better solution would be if you can create a search help for the field ( considering other fields in SE11 ) and then attach this seacrh help directly in the dynpro field . I hope this will solve your purpose as if you want to use the function module ( the ones suggested ) you can only get values for one field and the other fields can not be taken into consideration but in case of search helps the other fields also can be considered .

plz revert back for further clarification if needed .

Thanks

Ranjita

Read only

0 Likes
2,909

thanks ranjita,

But I guess I will continue with coding rather than implementing search help the reason being,

Current scenario is : A user gets all the entries for scheme type when presses input help F4. This is implemented using Search Help, It fetches 3 different fields from 3 tables.

NeW requirement : I need to check what is the subtype entered by user, if user enter subytpe A, then only few values of scheme type that match a condition need to come as input options from the same three tables.

any sugggestions?

Gaurav

Read only

former_member196299
Active Contributor
0 Likes
2,909

Gourav,

If you are aware of search help exits , then I suggest you to use that as in that case you can still refine your selection and according to the schemes selected you can have a particular input help available.