Application Development and Automation 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: 
Read only

RFC_READ_TABLE TRDIR

Former Member
0 Likes
1,213

Hi ,

I am using the FM 'RFC_READ_TABLE' to check whether a program exist in a system or not. I am using TRDIR as a query table.

My program is behaving differently with different input. In the first situation,i feed input as program1 and i am prompted with the login screen of the target system. where as when i feed the input as program2, it doesnt prompt me with the login screen and it gives me a report that program doesnt exist.

I checked in the target system TRDIR table that the program2 TRDIR entry has the SECU field filled with a value. I assume this is the reason.

Please help me in getting more info on this

Regards,

Tashi Norbu

7 REPLIES 7
Read only

wozjac
Active Participant
0 Likes
1,118

Hello Tashi,

SECU field value contains authorization group assigned to the program. System uses it when you want to:

- execute a program - in this case checks authorization object S_PROGRAM.

- edit a program in ABAP Workbench - authorization object S_DEVELOP is used.

As documentation says "Programs that are not assigned to an authorization group are not protected against display and execution."

The module RFC_READ_TABLE checks authorizations before getting data from table.

Regards,

Jacek

>>> there is no ultimate “one and true” way of software development that we need to get at incrementally by digging harder"
Read only

Former Member
0 Likes
1,118

Hi Jacek,

So when ever i try to read the table entry in TRDIR table, It checks the authorization group ???

My situation is ,The table entry where SECU field is left empty ,when i execute the RFC call, it prompts me the login screen. However when i access the table entry where SECU field is filled with a value ..it doesnt prompt me with the login screen and it says the object is not present in the table eventhough it is.

But it behaves differently why i execute from se37 ..in which case it prompts me with the login screen eventhough i feed the same input as in the previous case.

Please help.

Regards

Tashi

Read only

wozjac
Active Participant
0 Likes
1,118

Which exception are you getting exactly from RFC_READ_TABLE? There are six.

Logon screen can be also required by RFC destination settings in SM59. How do you call RFC_READ_TABLE?

>>> there is no ultimate “one and true” way of software development that we need to get at incrementally by digging harder"
Read only

Clemenss
Active Contributor
0 Likes
1,118

Hi Tashi,

if the user and password are not stored in the RFC destination details, then it will prompt with a logon screen. If you do another RFC call, the system will try to find the RFC session already opened. If successful, it will not need to verify the logon.

The table contents of the table queried are not evaluated at all.

Regards

Clemens

Read only

Former Member
0 Likes
1,118

Hi All,

I am using the same RFC destination to read another entry for which i am prompted with the login screen in the same box.Its not working only for a particular input where i say name like "program1".I checked the entry in TRDIR for program1.Both the entries are present in TRDIR but the only difference is the program1 entry has a value in the SECU field and the program2 doesnt have value in the SECU field. Please help.

Read only

Clemenss
Active Contributor
0 Likes
1,118

Hi Tashi,

did you try the other way round, exchangng the prog names in the queries? Still the same Login screen behavior?

Then this is special in your system.

Regards,

Clemens

Read only

0 Likes
1,118

Hi,

however, the existence of an entry in the table TADIR doesn't necessarily mean that the object exists.

You should try to use instead the function module SCTS_COMP_REPOS_GET_CUST...

It seems the right one.

Regards,

Andrea