cancel
Showing results for 
Search instead for 
Did you mean: 

Need clarification on SEGW for odata service

GowthamRaja
Participant
0 Kudos

Hi Experts,

I am traditionally creating Model provider class(MDP) & Data provider class(RDP) in se80, intergration them with model and generating the service.

But now for my new assignment i am starting on SEGW tcode where i am creating the entityset and entity as below

Now i have created the runtime airfacts which inturn creted the MDP & RDP. in traditional method we will creating the get_entity_set in /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET. but here the methods productset_get_entityset is created where i am writing the business logic, i have kept the breakpoint but it is not triggered and in the execution screen the productset_get_entityset doesn't available, then i found that this is in protected method as shown below.

My question is: where do i need to write the business logic. Please help me. Awaiting for your reply.

Thanks,

Gowtham

Accepted Solutions (0)

Answers (2)

Answers (2)

AshwinDutt
Active Contributor
0 Kudos

Hello Raja,

First redefine the method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET in your DPC_EXT class and call the method productset_get_entityset where u have written your logic inside it and return the response. Only if u do this u will be able to stop in GW with debugger.

What you have done is Without redefining  /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET method in DPC_EXT, you have just redefined method productset_get_entityset and written logic ? How can you stop with BP at runtime ? not possible right ? The call has to be delegated to productset_get_entityset method by redefining  /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET method and inside that you will be calling  productset_get_entityset method

Do this. You should be able to Debug.

Regards,

Ashwin

GowthamRaja
Participant
0 Kudos

Thanks Ashwin,

i also need to clarify regarding this. As you said we have to redefine /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET first and then we need to call productset_get_entityset. My question is : are we writting any code in the productset_get_entityset, why because i am asking is /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET here itself we can write the logic right? why we need to call the productset_get_entityset. i am not clear on this pls explain

AshwinDutt
Active Contributor
0 Kudos

Hello Raja,

You can write the logic inside /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET directly and return the response. It will work.


But i would suggest the below way -

You can write the logic inside the method productset_get_entityset and call this method inside /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET within a CASE statement .

Delegate the calls to the corresponding methods by checking based on Entity_Set_Name using CASE statement.

When Entity_set_name name is ProductSet then call productset_get_entityset method and return the response.

With this you can resolve your issue and can stop flow with a Break Point.

Regards,

Ashwin

former_member206574
Active Participant
0 Kudos

Hi gowtham,

In  zcl_XXXXXXXXXXXXXX_DPC_EXT Class you have to redefine the methods for your implementation.

For Example for (Query) operation u have to redefine the

method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET


Regards,

Venu

GowthamRaja
Participant
0 Kudos

Hi Venu,

I have redifined it, even then it is not working.

former_member206574
Active Participant
0 Kudos

Hi Gowtham,

Are you pointing to correct EntitySet 'ProductSet' in your service.

While debugging you said it is not triggering. Check the user for External break point once.

Regards,

Venu

GowthamRaja
Participant
0 Kudos

ya i am pointing the same, i have also tried with external breakpoint, no use

sreehari_vpillai
Active Contributor
0 Kudos

Hay Gautham, try this.

in your get_entity_set, write a

do.

enddo.

loop. Then you trigger the get_entity_set. Than go to sm50 and debug your code. Check the sy-uname and check which is the running user . Then set the external break point.

Sreehari