The questions about representing in BW the texts longer than 60 symbols almost disappeared in BI forums. I hope that my detailed posting with explanation of how to do it was not the least reason of it: Re: Increasing the length of Infoobject from 60 to 240 characters However, the questions about formatting workbooks and representing long texts are still there. It was the main motive for writing this blog. I'm going to demonstrate how to show long texts in Business Explorer Analyzer. Also it is to be an introduction to formatting workbooks in Excel using Visual Basic for Applications (VBA) code. The code is based on the modeling scheme for long texts that I proposed in my posting. That's why I'll explain this scheme again as a prerequisite for formatting with my VBA code. As a side effect, It'll be shown how to use a flexible infosource for simultaneous upload of texts and attributes (master data). Suppose, for simplification, that we need to keep in SAP BW the long text (description) with length of 240 characters and show this text in Business Analyzer workbook. I often encountered such an approach when this long description has been cut in four parts, 60-symbol peaces each (due to the well-known limitation of SAP BW), and been kept as characteristic values of four infoobjects, type of CHAR 60. I don't like this approach, because:
All this is enough for me to come up with another approach. I also use four infoobjects (hereinafter referred to as IOs). But, the peaces of the long text are kept in the long texts of the IOs, not in their characteristic values (keys). We will create three IOs and assign them as attributes of the one, basic (master) infoobject. The advantage of this - we don't have to pass to the infoprovider all four IOs. We load in there just one, master infoobject. I will demonstrate it on the example of the long description of foreign trade goods groups. The picture below shows an Excel file prepared for data load. Notice, that some description lengths definitely exceed 60 characters.
So, here we go. First, we create an infoobject for the 2nd part of the description. There is no need to create it as CHAR 60, because we will keep the peaces of the long description (60 symbols each) in the long texts, totaling 240 characters maximum length. It is even more convenient to determine each IO as NUMC 2 (the natural code of the goods group).
Since we are not going to use the peaces of the long description for displaying separately, sorting or analyzing; we declare them as "Attribute Only". Uncheck "With master data" flag since our attributes will not have their own attributes. And you see also that our texts are going to be language-dependent.
Create the 3rd and 4th parts, ZGROUP_3 and ZGROUP_4 infoobjects similarly. Finally, create the master/basis infoobject ZGROUP_1 which will have all the three created earlier infoobjects as attributes. The master IO has the same type and features, except the following:
Choose "Overwrite" as Update type, and "Source Field" as Update Method. Select ZGROUP_1 infoobject as the source field.
Click on the "Key Fields" tab to make sure that the source field for the Key Field has an assignment as shown below.
Repeat the same procedure for all attributes. Now all grayed out crosses should look like green triangles. Activate the rules.
Create URs for the text data target of ZGROUP_1. Click on the grayed out cross.
Again, choose "Overwrite" and "Source Field". Make sure that you choose 0ADDR_LINE1 infoobject as a source field.
The "Key Fields" tab will have two infoobjects. Leave them as they are.
Repeat creation of URs for ZGROUP_2, choosing 0ADDR_LINE2 as a source field.
One of the rows in the "Key Fields" tab will have the blank assignment.
Choose ZGROUP_1 (not ZGROUP_2!) as a source.
Repeat the same for the rest of the text data targets, selecting appropriate infoobject for the source field of Update Method and ZGROUP_1 as the source for the Key Field. Create an infopackage. Make sure that you see in the "Data Targets" tab all five targets, four for texts, and one - for attributes.
Load data. In the Infoobjects area of RSA1, from the context menu of ZGROUP_1 execute "Manage Master Data" option. You'll see that the long text has been truncated, and all attributes have the same values as this infoobject's characteristic value.
Master data for the ZGROUP_2 will show that its long text contains the second part of the long description. The blank texts for some rows mean that the first part of the long description was less than 61 character long.
The similar is true for the 3rd and 4th peaces. Create an infoprovider. Load into it some transaction data containing our ZGROUP_1 infoobject. Now we are ready for a query creation and formatting a workbook. See the next blogs: Long texts in SAP BW: Modeling – Follow UpLong Texts in SAP BW: Displaying in BEx Analyzer. Introduction to Excel Workbooks Formatting. Part I...Long Texts in SAP BW: Displaying in BEx Analyzer. Introduction to Excel Workbooks Formatting. Part I...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |