cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get information from Extension Definition.

Former Member
0 Likes
269

Hi guys,

I have an Extension Definition named 'Approves' which has a collection to keep approver information.The collection has Collection Internal Name as 'APPROVER_TABLE' and Attribute Database Table as 'FCI_DYN_$4147483555'. I would like to get the information from the extention. The problem is i can not be able to get the IBean of Approves extention defination to use 'iBean.getExtensionCollection("'APPROVER_TABLE")' method from the Project document script. I have to write SQL to query from 'FCI_DYN_$4147483555' directly. There might be a problem when i transport it to another server ,for example production,. The table name might be changed, and cause the script can not be work. Can you please guide me.

Thank you in advance,

Thongie

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Thongie,

What object class is the Extension collection on? The Project? or another class? If it's on the Project then you simply access the collection with doc.getExtensionCollection("collection name"); This will return an object of type ExtensionCollectionIBeanIfc.

Then you can get an iterator from it and iterate through the rows. Each row will have columns or fields from which you can retrieve values with row.get("field name");

Regards,

Alan

Former Member
0 Likes

Hi Alan,

Thanks for your reply. The collection that i want to get the data is not belong to any documents. It is created as the master data to look up for some business requirement ,for example pricing, approver, shipping,.

Let say that i go to setup->Master data->Master data i will see 'Pricing' contaning price information created for look up,then i go to setup->system setup->extention collection i will also see 'Pricing' created as extension collection. Inside it i will see the internal collection name and database table name for each extention collections, but i can not be able to use internal collection name like IBeanIfc.getExtentionColletion('Internal Name')) to get the information because i do not know the IBean name and do not have object reference of those ibean.

Thank you,

Noppong Jinbunluphol

Former Member
0 Likes

Hi

It seems you have used Custom Master Data component and renamed it to Approve to create a custom master data object. Each custom master data has IBean associated with it. for e.g. if you have used Custom MAster Data 1, IBean would be com.frictionless.api.doccommon.masterdata.analysis.spend.SACustomMD1IBeanHomeIfc

In case of custom master data 2, IBean would be

com.frictionless.api.doccommon.masterdata.analysis.spend.SACustomMD2IBeanHomeIfc

You can use these IBean to extract data once you figure out which custom master data object you are using.

Regards

Mudit Saini

Edited by: Mudit_UCB on Jan 18, 2012 2:17 PM

Former Member
0 Likes

Hi Mudit,

Thanks for your reply. Yes, i wiuld like to get information form the Custom Data. On above answer you suggest me to use iBeanHomeIfc.findwhere(). I go to the API doc and found that it use SQL as parameter. How can i use that method

Thank you,

Thongie

Former Member
0 Likes

Hi

Try using the following code:

CustomMasterDataHome = IBeanHomeLocator.lookup(session,com.frictionless.api.doccommon.masterdata.analysis.spend.SACustomMD1IBeanHomeIfc);

CustomMasterData = CustomMasterDataHome.findWhere("DISPLAY_NAME LIKE ' /display name/ ' ")

Instead of /display name*/ put display name of the object you want to find.

Regards

Mudit Saini

Answers (1)

Answers (1)

Former Member
0 Likes

Hi

To get project Ibean you can use the following code:

ProjectHome = IBeanHomeLocator.lookup(session,com.frictionless.api.contracts.ProjectIBeanHomeIfc.sHOME_NAME);

Project = contractHome.findWhere("DISPLAY_NAME LIKE 'Project_Name ' )

Here project name would be the display name of the project from which you want to retrieve the value.

Regards

Mudit Saini

Former Member
0 Likes

Hi Mudit,

Thank you for your response. Actually, i would like to get information from Extension Collection created as master data. My point is that i can not be able to get the information from the ibean. Let say i have Approver extension collection created as master data to lookup but i can not be able to get the ibean of Approver extension collection to find some information from the ibean.

Thank you,

Noppong Jinbunluphol

Former Member
0 Likes

Hi Thongie,

There is a attribute with name <%EXT_TABLE(logicalName,CollectionName)%>.. Guess by using that , you will able to pull the correct attribute database table from the respective servers,when you deploy...

Though I never used it!.. I just have a idea of it..try and let us know if it works..

For more info..

http://help.sap.com/saphelp_sourcing_70_p/helpdata/ko/bf/5098d180fd4560a31da978513d5a1e/content.htm

Regards,

Uday

Former Member
0 Likes

Hi UdayChand,

Thank for your reply. I have tried this before but it work only in Query Defination, not in the scripting.

Thanks you,

Noppong Jinbunluphol