cancel
Showing results for 
Search instead for 
Did you mean: 

Access Auction collection in ESO 5.1

Former Member
0 Kudos

Hi,

I am using ESO 5.1 and I need a script to create an auction from external data (XML) and vice versa: read auction data and create XML from it. For the second task, I'd like to use a Toolbar script. This is always called on Auctions (doc is an Auction).

I have the following problem: I can reach the "single" fields of the auction but I can not reach the collection members.

I use the following code:

1st version - lst is always null

CollectionIfc lst = doc.getExtensionCollection("COLLN:1:802"); // should contain auction line items

2nd version - lst is not null but contain only nulls

StringBuffer str = new StringBuffer();

CollectionIfc lst = doc.getCollectionMetadata("COLLN:1:802").get(doc); // should contain auction line items

for(int i = 0; i < lst.size(); i++) {

str.append("Line item:" + lst.get(i)); // lst.get(i) is always null

}

I tried all class collection names found in documentation - with no result.

Could you write me how to reach collection members?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Standard collections can be accessed by their respective/specific accessor methods(e.g getLineItems()). Don't think the generic accessor methods would work for standard collections .

E.g in case of RFX/Contract you would have a getLineItems() method. It looks like Auction doesn't have an API to enable accesing the line item collection. You may have to request SAP for that.

In general, if you have access to a collection, all you have to do is get the iteratort. e.g. getLineItems.iterator() and use the hasNext(), next() methods to get its members

Thanks,

Baski

Former Member
0 Kudos

Hi Baski,

thanks for your answer.

According to the Class documentation, Auction class contains - among others - the following class collections:

COLLN:1:802 - subordinate - contains doc.auction.lineitems

COLLN:3:810 - associative - containing auction.bidders

etc.

So you mean, there is NO way to read and set these collections using API calls?

thanks again,

Gabor

Former Member
0 Kudos

Hi,

You are correct. As far as I know, If an API access is not provided to access a collection, you cannot access them. You may have to request SAP for that explaining your case.

Thanks,

Baski