2007 Nov 19 7:11 PM
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.
2007 Nov 19 7:48 PM
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.
2007 Nov 19 7:13 PM
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
2007 Nov 19 7:14 PM
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
2007 Nov 19 7:15 PM
Hi,
You need to maintain RFC Destination using transaction SM59.
Please ask BASIS to setup in QA system.
Regards,
Ferry Lianto
2007 Nov 19 7:19 PM
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.
2007 Nov 19 7:48 PM
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.
2007 Nov 19 7:52 PM
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.
2007 Nov 19 8:17 PM
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.