abap.
Comparing of data flows through SAP landscape
It is quite a while since I published my last post. A lot happened since then. Analysis for Office 2.8 SP10 is now available, the summer and the vacation are over. But in the meantime
I developed some new ABAP tools, had quite some interesting exchange and took the SQL Script course by Jörg
Brandeis. But in this blog post I want to share with you the latest tool I developed which compare transformations in SAP Business Warehouse systems through the landscape.
Here is a short overview:
BW/4HANA Query Link Components
In BW/4HANA SAP offers you the possibility to link restricted or calculated key figures across different Composite Providers. The advantage of the link components concept is that they can
automatically synchronize whenever you make changes in the source or master component. If you are not familiar with this concept.
SAP Help:
„A linked component can be automatically synchronized whenever changes are made to the corresponding source component.
Example scenario: You have two highly similar InfoProviders, IP_A and IP_B. You have created the query Q_A for IP_A. You now want to create the query Q_B for
InfoProvider IP_B. You want this query to be very similar to query Q_A and to be automatically adjusted whenever changes are made to query Q_A.
To do this, you use the link component concept: You create the linked target query Q_B for source query Q_A. This is more than just a copy, as the system also
retains the mapping information. This mapping information makes it possible to synchronize the queries.„
BW/4HANA: Customer Exit Variable with dynamic assignment
You have different ways to store the logic of your customer exit variables in SAP BW/4HANA. After my last post about Customer Exit Variables with an own enhancement spot I want to share another solution
with you. In this blog post I want to show you how you can implement a BAdI implementation with a Z-Table (Customer Table). In this table you find the assignment between the BEx variable and the corresponding class for the customer exit. This is how the table will look like:
SAP BW F4 BAdI to restrict hierarchy nodes
In our current project we had to deal with the requirement that the enduser only want to show a certain node of a hierarchy to filter. So we used the F4 restriction from the transaction spro. You
find the entry under Business Warehouse >> Enhancements >> BAdI: Restricting the Value Help in the Variables Screen. We implemented it in
the method GET_RESTRICTION_NODE.
At this time I had only experience with the method GET_RESTRICTION_FLAT and searched for implementation examples. I found a wiki entry on scn. In our case we had bookable nodes so we implemented it like
this to get these node and all children of it.
l_s_node-nodename = ‚NODE1‘.
l_s_node-niobnjm = ‚ZZ_IO‘.
Append l_s_node to c_t_node.
But it didn’t work out. The debugging showed no error, but the restriction always showed the complete hierarchy. After a little digging we found our mistake, it have to look like the follwing:
l_s_node-nodename = ‚LEAF1‘.
Append l_s_node to c_t_node.
l_s_node-nodename = ‚LEAF2‘.
Append l_s_node to c_t_node.
And so on for all leafs. So we had to add all leafs and not the nodes. I didn’t found any good explanation so here is the short article about it. Thanks to my
collegue who had the problem.
Customer exit variable to hide hierachy node
In my current project we have the hide a position in a hierarchy, because it is a departmental requirement. The hierarchy is used by many departments so we cannot change it and we also don’t want
to have the same hierarchy two times (except for the one position). So we first excluded the position in the query.
SAP Business Warehouse DTP Filter with ABAP Routine
In my current project I have to filter data with a lot of logic. So I build some ABAP routines in a DTP filter to receive the necessary data.
First you have to open the DataTransferProcess (DTP) in change mode and select the Filter button on the Extraction tab.
SAP BW Decode String during Import
In my current project I have a file to import, which only delivers me a string with a length of 1000. I also get a description what is in this file. Like the following points:
- Customer from 1 to 10
- City from 11 to 50
The file looks like: 0000123456London………………………. So I have a file and a description how to decode this file. Now I need to find a way to separate this information into
InfoObjects. I build a Z-Table which contains the decode information.
SAP BW Create own reversal entry
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.
SAP BW: Keyfigure to Account Model
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.
SAP BW Use Pattern in Variable with Customer Exit
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.
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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. |