cancel
Showing results for 
Search instead for 
Did you mean: 

How to get SC instance or user context in SRM UI Add-On?

laurent_burtaire
Active Contributor
0 Kudos

Hello,

i try to find a way to get SC instance and user context inside SRM UI Add-On.

Indeed, for OData request done with keys which do not have OBJECT_ID and NUMBER_INT (this is the case for all Entity Type from UTIL service),

there is no way to get Shopping Cart instance:

- neither with /SAPSRM/CL_PDO_FACTORY_SC_ADV class as we do not have header guid,

- nor with /SRMNXP/CL_INTL_PDO_SC class as GET_OBJECT_ID_FROM_BUFFER method does not return Shopping Cart number...

Furthermore, it is not possible to get user context through /SAPSRM/CL_PDO_FACTORY_USER class...

Does anybody have an idea to get those data?

Regards.

Laurent.

Accepted Solutions (0)

Answers (2)

Answers (2)

laurent_burtaire
Active Contributor
0 Kudos

Hello,

nobody faced this problem???

What is the SAP standard process to get SC and SC item instances through SRM UI Add-On when OData request does not have OBJECT_ID and NUMBER_INT?

Regards.

Laurent.

laurent_burtaire
Active Contributor
0 Kudos

Hi,

regarding user context, method to use will depend on data stored or not in the buffer.

If this is the case, use GET_BUFFERED_US_CONTEXT_CONS method.

If not, use GET_INSTANCE_US_CONTEXT_CONS method.

I was not using correct method...

Regards.

Laurent.