Search code examples
c#saprfcbapisap-dotnet-connector

How to reset a password via BAPI in a CUA environment?


I am currently developing a C# application with SAP NCo 3. I am wondering if I could invoke BAPI into CUA and this BAPI would pass details to child system.

This field is available through Test Function Module (field "RFC target sys"), but it is unavailable directly in standard BAPIs when accessed from SAP NCo.

RFC target sys:

In ABAP, devs can use:

call function 'BAPI_USER_CHANGE' destination '<TARGET_SYS>'

Can I use something similar in NCo library?

IRfcFunction rfcs = rfcDest.Repository.CreateFunction("BAPI_USER_CHANGE");

Does anybody know how this could be achieved?

Main intent is to reset user passwords to initial ones through App(BAPI) --> CUA --> ChildSystem

Without direct access into child systems.


Solution

  • Ok, so I found out that what I wanted to achieve is not possible with just sapnco.

    But, in SAP I created function module, which calls function module and uses DESTINATION 'target_sys' to run in end system. This way I achieved what I wanted. By calling my Z_FUNC_MODULE from sapnco I pass variable target_sys and FN is called in child system of CUA.

    Hope this helps to someone.