‎2015 Jul 01 8:00 PM
I have been maintaining several applications in VB6 for several years, but have recently run into problems when accessing BAPI objects by name. For instance, part of my code for creating a Sales Order is shown below:
Set boOrder = oBAPICtrl.GetSAPObject("SalesOrder")
Set oHeader = oBAPICtrl.DimAs(boOrder, "CreateFromDat2", "OrderHeaderIn")
With oHeader
'THIS CODE FAILS WITH THIS ERROR "Structure member not found..." ON EACH LINE:
.Value("DOC_TYPE") = "SO" ' rush order (or TA for non-rush order)
.Value("SALES_ORG") = "BP01"
.Value("DISTR_CHAN") = "01"
.Value("DIVISION") = "01"
.Value("PRICE_DATE") = "07/01/2015"
.Value("PURCH_DATE") = "08/01/2015"
.Value("PURCH_NO_C") = "CA78-0613401c"
.Value("PURCH_NO_S") = ""
.Value("INCOTERMS1") = ""PPA"
.Value("INCOTERMS2") = "UPSN-UPS NDA"
'THE CODE BELOW WORKS! (but I'm guessing about ordinals)
' .Value(4) = "SO" ' rush order (or TA for non-rush order)
' .Value(6) = "BP01"
' .Value(7) = "01"
' .Value(8) = "01"
' .Value(30) = "07/01/2015"
' .Value(13) = "08/01/2015"
' .Value(40) = "CA78-0613401c"
' .Value(41) = ""
' .Value(23) = "PPA"
' .Value(24) = "UPSN-UPS NDA"
End With >/font>
Incidentally, this problem has only become evident since I updated to the SAP GUI 7.4 front end!
Can anyone help?
‎2015 Oct 30 7:12 PM
Boy, a lot of knowledgeable folks out there - not even a hint in nearly 4 months!
‎2015 Nov 02 8:14 AM
This is an Abap forum, not a VB one (try Scripting Languages or Interoperability .NET), also you posted during summer holidays too
‎2015 Nov 02 12:16 PM
Hello James,
you can find here the solution of your problem, from the post of the 5th Dec. 2014 from Dinesh Bhandarkar.
Cheers
Stefan