cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory and optioonal parameters mapping issue in Gateway

Pavan_Golesar
Active Participant

Hi,

I am facing issue with mapping fields to my RFC(BAPI) in service implementation - FOR Get_entity-READ 

Lets suppose we have 3 Fields as input for BAPI. 2 of which are mandatory and remaining 1 is optional.

Now, Data model->entity type, allows only Primary keys to be part of input paramters to the BAPI under mapping.

Can anyone share how can we pass this optional parameter (in case of Read-Get_entity) to bapi without setting it as Key under entity type.

Thanks in advance,

PavanG

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Pavan,

In that case try as below :

Create model alone in SEGW by setting which ever parameters you need as Keys.

Do not implement any operation in implementation section.

Generate Run-time objects.

Manually implement Get_Entity in DPC_EXT class and add code.

Regards,

Ashwin

Pavan_Golesar
Active Participant
0 Kudos

Hey Ashwin,

Thanks for Quick reply


Do not implement any operation in implementation section.

Do we have any other solution in this case.. As I have already implemented almost all the CRUDQ operation for that set.

Can we have some other solution.

Thanks,

--PavanG

EkanshCapgemini
Active Contributor
0 Kudos

Hi Ashwin,

In this case, wouldn't it raise error while calling the URL as the framework wouldn't allow the third parameter(non-key) to be passed as key in READ call?

Regards,

Ekansh

AshwinDutt
Active Contributor
0 Kudos

Hello Ekansh,

Yes error will come.

To use this BAPI for READ, we are forced to make that 3rd field also as key in the GW model. Only then we will be able pass that as part of KEY's to make that BAPI work.

Or else we need to implement QUERY for this so that we can define first 2 as keys and third as non key and pass as filters.

Regards,

Ashwin

EkanshCapgemini
Active Contributor
0 Kudos

I Agree.

He needs to redefine the GET_ENTITYSET method for QUERY because if he opts for mapping, it will throw error as "no output table is mapped....". Here I am assuming that there is a flat structure in the exporting parameters since he was trying to use READ.

Regards,

Ekansh

Pavan_Golesar
Active Participant
0 Kudos

Thanks Ekansh,

Yes, I have got to redefine the get_entityset method to make this possible. which is the another way to get things done..

But I felt there might be some way to get rid of this primary key input fuunction for read

Best Regards,

Pavan G

EkanshCapgemini
Active Contributor
0 Kudos

Hi Pavan,

This is as per the OData v2 standards that Read operation can be performed using all the key values and there can not be any other input other than key. Since gateway foundation runs on OData v2 standards, there is no way to escape this.

Regards,

Ekansh

Pavan_Golesar
Active Participant
0 Kudos

Hi Ekansh,

Thanks.

I'll certainly checking out on


OData standard v2

To get more clarity on other upcoming issues.

Thanks again

--PavanG

Message was edited by: Pavan Golesar

Answers (1)

Answers (1)

vivek_gaurav
Participant
0 Kudos