cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping RFC Parameters to Service gateway throws error

Former Member
0 Kudos

Hi Experts,


I've a task of creating Netweaver gateway service mapped to Remote Function Module. I see in SCN discussions that the service implementation could be mapped to Function module parameters like that one: .

Scenario:

I've created table and function module which Create/Update/Retrieve/Delete data for that table.

Import parameters: [Table contents] + Operation

Export parameters: [Table contents] + Operation Executed + Return Message


I've tested the function module and enable RFC for it.

In SEGW transaction I created Z_project and import the RFM mentioned before in the  Data Model folder as discussed in the mentioned link above. In this I choose the import parameters only of the function module.

I created EntitySet of type of the created entity type.

Now, I should implement service through Service Implementation folder  for the created EntitySet.

In SCN discussion, he mapped the (Create/Delete/GetEntitySet/GetEntityType/Update) to the function module.

What I've done: I mapped the import parameters for the function module with constant string for the operation with the required operation. When "Generating Runtime objects" there is an error always  for the 5 operatins(Create/Delete/GetEntityset/GetEntityType/Update) "Data Provider binding" and the "Generation of runtime objects for the project Zxxxx not possible" as follow:


I think there is something is missed from me in that. Could you review the scenario and tell me what should be done?

Accepted Solutions (1)

Accepted Solutions (1)

EkanshCapgemini
Active Contributor

Hi,

All these errors are self explanatory. Such as:

  • Key property does not have an output mapping in the query operation.

You need to understand that since it is a query operation, it is probably going to return multiple records. If there are multiple records, these have to be differentiated with some key elements. Thus there is the same error.

  • No output table is mapped in the query operation.

As I said above, since this is gonna return multiple records, structures or normal data elements can not hold and return multiple records. You have to map your properties to some table. This way you will be getting multiple records.

  • Mapping Direction for constants is always input.
  • Direction must be filled for all the mapping entries.

Try to read every error and go to that particular node by double clicking the errors. Think the cause of it and you will be able to solve most of them. You are always welcome to ask for help if needed.

Regards,

Ekansh

Former Member
0 Kudos

Thanks

I've maintained my service operations as you've guided and everything is OK now.

Regards,

Mohamed.

Answers (3)

Answers (3)

former_member182874
Active Contributor
0 Kudos

Hi Mohamed,

Double click on mapping and show the mapping please. You have not done the mapping properly.

Also show me the Entity sets

All operations have different RFCs ? CRUD ?

Regards,

Tejas

Former Member
0 Kudos

Could you review that please?

former_member184867
Active Contributor
0 Kudos

Not sure about what went wrong here..

I would recommend to  map only one operation and check the error instead of mapping all types of operation. You will get some more explanation if you expand the errors by clicking on the '>' symbol.

However my personal choice is the code based approach.

If you are experienced in ABAP, you may try it. The steps would look like

1. Create Model

2. Generate runtime Artifacts

3. Go to the Data Provider Extension class.(this class name ends with *DPC_EXT)

4. Call your BAPI/Function module in the generated methods and pass the data using the export parameters of the methods.

5. Register the service and access it.

Former Member
0 Kudos

Thanks for concern Atanu.

Actually, your solution is what I did and it's OK. What I'm practicing now is creating web services operations mapping to RFC.

The following image is the detailed errors if you could help

Regards.

former_member184867
Active Contributor
0 Kudos

Hi Mohamed, yes these errors are self explanatory. You are doing incorrect mapping. You need to double click on every error to find which node causes the error. I did not go through every error, but some of them are pretty reasonable. However all the errors needs to be resolved by navigating on the correct node. Warnings you can ignore.

For example: Mapping direction is not correct.

What you can do is to share the mapping screenshot.