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: 

Two questions

Former Member
0 Kudos

Hi,

I have a two questions :

1) When I call method cl_gui_frontend_services=>registry_get_value I get still same value regardles the value itself was changed in windows registry. It looks like SAP has read values stored in same kind of cache. I logged out and in and read value was still same, regardles current value in Windows registry.

Is there any possibility how to "refresh a cache" ?

2) When I call a function in another system through RFC (CALL FUNCTION DESTINATION) in background job the program shut down to dump. In foreground everything is OK. Is it possible to call remote functions from background jobs ?

Thanks.

Marian

4 REPLIES 4

Former Member
0 Kudos

Hi Marian,

I use Function "GUI_GET_REGVALUE" to read register values and it works fine (no problems with buffer). Try use this function, probably it will work in your system too:) Answer for yours second question is of course

Regards

Bogdan

0 Kudos

Hi,

Regarding FM you mentioned : I get same result as with class cl_gui_frontend_services ... doesnt mind.

But second question is for me more important. What do you mean by answer "of course" ? Of course yes - it is possible to call remote functions in jobs or of course no.

I get short dump "CALL_FUNCTION_REMOTE_ERROR" with text

"CPIC error when assigning terminal output for RFC connection" with error code 51.

In foreground everythink is OK.

Thanks.

Marian

0 Kudos

It looks like your RFC function is on a non-SAP system. Also it appears that the RFC function is trying to send stdout (screen output) as result to the caller. I have not done this, but first thing I would try is to figure out if the RFC function on the remote system ended successfully or not.

As for why it works fine in foreground and not in background, I don't know. If you wrote the RFC, try to spit out some trace messages to the file system and try to diagnose the problem.

0 Kudos

Hi,

thank you for your answer. In my case I use some remote FM in smartform. When I write a test program with same FM I can run it in foreground and in background as well.

Realy dont know what is wrong.

I set up control parameters for smartform this way :

NO_DIALOG = 'X'

PREVIEW = space

Marian