Skip to Content
0
Jun 05, 2022 at 02:21 PM

Change Master Data Attribute Value (VBA sample) - Object doesn't support this property or method

109 Views

We are trying to implement integrated-business-planning-excel-addin-vba-samples/VBA samples/Samples for SAP IBP APIs released with 2205/1.3_Change Master Data Attribute Value at main · SAP-samples/integrated-business-planning-excel-addin-vba-samples · GitHub which tries to allow the change of attribute's value via custom (sample) VBA on the planning view.


In the sample code from SAP, the ABC code is the attribute to be changed:
image.png

The documentation says:

image.png

Why do they use "4" here in the sample code? I would assume that it needs to be shifted to the right "2" columns instead, to find a data point (Key Figure?).

When trying to test this. It seems to be the case. For example if I want to change the Unit of Measurement, you can see that in this view, to go from a Unit of Measurement (Attribute) to the Year period (Key Figure), we need to shift one column to the right:

image.png

Indeed, instead of giving the error "Select cells within the data area of the planning view"

image.png

when adapting the code and using ...(Target.Offset(0,1)) the code allows to ask for a new input:

image.png

However, when trying to proceed in the "Change UOM" view, to actually change the Unit of Measurement from "PC" into "A" for example (so after pressing OK), the following error appears:

image.png

"Object doesn't support this property or method".

Why would this error occur, how to prevent this error and make the code operational please?

Attachments

image.png (3.7 kB)
image.png (14.9 kB)
image.png (67.1 kB)
image.png (3.7 kB)
image.png (5.9 kB)
image.png (3.3 kB)