Remember to re-schedule your modified process chain

Share Button

Remember to re-schedule your modified process chain after you modify it and activate it

This may sound evident, but whenever a process chain is changed and activated it is removed from the scheduling. You see if it scheduled graphically when you enter in the process chain via transaction RSPC or RSPC1 and the different process variants show as green, if it is not scheduled it shows as grey or the default color.
So, whenever you change and modify a process change, remember to re-schedule it to avoid headaches the “day after”.

The button to schedule is in the toolbar right to the activate button.Process Chain Activate Button

Process Chain Activate Button

You can use Function Module RSPC_CHAIN_START to start the process chain without changing its current scheduling. In transaction SE37, enter RSPC_CHAIN_START in the Function Module field and click on the Test/Execute Button (F8)Function Module RSPC_CHAIN_START, initial screen

Function Module RSPC_CHAIN_START, initial screen

Enter the name of the Process Chain on the field I_CHAIN and click on the “Execute” button (F8).

Function module RSPC_CHAIN_START, execution
Function module RSPC_CHAIN_START, execution
Share Button

VBA Example for RSDRI_INFOPROV_READ_RFC

Share Button

VBA Example for RSDRI_INFOPROV_READ_RFC

I found during testing that FM RSDRI_INFOPROV_READ_RFC cannot be used directly in VBA as it sends an error when trying to do the command

Set oR3F = Module1.oFunction.Add(“RSDRI_INFOPROV_READ_RFC”)  à Message box: wdtfuncs SAP data type not supported

This is due to an Export Parameter that is String type (E_RFCDATA_UC) as found in SCN thread issue using the COM components supplied with SAP GUI 6.2 or 6.4

To overcome this issue, I copied RSDRI_INFOPROV_READ_RFC into ZBW_RSDRI_INFOPROV_READ_RFC removing that parameter and it now works. The code below contains a test for the function module, by running testFM you get data from a cube. Be aware this is a test only and you would need to refine it to have a loop calling the FM multiple times based on I_MAXROWS provided and the size of the specific result set.

For more information refer to the SAP Online Help Data Mart Interface

Below is all the code needed to wrap the function module and to test it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
Public oConnection As Object     ' SAP/BW Connection
Public oFunction As Object       ' Function object
Public sDetMsg As String
Public sSysID As String
Public vBWConnStatus As Boolean  ' Status for BW connection
Public sEndOfData As String
 
Public Function RSDRI_INFOPROV_READ_RFC( _
ByVal i_infoprov As String, _
ByVal i_reference_date As String, _
ByRef i_t_sfc() As String, _
ByRef i_t_sfk() As String, _
ByRef i_t_range() As String) As String()
 
    Dim tableData() As String
    Dim oR3F As Object
'
    Dim Data As Object
    Dim sfc As Object
    Dim sfk As Object
    Dim myRange As Object
    Dim Line As Long
    Dim FuncResult As Integer
    Dim iRowCount As Integer
