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: 

Multiple Field Search Help

Former Member

Hi Folks,

I was wondering if its possible to create a Search Help, with several fields to export, assigned to a field on a dynpro and when you make the selection of the row on the search help the export fields get assigned to the other fields on the screen with same data element.

For example:

Search Help export fields = BELNR and BUZEI.

Fields on Screen = BUKRS, LIFNR, BELNR, BUZEI.

The search help is assigned to the field BELNR, but I want that when I do the selection on the search help it does insert the value of BUZEI in the screen also.

So my question is, is this possible? If this is possible, how can I achieve this? (Really appreciate if you can give me examples)

Thanks in advance for your help.

Regards,

Gilberto Li

1 ACCEPTED SOLUTION

Former Member

hi check this for the collective search helps..

http://www.saptechnical.com/Tutorials/ABAP/SearchHelp/page1.htm

the multiple selection selection can be done through the standard search help..check this for example...so please search is there is any existing one is there or not ..

tables: pa0002.

parameters:p_pernr like pa0002-pernr .

parameters:p_pernr1 like pa0002-pernr matchcode object PREM .

regards,

venkat

12 REPLIES 12

Sm1tje
Active Contributor
0 Kudos

well all these fields should be part of the search help (but need not to be displayed), and you will have to set the EXP checkbox for all of them.

Former Member
0 Kudos

Hi Micky,

Thanks for your reply.

I have checked those fields on my search help as export, and when I select on my search help, it doesn't fill the BUZEI field, it does only fill the BELNR field, this as usual because on the dynpro field attribute this is the field that has the search help assigned.

Thanks again.

Former Member
0 Kudos

Hi,

If what you want is to display 4 fields on your search help that can be done. At your value request fro the field you can use the Function Module F4_IF_FIELD_VALUE_REQUEST select all the field that you want from the table you want put them in an internal table and pass it to this FM.

Regards,

Himanshu

0 Kudos

Hi Himanshu,

For the fields that I want to display on the Search Help, I'm using a table view. What I want is that several fields from the same row that are shown on the search help, are assigned to the corresponding fields on the screen with the same data element (Which I guess would be the most common logic for it).

Thanks again.

Regards,

Gilberto Li

0 Kudos

Hello,

Please see this: [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/f4%2bhelp%2bfunctionality%2bfor%2ba%2bdynpro%2bscreen%2bfield%2busing%2bthe%2bprocess%2bon%2bvalue-request%2bstatement].

And if you're using a selection screen, see this: [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a07a330f-126c-2910-c684-d2a45f0f37dd].

Regards.

Former Member

hi check this for the collective search helps..

http://www.saptechnical.com/Tutorials/ABAP/SearchHelp/page1.htm

the multiple selection selection can be done through the standard search help..check this for example...so please search is there is any existing one is there or not ..

tables: pa0002.

parameters:p_pernr like pa0002-pernr .

parameters:p_pernr1 like pa0002-pernr matchcode object PREM .

regards,

venkat

0 Kudos

Hi Venkat,

I'm have looked for a standard search help that does the same thing. Still I haven't found one yet. I've been researching and have not found anything yet. I think what I'm trying to do might not be possible. And got to find a work around.

Still if anyone have any ideas, I really appreciate it.

Thanks again.

Regards,

Gilberto Li

0 Kudos

You could do it manually in the AT SELECTION-SCREEN OUTPUT ON VALUE REQUEST event of your program.

I mean, running all the needed selections and filling the fields you want. For instance: Choosing a BELNR could give you automatically a BUKRS and GJAHR (but you'd have to handle this data manually).

Besides this way I'm not sure if there's another one...

Regards!

0 Kudos

Hi Rodrigo,

The problem is that I need this on a table control.

For example:

I open the search help, from column 1 of the table control, and the selection should complete me the column 2 and 3 of the table control.

The real problem of this is not about the data managed manually, because that I understand it. The issue is that the document number and the position of the document, should be obtained automatically from the search help for the column1 and 2 of my table control, because I don't want the user to select the document, then use another search help for the position of the document.

And so, from the first selection, the document number, I can't know what is the position he wants, and so I require the user to select the position.

Thanks again.

Regards,

Gilberto Li

Hi Gill,

After you are calling "F4_IF_FIELD_VALUE_REQUEST",use the following logic to populate the remaining field values to the corresponding row.

Eg:

CALL Function "F4_IF_FIELD_VALUE_REQUEST ".

--

--

you have to read the document no choosen by the user from the "return" tab.

Then read the value of the remaing fields from itab for the corresponding doc.no.

pass it to the following internal table.

to get the line no in which the user clicked the search help ,you have to use "GET Cursor Line " statement.and populate that line no in SY-STEPL value of the following internal table.

REFRESH dynpfields.

CLEAR dynpfields.

dynpfields-fieldname = 'EKPO-EBELN'.

dynpfields-fieldvalue = '1300000' "wa_ekpo-ebeln.

dynpfields-stepl = l_stepl.

APPEND dynpfields.

dynpfields-fieldname = 'EKPO-EBELP'.

dynpfields-fieldvalue = '00020' "wa_ekpo-ebelp.

dynpfields-stepl = l_stepl.

APPEND dynpfields.

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING

dyname = 'SAPLZZ_EKKO' "Program name

dynumb = '0100' "Screen number

TABLES

dynpfields = dynpfields

EXCEPTIONS

OTHERS = 0.

0 Kudos

Hi,

I'll try it, and I'll get back with you guys with the result. Your post help me out to clear some doubts of the link posted by David.

Thanks for your help.

Really appreciate everyones help.

Regards,

Gilberto Li

Former Member
0 Kudos

Hi folks,

I have solved my problem. I have achieved to do what I needed.

Thanks for all your help, really appreciate it.

Regards,

Gilberto Li