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: 

Issue in elementary search help.

Former Member
0 Kudos

Hi,

Facing some issue on Attaching search help directly to the screen Fields.

I have a requirement that

1> Based on a screen field, I have to filter F4 for the other fields.

2> I have to populate 2 screen elements at the same time.

Like:

In my transaction i have 3 fields :

1> PA0001-WERKS : Personnel area.

2> PA0001-PERNR : Personnel number

3> PA0001-ENAME : Employee name.

All 3 have been defined as Dictionary fields on the screen.

Now PA0001-WERKS has its on search help and i use that to select the WERKS.

Then i have to create a search help that takes this as the input and gives me a hit list showing all the personnel number ( and there name) in PA0001 table based on the screen field PA0001-werks.

When i do F4 on say Pa0001-pernr field: a hit list showing all the personnel number ( and there name) in PA0001 table.

When i select a row both PA0001-pernr and PA0001-ENAME should be filled in the screen.

Solution that i tried:

I created a elementary seach help ZSEL_PER and had the PA0001 as the selection table and had the 3 fields as the parameters:

1> WERKS as input

2> PERNR and ENAME as output.

Then i attached the search help to the srceen fields :

1> PA0001-PERNR : Personnel number

2> PA0001-ENAME : Employee name.

Now ,

a> When i do F4 my data does not get restricted as per the WERKS on the screen.

b> When i select a row both the fields on the screen dont get populated, only the field on which i did F4 ( that too always with the colomn 1 only of the hit list )..

Is this possible with elementary search help and if yes then how ? what am i doing wrong...

Thanks, Ad.

10 REPLIES 10

Former Member
0 Kudos

hi,

use function module

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = l_field

dynpprog = l_repid

dynpnr = l_dynnr

dynprofield = l_fieldname

value_org = l_value_org

TABLES

value_tab = itab_massg

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

cheers

sasi

Former Member
0 Kudos

Hi

You can use SET PARAMETER for PA0001_WERKS on the screen with parameter id WRK in the attributes .

In the search help just put WRK ( without quotes) in the Default value column for Werks .

Hope this helps.

Cheers

Former Member
0 Kudos

Hi anuj,

This is the Search Help Process(F4) for a Particular Field.

Go to SE11.

Select Search Help Radio button : Any name with Z or Y.

Create.

Short Description : Any.

Selection Method : Table Name.

Dialog Type : Display Values immediately.

Search Help Parameter : Field Name (for which field ur doing in the table).

Exp : Tick it.

Lpos : 1 Just giving the position.

SAVE CHECK ACTIVATE.

Next Assign the Search Help to the table or field.

SE11.

Your Table Name : Change.

Search Help Button above the fields.

Search Help name : Your search help name.

Copy.

SAVE CHECK ACTIVATE.

Now go and check to the field by F4.

Thats it.

hope this helps you.

reward points for helpfull answers.

regards,

venu.

0 Kudos

Hi venu,

Ur solution is not what i want, i dont wnat to touch the table as it SAP table )

I'll try the other approach...

0 Kudos

Guys there is a issue with the parameter ID, one that i have to have valid parameter IDs set up for the data elements and that wud again mean changing the data element if it does not have paramter ID.Cant do that as it is a Sap table..

So we are not having the solution yet ... :-(((

Former Member
0 Kudos

Hi I think PA0001-WERKS has a parameter id PBR attached to it . You can always use this.

Cheers.

0 Kudos

Yes i have used it and it works but what abt a secanio when there is no parameter ID ??

How can i pass values to more than 1 screen field ?

like in above eg. PA0001-PERNR and PA0001-Ename both need to filled on same F4 selection from hit list..

0 Kudos

Hi Fellas,

Anyone has any Ideas on how this can be achieved ??

Regards,

Ad.

Former Member
0 Kudos

Hi

I think you can achieve this using custom coding only.

In Screen

PROCESS ON VALUE-REQUEST.

FIELD PA0001-MATNR MODULE HELP_MATNR.

FIELD PA0001-ENAME MODULE HELP_ENAME.

In both the above modules

Use Function DYNP_VALUES_READ to get the plant value as in F4 you may not get the plant values .

Select from table PA0001 into itab the three fields based on plant .

Call FM F4IF_INT_TABLE_VALUE_REQUEST for user selection.

In module HELP_MATNR you can pass back matnr to field directly using RETFIELD = 'PA0001-MATNR' .

To set PA0001-ENAME , you will have to use FM DYNP_VALUES_UPDATE

In module HELP_ENAME you will have to change the fields.

Cheers

0 Kudos

I folks, I know this Fm and also how to use it..

But i need to populate say 2 feilds on single F4 which will not be the case in the solution offered by some ppl...

From what i have read abt the Elementary search help, it shud be possible, but cant do it as of now...

If anyone has worked on similar requirement then let me know..

Regards,

Ad.