saro-lab / sap-jco-manager

sap jco manager - maven (using the sapjco3.jar)
Apache License 2.0
38 stars 12 forks source link

help me please #4

Closed werty4777 closed 3 months ago

werty4777 commented 3 months ago

this is not a problem, more than anything is to ask for help for what I want to do, I have sap secure login client and users enter sap only starting sap logon, I would like to make a small java app that enters sap and call any rfc but it is not necessary to pass username and password, the sap secure login client is linked to the windows authentication of the machine, could you help me by providing examples please, and thank you very much

ac-saro commented 3 months ago
SapManager
                .builder()
                .set(SapManagerBuilderOption.ASHOST, "host") // AS host
                .set(SapManagerBuilderOption.MSSERV, "9999") // MS port [AS, MS is MSSERV, GW is JCO_GWSERV]
                .set(SapManagerBuilderOption.SYSNR, "01") // system number
                .set(SapManagerBuilderOption.GROUP, "Group Name") // group
                .set(SapManagerBuilderOption.LANG, "KO") // language code
                .set(SapManagerBuilderOption.CLIENT, "100") // client number
                .set(SapManagerBuilderOption.USER, "user") // user
                .set(SapManagerBuilderOption.PASSWD, "password") // password
                .build();

I am currently not working on a project that uses SAP, so I don't have a way to verify this. However, I recommend trying the following changes instead of the above. It's simply a project that wraps JCo, so the usage remains the same. Please refer to the README.md for more details.

SapManager
        .builder()
        .set(DestinationDataProvider.JCO_ASHOST, "your_sap_server")
        .set(DestinationDataProvider.JCO_SYSNR, "00")
        .set(DestinationDataProvider.JCO_CLIENT, "100")
        .set(DestinationDataProvider.JCO_LANG, "EN")
        .set(DestinationDataProvider.JCO_SNC_MODE, "1")
        .set(DestinationDataProvider.JCO_SNC_QOP, "8") // Quality of Protection
        .set(DestinationDataProvider.JCO_SNC_MYNAME, "p:CN=myname")
        .set(DestinationDataProvider.JCO_SNC_PARTNERNAME, "p:CN=sapservicename");
werty4777 commented 3 months ago

I will try it, thank you very much, even so I leave the images of the secure login client and the configuration of the sap logon of the sap connection.

image image

ac-saro commented 3 months ago

@werty4777 Please let us know whether you succeeded or failed. If you succeeded, the method will be updated in the README.md file.

werty4777 commented 3 months ago

bro, this configuration work, I don't need to pass the user since it is taking the same windows user , thank you very much for your support.

image and this works when you want to use and get the sso ticket, you can pass this ticket to another system and use it as authentication to enter sap. image

thank you very much for your support.