cancel
Showing results for 
Search instead for 
Did you mean: 

samples of SAP Trex catalog

Former Member
0 Kudos

Hi,

iam looking for Java TREX samples to access the catalog. unable to find these anywhere in SAP world.

any samples using the

"com.sapmarkets.isa.catalog.trex"

or

"com.sapportals.trex.core" packages.

i need ways to access the Catalog in ISA which has been configured to Trex.

any help would be greatly appreciated.

Regards,

Manjunath

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What exactly do you need? I have several ojects that can pull any information for the Catalog and add the prices as well. Also, I have created these as standalone and to extend the ISA iteself.

Stephen

Former Member
0 Kudos

Hi Stephen,

we have configured ISA server to pick the catalog from trex. now we have to expose a server side interface to send the catalog structure to an external program (thru http). can you pls tell me how to do this via the trex. pls send the standalone and the extension classes of isa.

Thanks

Former Member
0 Kudos

Ramia,

What are you trying to do? It is confusing when you say you configured ISA to pick the catalog from TREX. It does this as par tof the SHOP. Also, what are you trying to do with the catalog? Do you want to interate through the whole catalog and send it out or to have it accessed from an external system? The design of what you are trying to do is confusing.

Stephen

Former Member
0 Kudos

Stephe,

i agree it is confusing.

yes, this is done as part of the shop in ISA.

What we are trying to do is to be able to get the catalog information and send it to an external program which will display the catalog information.

This catalog info will be sent as an XML data. Is this possible to do using the java client of Trex?.

Basically what we are looking for is a way to iterate thru the whole catalog and send it to the client UI.

Thanks

Former Member
0 Kudos

Stephen,

apologies, i got ur name wrong in previous post.

Former Member
0 Kudos

This makes sense. Do you want prices with this?

There are two ways you can do this.

1. You can create a STRUT that will go into the quick search functionality and have the Quick Search run on and "*" the results can be displayed in a JSP as XML. This way your External Progam only has to call the ISA application from the URL. ie http://<server-name>/b2c/fullproductlist.do

2. Create a Business Object that you can run to get the full product list.

Let me know which one you would like to go over?

Stephen

Former Member
0 Kudos

i would like to go over both of these options.

The pricing is not needed.

Thanks

Former Member
0 Kudos

Stephen,

can you pls provide the solution for above.

Regards,

Ramia

Former Member
0 Kudos

CatalogBusinessObjectManager catBom = getCatalogBom(userSessionData);

WebCatInfo catalog = catBom.getCatalog();

IQueryStatement queryStmt = catalog.getCatalog().createQueryStatement();

queryStmt.setStatementAsString(query);

IQuery iQuery = catalog.getCatalog().createQuery(queryStmt);

this.itemList = new WebCatItemList(catalog, iQuery);

catalog.setCurrentItemList(itemList);

itemPage = this.itemList.getItemPage(0);

Use this code to create a BO. Then you can access the bo through a BOM and call the catalog from any place. 'queryStmt' should be set to an '' for getting all vlaues from the catalog. you can replace the '' with a MATNR or PRODGUID or any other type of search information. If you want to search on custom or extended fields be sure to extend the searchable attribute list defined in the xcm.

'getItemPage(0);' setting this to '0' will get you all result item pages. You can use this to page through the result list so that way you don't have create your own pagination.

Stephen

Former Member
0 Kudos

Stephen,

thanks.

can u give me the standalone program that u talked abt..to pull the catalog info. this will help me understand better.

Regards,

Former Member
0 Kudos

Stephen,

i did not understand the getCatalogBom(userSessionData);

can u pls give more details on this method...

Former Member
0 Kudos

This is the core to both the standalone piece. Let explain the pieces I had thought the Names of the values would make sense. All BOM's are stored in the Session Memory per user and thus in order to get out the main the CATBOM we must use the userSessionData obj. Use this code and create your own BO. Assign that to your Custom BOM and then use an action or JSP to attach the user Session Data obj to the getCatalogBom(userSessionData); method.

Hope this helps.

Stephen

Former Member
0 Kudos

Hi Stephen,

Thanks for your reply..

What you have explained will work if we are in b2b or b2c session, i mean we need to login to these applications thru the browser and after that we will have UserSessionData Object which will hold most of the data {Basket, BOM etc..}

But what we want is..

To expose Catalog,Search functionality to an external application which will not be part of b2b or b2c, so in this case it will be an absolute http call like - http://SERVER:PORT/MyApp/servlet/Catalog, so in this case UserSessionData Object will not be there.

Is there a way to call Trex funtions outside of b2b or b2c application?

Thanks..

Former Member
0 Kudos

I see what you are saying but I am confused as to why you want to reinvent the wheel. SAP has built all the connection information need into the b2c or b2b apps. You can use the UserSessionData object or the regular ole session object or just use a JDBC connection and dump the results in an External TABLE or use the XML DOM to dump everything to an XML document or XML Stream.

The choice is yours. You do not have to create a contact person for this to work. In the B2C App you can navigate to your hearts content before being required to login. Yes you do have a System user defined in the XCM but authenticate to the backend system. You will always need that, since CRM controls the Catalog GUID not TREX. I think you might be worried about having to put a blind link in the b2c or b2b app and that standard way of initializing b2c or b2c is http://<server>:<port>/<web-app-name>/<b2c|b2b>/init.do. What you can do is create another entry point in the strut and call it http://<server>:<port>/<web-app-name>/catalogexport/init.do. This will still initialize all of the objects you need and you can even protect this every path by the rewrite scripts. This will require a modification of the STRUT and one java class.

Hope this helps. If you need to do a conf call I can discuss this with you.

Stephen

Former Member
0 Kudos

Hi Stephen,

Thanks for your reply..

i would like to have a chat with u.

my yahoo chat id is shridharrn@yahoo.com.

Thanks..

former_member202208
Active Participant
0 Kudos

Hi Stephen,

Can you help us out in implementing catalog support with Trex as an independent service..

Thanks in Advance,

Shridhar..

Former Member
0 Kudos

hi stephen i am trying to create a UI in web dynpro that connects to TRE and maps to appropriate indexes.

what steps should i follow to create a UI.

Answers (1)

Answers (1)

Former Member
0 Kudos

Or as an alternate pls give us ur phone number..we will try to call u.