Ansicht
Dokumentation

F4UT_SUBSHLP_CHOOSE - Standard search help exit for selecting a lower-level search help

F4UT_SUBSHLP_CHOOSE - Standard search help exit for selecting a lower-level search help

CPI1466 during Backup   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

Using this module you can dynamically attach a search help to a field.

In order to be able to use this module, you must first decide whether

I The search help to be attacahd can be selected from a fixed set of search helps S1,...,Sn or whether
II The search help to be attached can be defined as you like.

In either case, you must first create a collective search help S in the ABAP Dictionary. The interface parameters are the set of all the interface parameters of all the search helps in question. In case I, you must also include search helps S1,...,Sn in S, where you must assign the appropriate parameters. In case II, you do not need to include any search helps in S.

You must also decide whether

1) the name of the search help to be used at the time when F4 is pressed can be provided in a field of the screen or its module pool, or whether
2) program logic should still be executing at the time when F4 is pressed. This program logic determines the name of the correct search help.

In case 1), you must assign search help S a further IMPORT parameter called SUBSHLP which must have the same type as the corresponding field of the screen/module pool.

Now assign a search help exit to search help S. In case I1, you can simply use this module. In the other cases you must create a separate function module in which you call this module, whereby the following operations must have been executed:

  1. In case 2) define the name of the search help to be used and copy it to parameter SUBSHLP of this module. In case 1) you need not define this parameter.
  2. In case II, define a table of structure DD33V in which you store the parameter assignments of S and the selected search help. Copy this assignment to parameter DD33V_TAB of this module. In case I, simply do not define this parameter.

The remaining parameters of this module must be defined by parameters of the search help exits having the same name.

Then attach search help S to the field for which the input help process should be defined. In case 1) you must make sure that parameter SUBSHLP is assigned to the field of the screen or module pool in which the name of the search help to be used is available.

Example

This function module can be used to attach an input help which is independent of the view from which the field was taken (or taken from table T itself) to field F of table T occurring in one or more views V1,...,Vm with T.

This can be done by creating search helps S1,...,Sm, which describe the input help processes for fields V1-F,...,Vm-F. You must also define search help S0 to describe the input help process for T-F. Finally, you must define collective search help S, which includes S0,...,Sm. A search help exit containing the following program lines is then assigned to this collective search help:

DATA: subshlp LIKE DD31V-SUBSHLP,
interface LIKE DDSHIFACE.

READ TABLE SHLP-INTERFACE INTO interface WITH KEY F4FIELD = 'X'
TRANSPORTING VALTABNAME.
CASE interface-VALTABNAME.
WHEN 'T'. subshlp = 'S0'. " can also be omitted due to OTHERS
WHEN 'V1'. subshlp = 'S1'.
...
WHEN 'Vm'. subshlp = 'Sm'.
* OTHERS handling for any further views or structures which include
* T
WHEN OTHERS. subshlp = 'S0'.
ENDCASE.
CALL FUNCTION 'F4UT_SUBSHLP_CHOOSE'
EXPORTING
SUBSHLP = subshlp
TABLES
SHLP_TAB = SHLP_TAB
RECORD_TAB = RECORD_TAB
CHANGING
SHLP = SHLP
CALLCONTROL = CALLCONTROL.

You must then attach search help S to table field T-F.

Note: Similarly, a search help which describes an input help process which still depends on the structure/table which is still on the screen can also be attached to a field of a structure which is included in several structures/tables.

Notes

  1. The selected search helps may themselves also be collective search helps.
  2. In case I, some search helps may also be contained in several search helps S1,...,Sn. When S is activated, the system reports that there was overlaying, but the overlay is canceled by the transition to one of the search helps S1,...,Sn.
  3. If the search help to be used itself has a search help exit, this will be taken into consideration in the F4 process. This is also true if this search help is itself a collective search help.
  4. This module recognizes case II because it is called with a table DD33V_TAB which is not empty.
  5. If a search help contained in a lower level in S is defined in parameter SUBSHLP in case I, it will be used, but you are not recommended to use this method.
  6. If in case I parameter SUBSHLP does not contain the name of a search help contained in S, this function module does not perform any operation. As usual, S is expanded into its elementary search helps and then processed. This is also true if the parameter contains a pattern or complex select options. In this case, however, changes could still be made.
  7. In case 2), the data needed to determine the search help to be used should also be brought into the search help process from S with IMPORT parameters. The contents of these parameters can be defined in the search help exit using the module F4UT_PARAMETER_VALUE_GET. (In the example, this is not necessary since the data can be found here in the control information of the input help process itself.)

Further information





Parameters

CALLCONTROL
DD33V_TAB
RECORD_TAB
SHLP
SHLP_TAB
SUBSHLP

Exceptions

Function Group

SF4U

General Data in Customer Master   General Material Data  
This documentation is copyright by SAP AG.

Length: 7033 Date: 20240523 Time: 043601     sap01-206 ( 119 ms )