Lately, all my posts started with "In my current project", so now something else, even if it was developed in the current project. The problem we are facing with is that we get a data extraction which deliver us only the new data records, not the reverse data record.
In my current project we have a lots of source systems which delivers our data in a key figure model. In a normal case is this not a problem. But we need the values of the key figures in a hierarchy. So there are two ways to realize it. First way would be we build a structure with restricted key figures and get our hierarchy. Here is the problem, the customer will need different queries to realize his needs. If there is a change, we need to adjust different queries (each has a light different hierarchy) and the maintainace is immense.
In my current project I created with a collegue a really cool function to analyze a string with 1333 characters. We are using a BW 7.4 SP 17 on HANA. First we have to build an Advanced DataStoreObject with a Field which has a length of 1333. For further understanding, we call the field Field_1333. As data type I used SSTRING.
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:
zeichen(1) TYPE c,
muster(2) TYPE c,
field TYPE c LENGTH 000060.
field = SOURCE_FIELDS-YYSTREET.
IF field CO
' !"%&()*+,-./:;<=>?_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜßabcdefg' & & 'hijklmnopqrstuvwxyzäöü '.
zeichen = field+sy-fdpos(1).
muster+0(1) = zeichen.
muster+1(1) = space.
TRANSLATE field USING muster.
RESULT = field.