'A copy of the original function module removing export parameter
'E_RFCDATA_UC as it is String and it is not supported
    Set oR3F = Module1.oFunction.Add("ZBW_RSDRI_INFOPROV_READ_RFC")
    oR3F.Exports("I_INFOPROV") = i_infoprov
    oR3F.Exports("I_REFERENCE_DATE") = i_reference_date
    oR3F.Exports("I_RESULTTYPE") = "V"
 
    Set sfc = Nothing
    Set sfc = oR3F.Tables.Item("I_T_SFC")
    For i = 1 To UBound(i_t_sfc, 2)
        sfc.Rows.Add
        sfc(i, "CHANM") = Trim(i_t_sfc(1, i))
        sfc(i, "CHAALIAS") = Trim(i_t_sfc(2, i))
        sfc(i, "ORDERBY") = Trim(i_t_sfc(3, i))
    Next i
 
    Set sfk = Nothing
    Set sfk = oR3F.Tables.Item("I_T_SFK")
    For i = 1 To UBound(i_t_sfk, 2)
        sfk.Rows.Add
        sfk(i, "KYFNM") = Trim(i_t_sfk(1, i))
        sfk(i, "KYFALIAS") = Trim(i_t_sfk(2, i))
        sfk(i, "AGGR") = Trim(i_t_sfk(3, i))
    Next i
 
    Set myRange = Nothing
    Set myRange = oR3F.Tables.Item("I_T_RANGE")
    For i = 1 To UBound(i_t_range, 2)
        myRange.Rows.Add
        myRange(i, "CHANM") = Trim(i_t_range(1, i))
        myRange(i, "SIGN") = Trim(i_t_range(2, i))
        myRange(i, "COMPOP") = Trim(i_t_range(3, i))
        myRange(i, "LOW") = Trim(i_t_range(4, i))
        myRange(i, "HIGH") = Trim(i_t_range(5, i))
    Next i
 
  Set Data = Nothing
  Set Data = oR3F.Tables("E_T_RFCDATAV")
 
  FuncResult = oR3F.Call
 
    sEndOfData = oR3F.Imports("E_END_OF_DATA")
    If FuncResult = True And Data.RowCount > 0 Then
    'Fields: ID IOBJNM VALUE UNIT
        ReDim tableData(4, Data.RowCount)
        For Line = 1 To Data.RowCount
          tableData(1, Line) = Data(Line, "ID")
          tableData(2, Line) = Data(Line, "IOBJNM")
          tableData(3, Line) = Data(Line, "VALUE")
          tableData(4, Line) = Data(Line, "UNIT")
        Next
        RSDRI_INFOPROV_READ_RFC = tableData
    End If
 
  Set Data = Nothing
  Set sfc = Nothing
  Set sfk = Nothing
  Set myRange = Nothing
  Set oR3F = Nothing
 
    For i = 1 To oFunction.Count
        oFunction.Remove (1)
    Next i
End Function
Public Sub Logoff()
    If vBWConnStatus = False Then
        MsgBox "Not logged in"
    Else
      oFunction.Connection.Logoff
      vBWConnStatus = False
   End If
   Set oConnection = Nothing
   Set oFunction = Nothing
End Sub
Sub clearData()
    ActiveCell.SpecialCells(xlLastCell).Select
    iLastRow = Selection.Row
    If iLastRow >= 2 Then
        sRowRange = 2 & ":" & iLastRow
        Rows(sRowRange).Select
        Selection.Delete
        Range("A1").Select
    End If
End Sub
 
Sub testFM()
Dim myData() As String
Dim i_t_sfc() As String
Dim i_t_sfk() As String
Dim i_t_range() As String
 
Logon 'YOUR LOGON Sub
 
sEndOfData = ""
'In a real case scenario, it should do a while...loop until sEndOfData = "X"
 
If Month(Date) < 10 Then
    sMonth = "0" & Month(Date)
Else
    sMonth = Month(Date)
End If
If Day(Date) < 10 Then     sDay = "0" & Day(Date) Else     sDay = Day(Date) End If sDate = Year(Date) & sMonth & sDay ReDim i_t_sfc(3, 4) i_t_sfc(1, 1) = "0DISTR_CHAN" 'CHANM i_t_sfc(2, 1) = "0DISTR_CHAN" 'CHAALIAS i_t_sfc(3, 1) = "0" 'ORDERBY i_t_sfc(1, 2) = "0DIVISION" 'CHANM i_t_sfc(2, 2) = "0DIVISION" 'CHAALIAS i_t_sfc(3, 2) = "0" 'ORDERBY i_t_sfc(1, 3) = "0SALESORG" 'CHANM i_t_sfc(2, 3) = "0SALESORG" 'CHAALIAS i_t_sfc(3, 3) = "0" 'ORDERBY i_t_sfc(1, 4) = "0CALDAY" 'CHANM i_t_sfc(2, 4) = "0CALDAY" 'CHAALIAS i_t_sfc(3, 4) = "0" 'ORDERBY ReDim i_t_sfk(3, 1) i_t_sfk(1, 1) = "NET_VAL_S" 'KYFNM i_t_sfk(2, 1) = "NET_VAL_S" 'KYFALIAS i_t_sfk(3, 1) = "SUM" 'AGGR ReDim i_t_range(5, 1) i_t_range(1, 1) = "0CALDAY" 'CHANM i_t_range(2, 1) = "I" 'SIGN i_t_range(3, 1) = "BT" 'COMPOP i_t_range(4, 1) = "20110401" 'LOW i_t_range(5, 1) = "20110531" 'HIGH sWS = "MAIN" 'Rename to your worksheet name Sheets(sWS).Select Range("A1").Select Columns("A:D").Select Selection.ColumnWidth = 30 Selection.NumberFormat = "@" Range("A1").Select iRow = 1 iCol = 1 ActiveCell.SpecialCells(xlLastCell).Select iLastRow = Selection.Row If iLastRow >= iRow Then
    sRowRange = iRow & ":" & iLastRow
    Rows(sRowRange).Select
    Selection.Delete
End If
 
myData = RSDRI_INFOPROV_READ_RFC("0SD_C03", sDate, i_t_sfc, i_t_sfk, i_t_range)
iCount = UBound(myData, 2)
If iCount > 0 Then
    'First write the headers
 
    For i = 1 To UBound(i_t_sfc, 2)
        Worksheets(sWS).Cells(iRow, iCol + i - 1).Value = i_t_sfc(1, i)
    Next i
    iColNext = iCol + UBound(i_t_sfc, 2)
    For i = 1 To UBound(i_t_sfk, 2)
        Worksheets(sWS).Cells(iRow, iColNext + i - 1).Value = i_t_sfk(1, i)
    Next i
    iColTotal = UBound(i_t_sfc, 2) + UBound(i_t_sfk, 2)
 
    'Now the data
    iCol = 1
    For i = 1 To iCount
        sValue = ""
        sUnit = ""
        sValue = Trim(myData(3, i))
        sUnit = Trim(myData(4, i))
        If sUnit <> "" Then
            sValue = sValue + " " + sUnit
        End If
        Worksheets(sWS).Cells(iRow + myData(1, i), iCol).Value = sValue
        iCol = iCol + 1
        If iCol > iColTotal Then
            iCol = 1
        End If
    Next i
    Columns("A:D").Select
    Columns("A:D").EntireColumn.AutoFit
    Range("A1").Select
End If
 
Logoff 'YOUR LOGOFF SUB
 
End Sub
Share Button

Transport status in table TMSBUFFER and field MAXRC

Share Button

Transport status in table TMSBUFFER and field MAXRC

In order to find and download the status for the different transports that go into a system, use table TMSBUFFER, the field MAXRC:

Field MAXRC has a logic described below. As an example see the 4 transports below in a target system:
D50964060 RC is 0004 (between 1 and 4, warning, yellow)
D50968806 RC is 0008 (between 5 and 8, single error, red)
D50971456 RC is 0000 Green
D50971642 RC is empty Blitz

Transport Status traffic light
Transport Status traffic light

TMSBUFFER traffic light field

TMSBUFFER traffic light field

The logic for field MAXRC is as follows:Traffic Lights

Traffic Lights

This logic comes from the code in Function Module MS_UIQ_IMPORT_QUEUE_DISPLAY

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button

2LIS_02_ITM Not Updating Setup Tables In Initialization

Share Button

2LIS_02_ITM Not Updating Setup Tables In Initialization

Summary

When running the setup for application 02 (TR OLI3BW), the table was not filled: running RSA3 with no restrictions did not retrieve any records.

Diagnostics

By debugging function module MCEX02_PREPARE_INFO it was found that the field UPDACT in table TMCEXACT was not set for MC02M_0ITM. Once set (with a custom program to update), it started writing data in the setup table.

Activating the DataSource in transaction LBWE updates the field TMCEXACT-UPDACT as per SCN thread http://forums.sdn.sap.com/thread.jspa?threadID=115672

Some times the configuration in ECC is done in a client and the data is available in another one. To activate the DataSource in the “data” client, find your customizing transport request that contains the DataSource activation . Log into your “data” client and enter TCODE”SCC1″ enter the transport number and select include request subtasks.
This will bring across the client dependent data.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button

How to find who did a selective deletion, when and what was deleted

Share Button

How to find who did a selective deletion, when and what was deleted

Summary

Whenever you make a selective deletion, there is a log that keeps that information in the same place that you did the selective deletion.

Details

In the same place that you did the selective deletion, right-mouse click on the InfoCube, and select the menu option “Manage”

InfoProvider Context Menu

Select the “Contents” tab

"Contents" tab
“Contents” tab

At the bottom of the tab, click on the “Delete Selection” button

Delete Button
Delete Button

In the window that pops-up, click on the button “Log”

"Log" Button
“Log” Button

You will see a log that details date, time, user, fact table, numbers of records and the number of the log

log entry
log entry

 

The job that runs the selective deletion has a prefix of “BI_INDX” and executes the ABAP/4 report RSINDEX1.

The tables that contain this selective deletion log are:
RSDRDLOGHEADER Log Delete Actions (Header Table)
RSDRDLOGPOSITION Log Delete Actions (Positions)

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button

Rounding in BEX queries – formulas

Share Button

Rounding in BEX queries – formulas

Summary

There is no rounding functionality in formulas in the BEX query Designer (if you feel this information is not true, please contact us).

Formula

If you want to round a key figure “KF” to have zero decimals:
( FRAC ( ‘KF’ ) < 0.5 ) * FLOOR ( ‘KF’ ) + ( FRAC ( ‘KF’) >= 0.5 ) * CEIL (‘KF’)

An equivalent MS Excel formula you can use to test is:
=IF(A3-TRUNC(A3)<0.5,FLOOR(A3,1),CEILING(A3,1))

If you want to round a key figure “KF” to have 2 decimals:
( FRAC ( ‘KF’*100 ) < 0.5 ) * FLOOR ( ‘KF’ * 100 ) / 100 + ( FRAC ( ‘KF’ * 100 ) >= 0.5 ) * CEIL (‘KF’ * 100) / 100

The equivalent MS Excel formula to test it is:
=IF(A5*100-TRUNC(A5*100)<0.5,FLOOR(A5*100,1)/100,CEILING(A5*100,1)/100 )

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button

How to verify SAP BI 7 Transformations between systems

Share Button

How to verify SAP BI 7 Transformations between systems

Frequently a transport log for a transformation ends with errors or warnings. There are multiple causes for errors, most of them due to out of sync objects, for example, an object (cube, DSO) was modified in the source system and not transported to the target system. In case of errors, after diagnosis, a new transport is needed.

However, there are cases in which there are warnings, with no or little guidance as if they are relevant, such as ‘could not delete routine’ or ‘routine deleted’. In order to verify that the transformations are OK, the long way to go is to compare all mappings and routines between the 2 systems. A quick way is based on the transformation programs comparison, using transaction SE39 “Splitscreen Editor: (New)”. This transaction allows to compare 2 programs, either in the same system or separate systems.

To find the name of the programs for the transformations, execute transaction SE16 “Data Browser” in both systems. Entering both fields SOURCENAME and TARGETNAME with the corresponding fields will suffice. If you don’t know which transformation the transport refers to, get the Transformation ID from the transport object list (SE09) and enter it in the source system RSTRAN field TRANID. Be aware that this same TRANID won’t show up on the target system, but in the RSTRAN field ORGTRANID (this also happens with DTPs, table RSBKDTP). Field RSTRAN-TRANPROG contains the transformation program name, just add prefix “GP” to this value.

Execute transaction SE39 and click on the button “Compare Different Systems” (Shift-F7)

SE39 ABAP Split Editor

 

Once you click on the button, a new field will open for the RFC destination. As the landscape Development -> Quality -> Production is normally configured, normally you will find a corresponding RFC entry. It is also helpful to compare between landscapes, project versus production support, but not always the RFC connection is available.

SE39 Split Editor Remote comparison

Once you have entered the RFC destination (e.g. the quality system), and the 2 transformation program names, this initial screen will look like this

SE39

Now, click on the “Display” button.

Depending on the system settings, you may need to login into the target system. You will get a 2 column display of the programs

Program Comparison

