cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Netweaver Gateway Client HTTP Response is 201 (Created) but nothing being created in backend ERP

Former Member
0 Kudos

Hi,

I am trying to create a Sales Order through OData service.

I tried creating with Gateway Client and Firefox REST client.

The Response is same. 201 - Created.

But nothing being created in the backend ERP system.

Please help.

Thank you.

Ravinder.

Accepted Solutions (0)

Answers (3)

Answers (3)

LeonardoGomez
Advisor
Advisor
0 Kudos

Hi Ravinder,

If you implemented the oData service using the standard BAPI then the commit is not being issued. SAP BAPIs never issue the commit by themselves. So, inside your service implementations, after calling the BAPI, you have to call function BAPI_TRANSACTION_COMMIT.

I assume that the code above wont work because is a different LUW.

/iwbep/if_sb_dpc_comm_services~commit_work(
EXPORTING
iv_rfc_dest
= 'ERP001' ) .


Regards,

Leonardo.

AshwinDutt
Active Contributor
0 Kudos

Hello Ravinder,

Are you calling COMMIT WORK after successful SO Creation ?

Please call the below code by passing the RFC Destination which is pointing to ERP System.

/iwbep/if_sb_dpc_comm_services~commit_work(
EXPORTING
iv_rfc_dest
= <destination> ) .


Regards,

Ashwin

Former Member
0 Kudos

Hi Ashwin,

Yes I feel that it is something related to COMMIT WORK, because when I am trying to create sales order with BAPI Function it is being created successfully. But When it comes to OData the response is 201 Created. But nothing happened.

I tried with your piece of code, but not succeeded.

@Emanuel Affatati (SAP NGW hub is not embedded. ERP and GW Hub are in different boxes)

This is how my systems are. I have ERP installed in one box and Netweaver Gateway Hub in another box. I created OData service in the ERP system to create sales order and I registered that service in NW Gateway hub system.

URL like this:

http://<host>:<port>/sap/opu/odata/sap/zgw_create_hybris_so_srv/CreateHybrisSOSet

Response is 201 Created, but Sales order is not being created.

Thanks you.

AshwinDutt
Active Contributor
0 Kudos

Hello Ravinder,

As far as i know thus should work. Please check again.

You need to pass the RFC Destination associated with the System Alias configured for the service.

Regards,

Ashwin

Former Member
0 Kudos

Hi Ashwin,

ERP

NGW Hub

RFC Destination

NGW001

ERP100

System Alias

NGW

ERP

NGW001 is the RFC destination created in ERP which points NW Gateway Hub.

ERP001 is the RFC destination created ti NW Gateway Hub system which points ERP system.

Which RFC destination name I need to provide.

My OData service code in in ERP system.

Thank you

AshwinDutt
Active Contributor
0 Kudos

You need to pass ERP001.


/iwbep/if_sb_dpc_comm_services~commit_work(
EXPORTING
iv_rfc_dest
= 'ERP001' ) .


Former Member
0 Kudos

Thanks Ashwin,

Sorry for the late response.

RFC destination ERP001 is not created in ERP system. It has been created in NW GW Hub system. So it giving an error "RFC Error: RFC destination ERP001 does not exist"

Thank you.

AshwinDutt
Active Contributor
0 Kudos

Hello Ravi,

Basically you need to pass the RFC Destination used while creating the System Alias in GW Hub. Which in intern was used to add the service and activate in /iwfnd/maint_service in GW Hub

So please check the RFC Destination associated with your above service and pass accordingly in the code and check.

Regards,

Ashwin

former_member226239
Contributor
0 Kudos

Can you try with 'ERP100' (RFC created in NW GW Hub to point to ERP)?

-Chandra

former_member190010
Contributor
0 Kudos

Ravinder,

Your question is not clear.

Do you have develop a custom odata service, or is it a standard one?

Have you installed the SAP NW GW in a Hub o in an Embedded environment?

Best Regards,

Emanuel