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: 

RFCDEST parameter?

prem_kool
Participant
0 Kudos

Hello,

I have created a ABAP report in R/3 which calls the function module ZBW_RAISE_EVENT in BW ( DEV )

Following is the code of the ABAP report:

===================================

parameters: rfcdest NO-DISPLAY like rfcdisplay-rfcdest DEFAULT 'BWDCLNT200' .

parameters: zevent NO-DISPLAY like tbtco-eventid.

*rfcdest = 'BWDCLNT200'.

zevent = 'TEST'.

call function 'ZBW_EVENT_RAISE'

destination rfcdest

exporting

eventid = zevent

EXCEPTIONS

bad_eventid = 1

eventid_does_not_exist = 2

eventid_missing = 3

raise_failed = 4

OTHERS = 5.

=================================

This code works fine.

My question is - when I transport this code to QA, how do I make it look for the appropriate "RFCDEST" BW client?

I promise to reward points.

Thanks for your time and help.

Pramod.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can save it as a parameter in a table and maintain different entries for DEV, QA and PROD. You can then get the correct entry for each system based on sy-sysid.

Hope this helps.

7 REPLIES 7

Former Member
0 Kudos

you might have to create variants for each system.

Or if you know the RFC destinations for each system on INITIALISATION event you can default the parameter depending on the System.

A.

Message was edited by:

Amandeep Bal

naimesh_patel
Active Contributor
0 Kudos

You need to make sure that you have the RFC desitination maintained in transaction SM59 in your quality system.

And if you have any appropriate RFC destination than you can put that value in the parameter RFCDEST.

Regards,

Naimesh Patel

ferry_lianto
Active Contributor
0 Kudos

Hi,

You need to maintain RFC Destination using transaction SM59.

Please ask BASIS to setup in QA system.

Regards,

Ferry Lianto

Former Member
0 Kudos

Pramod,

Dont hardcode the RFC destination. It will work fine in dev as DEV has a connection with the corresponding BWDEV client. But when you transport the same program into Quality or Prod, it cannot find a connection with BWDEV. So the best practice is to dynamically determine what the rfcdest is depending on the client. You can get that information from table <b>RFCTRUST</b>.

Regards

Aneesh.

Former Member
0 Kudos

You can save it as a parameter in a table and maintain different entries for DEV, QA and PROD. You can then get the correct entry for each system based on sy-sysid.

Hope this helps.

0 Kudos
parameters: rfcdest NO-DISPLAY like rfcdisplay-rfcdest DEFAULT 'BWDCLNT200' .
parameters: zevent NO-DISPLAY like tbtco-eventid.

INITIALISATION.

case sy-sysid.

when 'dev'.
rfcdest  = 'BWDCLNT200'.
when 'qa'.
rfcdest  = 'BWQCLNT200'.
when 'prd'.
rfcdest  = 'BWPCLNT200'.
endcase.

You can further segregate based on parameter sy-mandt which is client.

hope this helps.

A

NOTE: Table RFCTRUST has only trusted destinations.

prem_kool
Participant
0 Kudos

Hello Everyone,

Thanks for the immediate response.

Amandeep: the code works perfectly.

Points awarded. ( Everyone deserve 10 but couldn't due to system setup.)

Thanks,

Pramod.