cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Document type of a project?

Former Member
0 Kudos

I have created an RFx from a Project. The script I have written is for RFx. I want to fetch the value of project type, for that I have tried this way:

import com.sap.odp.api.common.types.ObjectReferenceIfc;

import com.sap.odp.api.ibean.IBeanIfc;

import com.sap.odp.api.ibean.metadata.IBeanFieldMdIfc;

BeanIfc project= (IBeanIfc)doc.getParentIBean();

    IBeanFieldMdIfc projectData=  (IBeanFieldMdIfc) project.getFieldMetadata("DOC_TYPE").get(project);

but I am getting an error Typed variable declaration : null.

Where I am wrong? please help.

DocTypeRef =  doc.getRootParentIBean().getDocTypeReference();

Using this method , it is giving the doc type of RFx not of project.

How to get the document type of project.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sahil,

Assuming other things are correct, how abt using project.getDocTypeReference() ? This should give you the object reference to the Project Type. And if you want more information about this Project Type you can use the PrjectTypeIBeanHomeIfc to find the bean for this project type.

Hope this helps.

Thanks

Devesh

Former Member
0 Kudos

Hi Devesh,

Using project.getDocTypeReference()  is giving the doc type reference of the RFx not of the project. I am writing a script for class RFx in which I need to get doc type of a project.

Not much help from projectTypeIBeanHomeIfc either.

Thanks,

Sahil

Former Member
0 Kudos

Please Get the Project from RFx document link list, where Project is associated to RFx. and once you get the project u can use this

project.getDocTypeReference() to get the document type of project.