V Urgent : Debugging an RFC function Module in another R/3 system
Hi All
I have a function module in a R/3 system ( say WB1 ) and i am calling it from another R/3 system (say WD1) . Both have their RFC destinations set up as trusted system mutually . However when i try to debug that FM while in WD1 ( which basically exists only in WB1) i am not able to get inside that FM . Are there some settings that we need to do to allow us to debug function module in another R/3 system ? .
Yes ,we cant do this debugging if RFC function module is in a non SAP system but am sure it can be done atleast for R/3 to R/3 .
Any pointers to this as to what setting needs to done ?
Does some system parameter needs to be set in RSPARAM program for debugging RFC?
Please help
Regards
Shovit
Hi
Can you do a remote logon through the SM59 connection (the trusted one)?
If so, then the only thing preventing you would be debugging autorization.
If not, make sure you have trusted system logon auth (not part of SAP_ALL!).
Cheers
Dom
Similar Messages
-
How to debug a RFC function module remotely from another R/3 system?
Hi experts,
I have RFC function module in one R/3 system. I am calling this from another R/3 system that is cross apps (Xapps).
This function module is Synchronous.
Is it possible to debug this function module from cross apps?
Can somebody give me the steps?
Thanks & Regards
GopalHi Shree,
Can you explain it bit more?
Do I have to call the function module with "IN BACKGROUND TASK"?
Or is it that I have to just put external breakpoint in the function module?
Please help
Thanks
Gopa -
Debugging an RFC function module
Hi,
I am making an RFC call from Server(RDH) to server(RDI).The problem i am facing is that i am not being able to return debug the function module nor is this returning any values. The function module has been transported to the RDH and Rdi servers.
One reason could be that the destination returned by teh function module us wrong but the people concerned insist that it is correct. I am at a loggerheads.
Thanks
CALL FUNCTION '/GLB/RGT_RFC_DESTINATION'
EXPORTING
destsysttype = l_c_o "commercial box
IMPORTING
rfcdest = v_comdest
EXCEPTIONS
no_destination_found = 1
own_logical_system_not_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i004."Destination not maintained
LEAVE LIST-PROCESSING.
ENDIF.
CALL FUNCTION '/AOA/FAO_RFC_BILL_INFO'
DESTINATION v_comdest
EXPORTING
im_i_bsid10 = i_bsid10
IMPORTING
ex_i_billing = i_billing
ex_i_vbfa = i_vbfa
ex_i_vbpa = i_vbpa
EXCEPTIONS
communication_failure = 1
system_failure = 2
OTHERS = 3.Did you check in SM59 whether the said RFC destination is maintained and if it is able to connect to the destination.
-
Debugging RFC function module from ECC to CRM
Hi All,
My requirement is to debug an RFC function module present in CRM(7.0) system from ECC(6.0) system. A report program in ECC will call CRM custom FM. I found many posts in SDN with the same issue and tried to implement suggestions provided there. But I couldn't succeed. The approach I followed is:
I logged in to ECC report program and kept an external breakpoint just before the function module call.
I logged in to CRM system, opened the function module and kept an external breakpoint there.
In both the systems I provided the dialogue userid( id through which I log in to SAPGUI) in the system->settings->debugging option.
In CRM I activated the external break point in transaction SRDEBUG.
Now when I execute the report program in ECC, control stops at the breakpoint. If I press F5 at the function call, control is not going to the external break point set in the CRM FM. I am getting output of FM directly.
I tried with different settings like turning on the check box for IP matching and session breakpoint active immediate, switching to classic debugger etc. I also tried to provide the RFC user id instead of dialogue user but system throws exception saying only dialogue userids are allowed. I found that by inserting an infinite loop statement, control goes inside the RFC CRM FM but I prefer not to change the code.
Please let me know if I missed anything.
Thanks and Regards,
NarenHi,
Debug RFC calls
When an RFC function module is called it is usually not possible to debug the call, using the below techniques we can achieve the same. For this example we are calling an RFC enabled FM in ECC system from CRM system.
Scenario 1: Calling a custom RFC FM
STEP 1: Add an infinite loop in the remote custom Function Module (adding a u201CDO. ENDDO.u201D statement at the start of the FM would be enough).
STEP 2: Execute your program in the CRM system. The execution stops at the RFC call, because of the infinite loop.
STEP 3: Now login to the ECC system and go to transaction SM51 select the process which is executing the RFC and navigate to the menu: u201CProgram/Session->Program->Debuggingu201D this triggers the debugger session in a separate window.
Scenario 2: Calling a Standard RFC FM
When we are debugging a standard program we cannot add the infinite loop, hence we cannot go to SM51 and debug the work process. The RFC destination for the ECC system has a User specified, the RFC function module gets executed using this users credentials. Usually the basis team set up the RFC user as non Dialog user, this does not allow debugging. Contact your Basis team and get this changed to a dialog user enabling you to debug RFC function calls via the normal debugger.
Note: User name configured in the RFC destination (transaction SM59)
Note: User type for the RFC User (transaction SU01D)
Hope this will be helpful.. -
Unable to find the RFC function module in the impoting list in IR
HI
I am trying to import a RFC function module from the R/3 system.
I am not able to find the RFC in the list that comes for the RFC function modules that can be imported.
The RFC is present in the destination system and is actiated too
If anyone has and idea why is such a thing happning
Regards
NikhilHi Nikhil,
The Checklist,
1. Check the connection parameter at XI
2. Make sure ur function module is remote enabled
3. Make sure ur RFC exists for the same user, client credentials
Regards,
Prateek -
How to debug a remote function module in calling system? Help!
Hi Experts,
I have a ABAP report (in System A) from where I am calling a remote function module which exists in a different system B.
ABAP Program(System A)<----calls--
RFC(System B)
Can I debug the RFC funnction module in system A using ABAP debugger? In other words if i put a breakpoint on the "call function" statement then in debug mode I want to see that the control is going to system B and I should be able to process the FM code line by line. Is this possible?
Is there any special transaction or settings?
Is there any alternative?
Please help
Thanks
Gopalhello,
Try this method.
first check whether RFC connection is working b/w 2 systems.
if connection is working, then do like this.
In System B , put endless loop in FM before some main select statement.
like
DATA : v_a TYPE c VALUE space
DO .
IF v_a = 'X'.
EXIT.
ENDIF.
ENDDO.
the above code will be endleep loop.
In system A, when cursor goes to CALL FUNCTION DESTINATION 'XXXXX'.
u shud be logged in system B. the moment control comes to system B.goto tcode SM50 . check ur username . choose that particular checkbox then in menu bar --> program/session --> Program --> Debugging.
i hope it will help u.
try & let us know.
Thanks,
Manjunath MS -
Problem with RFC function module from R/3 to CRM
Hi, i have a RFC function module created in R/3, this is the code:
function Z_CRM_PRODUCTO_INTERLOCUTOR.
""Interfase local
*" IMPORTING
*" VALUE(GV_VKORG) TYPE VKORG
*" VALUE(GV_VTWEG) TYPE VTWEG
*" VALUE(GV_MATNR) TYPE MATNR
*" VALUE(GV_KUNNR) TYPE KUNNR_V
*" EXPORTING
*" VALUE(GV_KDMAT) TYPE MATNR_KU
*" VALUE(GV_POSTX) TYPE KDPTX
*" EXCEPTIONS
*" NOT_FOUND
UNPACK GV_MATNR TO GV_MATNR.
UNPACK GV_KUNNR TO GV_KUNNR.
select single KDMAT POSTX
into (GV_KDMAT, GV_POSTX) from KNMT
where VKORG = GV_VKORG
and VTWEG = GV_VTWEG
and KUNNR = GV_KUNNR
and MATNR = GV_MATNR.
IF sy-subrc <> 0.
RAISE NOT_FOUND.
ENDIF.
endfunction.
When i call this function from CRM, i do it like this:
CALL FUNCTION 'Z_CRM_PRODUCTO_INTERLOCUTOR'
DESTINATION LV_RFCDEST
EXPORTING
GV_VKORG = lv_vkorg
GV_VTWEG = ORGMAN_H-DIS_CHANNEL
GV_MATNR = ORDERADM_I_WRK-ORDERED_PROD
GV_KUNNR = WA_DATOS_PER-N_PAGADOR
IMPORTING
GV_POSTX = IT_POS_LINE-DESCRIPCION
GV_KDMAT = IT_POS_LINE-material
EXCEPTIONS
not_found = 1.
where:
it_pos_line-descripcion type string
it_pos_line-material type string.
Well, my problem is that when debugging, in R/3 the 2 return values have the correct value, but when they are passed to CRM they have only one position.
As i've been told, it was working ok, but it's being wrong since we made a ¿conversion to unicode?. Maybe I should change the type of return ???
Thanks in advance !!!Hello Maria,
Make sure you define your parameters in CRM exactly the same way as in R3, do not use type string here.
So:
it_pos_line-descripcion type C char 40,
it_pos_line-material type C length 35.
Kind regards,
John. -
Passing the structure to rfc function module
hi,
iam having a rfc function module which is importing structure.
i have to pass only one field value to that structure.
how can i pass that field value to that structure.
it is very urgent.
thanks in advanceHi..
You have to Declare the ACTUAL PARAMETER (workarea) with the Same Structure as that of the FORMAL PARAMETER.
but you can fill only the FIELD that you want pass in the workarea and pass it to the RFC.
<b>Reward if helpful.</b> -
Reg:rfc function modules
can i call below functionmodule in within the rfc function module.
CALL FUNCTION 'ZTEST_FUNC' in background task
here ztest_func is the rfc function module.
could any body please tell me its very urgent.
Regards,
ChaitanyaYes you can call it but, you have to ensure that you do a COMMIT WORK after the LUW for the function module to get executed in the background.
CALL FUNCTION 'ZTEST_FUNC' in background task
COMMIT WORK. ( This kicks off the function module).
hith
Sunil Achyut -
Call RFC Function Module and return 1000 records at a time
I would like to call a Remote Enabled Function Module from a non SAP system. This function module will select data from the database and return it to the calling program.
Suppose there are 100,000 records that need to be returned, but the calling module would like the data in chunks of 1000 records. Therefore the calling program would call the FM 100 times.
How do I code the function module to know on each subsequent call to grab the next chunk of 1000 records?
Let me know if additional information is needed.
Thanks,
AaronHello,
Here is how you can go for this issue:
1. Create one RFC function module with following parameter. These parameters are with respective of chunking logic.
Import: Package Size
Export: Total number of records
Changing: chunk count
Implement following logic:
1. First of you need to know how many chunks you need to fetch for that get the count of total number of records. This is one
time activity so you better maintain one flag import parameter will be set to 'X' only first call.
2. Get the number of chunk using total number of records / chunk size for e.g. 1000 / 100 so chunk count = 10.
3. Define internal chunk counter in function module which will be used to locate the correct chunk depending on the chunk
counter value sent from calling program.
4. Send first call with package size 100 and chunk count = 1, execute select statement and increment internal
chunk count check if chunk count = internal chunk count in current case chunk count = 1 so exit select statement and return
with first chunk.
5. Send second call with package size 100 and chunk count = 2. Execute select statement and check chunk count with internal
chunk counter, in current case it will be 1 so skip that data and go for next chunk of 100 records increment internal chunk
counter. In this case it will match with external chunk count = 2. load output table with that data and return to calling program.
6. Repeat step 4 until you reach last chunk.
You need to use SELECT...ENDSELECT with PACKAGE SIZE addition so for every loop it will return number of records mentioned in package size.
Hope this helps.
Thanks,
Augustin. -
Using RFC Function Module to send data to NON SAP Application
Hi friends,
Please guide me how can I send data from SAP -> Dotnet Applcation using Dotnet Connector through RFC function module from SAP side. In my scenerio, I Run Z transaction to executte RFC function module which create some data to pass to dotnet connector.
Regards,
Rajesh KumarHi,
You can make use of Dotnet connector to read the content of SAP RFC .. (eaiest of all)
The RFC can be executed using connector , and can read the data simultaneously.. u need to code in dotnet for this..
else create a webservice and read it from dot net ..
Regards
Renu Gusain
Edited by: Renu Gusain on Jan 25, 2010 12:55 PM -
How to take back the control from RFC function module to calling program
Hi,
In our system landscape, more than 200 child systems are connected to Solution manager(SMP). I have copied a RFC enabled function module into all the child systems and calling that FM from Sol Man in sychronous mode.
Here goes my code in SolMan.
LOOP AT it_dest INTO wa_dest.
CALL FUNCTION 'Z_GET_LOGIN_DETAILS' DESTINATION wa_dest-rfcdest
EXPORTING
date_fr = s_date-low
date_to = s_date-high
TABLES
tab_data = it_val
EXCEPTIONS
communication_failure = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc EQ 0.
* Updates zuserlogon
MODIFY zt_logon_det FROM TABLE it_val.
COMMIT WORK.
WRITE:/'RFC for Destination', wa_dest-rfcdest, 'succesfully updated.'.
ELSE.
WRITE:/'RFC for Destination', wa_dest-rfcdest, ' failed.'.
ENDIF.
ENDLOOP.
Few child systems are very slow & takes more than 20 minutes(Many of the times system hangs) to return the result. But I should not wait for so long. Even if the child system doesn't return any values in 5 minutes I shoud continue with other system ignoring the current one.
I tried calling the FM in asynchronous mode(STARTING NEW TASK) but no success because only 6 DIA processes possible but as I said I have more than 200 systems connected to SolMan.
Please help me resolving this problem.
Thanks,
PrathapIf there are only few child systems with bad response time, use asynchronous call using a CALL FUNCTION func STARTING NEW TASK task DESTINATION dest PERFORMING subr or CALLING meth ON END OF TASK. Count asynchronous calls still running/waiting (increment a counter when creating a task (not the one used for task id). In the form/method performed at end of a call decrement the counter. When counter is lower than a limit, 4-5 if 6 processes (*), perform an asynchronous call else perform a synchronous call or wait until the counter falls below the limit.
Regards,
Raymond
(*) Use SPBT_INITIALIZE at start of program to get actual number of free/available processes. -
Is it possible to call custom designed RFC function module, apart from BAPI
Hi Friends,
1. Is it possible to call custom designed RFC function module, apart from BAPI.
2. Why we call it Adaptive RFC layer, Since every time the JCO layer updated with SAP, Why cant be dynamic.
Thanx for Ur time.
Cheers,
SamAlso check <a href="http://help.sap.com/saphelp_nw04/helpdata/en/41/38bc8f813719488ddc9d9b21251ec3/frameset.htm">here</a> for more information on aRFC. Here you can find why it is called adaptive.
Regards,
Christophe -
Problem while calling an RFC Function Module in Background
Hello,
I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
I will be on holiday for the next 6 weeks, so take your time to answer .
Regards,
Dusan.
Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
Please read the forum rules about u r g e n t ...This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
Just guessing, but might be worth checking.
Cheers,
Julius -
Backgroung job failing becuase RFC function module is running in Dialog
Hi,
I have a program which is calling a RFC function module. I am running this program in background as a job. Now this function module which is in other system is running in Dialog and giving a time out error and the job is failing becuase of that.
I tried call fucntion 'test' in background task
destination 'XVZ'
tables
test = 'test'.
But this is not working, i can still see this function module running in Dialog in SM50. Any suggestion?
Thanks,
ShwetaHi !
RFC-Called function-modules are running in a dialog workprocess of the
target system (they could not run in a batch proecess !!).
That means the do have the same "Timeout" limitations than any other
Dialog-Process.
What you can do:
- The Dialog "Timeout" could ce increased by your SAP-BASIS
- If they could not - you should "shorten" the LUWs in the target-funktion.
...means - put a COMMIT WORK an any point the work is done.
After a COMMIT WORK the "Timeout" Counter beginns at 0 !
Hope that helped....
Reward points would be nice...
Maybe you are looking for
-
How to get all authorization objects for a certain authorization profile
Hi ABAP experts, I have the following problem: for a certain authorization profile of a role (created with transaction PFCG) I would like to get all contained authorization objects: e.g. for the contained object PLOG I would like to know/read all cor
-
How do I create a searchable table of contents in a pdf? please help.
Hi, i need to insert a table of contents into a pdf that can be searchable - used for the purpose of clinking on the section and goign to it. Does anyone know how to do this? Thank you, melissa
-
Cannot make a 'number' account on MacOS 10.6 (workstation)
Hi all, suddenly in MacOS X 10.6 the possibility to make an account named '00186' is giving me an error.. I get the warning that i cannot not use special characters.. (screen-shot: http://www.mactinosx.com/pica/sreenshot_account.jpg srry 4 the dutch
-
Essbase Integration Services Error Logic Implementation
Hi All, We are using EIS for Member Load activity and populating the outline to Essbase for the cubes. As part of this process we have the cbs file and bat script and we initiate the bat script for this activity. Now, i want to see the Failure and Su
-
VERY frustrated, could not access Lightroom to finish a very important project that was due yesterday. I called and was on hold for over an hour so I hung up as it was by then after 5:00. I called again first thing this morning and was prompted to le