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

Select users from diferent systems like F4-Help in su01



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Security and Monitoring
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Sat Oct 20, 2007 1:52 pm    Post subject: Select users from diferent systems like F4-Help in su01 Reply with quote

Code:

report z_rfc_user_list.
 
parameters: p_bname type usr01-bname.
 
at selection-screen on value-request for p_bname.
 
  data: ioption type table of  rfc_db_opt with header line.
  data: ifields type table of rfc_db_fld with header line.
  data: idata   type table of tab512 with header line.
  data: begin of iusr01 occurs 0,
        bname type usr01-bname,
        end of iusr01.
 
  ifields-fieldname = 'BNAME'.
  append ifields.
 
  call function 'RFC_READ_TABLE'
   destination 'PRD'         " <--- Your RFC DEST
    exporting
      query_table                = 'USR01'
*   DELIMITER                  = ' '
*   NO_DATA                    = ' '
*   ROWSKIPS                   = 0
*   ROWCOUNT                   = 0
    tables
      options                    = ioption
      fields                     = ifields
      data                       = idata
   exceptions
     table_not_available        = 1
     table_without_data         = 2
     option_not_valid           = 3
     field_not_valid            = 4
     not_authorized             = 5
     data_buffer_exceeded       = 6
     others                     = 7.
 
  loop at idata.
    iusr01-bname = idata.
    append iusr01.
  endloop.
 
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'BNAME'
            dynprofield = 'P_BNAME'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = iusr01.
 
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 -> Security and Monitoring 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.