cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gateway Service : External ODATA Service-Association Referential Constrainst

rubin_luke3
Participant
0 Kudos

Hi Experts,

I have 2 services, one is for Purchase Order and Other is for Material Master. In PO Line Item-Material OData I would like to reference to the Material Master OData.

Keys in PO Item are PO Number and Line Item.

Key in Material is Material Number.

Included OData Service of material master in PO Service.

While creating external association, I provided the PO Line item as Principal entity and Material as Dependent entity. While providing the referential constraints it is showing an error as all the key fields in principal entity should be mapped but I cannot add any key fields as none of them are matching.

I tried using Material as principal entity, but getting an error 'Entity by ID 'NE12A45FFD2F85A6E6B36F1F384F324AD' not found'.

Can you please help to correct this issue, or does my mapping has any issues?

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Lokes
Participant
0 Kudos

Hi Rubin,

this may be a work around , try this:

add po number and line item number fields in Material Entity set.

map the respective fields in association.

Please note :: ( if you are importing material entity fields from standard structure Like MARA then it wont work, in that case create custom structure -- add po number and line item number and then include the structure MARA in custom structure).

This should work.

Thanks,

Lokeswar.

Lokes
Participant
0 Kudos

Hi ,

Use the below scenario:

principal entity: PO Line Items

Keys : PO Number, Item Number, Material Number

Dependent entity: Materials

Keys: Material number

Referential constraint: Matrial number

Please try with the above.

Thanks,

Lokeswar.

rubin_luke3
Participant
0 Kudos

Hi Lokeswar,

Thanks for the response, as mentioned above we do get error 'All keys of principal entity should be mapped in referential constraint'.

Regards,