cancel
Showing results for 
Search instead for 
Did you mean: 

Ibase Component to find associated Product id

Former Member
0 Kudos

Hello SAP Gurus,

For a given Ibase Component i need to find the Object id(Product id) as seen on IB53 transaction, i know that i can use the FM CRM_IBASE_COMP_GET_DETAIL for the same but i need to know the direct table relationship for the same.

Help will be really appreciated

Thanks in advace

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Bhavpreet,

I understand that you want to get the Product ID from a given Instance number of an IBase Component. The Master table of the IBase Components is IBIN. Using the given Component Instance number as Input to table IBIN we get the field OBJNR from this table. Now OBJNR is a CHAR22 Guid. We need to convert this to RAW16 format. GUID_CONVERT is what we used earlier, however now its obsolete so I would suggest that you use the CLASS cl_ibase_service and static method cl_convert_guid_22_16 to get a RAW16 GUID.

You can then use this RAW16 GUID to pass to table field COMM_PRODUCT-PRODUCT_GUID and get the field PRODUCT_ID which is what you need. I have a written a small piece of code to help you understand this.Please let me know in case you need more details on this.

Thanks

Sumit

***********************************************************************************************************************************************

REPORT zrandom_test.

PARAMETERS : p_inst TYPE ibin-instance.

DATA: gv_objnr22 TYPE ibin-objnr,

gv_guid16 TYPE comt_product_guid,

gv_objid TYPE comt_product_id.

START-OF-SELECTION.

CLEAR gv_objnr22.

SELECT SINGLE objnr FROM ibin INTO gv_objnr22 WHERE instance = p_inst.

CLEAR gv_guid16.

gv_guid16 = cl_ibase_service=>cl_convert_guid_22_16( gv_objnr22 ).

CLEAR gv_objid.

SELECT SINGLE product_id FROM comm_product INTO gv_objid WHERE product_guid = gv_guid16.

WRITE : gv_objid.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bhavpreet,

Please check the tables IBIB and IBIN