cancel
Showing results for 
Search instead for 
Did you mean: 

Query Odata Entities with no common fields

ricky_shaw
Contributor
0 Kudos

Hi,

I have a requirement that takes Kunnr as input and outputs a list of Bank accounts(Int table) .

We have a Z*FM for this that has an import struct with Kunnr, Name & few other fields where Kunnr is mandatory.

The Output of this FM has table that holds list of Bank Accounts details with BankId, BankAcc# & other fields where Bankid & BankAcc are Key fields.

There is NO common field like KUNNR.

I happened to build 2 Entities based on this Z*FM which has no common field that takes input (like Kunnr) .

CustDet

BankDet

issues :

When passing Kunnr# in the input query string for the BankDet entity set, It errors out saying KUNNR is not part of the BankDet Entity set. which has no KUNNR field.

When passing Kunnr# in the input query string for the CustDet entity set, It does not display any output as CustDet entityset has no Bank Details structure.

Do i need to create Mapping or any association?

How can i handle this?

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yes, if the KUNNR field is a scalar parameter in your OData Service, but a member of a structure in the FM interface, then you will need a mapping that maps the scalar value into the sub-field of the FM's input structure.

However, I am not an expert of NW ABAP Gateway, so don't know how to do this. Therefore I'm adding this only as a comment, hoping that someone with the necessary Gateway know-how will provide an answer with detailed steps/instructions.

Accepted Solutions (0)

Answers (1)

Answers (1)

ricky_shaw
Contributor
0 Kudos

Hi,

I solved my self and not sure how to close this in new SDN..

I created all the import & export fields in entities & handled the code in Get_entity () & Get_entity_Set () methods.