To check the differences, click on the button “Comparison On” (CTRL-F4), this will highlight the differences, and with the button “Next Difference From Cursor” (CTRL-SHIFT-F9), you will navigate through the differences. Normally the differences are only related to timestamps and user IDs between systems, but you will find differences if the transformations are not identical.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button

Detailed Transport Documentation

Share Button

Detailed Transport Documentation

Summary

When analyzing the contents of a transport, it’s often challenging to understand all entries in the transport because some of them are ‘cryptic’. Instead of having a meaningful key, they have a system generated one that makes it hard to figure out. This is the case for report elements, update rules, transformations, InfoPackages, Routines and Formulas. The Object types in transports are described in table OBJT and in the ABAP/4 include LTR_OBJECTSF02 . In later versions, you can access now certain BI objects by double-clicking on it on the transport screen, for example, transformations.

Documentation tool

A documentation tool that uses the tables mentioned below to translate the generated IDs is useful to follow up on transports: (transport entries are stored in table E071).
InfoPackages: RSLDPIO and RSLDPIOT
Reporting Elements: RZELTDIR and RZELTTXT
Routines: RSARROUTT, formulas: RSAFORMT
Transformations: RSTRAN, update rules: RSUPDINFO

Demo tool

This transport documentation tool was created in MS Excel. Another possible approach would be a similar program in ABAP/4. For a demo, click on Detailed Transport Documentation Demo

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button

How to activate an SAP BI transformation in a target system

Share Button

How to activate an SAP BI transformation in a target system

When a BI transformation gets de-activated due to a transport, display the transformation generated program and activate it.

It is common to get transformation de-activated after a related  transport: either by changing the transformation source, target or a related InfoObject. The person that is responsible for the causing
transport should create a new transport with the affected transformation to permanently correct the situation. Depending on the size and controls of a specific landscape, this can take a while. A workaround is to display the transformation in BI transaction RSA1 and select the menu option Extras -> Display Generated Program. Then click on the ‘match’ button to activate or Ctrl-F3.

This may save you in some situations, but not all. If the transport deactivated the associated DTP you may not be able to load data.

Another temporary option is to open the system (Basis) and activate.

You can also run the ABAP/4 report RSDG_TRFN_ACTIVATE with transaction SE38 to attempt to activate the transformation in the target system. Depending on the system setting and the ‘correctness’ of the transformation, it will activate or fail. The transformation ID can be found in table RSTRAN (first field), based on the source and target objects. This program also activates the affected DTPs. See SAP Note 1408161

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button

How to verify an SAP BI MultiProvider definition and its mappings

Share Button

How to verify an SAP BI MultiProvider definition and
its mappings

Checking SAP BI MultiProvider mappings can be cumbersome because the user interface shows InfoProviders descriptions instead of technical names

If you want the check your MultiProvider mapping, just download 2 main tables from BI (use transaction SE16):
-RSDCUBEMULTI ‘InfoCubes concerned with MultiCube’ has the providers you have assigned to the MultiProvider
-RSDICMULTIIOBJ ‘MultiProvider: Selection/Identification of InfoObjects’ contains the mappings.

Things to check:
-Search for missing mappings: for example you have 3 similar cubes and 0MATERIAL is mapped to 2 of them but not to the third one.
-Inconsistent assignments: one mapping refers to a navigational attribute while a similar one refers to the InfoObject itself.

Downloading RSDICMULTIIOBJ in a spreadsheet and sorting it by IOBJNM (InfoObject in MultiProvider) may help. Also counting the number of assignments to a specific provider and comparing it to a similar provider.

Other tables that help in the MultiProvider definition are the cube ones:
-RSDCUBE ‘Directory of InfoCubes / InfoProvider’
-RSDCUBET ‘Texts for the InfoCubes’
-RSDDIME ‘Dimensions directory’
-RSDDIMET ‘Dimension Texts’
-RSDDIMEIOBJ ‘InfoObjects per dimension (where-used list)’
-RSDCUBEIOBJ ‘Objects per InfoCube (where-used list)’

Also executing the FM BAPI_MPRO_GETDETAIL will provide you with all the information mentioned above without dealing with all the tables.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Share Button