cancel
Showing results for 
Search instead for 
Did you mean: 

SAPGetCellInfo

0 Kudos

Hello Experts,

                      New to analysis office and I am having difficulty with understanding SAPGetCellInfo API Function with the property Selection.

I have got the following report

With my understanding, when i run the following code, I should get details regarding the GLAccount Dimension( Row filter) , Time Dimension (Column Filter) and Measure. Is my understanding correct or its totally wrong.

Public Sub CellInfo1()

Dim Result13 As Variant

Dim txt As String

Dim i As Long

Result13 = Application.Run("SAPGetCellInfo", ActiveCell, "SELECTION")

For i = LBound(Result13) To UBound(Result13)

    txt = txt & Result13(i) & vbCrLf

  Next i

  MsgBox txt

End Sub

When I try to run this, I am getting subscript out of range error. Kindly correct me where I am going wrong. Your help is much appreciated.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vicky,

I tried a similar drill-down and I'm getting a 2-dimensional Array (at least in 1.4.14).

I guess this is your Problem. Please check in the Debugger and then adjust your Loop.

BR, Martin

0 Kudos

Thanks Martin for the clarification. Could you please let me know what are those values in result (1,2) and (1,3).

Former Member
0 Kudos

Hi Vicky,

result (1,2) is the generated technical name of the key figure "FK Fakturier. Wert".

To be honest, what result (1,3) is, I'm not 100% sure. I assume it is the row reference. Similar to what you have as drill-down characteristics in SAPGetData:

In the previous example you found this information in Result (2) to (4).

Assume you refresh your report during the month. The value itself can change day by day, so you need a second "constant" for explicitly defining the row, related to the one specified key figure...

BR, Martin

Answers (0)