Functionality Creating one or more data cleansing cases. Meaning of the Interface Parameters: Using this BAPI method, it is possible to create one or more datacleansing cases in the system, which should then be processed by anadministrator. Since there are different categories of data cleansingcases, that are used by various applications, it is important that therelevant fields are filled when the method is called. Meaning of the interface parameter: NumberOfCases, StartIndex (entry Parameter) NumberOfCases specifies how many cases are to be created The parameter is optional. It is only relevant if Several cases are to be created at a time Not the whole list of transferred cases is to be created If NumberOfCases is not filled then all the transferred entries of thetable ClearingCaseData are created as data cleansing cases in thesystem. StartIndex> (entry Parameter) StartIndex indicates from which entry of the table ClearingCaseData thestated number of cases should be created. The parameter is optional. It is only relevant if Several cases are to be created at a time Not the whole list of transferred cases is to be created If StartIndex is not filled, then the sytem starts at the first entryof the table ClearingCaseData. It is recommended that you work with the parameters NumberOfCases orStartIndex if you want to restart in the case of an error, whereby thetables used originally should not be restructured. For example, if a termination occurred during the processing of thetenth record, you can start the next attempt at the eleventh record(StartIndex = 11). AcceptDuplicates> (entry parameter) Indicator: Acceptance of duplicate data cleansing cases per applicationobject In the standard setting (AcceptDuplicates = X>) it is possible tocreate several data cleansing cases for one and the same applicationobject. If the parameter is transferred when it is empty, then the modulechecks whether a case of the same category already exists for the sameobject of the same application. If this is the case, then no new datacleansing case is created. This is recommended if you want to avoid thecase 'B is a possible duplicate of A'>' also being createdalongside case 'A is a possible duplicate of B>'. ClearingCaseData> (entry parameter) List of the data cleansing cases to be created. Administrative andcontrolling information is given for each data cleansing case. At least fill the fields CASE_NUMBER (external numbering), CASE_TYPE(case category, see fixed values) and APPLICATION (applicationaccording to value tables TBZ5B). Other fields: SOURCE - Source of the data cleansing case. Here, for example, the nameof a data provider or of a search program that was used can be found. ADMINISTRATOR - Processor responsible NOTE - Note/Comment [BUFFERED_DATA - Indicator for the relevant application, that thetarget objects are not to be found in the original tables, but ratherin shadow tables. At present the field is not being actively used byany application.] PRIORITY - Priority (of the processing) STATUS - Status of the processing TargetList> (entry parameter) List of target objects All target objects belonging to a case must be marked with theCASE_NUMBER of a case. A target object must be identified by statingthe application-specific key (field OBJECT_APPL_KEY). One of the target objects must have IS_SOURCE = X>, and thus formthe source object for the cleansing to be carried out. All other targetobjects are then possible targets of the cleansing. Example: If duplicates of business partners are to be cleansed,(ClearingCaseData: Case_type = D>, application = BUPA>),then the business partner that should be deleted if necessary isentered with IS_SOURCE = X> in the target object list. Businesspartners that constitute possible duplicates, are entered in the targetobject list with IS_SOURCE = ' '>. In the latter case it is alsopossible to state, with the help of the field PROBABILITY, thelikelihood of there being duplicates. ClearingCaseNumbers> (entry or return parameters) List of the created data cleansing cases. All the successfully createdcases are stated in this list. Since the system always works with internal number assignment for thenumber of the data cleansing case, the number given by the system isreturned in the field CASE_NUMBER, whereas the originally used externalcase number is returned with the field ORIGINAL_NUMBER Alternatively it is possible, as of Release 6.20, to return a key inthe form of a GUID. Return> (return parameter) List of the error messages for the cases that were not createdsuccessfully.Example data: lt_clearing_case_data type table ofBAPIBUS2132_CLEAR_CASE_DATA, ls_clearing_case_data type BAPIBUS2132_CLEAR_CASE_DATA, lt_target_list type table of BAPIBUS2132_TARG_DATA, ls_target_list type BAPIBUS2132_TARG_DATA, lt_clearing_case_keys type table of BAPIBUS2132_CLEAR_CASE_KEY, lt_results type table of bapiret2. * Supply clearing case data ls_clearing_case_data-case_number = 1. ls_clearing_case_data-application = 'BUPA'. "business partner ls_clearing_case_data-case_type = 'D'. "duplicates ls_clearing_case_data-priority = 3. append ls_clearing_case_data to lt_clearing_case_data. * Supply target list data * Source object ls_target_list-case_number = ls_clearing_case_data-case_number. ls_target_list-object_appl_key = '0000123456'. "business partnernumber ls_target_list-is_source = 'X'. append ls_target_list to lt_target_list. * First target ls_target_list-case_number = ls_clearing_case_data-case_number. ls_target_list-object_appl_key = '0000158456'. "business partnernumber ls_target_list-is_source = ' '. ls_target_list-probability = 100. "100 % append ls_target_list to lt_target_list. * Second target ls_target_list-case_number = ls_clearing_case_data-case_number. ls_target_list-object_appl_key = '0000158458'. "business partnernumber ls_target_list-is_source = ' '. ls_target_list-probability = 90. "90 % append ls_target_list to lt_target_list. CALL FUNCTION 'BAPI_CLEAR_CASE_CREATE_MULTI' EXPORTING * NUMBEROFCASES = * STARTINDEX = ACCEPTDUPLICATES = ' ' TABLES CLEARINGCASEDATA = lt_clearing_case_data TARGETLIST = lt_target_list CLEARINGCASENUMBERS = lt_clearing_case_keys RETURN = lt_results . if not lt_results is initial. * insert error handling here endif. if not lt_clearing_case_keys is initial. * do something with ok cases endif. Notes For subsequent calls of the methods for reading, changing or deletingdata cleansing cases, returned keys must be used in the fieldClearingCase_numbers-Case_Number. Description Indicates whether several cleansing cases are to be allowed for thesame application object or not. Value range AcceptDuplicates = ' ' means that a check is being carried out. A newcase is not created when a cleansing case already exists for one of thetransferred application objects. AcceptDuplicates = 'X' means that no check is being carried out. Description Number of data cleansing cases that are to be created with thisfunction call. Description Start index in the data and keys table from which the number of casesare to be created that were specified by NumberOfCases. Description Central administrative data of the data cleansing cases that are to becreated. Table with one entry per case. Description Table of the keys of a cleansing case. The table can be filled externally. This is useful if a GUID alreadyexists in a non-SAP system. The local case number (ClearingCaseNumber) cannot be filled externally,it is taken from the number range COM_CLEAR in the local system andreturned to the table. Description Results table (for error messages) Default Empty Description Target object list A complete list with subsets per cleansing case. The assignment oftarget objects to a particular cleansing case (ClearingCaseData) isdetermined by the means of ClearingCaseNumber. |