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

Information on the call mode inside an (RFC-enabled) function module

Former Member
0 Likes
663

Hello all,

just working on and with some RFC-enabled own function modules. Normally these function modules are called via RFC from an business connector.

Now the situation is that i want to call the same function modules inside the SAP-system, but with a slightly other functionality.

The question: is there any field (sy-???) at runtime which gives me the information whether this function call came from outside or inside the SAP system ?

I'm at Rel.4.7 .

Best Regards

Wolfgang

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
627

Hi!

In most common, RFC is using an own user (f.e. RFC_USER) to log in to SAP, so you can check the SY-UNAME for this process.

Regards

Tamá

5 REPLIES 5
Read only

Former Member
0 Likes
628

Hi!

In most common, RFC is using an own user (f.e. RFC_USER) to log in to SAP, so you can check the SY-UNAME for this process.

Regards

Tamá

Read only

0 Likes
627

Hello Tamas,

yes , but: these function modules will be rolled out to more than one system. So i don't know, which users will be used there for rfc-calls. Ok , i could check sy-uname being a communication user..

But my hope is that there's a way by some flag set in system tables.

Regards Wolfgang

Read only

0 Likes
627

Hi!

If you check the user list in the transaction SM04, there is a field (Type), which can be useful for you. I'll try to find out, where is this field read from.

Of course it is based on the user again, but not requires hard coding.

Regards

Tamá

Read only

0 Likes
627

Hello Tamas,

that's the idea. Looked it up - it's a c-call 'ThUsrInfo' return a table.

Reading that with sy-uname and setting a flag if RFC-called or not - a nice little form-routine.

Beside, there's still some more info which might be useful to me (ip-adress).

I'll try that.

Thank you and best regards

Wolfgang

Read only

0 Likes
627

Sorry I didn't find any useful tables.

You might check the coding of the program "RSM04000_ALV", this provides the results of SM04, I don't have time for this now.

Just spotted that you solved it, great job!

Best regards

Tamás

Message was edited by:

Tamás Nyisztor