SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Программа по поиску ENQUEUE / DEQUEUE функций



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Submit a new program | Новые материалы, программы для сайта
View previous topic :: View next topic  
Author Message
Endrews
Участник
Участник



Joined: 03 Feb 2014
Posts: 8

PostPosted: Wed Feb 05, 2014 10:28 am    Post subject: Программа по поиску ENQUEUE / DEQUEUE функций Reply with quote

Code:

*&---------------------------------------------------------------------*
*& Report  ZFIND_ENQUEUE
*&
*&---------------------------------------------------------------------*
*& Created By Endrews
*&---------------------------------------------------------------------*

REPORT  zfind_enqueue.

*----------------------------------------------------------------------*
* .DEFINITION
*----------------------------------------------------------------------*

TYPE-POOLS : slis.

TABLES: dd25l, tfdir.

DATA: BEGIN OF lt_dd25 OCCURS 0,
  viewname LIKE dd25l-viewname,
  roottab  LIKE dd25l-roottab,
  ddtext   LIKE dd25t-ddtext,
  enqueue  LIKE dd25t-ddtext,
  dequeue  LIKE dd25t-ddtext,
END OF lt_dd25.

DATA gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA gs_layout   TYPE slis_layout_alv.
DATA lv_fm_name  TYPE rs38l_fnam.

FIELD-SYMBOLS: <fs_lt_dd25> LIKE LINE OF lt_dd25.
FIELD-SYMBOLS <fs_fc>       LIKE LINE OF gt_fieldcat.

*----------------------------------------------------------------------*
* .SELECT-OPTION (Основная таблица , как MARA, LIKP, VBAK)
*----------------------------------------------------------------------*

SELECT-OPTIONS: s_rootab FOR dd25l-roottab.

*----------------------------------------------------------------------*
* .CODE
*----------------------------------------------------------------------*

CHECK s_rootab[] IS NOT INITIAL.

SELECT dd25l~viewname dd25l~roottab
       dd25t~ddtext
  FROM dd25l
  INNER JOIN dd25t
   ON  dd25l~viewname = dd25t~viewname
   AND dd25l~as4local = dd25t~as4local
  INTO CORRESPONDING FIELDS OF TABLE lt_dd25
  WHERE dd25l~roottab    IN s_rootab
    AND dd25t~ddlanguage EQ 'RU'.

CHECK sy-subrc IS INITIAL.

LOOP AT lt_dd25 ASSIGNING <fs_lt_dd25>.
  CONCATENATE 'ENQUEUE_' <fs_lt_dd25>-viewname
                    INTO <fs_lt_dd25>-enqueue.
  CONCATENATE 'DEQUEUE_' <fs_lt_dd25>-viewname
                   INTO <fs_lt_dd25>-dequeue.

  SELECT SINGLE * FROM tfdir WHERE funcname = <fs_lt_dd25>-enqueue.
  IF sy-subrc <> 0.
    CLEAR: <fs_lt_dd25>-enqueue.
  ENDIF.

  SELECT SINGLE * FROM tfdir WHERE funcname = <fs_lt_dd25>-dequeue.
  IF sy-subrc <> 0.
    CLEAR: <fs_lt_dd25>-dequeue.
  ENDIF.

ENDLOOP.

DELETE lt_dd25[] WHERE enqueue IS INITIAL
                   AND dequeue IS INITIAL.

CHECK lt_dd25[] IS NOT INITIAL.

*----------------------------------------------------------------------*
* .ALV
*----------------------------------------------------------------------*

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
    i_program_name         = sy-repid
    i_internal_tabname     = 'LT_DD25'
    i_inclname             = sy-repid
    i_bypassing_buffer     = 'X'
  CHANGING
    ct_fieldcat            = gt_fieldcat
  EXCEPTIONS
    inconsistent_interface = 1
    program_error          = 2
    OTHERS                 = 3.

IF sy-subrc NE 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

LOOP AT gt_fieldcat ASSIGNING <fs_fc>.
  CASE <fs_fc>-fieldname.
    WHEN 'ENQUEUE'.
      <fs_fc>-seltext_s    = 'ENQUEUE'.
      <fs_fc>-seltext_m    = 'ENQUEUE'.
      <fs_fc>-seltext_l    = 'ENQUEUE-функция'.
      <fs_fc>-reptext_ddic = 'ENQUEUE-функция'.
    WHEN 'DEQUEUE'.
      <fs_fc>-seltext_s    = 'DEQUEUE'.
      <fs_fc>-seltext_m    = 'DEQUEUE'.
      <fs_fc>-seltext_l    = 'DEQUEUE-функция'.
      <fs_fc>-reptext_ddic = 'DEQUEUE-функция'.
  ENDCASE.
ENDLOOP.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program       = sy-repid
    it_fieldcat              = gt_fieldcat
    is_layout                = gs_layout
*      i_callback_user_command  = gc_form_user_command
  TABLES
    t_outtab                 = lt_dd25[]
  EXCEPTIONS
    program_error            = 1
    OTHERS                   = 2.

*----------------------------------------------------------------------*
* .END OF PROGRAMM
*----------------------------------------------------------------------*
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Submit a new program | Новые материалы, программы для сайта All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.