c# - Is it possible to access the PPSONE data with the DI SDK from SAP B1? -
i try write sowftware production can confirm material items. when want production order key, can't find po. if same thing business partner, works. use pps 1 addon sap b1, there problem? not possible access data addon or have change?
sapbobscom.businesspartners vbp = connection.company.getbusinessobject(sapbobscom.boobjecttypes.obusinesspartners); sapbobscom.productionorders vpo = connection.company.getbusinessobject(sapbobscom.boobjecttypes.oproductionorders); if(vbp.getbykey("l22437")) { writelogline("name: " + vbp.cardname); // works, name! } else { writelogline("no matching customer record found!"); } if (vpo.getbykey(anykey)) // tried lot of keys, no 1 worked { writelogline(vpo.getasxml()); } else { writelogline("no matching production order record found!"); }
there weird thing, in sap gui po displayed work orders, coresponding table in db @ppsone_prdorders. works neither if change sapbobscom.productionorders sapbobscom.workorders.
if understood, doesn't matter addon if @ least creates record in po table, if want find records of po's have query owor table, field use in geybykey method of po owor.docentry.
if usertable no object ou can use object usertable
usertable oust = (usertable)ocompany.usertables.item(yourtable); if oust.getbykey("1") ....
if usertable object have genericservices
dim ogeneralservice sapbobscom.generalservice dim ogeneraldata sapbobscom.generaldata dim ogeneralparams sapbobscom.generaldataparams dim scmp sapbobscom.companyservice scmp = ocompany.getcompanyservice 'get handle sm_mor udo ogeneralservice = scmp.getgeneralservice("sm_mor") 'get udo record ogeneralparams = ogeneralservice.getdatainterface(sapbobscom.generalservicedatainterfaces.gsgeneraldataparams) ogeneralparams.setproperty("docentry", "2") ogeneraldata = ogeneralservice.getbyparams(ogeneralparams)
Comments
Post a Comment