Comments (12)
The question can be discussed with Functional/ABAP Consultant. node-rfc support can help with technical and integration issues, related to Python RFC connections. For questions about particular BAPIs it is recommended to reach out to Functional Consultants or SAP ABAP Community.
from node-rfc.
Could you please send the screenshot of the selection data used in SAPGUI, like how the key 000070001048 looks in HUOBJECTS table record in SAPGUI:
You can also set the external breakpoint at the beginning of BAPI_HU_GETLIST and see in ABAP debugger if difference in selection data from SAPGUI and from Node.js. More info here: RFM call results differ from expected
To check if ABAP User Exit used for selection field, you can useabap
utility from SAP/fundamental tools
mkdir tmp
cd tmp
npm init -y
npm install abap-api-tools
# create sapnwrfc.ini file, here in tmp folder, with your system connection parameters
# like
# sysId
# DEST=mySysId
# USER=demo
# PASSWD=welcome
# ASHOST=coevi51
# SYSNR=00
# CLIENT=620
# LANG=EN
# get ABAP metadata of your function module
abap get yourSysMME BAPI_HU_GETLIST
# inspect fields with user exits, search for ALPHA in editor, or from command line
grep ALPHA api/bapi_hu_getlist.js
It would help find out if selection field(s) have user-exits and if leading zeroes for example should be sent from Node.js
from node-rfc.
Hi @bsrdjan ,
Thanks for the quick response on this.
From sap GUI too, I'm providing the leading zeros.
from node-rfc.
I tested with the latest and older node-rfc versions and in remote enabled debugger the selection data look the same, no matter if called from node-rfc or from SAPGUI:
I would suggest to get in touch with Functional Consultant to check if any configuration in the system has influence on RFC call of this particular BAPI.
If no progress could you please open customer incident for BC-MID-RFC-SDK component, provide the url of this issue there and also update this issue with the incident number.
Customer incident helps that more experts can analyse if needed. Next three weeks I am on vacation with very limited access to system.
With customer incident we can also get access and test in your system.
In my test system the OBJKEY 000070001048 does not exist and the correct error message is returned.
test.mjs
import { Client } from "node-rfc";
(async () => {
const client = new Client({ dest: "MME" });
await client.open();
const R = await client.call("BAPI_HU_GETLIST", {
HUOBJECTS: [
{
OBJECT: "09",
OBJKEY: "000070001048",
},
],
});
console.log(R);
})();
Console output
node test.mjs
{
NOTEXT: '',
ONLYKEYS: '',
HIGHESTLEVEL: [],
HUHEADER: [],
HUHISTORY: [],
HUITEM: [],
HUKEY: [],
HUNUMBERS: [],
HUOBJECTS: [ { OBJECT: '09', OBJKEY: '000070001048' } ],
NOTFOUNDHUS: [],
RETURN: [
{
TYPE: 'E',
ID: 'HUSELECT',
NUMBER: '009',
MESSAGE: 'No handling units for required objects',
LOG_NO: '',
LOG_MSG_NO: '000000',
MESSAGE_V1: '',
MESSAGE_V2: '',
MESSAGE_V3: '',
MESSAGE_V4: '',
PARAMETER: '',
ROW: 0,
FIELD: '',
SYSTEM: ''
}
]
}
We need to check the behaviour in your system.
from node-rfc.
Hi @bsrdjan ,
This error you are getting because the process order is not there.
-
You must first create the process order using the cor1 transaction code.
-
Then, by using cowbpack transaction code, you have to create the handling units.
-
Then you have to provide the 09 and the objkey = your process order number that you have created.
from node-rfc.
Hi @bsrdjan If you want, we can set up a call and check the behavior in my system.
from node-rfc.
Thank you for detailed steps. My point was that when HU not found, the error message is correct and in your system there is no result and no error message.
My test system is plain Basis system in which I can't test steps to reproduce. We need to test the behaviour in your system, with customizing applied there. For that we need a customer incident and from EoD today I am anyway out of office.
from node-rfc.
Hi @bsrdjan
The root cause of this issue is when we pass any return parameter. Suppose you are passing a message to this to return then in that at the line n0 89 getting some problem and it does not execute the 107 line that adds the hukey to hukey array.
If I pass the following input to that BAPI on SAPI UI, too, I'm not getting any output.
So, I wonder if it is expected behavior or not.
from node-rfc.
Hi @bsrdjan
Thanks for the support.
The issue is happening because we are passing an empty string in the RETURN parameter array like the following:-
RETURN: [
{
TYPE: 'E',
ID: 'HUSELECT',
NUMBER: '009',
MESSAGE: 'No handling units for required objects',
LOG_NO: '',
LOG_MSG_NO: '000000',
MESSAGE_V1: '',
MESSAGE_V2: '',
MESSAGE_V3: '',
MESSAGE_V4: '',
PARAMETER: '',
ROW: 0,
FIELD: '',
SYSTEM: ''
}
To resolve this issue temporarily, we initialized the return parameter with an empty array, and the issue get resolved. As one suggestion, if SAP itself does not accept the empty string in the return parameter, then the node_rfc library should handle this scenario like if a user is not providing input to the field, then Node_rfc should remove that parameter or provide that which can be accepted at the SAP system.
from node-rfc.
Which field exactly causes the issue when returned as empty string? Could you please provide the example of RETURN parameter with empty string, which causes the issue?
from node-rfc.
From our node js code, we previously provided this input. Because of this, it's not giving us the expected output.
"RETURN": [
{
"FIELD": "",
"ID": "",
"LOG_MSG_NO": "",
"LOG_NO": "",
"MESSAGE": "",
"MESSAGE_V1": "",
"MESSAGE_V2": "",
"MESSAGE_V3": "",
"MESSAGE_V4": "",
"NUMBER": "",
"PARAMETER": "",
"SYSTEM": "",
"TYPE": ""
}
]
If you see line number 89, it's saying if the return is initialized, if we are passing the input to any field that array then this array will get initialized Because of that might following statements will not be executed.
from node-rfc.
The support here can't help with questions related to ABAP functional logic. Is there an issue with ABAP RETURN parameter which is not handled properly by node-rfc? Can you provide an example of such ABAP RETURN parameter and describe what the node-rfc issue exactly is?
I am asking because the above comment is not clear to me:
The issue is happening because we are passing an empty string in the RETURN parameter array like the following:-
The example following this sentence shows non-empty structure and I am not sure which empty string is mentioned here?
from node-rfc.
Related Issues (20)
- error: ‘condition_variable’ in namespace ‘std’ does not name a type
- Can't able to upload excel file using node rfc HOT 1
- Change we change the default port 3300 to 3600 without changing connection string HOT 4
- receving idoc using node-rfc HOT 3
- Installation fails HOT 14
- [rl-reuse_tool-2] Violation against OSS Rules of Play
- [rl-reuse_tool-4] Violation against OSS Rules of Play
- Problem with node 20.10 LTS HOT 1
- Can't get environment on Windows env HOT 2
- Dynamic Connection and Cache HOT 8
- node-rfc installation not working HOT 2
- Difference between client.call and client.invoke HOT 4
- Using node-rfc on web workers HOT 1
- Getting Error: Conversion Error between Character Sets HOT 1
- SAP document listener in node js HOT 1
- TypeScript types for exceptions
- Node Js server crashes after a few RFC calls
- device or resource busy
- Call for Maintainers & Support
- Backslash in password does not work via rfc login
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-rfc.