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

Create any report on every target system reachable via RFC



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Connect to External system, Unix и Perl
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Sun Nov 04, 2007 3:21 pm    Post subject: Create any report on every target system reachable via RFC Reply with quote

This reports shows how to create any report on every target system reachable via RFC.

Code:
REPORT Y9030023 LINE-SIZE 50.
*
**********************         HEADER                    **************
*
* Copyright (c) 1999 by Stefan riedel-Seifert,
*               78034 Boeblingen, http://www.hp.com
*
*     You can use or modify this report for your own work as long
*               as you don't try to sell or republish it.
*      In no event will the author be liable for indirect, special,
*        Incidental, or consequental damages (if any) arising out of
*                       the use of this report.
*//////////////////////////////////////////////////////////////////////*
* Parameters.
  parameters:
    PR_DEST LIKE RFCDES-RFCDEST DEFAULT 'ABXR2_XR2_00'.

* Data.
  data:
    lv_errormessage like sy-msgv1,
    gt_program      like progtab   occurs 0 with header line,
    gt_writes       like listzeile occurs 0 with header line.

* Start of selection.
  start-of-selection.

* Init.
  clear:
    gt_program, gt_program[],
    gt_writes,  gt_writes[].

* Fill.
  gt_program = 'Report <>.'.
  append gt_program.
  clear  gt_program.
  GT_PROGRAM = 'Write /1 ''Hello world''.'.
  append gt_program.
  clear  gt_program.
*............................................ add from CT-Team .........
  APPEND 'WRITE: /1 ''SY-REPID:'', SY-REPID.' TO GT_PROGRAM.
  CLEAR GT_PROGRAM.
*.......................................................................
*
* Create on target system and retrieve screen output.
  call function 'RFC_ABAP_INSTALL_AND_RUN'
       destination         pr_dest
       importing
            errormessage = lv_errormessage
       tables
            program      = gt_program
            writes       = gt_writes
       exceptions
            others       = 1.
*
*............................................ add from CT-Team .........
  LOOP AT GT_WRITES.
    WRITE: /1 GT_WRITES.
  ENDLOOP.
*
************************************************************************
******************** end of program ************************************
************************************************************************
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 -> Connect to External system, Unix и Perl 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.