SAP BW ABAP remove symbols

From time to time it happens that the source system delivers special characters and the Business Warehouse system can not handle it. So the loading process may be crashed.

 

One solution is the following ABAP code:

 

DATA:

zeichen(1) TYPE c,

muster(2) TYPE c,

field TYPE c LENGTH 000060.

field = SOURCE_FIELDS-YYSTREET.

 

DO.

IF field CO

' !"%&()*+,-./:;<=>?_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜßabcdefg' & & 'hijklmnopqrstuvwxyzäöü '.

EXIT.

ELSE.

zeichen = field+sy-fdpos(1).

muster+0(1) = zeichen.

muster+1(1) = space.

TRANSLATE field USING muster.

ENDIF.

ENDDO.

RESULT = field.

Analysis Office - The Comprehensive Guide
Analysis Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis Office. It is based on Analysis Office 2.3 and contains 227 Pages.
29,99 €
Analysis Office - The Comprehensive Guide 2nd edit
Analysis Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis Office. It is based on Analysis Office 2.4 and contains 243 pages.
39,99 €

Write a comment

Comments: 0