cancel
Showing results for 
Search instead for 
Did you mean: 

Planning view with VBA code to show MD details

ramicie11
Member
0 Kudos

Dear experts,

I have downloaded from GitHub a sample planning view with VBA codes to show MD details with the function "BeforeDoubleClick". Link: https://github.com/SAP-samples/integrated-business-planning-excel-addin-vba-samples/tree/main/VBA%20...

The thing is this sample planning view is adapted to click double on a Product ID but I want to apply same logic with different attribute, "GTIN" and then showing the MD details related to specific attribute names and values that I have defined in the details view (attached some screenshots).

I have replaced PRDID/Product ID by GTIN in all the entire code but still is popping up a message that PRDID is missing. I'm not familiar with VBA codes as this is my first experience as per business requirement.

Can you please help me on my request? Thank you very much in advance,

Kind regards.

View Entire Topic
nuggler
Explorer
0 Kudos

In the following code you are retrieving the attributes of the master data type "Product". Assuming your GTIN exists at that master data type, then you need to filter on what PRDIDs you want to retrieve the information for. So in the second statement where you have the array, you need to the PRDIDs.

attributes = IBPAutomationObject.GetSingleMasterData("Product", Array(GTIN)) 

See documentation for details:
GetSingleMasterData

Second step is then to retrieve GTIN from the array "attributes", which you seem to do in the For Next loop on the second picture.