cancel
Showing results for 
Search instead for 
Did you mean: 

Get vendor object from RFX response

Former Member
0 Kudos

Hello All

I am trying to get the vendor reference from RFX responses.

relevant code

propsColln = doc.getProposals();

iterProps=propsColln.iterator();
		while(iterProps.hasNext()){
			prop=iterProps.next();
			propSupplier=prop.getFieldMetadata("VENDOR").get(prop);
			logMsg.setLogMessage("*****MP ***"+propSupplier);
                                            }

This prints

*****MP ***1283457025:902:Test Supplier 1

How can I get vendor reference from this class?

Although 902 is the class id for RfxVendorIBeanIfc, I am unable to call methods like getDocumentId(), error is

No args method getDocumentId() not found in class'com.sap.odp.common.db.ObjectReference'

How can I get the vendor object reference from the RFX response?

Thanks,

MP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi MP,

RfxVendorIBean has a reference to master data vendor object. Looks like getVendor() methods in RFxVendorIbean is not API enabled & not sure if there are any workarounds.. if not request SAP for api enablement for this..

Thanks, Baski

Former Member
0 Kudos

Thank you Baski, as usual you are very helpful.

Could you give me an opinion about using IapiDbHandleIfc for direct sql queries against the db. Although I am getting in touch with SAP for a lot of the things you are advising on, it just goes to product development and gets added to their backlog. So obviously, there will a long turnaround time. I am trying to find workarounds and have implemented a direct sql query for other information like accessing RFX event specs, but wanted general advice from you and the other experts on whether it is advisable to run sql queries.

Thanks,

MP

Former Member
0 Kudos

Hi

IapiDbHandleIfc can be used to extract information from database. For e.g. lets say you want to extract document description from database for MA with display name as "ABC" you can use the below mentioned script:

import com.frictionless.api.common.platform.IapiDbHandleIfc;

logMsg = Logger.createLogMessage(session);

dbHandle = session.getDbHandle();

dbHandle.beginTransaction();

Description = dbHandle.executeIsolatedQuery("SELECT DOCUMENT_DESCRIPTION FROM FCI_CONTRACT WHERE DISPLAY_NAME= 'ABC' ");

dbHandle.endTransaction();

logMsg.setLogMessage("*****Desctiption="+Description );

Logger.info(logMsg);

However my suggestion would be to use this API to execute simple SQL queries. In case you want to implement a complex SQL logic you can always write Jobs directly on database.

Regards

Mudit Saini

Former Member
0 Kudos

Thank you Mudit. I will end up writing sqls then.

We are On Demand, so probably cannot write jobs directly against the db, correct?

Thanks,

MP

Former Member
0 Kudos

Hi

Yes, you would not be able to write jobs directly. I would suggest raising an OSS with SAP for them to provide some solutions for initiating access to database.

Regards

Mudit Saini

Answers (0)