Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> UserExit>KKCD0001



Index

KKCD0001

SAP-EIS: User Exits
Four Customer Exits exist for the data transfer or for the conversion from IDOC segments. The Exits are contained in the enhancement KKCD0001. As soon as the Customer Exits are activated, they are carried out for all sender structures or segments. The first two Customer Exits require minimal coding once they are activated. The sender structure concept is used when loading data into the SAP-System. The concept Segment is used in the context of the distribution of the SAP-System. It is a matter of a record of data to be transferred or converted. It is recommendable to code a CASE -instruction within the Customer Exit, where (differentiated according to sender structure (REPID) or segment) various coding is accessed. In the parameter REPID, the name of the segment for the conversion from IDOC segments. The parameter GRPID is not filled out with the conversion from IDOC segments. You should have a WHEN OTHERS branch within the CASE instruction, in which the 'SENDER_SET' is allocated to the 'SENDER_SET_NEW' or the 'RECEIVER_SET' to the 'RECEIVER_SET_NEW'. Utherwise the return code will have its initial value. You can view a possible solution in Code sample.

The first Customer Exit is accessed before the summarizing or conversion. It is called up as follows:

CALL CUSTOMER-FUNCTION '001' EXPORTING GRPID = GRPID "Origin REPID = REPID "Sender program SENDER_SET = SENDER_SET "Sender record IMPORTING SENDER_SET_NEW = SENDER_SET "modified sender record SUBRC = SUBRC. "Returncode
  • If the variable 'SUBRC' is initial, the modified record is edited further or else passed over. The import parameter 'SENDER_SET_NEW ' must be filled out in the Customer Exit, as only this field and not the field 'SENDER_SET is further edited. This also especially means that you must allocate the import parameter 'SENDER_SET_NEW' the value of 'SENDER_SET ' for records, for which no special handling will be carried out otherwise.
  • The second Customer Exit is accessed after the summarization and before the update:
CALL CUSTOMER-FUNCTION '002' EXPORTING REPID = REPID "Senderprogramm GRPID = GRPID "Herkunft RECEIVER_SET = RECEIVER_SET "verdichteter Satz IMPORTING RECEIVER_SET_NEW = RECEIVER_SET "modifizierter verdichteter Satz SUBRC = SUBRC. "Returncode
  • The modified record is only updated if the variable 'SUBRC'
  • is initial.
  • The import parameter 'RECEIVER_SET_NEW' must be filled out in the Customer Exit, since only this field and not the field 'RECEIVER_SET _NEW' is updated.

The third Customer Exit is used for replacing variables. It is called up when you load the transfer rules.

CALL CUSTOMER-FUNCTION '003' EXPORTING REPID = REPID GRPID = GRPID VARIA = VARIA RFELD = RFELD VARTP = VARTP CHANGING KEYID = KEYID EXCEPTIONS VARIABLE_ERROR = 1.

The parameters REPID and GRPID are supplied with the sender structure and the origin. The variable name is in the field VARIA . The name of the receiver field is in the parameter RFELD. Field VARTP contains the variable type. Valid types are fixed values of the domain KCD_VARTYP. You transfer the variable values in the parameter KEYID . If an error occurs you use the exception VARIABLE_ERROR.

the fourth Customer Exit is required in EC-EIS only. It is called up after the summarization and before the determination of key figures. It is a necessary enhancement to the second Customer Exit. This is because changes to the keys are considered before the database is checked to see if records exist for the keys.

The function is called up as follows:

CALL CUSTOMER-FUNCTION '004' CHANGING RECEIVER_SET = R SUBRC = UE_SUBRC.

The parameter RECEIVER_SET contains the receiver record to be changed. The parameter RECEIVER_SET is a changing parameter. No changes must be made to the function module if it is not used.

The User-Exits can be found in the Module pool 'SAPFKCIM'. If you want to use the Customer Exits, you can create a project and activate the Customer Exits with the transaction 'CMOD'. The enhancement which you must use with it is KKCD0001.


Function/Program:
  • EXIT_SAPFKCIM_001: SAP-EIS: User exit for data compression of sender records
  • EXIT_SAPFKCIM_002: SAP-EIS: User exit for data compr. of summarized records before update
  • EXIT_SAPFKCIM_003: Data transfer: Replacement of variables
  • EXIT_SAPFKCIM_004: SAP-EIS: User Exits Data Transfer after Summarization

02-Oct-2005