Currently Being Moderated

Are you fed up of hanging queues in CRM because your colleagues changed some customizing and now your e.g. materials won't arrive any more.

Well then you may have already sheduled a regular download of the customizing objects. But still.... Usualy you do the download twice a day, but someone was quicker and now there is a hanging queue.

What would you say about a litle report, that will restart the queues once the download of your customizing objects was done.

This will probably save you some time and the anoying calls, that CRM is bulls*** and that it's your fault that there are hanging queues. You shurely now, it's not your fault :-)

So what you will have to do is put the report in your CRM and put a second step in your customizing download job. After you have fired "smof_download" execute this report and from now on, you should have much less trouble with hanging queues.

 

The usage is simple, the first parameter is the load objects, like you entered them in smof_download, the second parameter is the queue name (use a generic one, e.g. "R3AD_MATERI") and the third parameter is the time of retrys the report waits for the download objects beeing finished. It's always 5 seconds wait, so lets use something like 10.</p><p>So this is not realy genious, but sometimes the little things are helpful.</p><p>So have fun, and now your colleagues owe you a coffee</p><p><textarea cols="80" rows="20">***********************************************************************

  • Report  ZCAUK_QUEUE_RESTART

*----


  • Restart QRFC Queue after initial Download

*----


  • <Kurzbeschreibung>

*----


  • DATUM      NAME                            PROGR.-AUFG.     TRANSPORT

  •            BESCHREIBUNG

  • 2011-02-23 Rolf Mueller Ciber AG          

  •            Initiale Version

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

 

REPORT  zcauk_queue_restart.

 

 

TABLES: smofdstat, smofobject.                              "#EC *

TABLES: trfcqin, trfcqstate, trfcqdata.                     "#EC *

 

 

SELECT-OPTIONS s_object FOR smofobject-objname.

PARAMETERS: "  p_object LIKE smofobject-objname,

                p_qname  LIKE trfcqin-qname OBLIGATORY,

                p_time(3) TYPE n DEFAULT 10.

 

DATA: gt_smofobject LIKE smofobject OCCURS 0 WITH HEADER LINE,

      gt_smofobj_tmp LIKE smofobject OCCURS 0 WITH HEADER LINE,

            gt_smofdstat LIKE smofdstat OCCURS 0 WITH HEADER LINE.

 

DATA: exeluw LIKE sy-index,

      astate LIKE trfcqin-qstate.

 

 

 

INITIALIZATION.

--


Berechtigungsprüfung--

  AUTHORITY-CHECK OBJECT 'S_ADMI_FCD'

                  ID 'S_ADMI_FCD' FIELD 'NADM'.

  IF sy-subrc <> 0.

    MESSAGE e149(00) WITH 'S_ADMI_FCD / NADM'(ath).

  ENDIF.

--


Berechtigungsprüfung--

 

 

START-OF-SELECTION.

 

  • select objects based on user entry

  SELECT * INTO TABLE gt_smofobject FROM smofobject

                                  WHERE objname IN s_object

                                  AND inactive EQ space.

  IF sy-subrc = 4.

    REFRESH gt_smofobject.

    EXIT.

  ENDIF.

 

  gt_smofobj_tmp[] = gt_smofobject[].

 

  CALL FUNCTION 'SMOREP_SMOFDSTAT_SELECT'

    EXPORTING

      i_abort       = space

      i_waiting     = 'X'

      i_running     = 'X'

      i_done        = 'X'

    TABLES

      ti_smofobject = gt_smofobject

      to_smofdstat  = gt_smofdstat.

 

  LOOP AT gt_smofdstat.

    READ TABLE gt_smofobj_tmp WITH KEY objname = gt_smofdstat-objname

      TRANSPORTING NO FIELDS.

    IF sy-subrc = 0.

      DELETE gt_smofobj_tmp INDEX sy-tabix.

    ENDIF.

  ENDLOOP.

 

  IF gt_smofobj_tmp[] IS NOT INITIAL.

    LOOP AT gt_smofobj_tmp.

      WRITE:/ 'Object:', gt_smofobj_tmp-objname, 'nerver downloaded!'.

    ENDLOOP.

    EXIT.

  ENDIF.

 

  DO p_time TIMES.

 

    gt_smofobj_tmp[] = gt_smofobject[].

 

    CALL FUNCTION 'SMOREP_SMOFDSTAT_SELECT'

      EXPORTING

        i_abort       = space

        i_waiting     = space

        i_running     = space

        i_done        = 'X'

      TABLES

        ti_smofobject = gt_smofobject

        to_smofdstat  = gt_smofdstat.

 

    LOOP AT gt_smofdstat.

      READ TABLE gt_smofobj_tmp WITH KEY objname = gt_smofdstat-objname

        TRANSPORTING NO FIELDS.

      IF sy-subrc = 0.

        DELETE gt_smofobj_tmp INDEX sy-tabix.

      ENDIF.

    ENDLOOP.

 

    IF gt_smofobj_tmp[] IS INITIAL.

      WRITE:/ 'Loop:', sy-index.

      PERFORM restart_queue.

      EXIT.

    ENDIF.

 

    WAIT UP TO 5 SECONDS.

 

  ENDDO.

&----


*&      Form  RESTART_QUEUE

&----


  •       text

----


 

FORM restart_queue .

 

  CALL FUNCTION 'TRFC_QIN_RESTART'

    EXPORTING

      qname                      = p_qname

   IMPORTING

     exeluw                     = exeluw

     astate                     = astate

    EXCEPTIONS

      invalid_parameter          = 1

      system_failed              = 2

      communication_failed       = 3.

 

  DETAIL.

  WRITE: /2 'QUEUE NAME    : ', p_qname.

 

  SKIP 1.

  SUMMARY.

 

  CASE sy-subrc.

    WHEN 0.

      WRITE: /2 'No. of actived LUWs:', exeluw.

      WRITE: /2 'LUW-State          : ', astate.

    WHEN 1.

      WRITE: /2 'ERROR:  System Failure'.

    WHEN 2.

      WRITE: /2 'ERROR:  Communication Failure'.

    WHEN 3.

      WRITE: /2 'ERROR:  Invalid Queue Name'.

  ENDCASE.

 

ENDFORM.                    " RESTART_QUEUE



 

 

Comments

Actions

Filter Blog

By date:
By tag: