Sunteți pe pagina 1din 10

Removing Invalid Characters for a Particular Infoobject

Applies to:
SAP 7.0 BI versions. For more information, visit the Business Intelligence Homepage

Summary
This paper explains about the removing of invalid characters for particular infoobject, which is when the entry in the flat file in a particular column for that particular infoobject contains invalid or Chinese characters then how to remove those particular entries from the PSA table using Routine for that particular infoobject. Author: Gaurav Paul

Company: LNT Infotech Limited Created on: 10 February 2009

Author Bio
Gaurav Paul is working as a SAP BI Consultant having 1.3 years of experience. He has worked on Development projects for multiple clients.

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

Table of Contents
Introduction: ........................................................................................................................................................3 Step by Step Solution......................................................................................................................................3 Related Content..................................................................................................................................................9 Disclaimer and Liability Notice..........................................................................................................................10

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

Introduction:
This article describes about the basic steps about the removing of invalid characters for particular infoobject, which is when the entry in the flat file in a particular column for that particular infoobject contains invalid or Chinese characters then how to remove those particular entries from the PSA (Persistent Staging Area) table using Routine for that particular infoobject. That is it will create spaces for that particular invalid character. Step by Step Solution Here initially I am going to show you the flat file structure that has errors in flat file for a particular infoobject ZAREA.

Here you can see that column ZAREA contains invalid characters and our motto is to remove those invalid characters with blank spaces so that values for that particular column can be successfully updated in our infoprovider.

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

So for this I create a DSO in which Ill be loading this flat file without these invalid characters.

Then we create a data source for this DSO and then create infopackage and schedule that package and load the data till PSA.

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

Then we create transformation for this DSO. In the transformation, while mapping the fields from source to target we give direct assignment from source to target for all the fields except for ZAREA.

For ZAREA, we write a routine that is right click on ZAREA click on rule details.

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

In the rule type select routine from dropdown and another window opens.

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

Write the following routine in that window for that particular ZAREA.

Check for any errors in this routine and if no errors are found then save this routine and click on transfer values. This routine basically removes all the invalid characters and fills with blank spaces replacing those chars. Save and activate your transformation.

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

Then right click and create Data Transfer Process. Then load the data from PSA into DSO using DTP. And finally when you activate the request and see the data yourself in DSO you will find that the invalid characters have been removed from that particular column ZAREA and data has been loaded successfully.

Finally you see that in ZAREA field, from each value those invalid characters have been truncated and values have been updated successfully.

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

Related Content
http://www.help.sap.com https://www.sdn.sap.com/irj/scn/thread?messageID=6695387#6695387 https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4059

SAP COMMUNITY NETWORK 2009 SAP AG

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

Removing Invalid Characters for a Particular Infoobject

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. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. 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, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK 2009 SAP AG

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

S-ar putea să vă placă și