Skip to Content
0

SAP Gateway Service : External ODATA Service-Association Referential Constrainst

Nov 28, 2017 at 02:54 AM

111

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Lokeswar Reddy Byni Nov 28, 2017 at 01:11 PM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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,

0
Lokeswar Reddy Byni Nov 30, 2017 at 09:00 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded