Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Transport Request Documentation

vg24
Explorer
0 Kudos

After creating a transport request, is there any way to check whether documentation for that tr is made or not?

Like, when we release a task it displays a text editor where we can maintain documentation. But I want to check whether documentation is there or not and if it is not there then don't release the tr.

Is there any way to do this?

1 ACCEPTED SOLUTION

former_member106
Contributor

Hi vg24 ,

It is possible. You need to implement a BADI CTS_REQUEST_CHECK. Use the method CHECK_BEFORE_RELEASE to check the documentation.

A short code suggestion below can help you.

  DATA lv_found      TYPE i.
  DATA lv_object     TYPE doku_obj.<br>
MOVE request TO lv_object.
**Check whether the transport contains the documentation,
    CALL FUNCTION 'DOCU_INIT'
      EXPORTING
        id     = 'TA'
        object = lv_object
        typ    = 'T'
      IMPORTING
        found  = lv_found.

    IF lv_found EQ 0.
      EXIT.
    ENDIF.

    IF lv_found NE 0.
    CALL FUNCTION 'DEQUEUE_E_TRKORR'
      EXPORTING
        trkorr = request.
    MESSAGE e000 WITH request.
  ENDIF.<br>
10 REPLIES 10

FredericGirod
Active Contributor
0 Kudos

Yes, there is, at the same place as ATC

former_member106
Contributor

Hi vg24 ,

It is possible. You need to implement a BADI CTS_REQUEST_CHECK. Use the method CHECK_BEFORE_RELEASE to check the documentation.

A short code suggestion below can help you.

  DATA lv_found      TYPE i.
  DATA lv_object     TYPE doku_obj.<br>
MOVE request TO lv_object.
**Check whether the transport contains the documentation,
    CALL FUNCTION 'DOCU_INIT'
      EXPORTING
        id     = 'TA'
        object = lv_object
        typ    = 'T'
      IMPORTING
        found  = lv_found.

    IF lv_found EQ 0.
      EXIT.
    ENDIF.

    IF lv_found NE 0.
    CALL FUNCTION 'DEQUEUE_E_TRKORR'
      EXPORTING
        trkorr = request.
    MESSAGE e000 WITH request.
  ENDIF.<br>

0 Kudos

Thanks a lot semkum

I believe the loop begins before function call.

0 Kudos

Thanks. there is no loop required, and my code had loop for someother reason. I have removed it now. Please accept the answer if your implementation works.

Regards

Senthil.

0 Kudos

Thankyou for the answer!!

0 Kudos

semkum what can be given in 'langu' within the function call DOCU_INIT?

0 Kudos

vg24 , it should be SPRAS value (en, de) which needs to be passed. Basically, the language in which the text will be stored in the table.

Regards

Senthil.

0 Kudos

Thankyou Senthilkumar Moorthy 🙂

0 Kudos

semkum if the check has to be made only for a TR and not task, then how can it be done?

I have been trying to make an internal table of type E070 and looping through it. Wherever STRKORR eq '' and TRKORR eq lv_object, the function is being called and if not then I'm simply executing it. But this method is not working. It is not checking whether the object is a task or TR. Please help here.

vg24
Explorer
0 Kudos

Can you elaborate a bit more about it? I'm new to this.

Thank you!