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: 

Default search help tab with condition

Former Member
0 Kudos

Hell o gurus,

I ve created a 2 search help, and i used in production order (when created at COR1) for batch proposal. My requirement is to have a default tab 1, for example if the order is type A, and the default tab 2 when order type is B.

Is any sample code for this ?

Thanks in advance,

Stratos

5 REPLIES 5

FredericGirod
Active Contributor
0 Kudos

0 Kudos

thanks for the reply,

the sap helo describes the functionality of the search helps, which i know it.. the second is a how to create a search help.

where exactly is the point for my requirement ?

thanks in advance,

stratos

0 Kudos

If you create a function module called in the search-help, you will be able to manage yourself.

look the function F4IF_SHLP_EXIT_EXAMPLE

*"----------------------------------------------------------------------
* STEP SELONE  (Select one of the elementary searchhelps)
*"----------------------------------------------------------------------
* This step is only called for collective searchhelps. It may be used
* to reduce the amount of elementary searchhelps given in SHLP_TAB.
* The compound searchhelp is given in SHLP.
* If you do not change CALLCONTROL-STEP, the next step is the
* dialog, to select one of the elementary searchhelps.
* If you want to skip this dialog, you have to return the selected
* elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
* either to 'PRESEL' or to 'SELECT'.

...


*"----------------------------------------------------------------------
* STEP PRESEL  (Enter selection conditions)
*"----------------------------------------------------------------------
* This step allows you, to influence the selection conditions either
* before they are displayed or in order to skip the dialog completely.
* If you want to skip the dialog, you should change CALLCONTROL-STEP
* to 'SELECT'.

Fred

0 Kudos

i think you dont understand! this code is only for the selected search help...

my requirement is, when the user press the F4 (or the bubble), a selected tab of search help tabs to be displayed...

0 Kudos

Search help exit will get called when you do F4.

It is not clear what needs to be changed in exit to make it work, but debugging can give more information.

In standard program WDTMFORS, subroutine TAB_CHANGED, this code gets called when you select another tab.

IMPORT tabc_shlptab FROM MEMORY ID 'TABControl-SHLP'.

IMPORT resultbuffer FROM MEMORY ID 'TABControl-RSBF'.

PERFORM change_curr_shlp TABLES tabc_shlptab resultbuffer

                USING tab_ctl dialognumber h_mcx.

EXPORT tabc_shlptab TO MEMORY ID 'TABControl-SHLP'.

On debugging subroutine TABC_SHLPTAB, it can be seen that tab is selected by filling TABC_SHLPTAB[1]-SHLP_CURR, and exporting it back to memory.