Restricting Invalid Characters from Loading into SAP BI 7.

0

Applies to:
This article applies to SAP BI 7.0.

Summary
This document explains how to restrict invalid characters from getting loaded into SAP BI, which in turn results into data loading errors. The source for these characters could be any one accepted by SAP.

Author: Company:

Anurag Krishna Dev Infosys Technologies Limited

Created on: 10 April 2009

Author Bio
Anurag Krishna Dev is an SAP Certified Solution Consultant and working at Infosys Technologies. He has been involved in SAP BI consulting practice for 3 years now. He has expertise in executing implementation and support projects for multiple clients.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

...........................................................10 Disclaimer and Liability Notice.....................................boc...................com | BPX .........11 SAP COMMUNITY NETWORK © 2008 SAP AG SDN ....................................................................................3 How to handle invalid characters................................................com | BOC .....................................................................................................................0 Table of Contents Introduction ..........3 Practical scenario / Data loading errors ................................................................Restricting Invalid Characters from Loading into SAP BI 7..............4 Related Contents ......................................................................................com 2 ...........sap................................................................................................3 Permitted characters .................sap............bpx................................3 Root cause analysis .............................sdn................sap.....................................................................................................................................................................

bpx. Characteristic 0material contains invalid characters :- 4.sap. Thus these characters are permitted for characteristic values.boc.com | BPX .sap. Error in SID generation :- 2. Error when assigning SID: Action VAL_SID_CONVERT table 3.-. and presence of any small letters or special characters in the source data will result into error.sap. If we have to load the small letters “a to z” then we need to check mark the lower case letters setting in the Info Object maintenance screen. It is guaranteed that the characters '!"%&'()*+. This article also intends to help developers understand what all are the valid characters and how to handle the scenarios when any unpermitted characters are present in the source. SAP COMMUNITY NETWORK © 2008 SAP AG SDN . Practical scenario / Data loading errors Here are some of the common errors which appear while loading when the source data contains invalid characters:1.com | BOC .com 3 ./:.0 Introduction This article address the problems/errors arising while loading the data into SAP BI because of the presence of special characters not permitted by SAP in the source data. on the language being used as to whether a character is in capital letters. in the Info Object maintenance).sdn. It depends.<=>?_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' are capitalized in all languages. Activation of M records from DataStore object terminated :- Root cause analysis The cause of all the errors mentioned above is the presence of special characters in the source data. however. SAP allows only All capitalized characters. Permitted characters No small letters are allowed for characteristic values (for example. As a standard.Restricting Invalid Characters from Loading into SAP BI 7. which is not permitted to be loaded into SAP BI.

com | BPX . SAP COMMUNITY NETWORK © 2008 SAP AG SDN .com 4 .sap.com | BOC .Restricting Invalid Characters from Loading into SAP BI 7. In case when all these characters are capitalized in all the installed languages then these characters are also accepted in the characteristic values.boc.sdn.bpx.0 How to handle invalid characters Following are the different ways to avoid error resulting from presence of invalid characters 1 Maintenance of the permitted extra characters in SAP BW If we have such a system that still delivers the unpermitted character then we can make the setting in SPRO IMG Activity and enter such characters in the following path First Go to Transaction SPROÆSAP Reference IMGÆSAP Customizing implementation guideÆSAP Net weaverÆBusiness IntelligenceÆGeneral BI SettingsÆMaintain permitted extra characters (Or we can directly go to transaction RSKC) Basically system checks what all languages are installed in the system at this point of time and whether these characters are capitalized in all these languages or not.sap.sap.

1.sdn.2.com | BPX .2 Change the data in PSA If it is not possible to correct the data in the source system then we can edit the data in the PSA. therefore. It is possible that the validity of these additional characters is then not guaranteed.4 In PSA maintenance select the data Package Number that you wish to edit and then click on continue SAP COMMUNITY NETWORK © 2008 SAP AG SDN .sap. and the select ability of the entire master data is. We need to check whether some how it is possible to correct the source data at the source system level before loading into SAP BW. Once the data has been loaded in PSA then 1.3 Select the request and click on PSA maintenance 1.2 Click on manage PSA 1. First we need to load the data in PSA by running the Info package.Restricting Invalid Characters from Loading into SAP BI 7.com | BOC .sap.sap.1 Go to Data source maintenance screen 1.2.boc.2. come at risk.com 5 .0 Note: All languages that you install subsequently are not checked.bpx.2.1 Correcting the data in the source system This is just another way to avoid all the data loading error. 1.

