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

Getting the External Id of an Item in WD JAVA Code

Former Member
0 Kudos
166

Hi All,

We have created a custom iview in WD JAVA for showing PM notification data with respect to an item.

The custom iview is accessed by click on a custom linked placed in Navigation panel.

In order to fetch the correct notification for the selected item we need to fetch the external ID of that Item.

Your suggestions are welcome.

Regards,

Sumit Oberoi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I am not sure of any API for getting it in WD Java.

You can have a RFC to return you the value of the External ID.

/rpm/cl_portal_context=>get_user_object_guid : This will return you the GUID.

Query the /rpm/item_d table for External ID for portfl_item_guid = GUID

select external_id from /rpm/item_d where portfl_item_guid = GUID

Hope this helps.

Reshma

Former Member
0 Kudos

Hi,

The issue is resolved.. we need to use rpm_common.jar file and below code to read the guid in WD JAVA and then send it to abap for reading the item external id from /rpm/item_d table


import com.sap.xapps.cprxrpm.common.cache.CacheObject;
import com.sap.xapps.cprxrpm.common.cache.CacheObjectException;

guid = new byte[16];
		pguid = new byte[16];
		try {
			CacheObject _rpmCache = new CacheObject();
			guid = _rpmCache.getRPMObjectGUID();
			pguid = _rpmCache.getPortfolioGUID();
			type = _rpmCache.getRPMObjectType();
}
catch (CacheObjectException e) {
			//Utility.logException(logger, "wdDoInit()", e);
			msg_mgr.reportException("No Item ID found", true);
		}

Regards,

Sumit

Answers (0)