cancel
Showing results for 
Search instead for 
Did you mean: 

E-Sourcing Object Creation (Org. Unit)

murat_kaya
Participant
0 Kudos

Hi experts,

I need to read some extension fields of an Org. Unit in my script. I have the external id of the Org. Unit but I couldn't create the object or the Bean properly, so I cannot call the needed methods. Can anyone give me an example on this subject? Also is there any Help document about the classes and object references in e-sourcing that gives samples or examples about issues like this?

Thanks,

Murat Kaya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Murat,

For what you are trying to do I don't think you need to create a new object.

You can access that particular Org Unit in your script by using the doc variable. For help you can click on Reference Guide on the Org Unit page and look at the IAPIs.

Some sample scripts may be available at this forum but I am unable to offer you a comfortable way of locating them.

Thanks

Devesh

murat_kaya
Participant
0 Kudos

Hello Devesh and thanks for the reply.

I use Reference Guide but generally it is not enough for me, I guess I need examples to understand better.

About the Org. Unit, my case is as follows;

(I am working on a Contract Document by the way)

We created 2 extension fields on Org. Unit say z1 and z2. Now I need to read these extension field values of the specific Org. Unit 'XYZ'. This is why I think I should create and Object so that I can use something like

...orgUnBean.getExtensionField("z1").get();

but I couldn't manage to create data orgUnBean properly and set the External Id 'XYZ' so that I can read the z1 and z2 fields of 'XYZ'.

Any ideas?

Regards,

Murat Kaya

Former Member
0 Kudos

Murat,

I think the resource you are looking for is called 'Workflow and Scripting Guide'. It is available in the SAP Serivce Marketplace. Please have a look at it. It is a good starting point for learning to write scripts and also IBean Management.

For your requirement I would say that if you are writing the script for Org Unit then the variable 'doc' itself is the reference to the bean of the current document. You need not create/locate it seperately. So, doc.getExtensionField("z1").get() should get you the value of extension field on that particular bean.

If my explanation ended up confusing you even more then please do have a look at the 'Workflow and Scripting Guide'

Thanks

Devesh

murat_kaya
Participant
0 Kudos

Thanks Devesh,

***

So, doc.getExtensionField("z1").get() should get you the value of extension field on that particular bean.

***

I believe this would give me the value of the extension field z1 which belongs to the Org. Unit of the creator of the document. My need is to find the z1 value of some other Org. Unit, which has no connection to the document. Think that I am in the Org. Unit 'ABC' and creating a document. I need to find the z1 value of specific Org. Unit 'XYZ'. I hope I could express the case I'm having.

Regards,

Murat Kaya

Former Member
0 Kudos

Murat,

In that case you will have to use the IBeanHome Ifc for Business org to find the particular bean you are looking for.

Again, my advice would be to read the Scripting guide first before proceeding.

Thanks

Devesh