Skip to Content

Disclaimer: This is a proposal of an SCN Member and not an authorized solution by SAP. Pls. be aware what you do!


Motivation

CSOL Error.png

In my Post I pointed out the Issue that #adt can not handle #csol warnings as #SE80 can. I described a workaround using #SE80 and another using a dirty technique in solutionamanger.

For us in the project this was not sufficient.

The goal is to “auto confirm” the CSOL warnings as we can do in #SE80. Due to project requirements this would be the only way in any case at the moment.

—- EDIT  04.07.2016 —–

This Note : 1591120 will also help you. You can change the priority of the CSOL Messages.


This helped us in same issues with SPROXY and in CRM Tools.



Durch diese Customizing-Option wird festgelegt, wie das System nach einer Sperrkonfliktwarnung reagierensoll.

Wenn Sie z.B. Änderungen an einem Transportauftrag sichern, liefert die Sperrkonfliktberechnung durch

die CSOL drei Ergebnisse:

Wenn keine Konflikte vorliegen, sichert das System die Änderungen.

Wenn Konflikte der Konfliktart “Fehler” vorliegen, meldet die Anwendung einen Fehler.

Wenn ein Konflikt der allgemeinen Konfliktart “Warnung” vorliegt, hängt der weitere Prozess vom Wert

im Feld CSOL_WAR_DIA_FREE_STRATEGY ab:

Beim Wert CANCEL_WARNING wird das Sichern abgebrochen und gemeldet.

Beim Wert IGNORE_WARNING wird das Sichern fortgesetzt und kein Fehler gemeldet. Außerdem werden

Sperreinträge vorgenommen.

Wenn der Customizing-Eintrag CSOL_WAR_DIA_FREE_STRATEGY nicht hinzugefügt wird, entspricht das

Standardverhalten der Einstellung CANCEL_WARNING.


We removed the enhancement listed here again.
—- END EDIT —-

You can solve this using two Enhancements and a helper class:

Create helper-class:

CLASS zcl_000_adt_service DEFINITION

  PUBLIC

  CREATE PUBLIC.

  PUBLIC SECTION.

    CLASS-DATA:

      sv_adt_call          TYPE abap_bool VALUE abap_false,

      sv_csol_check_called TYPE abap_bool VALUE abap_false.

  PROTECTED SECTION.

  PRIVATE SECTION.

ENDCLASS.

CLASS ZCL_000_ADT_SERVICE IMPLEMENTATION.

ENDCLASS.

Detect if called via ATD in SADT_REST_RFC_ENDPOINT

Create an enhancement at the top of SADT_REST_RFC_ENDPOINT:

ENHANCEMENT Z_SADT_REST_RFC_ENDPOINT.    “active version

  **********************************************************************

* Enhancement to register an ADT call.

**********************************************************************

     LOGPOINT ID z000_sap_code_enhancement SUBKEY sycprog FIELDS ‘Z_SADT_REST_RFC_ENDPOINT’. “Optional

     zcl_000_adt_service=>sv_adt_call = abap_true.

ENDENHANCEMENT.

Catch the CSOL message in function module TMW_PRJL_CSOL_CHECK when called from #adt

We did not want to do real modification, such that we used a recursive call within the enhancement of TMW_PRJL_CSOL_CHECK. After the recursion we can catch the message if we are called via #adt an ignore it. Create an enhancement at the top:

ENHANCEMENT Z_TMW_PRJL_CSOL_CHECK.    “active version

**********************************************************************

* Because the confirmation of CSOLocks is still not possible via ADT/Eclipse

* this enhancement helps on an interim basis.

*

* IF a CSOL conflict occurs the Solution Manager (second call of function

* module /TMWFLOW/CHECK_OBJECT_LOCK_CSL) returns a specific message. This

* message will be raised as LOCKING_NOT_ALLOWED.

*

* The conflict will be confirmed with including the object to a transport

* request which is known by the Solution Manager. So catching the specific

* message by a recursive call (depth 2) and ignoring it will cause an

* automatic CSOL conflict confirmation.

*

* To differ a call of function module TMW_PRJL_CSOL_CHECK by Eclipse/ADT and

* by an se80 session there is a flag, which is set by an enhancement of

* function module SADT_REST_RFC_ENDPOINT.

**********************************************************************

”   LOGPOINT ID z000_sap_code_enhancement SUBKEY sycprog FIELDS ‘Z_TMW_PRJL_CSOL_CHECK’.   Optional

   IF zcl_000_adt_service=>sv_adt_call = abap_true AND

      zcl_000_adt_service=>sv_csol_check_called = abap_false.

    “AND

    ”  new zcl_001_user_service( )->is_user_parameter_set( ‘Z_AUTO_CSOL_CONFIRM’ ) = abap_true.  “Nice to have

     zcl_000_adt_service=>sv_csol_check_called = abap_true. “stop recursion

     CALL FUNCTION ‘TMW_PRJL_CSOL_CHECK’

       EXPORTING

         iv_request         = iv_request

         iv_suppress_dialog = iv_suppress_dialog

         it_objects         = it_objects

         it_keys            = it_keys

         iv_trfunction      = iv_trfunction

       IMPORTING

         ev_no_check_performed = ev_no_check_performed

       EXCEPTIONS

         locking_not_allowed     = 1

         warning_conflicts_exist = 2

         OTHERS                  = 1.

     zcl_000_adt_service=>sv_csol_check_called = abap_false.

      CASE sysubrc.

        WHEN 0.

          RETURN.

        WHEN 1.

          IF symsgid = ’00’ AND symsgty = ‘E’ AND symsgno = ‘001’ AND

             ( sylangu = ‘E’ AND symsgv1 = ‘Customizable CSOL conflict for objects changed in’  AND symsgv2 = ‘ other TR (Note 1591120)’ ) OR

             ( sylangu = ‘D’ AND symsgv1 = ‘Anpassbarer CSOL-Konflikt für in and. TA geänderte’ AND symsgv2 = ‘ Objekte (Hinw. 1591120’  ).

            “ignore/accept CSOL conflict => confirm CSOL conflict

            RETURN.

          ENDIF.

          “re-raise

          MESSAGE ID symsgid TYPE symsgty NUMBER symsgno WITH symsgv1 symsgv2 symsgv3 symsgv4 RAISING locking_not_allowed.

        WHEN 2.

          “re-raise

          MESSAGE ID symsgid TYPE symsgty NUMBER symsgno WITH symsgv1 symsgv2 symsgv3 symsgv4 RAISING warning_conflicts_exist.

      ENDCASE.

   ENDIF.

ENDENHANCEMENT.

Additional

in the line:

  ”  new zcl_001_user_service( )->is_user_parameter_set( ‘Z_AUTO_CSOL_CONFIRM’ ) = abap_true. 

we placed some code to ensure that the auto confirm of #csol is only done for user who have set the set/get parameter accordingly.

This is what the coding does.

Conclusion

Now we have a #adt that “confirms” CSOL warnings immediately such that we can continue to work as normal in #adt.

Thomas Fiedler  and the ATD Team are aware of this issue and are working on a standard solution.

Be aware of the disclaimer at the top.

Kind Regards

Timo


To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Christian Hiller

    Hi Timo,

    we are have the same problem by using Solution Manager and CSOL.
    Is this workaround valid for Solman 7.1?
    Or which version of Solution do you use?

    Best Regards,
    Christian

    (0) 
    1. Timo John Post author

      Hi,

      we have SOMAN 702 SP16  which is SOLMAN 7.1

      Please check the Note mentioned at the top and change the prio of the messages. Then you need no enhancements

      (0) 

Leave a Reply