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

Show Transports RELEASED but NOT YET Imported



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Transport and Upgrade | Транспорт и Обновления
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Wed Aug 20, 2008 10:05 am    Post subject: Show Transports RELEASED but NOT YET Imported Reply with quote

Code:
* Source Name is  ZIMPORTN
REPORT ZIMPORTN
 LINE-COUNT 65
 LINE-SIZE 255 NO STANDARD PAGE HEADING.
********************************************************************
* Purpose - Transports RELEASED but NOT YET Imported               *
********************************************************************
TABLES:  E070,E07T,DD07T, USR21, TSYST.
DATA: BEGIN OF TT_COFI_LINES OCCURS 500.
        INCLUDE STRUCTURE TSTRFCOFIL.
DATA: END OF TT_COFI_LINES.
DATA: TT_COFI_LINES-COUNT(8) TYPE P.
DATA: TT_COFI_LIT(10).
DATA: TT_COFI_LIT2 LIKE DD07T-DDTEXT.
DATA: BEGIN OF TAB OCCURS 500,
      STRKORR LIKE E070-STRKORR,
      AS4USER LIKE E070-AS4USER,
      END OF TAB.
DATA: BEGIN OF TAB2 OCCURS 500,
      STRKORR LIKE E070-STRKORR,
      AS4USER LIKE E070-AS4USER,
      END OF TAB2.
DATA: BEGIN OF TAB-DD07T OCCURS 100,
      DOMVALUE_L LIKE DD07T-DOMVALUE_L,
      DDTEXT     LIKE DD07T-DDTEXT,
      END OF TAB-DD07T.
DATA: TEMP-LINE(150).
data: init-strkorr like e070-strkorr.
SELECT-OPTIONS:
            USER FOR  USR21-BNAME,
* Selection Text   "User(s) Releasing a Task
      TARSYS    FOR  TSYST-SYSNAME DEFAULT 'RQ1'.
* Selection Text   "Target System(s)
PARAMETERS:
      SORT1 RADIOBUTTON GROUP TMOD DEFAULT 'X',
* Selection Text   "Sort by Person Transport
      SORT2 RADIOBUTTON GROUP TMOD.
* Selection Text   "Sort by Transport Person
SELECT * FROM DD07T WHERE DDLANGUAGE EQ SY-LANGU
                      AND DOMNAME    EQ 'TRBATFUNC'.
  MOVE-CORRESPONDING DD07T TO TAB-DD07T.
  APPEND TAB-DD07T.
ENDSELECT.
CLEAR TAB-DD07T.
MOVE 'I' TO TAB-DD07T-DOMVALUE_L.
MOVE 'Import' TO TAB-DD07T-DDTEXT.
APPEND TAB-DD07T.
CLEAR TAB-DD07T.
MOVE 'P' TO TAB-DD07T-DOMVALUE_L.
MOVE 'Problem' TO TAB-DD07T-DDTEXT.
APPEND TAB-DD07T.
SORT TAB-DD07T BY DOMVALUE_L.
clear init-strkorr.
SELECT * FROM E070 WHERE AS4USER IN USER
*  Find Released Tasks for an Owner
                     AND TRSTATUS EQ 'R'
*                    AND STRKORR  eq init-strkorr.
                     and tarsystem in tarsys.
  CLEAR TAB.
  MOVE E070-TRKORR  TO TAB-STRKORR.
  MOVE E070-AS4USER TO TAB-AS4USER.
  COLLECT TAB.
ENDSELECT.
COMMIT WORK.
LOOP AT TAB.
  REFRESH TT_COFI_LINES.
  CALL FUNCTION 'STRF_READ_COFILE'
       EXPORTING
            IV_DIRTYPE     = 'T'
            IV_TRKORR      =  TAB-STRKORR
*    IMPORTING
*         EV_COFI_HEADER =
       TABLES
            TT_COFI_LINES  = TT_COFI_LINES
       EXCEPTIONS
            WRONG_CALL     = 1
            NO_INFO_FOUND  = 2
            OTHERS         = 3.
  DESCRIBE  TABLE TT_COFI_LINES LINES TT_COFI_LINES-COUNT.
  if tt_cofi_lines-count > 0.
    loop at tt_cofi_lines where function eq 'P'
                             or function eq '<'
                             or function eq 'E'.
      delete tt_cofi_lines index sy-tabix.
    endloop.
    loop at tt_cofi_lines.
      check not tt_cofi_lines-tarsystem  in tarsys.
      delete tt_cofi_lines index sy-tabix.
    endloop.
  endif.
  DESCRIBE  TABLE TT_COFI_LINES LINES TT_COFI_LINES-COUNT.
  check tt_cofi_lines-count eq 0.
* check tt_cofi_lines-count ne 0.
  clear tab2.
  move tab-strkorr to tab2-strkorr.
  move tab-as4user to tab2-as4user.
  append tab2.
ENDLOOP.
IF NOT SORT1 IS INITIAL.
  SORT TAB2 BY AS4USER strkorr.
ENDIF.
IF NOT SORT2 IS INITIAL.
  SORT TAB2 BY STRKORR as4user.
ENDIF.
LOOP AT TAB2.
  CLEAR E07T.
  SELECT SINGLE * FROM E07T WHERE TRKORR EQ TAB2-STRKORR
                              AND LANGU EQ SY-LANGU.
  CLEAR TEMP-LINE.
  MOVE E07T-AS4TEXT TO TEMP-LINE.
  clear e070.
  select single * from e070 where trkorr eq tab2-strkorr.
  WRITE: /02
        'Task Owner', TAB2-AS4USER,
         TAB2-STRKORR,
         e070-as4date, e070-as4time,
         TEMP-LINE(75).
ENDLOOP.
INCLUDE ZCONINC3.
FORMAT INTENSIFIED OFF.
IF NOT SORT1 IS INITIAL.
  WRITE: / 'Sort by User  Transport'.
ENDIF.
IF NOT SORT2 IS INITIAL.
  WRITE: / 'Sort by Transport User'.
ENDIF.
FORMAT INTENSIFIED ON.
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 -> Transport and Upgrade | Транспорт и Обновления 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.