Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
Though, I have stated in my first blog that questions about long texts in SAP BW almost disappeared, Long texts in SAP BW: Modeling one more appeared just recently. This time the load of long text was conducted from R/3 system. How to deal with this issue is explained here. What will be said is applied to all source systems (including DB Connect) except flat files. In case of loading long description with 240-character length we have four fields in the datasource of the source system. The first one bears the whole long description (AAA, BBB, CCC and DDD abbreviations designate the parts of the long description, 60-characters length each). The other three, with 60-character length, may contain any information (shown as XXX, YYY and ZZZ). Content of these fields is not important, they are simply placeholders. What is important is the length of the fields. After uploading data from the datasource, in BW information goes to transfer structure. Physically, it is so called PSA table. Information is copied without any changes, 1:1. During further load from PSA table to data target, the start routine in transfer rules works out first. In our case it cuts out the long description in peaces of 60-symbol each and places them into corresponding fields (infoobjects) of the communication structure. Actually, incoming from PSA table XXX, YYY and ZZZ information is replaced by BBB, CCC and DDD on the fly. Update rules of data targets take these peaces of the long description and place them in their long texts. So, in general, the datasource should supply a field with the original long text and several fields with 60 characters length (placeholders). If you have such a datasource, then dealing with it is obvious. If you have not, create it. The easiest way to do it is to create a generic datasource with a table or view.

VIEW Creation (SE11 t-code)

For demonstration purposes I found a table AQGTQ with 255-symbol TEXT field. For a placeholder I used the 80-symbol TEXT field of AQGTS table. It doesn’t matter that the length of this field is not 60 characters. What matters is the fact that this length is greater than 59 characters. For simplification I cut out the long description in two peaces, not four. I choose mentioned above two fields during a view creation and named them as TEXT1 and TEXT2 in the view definition. In order to decrease the number records to be extracted from R/3, I joined the tables with the common key INDX.

Generic Datasource Creation (RSO2 t-code)

I chose an application component and created view. The length of the field INDX is NUMC 5 and I set ‘Selection’ option for this field in the datasource. Since our ZGROUP_x infoobjects have NUMC 2 type, this selection will allow me to restrict the records to be transferred to BW by their key.

Further Steps

I generated the datasource in R/3. Replicated it in BW. Found the infosource I used for load long description from flat files. Assigned to it my R/3 system as a source system and chose the datasource I just created. In transfer rules I copied ZGROUP_1, 0ADDR_LINE1 and 0ADDR_LINE2 names from the left frame into blank fields corresponding to INDX, TEXT1 and TEXT2 fields. Since my datasource didn’t provide the value for language field 0LANGU, I placed in transfer rule for this field a formula which returned the logon language. Transfer rules for the last two fields remained unassigned. It doesn’t matter. In the start routine in transfer rules I placed the following code. Notice, that it is the same code that I used before save that the number of modified fields is less and field names in transfer structure are different. In the Data Selection tab of an infopackage I restricted transferred records by the INDX value form 1 to 99. The list of data targets was changed. The rest is absolutely the same as in case of load from a flat file and has been described in the first blog. About workbooks formatting see the blogs: Long 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...
13 Comments