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: 

Search help and passing values to it

h_senden2
Active Contributor
0 Kudos

Hi,

in a dialog program i'm using on screen 100 two input fields. P_DOKAR (document type, data element DOKAR, parameter id CV2) and P_DOKNR (document number). P_DOKNR uses search help CV01. One of the selection fields in the search help is DOKAR (the same type !), but when i'm fill P_DOKAR with CSD it is not passed to the search help.

How can i solve this one ?

regards,

hans

7 REPLIES 7

Former Member
0 Kudos

Hi Hans,

use in screen 100 field DRAW-DOKAR and DRAW-DOKNR, then the search help appears automatically, because it is defined in table DRAW.

0 Kudos

Hi Volker,

your solution is working for DRAW-DOKNR.

But i have also created a Z-searchhelp based on a Z-table with key DOKAR + MAINDOC. The field MAINDOC is also on the inputscreen. When i use the F4-button, the document type DOKAR is not taken.

Is there a solution for this problem ?

regards,

Hans

Former Member
0 Kudos

Hi Hans,

This si something that you have to code. Sicne you are saying that you are using a screen, you have to write a POV ( Process on Value Request ) Module in addition to your regular PBO and PAI modules.

Inside your POV Module you need to call the Function Module F4IF_FIELD_VALUE_REQUEST, using the appropriate parameters, like the name of the search help , the search help parameters etc.,

*===================

PROCESS BEFORE OUTPUT.

MODULE PBO_1.

MODULE PBO_2.

MODULE PBO_N.

PROCESS AFTER INPUT.

MODULE PAI_1.

MODULE PAI_2.

MODULE PAI_N.

PROCESS ON VALUE-REQUEST.

FIELD P_DOKNR HANDLE_F4_FOR_DOKNR.

-


MODULE HANDLE_F4_FOR_DOKNR.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

TABNAME = NAME_OF_THE_TABLE

FIELDNAME = NAME_OF_THE_FIELD

SEARCHHELP = SEARCH_HELP_NAME

SHLPPARAM = SEARCH_HELP_PARAMETER.

ENDMODULE.

*==========================

For further information, you can refer to the documentation for the above function module, which is almost always available in every release of SAP.

Hope this helps you reach the solution.

Regards,

Anand Mandalika.

Former Member
0 Kudos

Hi Hans,

I think what you need is your own 'process on value request' in your dynpro. In there put fm 'DYNP_VALUES_READ'. This will give you the content of each field on your screen. The fm is well documented.

regards

Siggi

0 Kudos

Hi Siggi,

i know the DYNP_VALUES_READ function. I've used this one in the Process on value request in combination with function F4IF_FIELD_VALUE_REQUEST to start the Search help functionality for my own table en search help.

The initial problem still exist : how can i get the DOKAR fieldvalue into the related field in my own search help ?

Hans

0 Kudos

Hi Hans,

Did you try to define the parameters with reference to a field of a Data dictionary structure? You could then assign in the definition of the structure (or table) the search help to a specific field and in the assignment you can define that both field doknr and dokar should be passed to the search help.

Regards,

John.

nablan_umar
Active Contributor
0 Kudos

In your screen 100, the attributes for field P_DOKAR, did you turn on the checkbox for SET and GET of the parameter id CV2? If you do, keep in mind that you need to hit enter before clicking the down arrow on field P_DOKNR in order to make the new values for parameter id CV2 to take effect.