cancel
Showing results for 
Search instead for 
Did you mean: 

Registering program permanently in gateway

Former Member
0 Kudos

Hello Gurus,

We need to have a program registered in the gateway i.e <SID>_RFCSENDER.

I follow this command to register it in the UNIX box

nohup rfcexec -a <>SID_RFCSENDER -g <hostname> -x sapgw00 &

This works fine as connection test is successful.But when we re-start the instance this process usually gets stopped and we have to register it manually again.Is there any way we can register this program in the gateway permanently without the need to register it again ?

As an after thought,is there any way we can monitor the process in the OS and start it if the process gets stopped automatically?

Thanks

Sabya

Accepted Solutions (1)

Accepted Solutions (1)

alwina_enns
Employee
Employee
0 Kudos

please check the note "353597 - Registering RFC server programs", section "Automatic registration after a program termination"

Former Member
0 Kudos

HI Alwina,

Is there any other way we can register this program from PI without manually using rfcexec?

There should be some way to register from PI without using scripts.

Thanks

Sabya

alwina_enns
Employee
Employee
0 Kudos

Hello Sabya,

I'm not familiar with this program, I do not know, if there is a special procedure to register this program. But in your example

rfcexec -a <>SID_RFCSENDER -g <hostname> -x sapgw00 &

you should not use rfcexec, this is only a standard program for testing. The correct syntax should be:

<program> -a <program id> -g <hostname> -x sapgw00 &

so it should look like

SID_RFCSENDER  -a  SID_RFCSENDER -g <hostname> -x sapgw00 &

You have to clarify what is the correct "program id", if it is already used somewhere on PI side.

regards,
Alwina

Former Member
0 Kudos

Hi Alwina,

I have uploaded the screen shots.The command we use to register is:

rfcexec -a WR2_RFCSENDER -g orcjap03a -x sapgw00 &

Could you please provide the command now?

Thanks

Sabya

alwina_enns
Employee
Employee
0 Kudos

Hello Sabya,

with

rfcexec -a WR2_RFCSENDER -g orcjap03a -x sapgw00 &


you have registered rfcexec program under program id WR2_RFCSENDER, so under program id WR2_RFCSENDER the gateway will always contact rfcexec. But this is not a correct program, which you want to use. What is the executable name of WR2_RFCSENDER? Please register it with

<executable name of WR2_RFCSENDER> -a WR2_RFCSENDER -g orcjap03a -x sapgw00 &

regards,
Alwina

Former Member
0 Kudos

Hi Alwina,

How do you get the executable name for WR2_RFCSENDER?

And PI is able to retrieve the qrfc's with this PID WR2_RFCSENDER which is maintained in the Integration builder.

Thanks

Sabya

alwina_enns
Employee
Employee
0 Kudos

Hello Sabya,

in your screenshot of SMGW several clients with the same tp name  WR2_RFCSENDER are seen. The gateway will now work in the way, that if something is calling WR2_RFCSENDER at the gateway it will take the first free client in his list. If you say PI is able to retrieve qrfc's with this PID WR2_RFCSENDER, then some of this clients in SMGW are registered correctly and are working. But as soon as gateway will access the client, which you have registered with rfcexec program, PI will not be able to send any  qrfc's. 

regards,
Alwina

Former Member
0 Kudos

Hi Alwina,

Could you please suggest why the script is not working

I tried creating a script for korn shell referring note #353597.The contents are:

while true

do

rfcexec -a WR2_RFCSENDER -g orcjap03a -x sapgw00 &

done

But the script doesn't seems to work.

Could you please check on this?

Thanks

Sabya

Former Member
0 Kudos

Thanks Alwina for all the help,

We were able to resolve our issue.PI needed to poll the ECC with the PID WR2_RFCSENDER.

The registration in this case is automatic from PI end..These same details(i.e PID and gateway details) needed to be updated in the Integration Builder of PI.When PI calls this PID, it automatically registers and the RFC connection test is successful.

I have attached the screenshot for Integration builder.

Thanks

Sabya 

Answers (3)

Answers (3)

Akshay_G
Contributor
0 Kudos

Hi,

Sticking to your original issue i.e. You were able to register a program at OS level and that too with nohup running the program as an background daemon, so the RFC was working fine.

Once your instance or the Unix box gets a re-bounce this process dies. To always ensure that this program is running when your Unix box is up you should add the execution of this command in the server start-up scripts, so every time if your instance re-bounces your command would be up and running.

Effectively, you should be creating a script/service with the command "nohup rfcexec -a <>SID_RFCSENDER -g <hostname> -x sapgw00 &"

Then you should add the service in the server's start-up script:

chkconfig <service name> on

Then you can view the status of the service:

chkconfig <service name> --list

That should be pretty much all.

Regards,

Akshay

Former Member
0 Kudos

HI Akshaya,

I tried creating a script for korn shell referring note #353597.The contents are:

while true

do

nohup rfcexec -a WR2_RFCSENDER -g orcjap03a -x sapgw00 &

done

But the script doesn't seems to work.

Could you please check on this?

Thanks

Sabya

Akshay_G
Contributor
0 Kudos

Hi Sabya,

Please define and run the script in the below specified way:

1) First define the script: <yourscript>.sh

while true

do

rfcexec -a WR2_RFCSENDER -g orcjap03a -x sapgw00

done

- Save the script

2) Now run the above defined script as a daemon

nohup <yourscript>.sh &

This should probably work.

Please consider OS discretions if any b/w Unix & Linux. The above points work absolutely fine on my Linux Machines.

Regards,

Akshay

alwina_enns
Employee
Employee
0 Kudos

Hello Sabya,

as Susan already wrote it is important to know, what is this external program, which should be registered at the gateway. Some program have their own procedure, how they should be registered at the gateway. Was the file saprfc.ini created with the registration information (gateway and host)?

regards,
Alwina

Former Member
0 Kudos

Hi Alwina,

We have created a TCP/IP connection with registered program and program id as  <SID>RFCSENDER.

Thanks

Sabya

alwina_enns
Employee
Employee
0 Kudos

Hello Sabya,

could you please attach screenshots about configuration of the destination of the program in SM59? Please check also SMGW --> Goto --> Logged on clients which "tp name" do you see for your program here? It should be exactly the same name like you see in SM59 for the "program id" in the destination. Does the program <SID>RFCSENDER write a trace?

regards,

Alwina

Former Member
0 Kudos

You need to look at this as your external process telling the gateway "Hi, I'm here and ready, if you want to send me something".  So the answer to your first question is no.  The gateway registration is always temporary and lost if either side (external process or gateway) stops.  I guess you could write a shell script to check for the process and restart it, if necessary.

The question I have is, what do you actually want to achieve with this?  Who is the external partner?  This might help us maybe suggest alternatives to what you are doing right now.

Former Member
0 Kudos

Thanks Susan/Alwina for the response,

The external system in this case is PI.This registered program is used by the communication channel in the integration builder for polling QRFC's from the gateway of the ECC system.

PI needs to continuously poll  this program <SID>_RFCSENDER .

Please suggest if you need further info.

Thanks

Sabya