I'm
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial Director
...........
boMaterial = oBAPICtrl.GetSAPObject("BUS1001", "Material")
oMaterialDesc = boMaterial.GetDetail(return:=oReturn, MaterialGeneralData:=oMaterialDesc)
TextBox2.Text = oMaterialDesc
........
But it keeps showing this error: "The runtime object of type Material with the persistent key Material could not be created in the Business Object Repository."
I tried it with the code:
boMaterial = oBAPICtrl.GetSAPObject("BUS1001")
oMaterialDesc = boMaterial.GetDetail(return:=oReturn, _ MaterialGeneralData:=oMaterialDesc)
TextBox2.Text = oMaterialDesc
......
and the error is: "The persistent key for a Business Object instance of type Material has not been set. Cannot invoke method GETDETAIL"
Could you please show me how to fix this problem? I really need help. And do you have a Web site or anything that can help me finish my little project? Thank you very much for your help. I really appreciate it.
In this source code statement:
- boMaterial = oBAPICtrl.GetSAPObject("BUS1001", "Material")
change "Material" to the actual material number (e.g., "TGS100") you are interested in, so that your statement looks like this:
- boMaterial = oBAPICtrl.GetSAPObject("BUS1001", "TGS100")
or this:
- boMaterial = oBAPICtrl.GetSAPObject("BUS1001", variableContainingMaterialNumber)
And you can replace "BUS1001" by "Material". They both refer to the same business object:
- boMaterial = oBAPICtrl.GetSAPObject("Material", "TGS100")
This was first published in July 2004
Join the conversationComment
Share
Comments
Results
Contribute to the conversation