jfilak / sapcli

Command Line Interface for interaction with SAP tools
Apache License 2.0
56 stars 24 forks source link

user action newreleasejobs is not supported #20

Closed matt1as closed 4 years ago

matt1as commented 4 years ago

When I try to release a task I get the following error. We're on 7.50 sp 11.

mattias@PC2749:~/sapcli$ ./sapcli cts release task TCGK900054 Traceback (most recent call last): File "./sapcli", line 23, in sys.exit(sapcli.main(sys.argv)) File "/home/mattias/sapcli/bin/sapcli", line 157, in main return args.execute(connection, args) File "/home/mattias/sapcli/sap/cli/cts.py", line 38, in release request.release() File "/home/mattias/sapcli/sap/adt/cts.py", line 99, in release headers={'Accept': 'application/vnd.sap.adt.transportorganizer.v1+xml'} File "/home/mattias/sapcli/sap/adt/core.py", line 232, in execute resp = self._execute_with_session(session, method, url, params=params, headers=headers, body=body) File "/home/mattias/sapcli/sap/adt/core.py", line 168, in _execute_with_session Connection._handle_http_error(req, res) File "/home/mattias/sapcli/sap/adt/core.py", line 141, in _handle_http_error raise error` sap.adt.errors.ADTError: ADT_TM_COMMON_EXCEPTION: user action newreleasejobs is not supported

jfilak commented 4 years ago

Can you release tasks from ADT Eclipse? If so, can you send me the HTTP logs, please?

matt1as commented 4 years ago

Yes, I can release from ADT, however I see that it opens SAP GUI in the background. Here's the HTTP log

Time      Session                        Request Message                                                                                                                     Status  Thread                                                                Elapsed Time (ms)  Server Time (ms)  Communication Time (ms)  Request Size (KB)  Response Size (KB)  Version   Debuggable
====================================================================================================================================================================================================================================================================================================================================================================================
13:00:28  TCG_200_matti_en_1, stateless  POST /sap/bc/adt/repository/nodepath?uri=%2Fsap%2Fbc%2Fadt%2Fvit%2Ftm%2Freleasejobs%2FTCGK900103%3FtmNavigationId%3D20191211120028  200     Worker-20: expanding tree for '' in project 'TCG_200_matti_en_1'...   34                 6                 27                                          0,193               HTTP/1.1  false
13:00:28  TCG_200_matti_en_1, stateless  GET /sap/bc/adt/security/reentranceticket                                                                                           200     Worker-26: Opening SAP Gui ...                                        214                5                 208                                         0,624               HTTP/1.1  false
13:00:28  TCG_200_matti_en_1, stateless  POST /sap/bc/adt/cts/transportrequests/TCGK900103/releasejobs                                                                       200     Worker-22: TCGK900103 Transport request or task release               104                2                 101                                         0,221               HTTP/1.1  false
13:00:19  TCG_200_matti_en_1, stateless  GET /sap/bc/adt/cts/transportrequests?targets=true&user=MATTI                                                                       200     Worker-5: Loading transport requests...                               341                117               223                                         81,296              HTTP/1.1  false
jfilak commented 4 years ago

The only thing I can do here is to employ PyRFC and call RFC FunctionModules for releasing transpors. But that would mean that you would have to get the C RFC SDK libraries installed on your machine.

Do you like such a solution?

matt1as commented 4 years ago

Sorry for the late reply, holidays are coming. Is it a versioning issue, or why does it work for you and not on my machine?

jfilak commented 4 years ago

I would say that's because your ADT ABAP back-end is not the latest version. I tested sapcli with 751, 752 and 753.

jfilak commented 4 years ago

I can release transport from Eclipse directly without the need to jump into SAPGUI.

matt1as commented 4 years ago

Then I think it makes more sense to add a minimum requirement on the ADT backend instead of introducing another dependency.