Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RFC_READ_TABLE with other user (IS this possible?)

Former Member
0 Kudos

Hi I will explain my problem

I want use RFC connection with function RFC_READ_TABLE

The problem IS I dont want use the user where they are in the red circle (inside sm59)

I want use USER and password in my ABAP CODE or in a table with password in MD5

THIS IS POSSIBLE ?

My function look like that

CALL FUNCTION 'RFC_READ_TABLE' DESTINATION 'DCRCLNT440'
     EXPORTING
          query_table                = 'TMSBUFFER'
          delimiter                  = ' '
          no_data                    = ' '
          rowskips                   = 0
          rowcount                   = 0
        TABLES
           options                    = lv_options
           fields                     = lv_fields
           data                       = lv_data
       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   

1 ACCEPTED SOLUTION

Former Member
0 Kudos

no reponse since 3 days

it's look like not possible, anyone can help me

6 REPLIES 6

Former Member
0 Kudos

no reponse since 3 days

it's look like not possible, anyone can help me

0 Kudos

Hi

Could you check this SDN link I am not sure about the custom development.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a83ec690-0201-0010-14ac-bd1d75e24...

BR

SS

0 Kudos

no this is not that

I search in abap a function where I can call myself username and password from a rfc code

0 Kudos

Create a new RFC destination and use the checkbox "current user" - then in RFC call the system will ask calling dialog user for their UID and PWD -> the connection runs as themself and not the fixed user.

Cheers,

Julius

0 Kudos

YES julius I know this

but I dont want when I run my abap programm always enter my UID and PWD

I thnik I will just create new RFC connection because no solution

0 Kudos

Dont' give up too quickly...  see function module AUTHORITY_ CHECK -> via the fixed System user you can call that FM in remote system and export an alternate user name to the FOR USER extention in the check. That can be the calling dialog user name for example. Then based on that result of the check, the fixed System user in the RFC connection calls RFC_READ_TABLE for the S_TABU_NAM name of the table or not - this then has nothing to do with it's own authorizations anymore, it is just taking care of the system task of returning the data or not.

Downside: The fixed System RFC user must have all the authorizations for the tables and if there are problems then it is confusing for the trace on the target system side, because fixed user is authorized but message says "No authority" etc.

Cheers,

Julius