Application Development and Automation 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: 
Read only

Transport Request Documentation

vg24
Explorer
0 Likes
3,215

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
Read only

former_member106
Contributor
3,065

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
Read only

FredericGirod
Active Contributor
0 Likes
3,065

Yes, there is, at the same place as ATC

Read only

former_member106
Contributor
3,066

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>
Read only

0 Likes
3,065

Thanks a lot semkum

I believe the loop begins before function call.

Read only

0 Likes
3,065

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.

Read only

0 Likes
3,065

Thankyou for the answer!!

Read only

0 Likes
3,065

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

Read only

0 Likes
3,065

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.

Read only

0 Likes
3,065

Thankyou Senthilkumar Moorthy 🙂

Read only

0 Likes
3,065

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.

Read only

vg24
Explorer
0 Likes
3,065

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

Thank you!