You must create functional modules to enable the locking and unlocking of data from SAP BW. These functional modules will be delegated to the J2EE engine server and subsequently call remote locks on RFC destinations as indicated by RFC destination configuration parameters.
The following procedure is only valid if you are using versions of SAP BW prior to 7.02., Functional modules for locking and unlocking were added with SAP BW 7.02 content.
You should describe all functional modules and their corresponding parameters as listed below; however, the dictionary type names can differ from what you will see here.
The functional module RSCAF_TABLE_REMOTE_LOCK will be delegated to J2EE server, whereas the RSCAF_TABLE_LOCK calls RSCAF_TABLE_REMOTE_LOCK on RFC destination, which was given as a parameter during configuration.
● RSCAF_TABLE_REMOTE_LOCK functional module source code:
FUNCTION CAF_TABLE_REMOTE_LOCK.
*"--------------------------------------------------------------------
*"*"Global Interface:
*" IMPORTING
*" REFERENCE(I_BEI_LIST) TYPE RSCAF_BEI_TABLE
*" REFERENCE(I_LOCK_FLAG) TYPE RSCAF_LOCK_FLAG
*"--------------------------------------------------------------------
ENDFUNCTION.
● RSCAF_TABLE_LOCK functional module source code:
FUNCTION CAF_TABLE_LOCK.
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_RFCDEST) TYPE RFCDES-RFCDEST
*" REFERENCE(I_BEI_LIST) TYPE RSCAF_BEI_TABLE
*" REFERENCE(I_LOCK_FLAG) TYPE RSCAF_LOCK_FLAG
*"--------------------------------------------------------------------
CALL FUNCTION 'RSCAF_TABLE_REMOTE_LOCK' destination I_RFCDEST
EXPORTING I_BEI_LIST = I_BEI_LIST
I_LOCK_FLAG = I_LOCK_FLAG.
ENDFUNCTION.
The tables lock (RSCAF_TABLE_LOCK) and remote lock (RSCAF_TABLE_REMOTE_LOCK) functional modules have two input parameters with custom data types. Use the information in the lists below to structure the custom data types.
● RSCAF_LOCK_FLAG (Type: Elementary)
○ Data type – CHAR
○ Length – 1
○ Domain – LOAD_TYPE
○ Short Text – Flag for locking/unlocking table in CAF. This type is a flag that shows what operation is executed (lock or unlock). Possible values are:
■ 0 (lock)
■ 1 (unlock)
● RSCAF_BEI_TABLE (Type: Table and Line)
○ Short text – Table with search information for BEI.
This type of table describes business entity services (RSCAF_BEI).
● RSCAF_BEI (Type: Transparent)
○ Short Text – Entity interface metadata
○ E_VENDOR
■ Data type – CHAR
■ Length – 30
■ Key – true
■ Initial values – true
■ Decimal places – 0
■ Short text – Application vendor name for entity service
○ E_APPLICATION
■ Data type – CHAR
■ Length – 30
■ Key – true
■ Initial values – true
■ Decimal places – 0
■ Short text – Application name containing entity service
○ E_NAME
■ Data type – CHAR
■ Length – 60
■ Key – true
■ Initial values – true
■ Decimal places – 0
■ Short text – Name of entity service
Do not change names of functional modules parameters. You can create functional modules for locking and unlocking by using the Function Builder (transaction se37).