SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
252 stars 74 forks source link

receving idoc using node-rfc #310

Closed panditha closed 10 months ago

panditha commented 11 months ago

Hi @bsrdjan ,

We have gone through the ticket https://github.com/SAP/node-rfc/issues/259 and we are trying to achieve the same thing to receive idocs from SAP and our receiving platform is based on nodejs and not java. From our understanding (correct us if we are wrong) the underlying technical framework is same RFC functions except that there are predefined function names for exchanging idocs. For example, IDOC_INBOUND_ASYNCHRONOUS is the function for inbound into SAP and we are successfully able to send idoc to SAP by calling this function. In similar way we are expecting that if nodejs server exposes the same function we should be able to receive the idoc.

We are trying to receive idocs now, we are able to start the server, expose the IDOC_INBOUND_ASYNCHRONOUS function and also able to see the connection established on RFC gateway. However, when we trigger an idoc in SAP it says successfully submitted but on nodejs side the server simply exits without any error message. We do feel that SAP did contact nodejs server and then crashed because if we don't trigger idoc in SAP then the node server is not crashing.

Can you please guide us here on how to further debug this.

bsrdjan commented 11 months ago

Although an IDoc example is provided, the node-rfc is not recommended for IDoc processing because. Considerable efforts are required for providing IDoc parsing functionality already implemented in SAP Java Connector, JCo, as described in this comment https://github.com/SAP/node-rfc/discussions/279#discussioncomment-4905375 For IDoc processing, JCo is the way to go

panditha commented 11 months ago

@bsrdjan, Does it mean Idocs can't be processed anywhere other than Java language? I think this will be major constraint. Do you have any alternatives to process Idocs in non-java languages?

bsrdjan commented 11 months ago

yes, it is the case for the time being. Per current cloud and on-premise extensibility guidelines, IDoc is deprecated integration technology, see pg. 28 of Extend SAP S/4HANA in the cloud and on premise with ABAP based extensions

As you can see from Ulrich-Schmidt comment https://github.com/SAP/PyRFC/discussions/340#discussioncomment-7326815, the IDoc support requires considerable efforts, invested so far in Java platform only.

Support on other platforms is not on current roadmap and request/proposal can be submitted via SAP Customer Influence channel: https://influence.sap.com