sdn.com 6 .sap.bpx.0 A.sap.com | BOC .Restricting Invalid Characters from Loading into SAP BI 7. Change the record and click on continue C.com | BPX . Finally save the modified record.boc. Select the particular row and click on change B. SAP COMMUNITY NETWORK © 2008 SAP AG SDN .sap.

com 7 . Let’s take the Flat file scenario and suppose we have the file having records with invalid characters for material column:- SAP COMMUNITY NETWORK © 2008 SAP AG SDN .boc.com | BOC . If all the source characters are within the permitted set then that record is loaded normally. In this process basically we write the ABAP routine in Transfer rule of the field which is suspected to contain invalid character.com | BPX .sap. This routine compares the source characters with the permitted set of characters in SAP BI.Restricting Invalid Characters from Loading into SAP BI 7.sap. In case we have any source record having invalid character then this routine eliminate that invalid character from passing into BI and filtered record gets loaded to SAP BI.0 1 Eliminate the invalid character by using ABAP routine in transfer rule This is yet another and effective way to eliminate the invalid characters in the source data.bpx.sap. To illustrate this process we will take an example scenario.sdn.

"to cancel the update process * raise exception type CX_RSROUT_ABORT.... "to skip a record * raise exception type CX_RSROUT_SKIP_RECORD. [Here your Field will come] DATA : STR_VAR1(20) TYPE C.sap..Restricting Invalid Characters from Loading into SAP BI 7.to make monitor entries . DATA : VAR3 TYPE I. *-* SAP COMMUNITY NETWORK © 2008 SAP AG SDN . .sap.. "to clear target fields * raise exception type CX_RSROUT_SKIP_VAL.fill table "MONITOR" with values of structure "MONITOR_REC" *. "insert your code here *-. For this purpose we will select the rule type as “Routine “for material field as following Then write the following ABAP routine in the window that comes. DATA : VAR2 TYPE I.com 8 . In order to eliminate these invalid characters we need to write the ABAP routine (described above) in the transfer rules.sap..com | BOC .insert your code only below this line .boc.. DATA : INT_VAR TYPE /BI0/OIMATERIAL..sdn. .com | BPX .0 It’s quite obvious that this file contains the invalid character highlighted above.bpx. where system says “Write your Code here “ ABAP Routine:………………………………………………………………………………………………………………… *$*$ begin of routine .

and also the length of the variables. ."''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890' STR_VAR1 = INT_VAR+0(SY-FDPOS).0 DATA : VAR4 TYPE I.sdn. Following is the screen shot of the data loaded in DSO As we can see here that the invalid characters coming in the material field have been eliminated and data has been loaded successfully.VAR3.com | BPX . For rest of the fields we can go for ‘Direct Assignment’.sap.sap.bpx. Then save and activate the transfer rules.com 9 . SAP COMMUNITY NETWORK © 2008 SAP AG SDN . Execute the DTP and display the data loaded. VAR2 = STRLEN( INT_VAR ). IF INT_VAR CN '. In the next step create the DTP to execute this transformation between the Data source and the target DSO. DATA : STR_VAR6(20) TYPE C. STR_VAR6 = INT_VAR+VAR3(VAR4). CONCATENATE STR_VAR1 STR_VAR6 INTO RESULT.<>?/\:. TRANSLATE INT_VAR TO UPPER CASE . ………………………………………………………………………………………………………………… In the above routine you might need to change your field name in place of Material. VAR4 = VAR2 . MOVE SOURCE_FIELDS-MATERIAL TO INT_VAR.Restricting Invalid Characters from Loading into SAP BI 7. RESULT = INT_VAR.boc.sap.com | BOC . VAR3 = SY-FDPOS + 1. ELSE. ENDIF.

com 10 .Restricting Invalid Characters from Loading into SAP BI 7.com | BPX .bpx.sap.sap.sdn.com | BOC .boc.sap.0 Related Contents Psa Easy maintenance Many Records Edited in PSA PSA SAP COMMUNITY NETWORK © 2008 SAP AG SDN .

sap. including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.Restricting Invalid Characters from Loading into SAP BI 7. You agree that you will not hold. SAP will not be held liable for any damages caused by using or misusing the information.bpx.com | BOC .boc. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample. or seek to hold.0 Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP.sap. code or methods suggested in this document. SAP COMMUNITY NETWORK © 2008 SAP AG SDN .com | BPX . SAP responsible or liable with respect to the content of this document.com 11 . and anyone using these methods does so at his/her own risk.sdn.sap.

Sign up to vote on this title
UsefulNot useful