on 06-07-2011 6:01 PM
Dear all,
I have a program in VBA to create new Material thru an Excel file.
When i launch it i have the following error:
"*Key fields for use data STORAGELOCATIONDATA and checkbox structure STORAGELOCATIONDATAX are different"
Here is my code sample :
'-- Declare variable
Dim boArticle As Object
Dim oStorLoc As Object
Dim oStorLocX As Object
'-- Set variable
Set sapConn = CreateObject("SAP.BAPI.1")
...
Set boArticle = sapConn.getSapobject("StandardMaterial")
...
Set oStorLoc = sapConn.DimAs(boArticle, "SaveData", "storagelocationdata")
Set oStorLocX = sapConn.DimAs(boArticle, "SaveData", "storagelocationdatax")
...
'-- Define StorLoc
oStorLoc.Value("PLANT") = "GPF3"
oStorLocX.Value("PLANT") = "GPF3"
...
'-- Create article
boArticle.SaveData Headdata:=oHeader, Storagelocationdata:=oStorLoc, .......
Could you help me ?? I don't know what the error message means ...
Thks
edit I was confusing this with SALESDATA
Edited by: Zeblion on Jun 8, 2011 2:19 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.