Closed Zefau closed 2 years ago
Where the CALLER_SYSTEM_ID
is expected to be set?
The SUAUTH_SYSTEM_TRACE_FOR_AUTH
is called from nodejs script and CALLER_SYSTEM_ID
is not the output parameter?
Are you getting expected/correct results from SUAUTH_SYSTEM_TRACE_FOR_AUTH
, when running it in SE37?
Where the CALLER_SYSTEM_ID is expected to be set?
This is a variable set in the ABAP in the program routine of the rfc module RFC_GET_ATTRIBUTES
. This rfc module is called in SUAUTH_SYSTEM_TRACE_FOR_AUTH
, which is using the results.
The SUAUTH_SYSTEM_TRACE_FOR_AUTH is called from nodejs script and CALLER_SYSTEM_ID is not the output parameter?
Yes, SUAUTH_SYSTEM_TRACE_FOR_AUTH
is called via Node.js. And no, CALLER_SYSTEM_ID
is only a variable as stated above. The import / output parameter can be found here https://www.sapdatasheet.org/abap/func/suauth_system_trace_for_auth.html. These do not change the incorrect behaviour though.
Are you getting expected/correct results from SUAUTH_SYSTEM_TRACE_FOR_AUTH, when running it in SE37?
Yes. Locally it runs smoothly with correct results.
For clarification, the program code of SUAUTH_SYSTEM_TRACE_FOR_AUTH
contains the following code:
" System checks
call function 'RFC_GET_ATTRIBUTES'
importing
caller_client = lv_client
caller_system_id = lv_sysid
exceptions
system_call_not_supported = 1
no_rfc_communication = 2
internal_error = 3
others = 4.
if sy-subrc ne 2.
if lv_client ne sy-mandt or
lv_sysid ne sy-sysid.
return.
endif.
endif.
I don't write ABAP, but I read it like lv_sysid
is set from caller_system_id
. Running RFC_GET_ATTRIBUTES
remotely returns an empty value for caller_system_id
. Running it via SE37 it correctly holds the system ID.
This why lv_sysid ne sy-sysid
is true and thus exists the rfc without result (return
).
This is why I would like to set SY-SYSID
via node-rfc, because that seems to be required in order to run this correctly?
ok, now I understand. The question is more for ABAP experts, not the node-rfc issue.
What could eventually help is opening a RFC connection from node-rfc, before calling SUAUTH_SYSTEM_TRACE_FOR_AUTH
, using the Client open()
or Pool acquire()
method:
If it does not help, you could reach out to ABAP experts or ask the question in SAP ABAP community: https://community.sap.com/topics/abap
Describe the bug
I'm trying to call
SUAUTH_SYSTEM_TRACE_FOR_AUTH
to retrieve the current status of the security audit log. Internally, the rfc itself callsRFC_GET_ATTRIBUTES
.Eventually the result for
CALLER_SYSTEM_ID
, which relies onsy-sysid
, is empty. For this reason, the rfc fails to retrieve the status of the security audit log.Calling the rfc directly within the system using SE37 is successful.
To Reproduce
Simply calling
SUAUTH_SYSTEM_TRACE_FOR_AUTH
without arguments (respectively using default arguments) should return the security audit log status, but fails returning nothing. Running it via SE37 retrieves the status.Screenshots
Result
SUAUTH_SYSTEM_TRACE_FOR_AUTH
Result
RFC_GET_ATTRIBUTES
!
CALLER_SYSTEM_ID
is not set correctly !Result SE37
Environment
Additional context
None