ABAP Dump due to RFC Function module call in another thread
Hi,
I am facing some problem since yesterday. In one of my executable program I am calling a RFC fm as below mentioned
REPORT ZREPORT.
CALL FUNCTION 'Z_XXXXXXXXX'
STARTING NEW TASK L_NAME
DESTINATION IN GROUP 'TASK'
PERFORMING RETURN_INFO ON END OF TASK
EXPORTING
P_exp1 = l_emp
TABLES
R_VBELN = r_it_vbeln
EXCEPTIONS
NO_DATA_TO_PROCESS = 1
OTHERS = 2.
wait until v_task = 1.
update ztable.
Due to some data inconsistence one of the SAP function
module which I am calling in my function module Z_XXXXXXXXX
is generating dump with message type X. Since there is data inconsistence it is generating dump that's OK.
But the problem i am getting is, report ZREPORT is generating dump at WAIT statement saying illegal statement even though I am calling that function module
Z_XXXXXXXXX as a separate new task.
Can somebody help me.
Thanks,
Amara.
hi, Amara
I agree with Rich said, and do a simulate test in my server, here is the analysis.
Assume we have a RFC, like this:
FUNCTION ZGZL_DUMPTEST.
*"*"Local interface:
*" EXPORTING
*" VALUE(OUT) TYPE I
*" EXCEPTIONS
*" CONVERT_FAIL
data:a type i.
a = 'A'.
ENDFUNCTION.
And call this RFC like you way:
REPORT ZGZL_DUMPTEST .
DATA:
SEMAPHORE(1) VALUE SPACE,
LC_OUT TYPE I.
CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.
WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.
FORM RETURN_INFO USING TASKNAME.
RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
IMPORTING OUT = LC_OUT.
SEMAPHORE = 'X'.
ENDFORM. " RETURN_INFO
if we run the RFC in se37 directly, obviously it will occur a rumtime error CONVT_NO_NUMBER, and dump.
But if we run the above application to call the RFC, we will get a different runtime error CALL_FUNCTION_REMOTE_ERROR.
Error Analysis in ST22 like this:
An error occurred when executing a REMOTE FUNCTION CALL.
It was logged under the name "CONVT_NO_NUMBER"
on the called page.
I think that means the application receive the runtime error from RFC when call <b>RECEIVE RESULTS</b>.
In normal CALL FUNCTION, the external application will accept the rumetime error throw from FM, that's correct, because it let the caller can handle these runtime errors.
In you case, you said RFC run in a new task, yes, that's true, so you can call the RFC like this:
CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.
WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.
FORM RETURN_INFO USING TASKNAME.
SEMAPHORE = 'X'.
ENDFORM. " RETURN_INFO
It will goes well, no dump. Why? because we don't use RECEIVE RESULT. RECEIVE RESULT will bring the result from FM, also bring the runtime error from FM.
So if you want to call the FM and receive the result, handle the runtime error in FM inside at first.
like this:
CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.
a = 'A'.
ENDCATCH.
IF SY-SUBRC = 1.
RAISE CONVERT_FAIL.
ENDIF.
And then you call FM like this:
CALL FUNCTION 'ZGZL_DUMPTEST'
STARTING NEW TASK 'DUMP'
PERFORMING RETURN_INFO ON END OF TASK.
WAIT UNTIL SEMAPHORE = 'X'.
WRITE: 'OVER'.
FORM RETURN_INFO USING TASKNAME.
RECEIVE RESULTS FROM FUNCTION 'ZGZL_DUMPTEST'
IMPORTING OUT = LC_OUT
EXCEPTIONS CONVERT_FAIL = 1.
SEMAPHORE = 'X'.
ENDFORM. " RETURN_INFO
That's will be ok for your scenario.
Hope my reply is useful.
thanks
Similar Messages
-
Rfc function module call error
Hi Abaper,
I'm doing upgrade from 4.7 to ecc 6.0 currently and encounter problem in one of the rfc function module that we used. I've tested the connection to destination using sm59 and the connection is successful.
As an information, in the rfc setting, the target system is not Unicode system.
When I test using se37 and put the rfc destination in my function module call, I always encountered system_error exception. There's no issue with this rfc call before in 4.7 system.
Please help me on this. Thank you.
Edited by: Abraham Bukit on Sep 3, 2008 2:36 AMHi,
I had the same issue in the past and solved it in the following way.
If the destination system is not Unicode please try to set the password for the communication user set in SM59 using only upper-case characters and taking into account that the password shouldn't be longer than 8 characters.
Hope this will help. -
RFC function module called inside an enhancment section
Hi All,
I am calling a RFC function module in background task as a separate unit. I am calling this FM within an enhancement section. Is it alright to use a commit work inside this RFC enabled FM even if I am calling it within an enhancemnt? Please helpHi,
Yes, you can use a commit work inside this RFC enabled FM even if I am calling it within an enhancemnt. Please refer below link regaring this. Thanking you.
Commit within an enhancement point -
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 -
Regarding the RFC Function Module call from PI
Hi All,
I am working on one File to RFC interface, in which File adapter picks the file, this file data has to goto 2 function modules in SAP system. For this i added 2 Inbound interfaces in INTERFACE DETERMINATION and I developed 2 RECEIVER AGREEMENTS. In 2 RECEIVER AGREEMENTS i added single receiver RFC Communication Channel.
Now i want assurance that once 1 st function module will execute completely, then only my second function module should be called. Is there any setting that i can do to make this sync?????.
what is the use of Send 'Confirm Transaction' in receiver RFC Communication Channel under Adavanced Mode.
Thanks,
BaluHi,
As per you requirement I would suggest to change your scenario as File To Proxy. It will much more easier and 100% sure to process second BAPI only after first gets successful inside the proxy.
Pass the data from file adapter to inbound proxy and then inside proxy code you first call the first BAPI and use commit wrok. Once commit work is successful then you call the second BAPI otherwise rollback the changes.
Example:
Call First_BAPI
<pass the data to it's import export parameters>
Commit work.
if sy-subrc =0.
Call Second_BAPI.
<pass the data to it's import export parameters>
Commit work.
endif.
Note: If you are not very much comfortable with ABAP the discuss this with your ABAP team mate.
Regards,
Sarvesh -
Unknown error calling a RFC Function Module in BODI
Hi all,
I am having an issue identifying the error that my batch job in BODI is giving with regards to a RFC function module call in my query. The value returned by the standard parameter 'AL_RFC_RETCODE' are square characters ( ).
At the completion of the job, the error message 'RFC CallReceive error <Function ZCT_INDSLS_SLS_TRN_INSERT: Invalid request.. Invalid request.>.' is being output.
Correct me if I'm wrong but the parameter 'AL_RFC_RETCODE' should return standard values as per the techical manual provided to undertand any errors that might occur during a RFC FM call.
Can anyone help me on this?
Best regards,
Andrew WongHi Senthil,
I think you answered your query in your question itself
The user ID and password need to be maintained in RFC destination in SM59.
Go to SM59 and then click on test connection..if it does not ask for ID and passwoed that means correct ID and password is maintained in SM59 otherwise maintain it.
Regards,
Atish -
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 -
Hello Guys,
I have a question regarding calling a RFC function module.
In BW - BI 7.0 I call a RFC function module:
(The ABAP program in BW-BI 7.0 is below)
CALL FUNCTION ''ZTESTFUNCTIONMODULE' " Function module in ECC
DESTINATION 'DECCLNT110' " ECC system
TABLES
it_gl_item = it_gl
it_errlog_gl = it_errlog_gl.
The 'ZTESTFUNCTIONMODULE' is RFC enabled in the ECC system.
The purpose is we retarct the data from BW to ECC.
When I run the function module it always asks for the user id and password.
The SAP logon screen appears and it asks for the user id and password.
The destination is maintained in the SM59 transaction and also the user is maintained there. I think it should login automatically into remote system and return the tables. is it correct. How to skip the logon screen.
Do I have to pass the user id and password in the function module. I think it should take the user id from the SM59 destination. Is it correct.
Please advise. As always thanks for your help guys.Hi Senthil,
I think you answered your query in your question itself
The user ID and password need to be maintained in RFC destination in SM59.
Go to SM59 and then click on test connection..if it does not ask for ID and passwoed that means correct ID and password is maintained in SM59 otherwise maintain it.
Regards,
Atish -
Error when call RFC Function module in R/3
Dear All,
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
This is the first time we are doing this configuration.
Could you please let me know what woulbe the reason.read the original message
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter -
Where should i call the rfc function module? in xi or in r/3
where should i call the rfc function module?
for the synch scenario: file < -- > xi <---> rfc
i know the type of rfc is tcp/ip; but i'm not sure with the followings,
and with some trials i can not even see any message via rwb even all the setting
can be activated without errors.
where should i create the rfc destination? in r/3 or xi
where should i call the rfc via abap program? in r/3 or xi
i guess the calling program should belong to the different server with the rfc itself....
so confused....
Thanks for your reply!!
Junif i create the destination in xi point to r/3, then i call the rfc use the destination in r/3 right ?
The call doesnt use the destination in R3. XI has the RFC destination which is just used to connect to the R3 system
but where i need to create the fm via se37? in xi or r/3 ?
In R3
Regards,
Prateek -
IDOC with ABAP - PI Port , RFC Function module
Hi ,
I am creating outbound Idoc in one system, In the same system I am using a ABAP - PI port and assigned a RFC function module.
So when ever the outbound IDOC is created it will go to the port and triggers the RFC function module.
now my question is how to get the outbound IDOC number in the RFC function module.
I thought of reading the table EDIDC with message type, but all previous IDOC's aslo coming .
Regards
BhaskarHi Bhaskar, the IDOC control record or records are transfered to your function module in table paramater I_EDIDC. You could read the IDOC data by calling function modules EDI_DOCUMENT_OPEN_FOR_PROCESS and EDI_SEGMENTS_GET_ALL for each control record.
Regards Jack -
How to create RFC function module and how to call this function module
Hi,
i want to know step for creating RFC function module and then How to use this function module from some other sap system.
Thnaks,
jigarJigar,
To implement a remote function module in ABAP, perform the following steps:
Register the module as remotely callable in the RFC server system.
In the function module Administration screen (transaction code SE37), set the field Can be called via REMOTE CALL. Registering a module as remote causes an RFC stub to be generated for it.
Write the code for the function module.
Create the destinations.....................
Displaying, Maintaining and Testing Destinations
To display, create or modify destinations, choose Tools ® Administration ® Administration ® Network ® RFC destinations or enter transaction code SM59.
Remote Destinations are stored in table RFCDES. The RFCDES table describes logical destinations for remote function calls.
It is not possible to maintain the RFCDES table directly.
You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® AcceleratedSAP ® Customizing ® Execute Project ® SAP Reference IMG.
In the Implementation Guide, expand the following hierarchy structure:
Basis
Application Link Enabling (ALE)
Sending and Receiving Systems
Systems in Network
Define Target Systems for RFC Calls
Displaying Destinations
The initial screen for this transaction displays a tree:
Different connection types (i.e. partner systems or programs) are possible. For further information, see Types of Destinations.
To display all information for a given destination, double-click it, or place the cursor on it and press F2 .
To search for a destination, press the Find button and specify your selection. You get a list of all entries matching your selection. Place the cursor on the one you want, and press F2 or simply double-click the destination. All information for the given entry appears.
Creating Destinations
On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
All available connection types are explained in Types of Destinations.
To create a new RFC destination, press the Create button. A new screen is displayed with empty fields for you to fill in.
If you want to create a new destination
As you create a remote destination, you can specify a particular application server or a group of servers for a balanced distribution of system load.
For details of the destination parameters, see Entering Destination Parameters.
Changing Existing Destinations
On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
You can display all information for a given destination by double-clicking it or pressing F2 on it.
To change an existing destination, double-click it, or place the cursor on it and press the Change button.
For details of the destination parameters, see Entering Destination Parameters.
Testing Destinations
To test a destination, choose the appropriate function from the Test menu.
Connection (also available via the Test connection pushbutton)
Authorization (checks logon data)
Local network (provides a list of application servers)
You can use the CALL FUNCTION statement to call remote functions, just as you would call local function modules. However, you must include an additional DESTINATION clause to define where the function should run:
CALL FUNCTION RemoteFunction
DESTINATION Dest
EXPORTING
f1 =...
f2 =...
IMPORTING
f3 =...
TABLES
t1 =...
EXCEPTIONS......
The field Dest can be either a literal or a variable: its value is a logical destination (for example, "hw1071_53") known to the local SAP System. Logical destinations are defined in the RFCDES table (or the TRFCD table in R/2 Systems) via transaction sm59 or the following menu path: Tools ® Administration, Administration ® Network ® RFC destinations. You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® Customizing ® Enterprise IMG. In the Implementation Guide, you can then choose Cross-application components ® ALE ® Communication ® Define RFC destination.
The remote function call concept, for example, allows you to access a function module in an R/2 System from an ABAP program in an R/3 System. If you want to read a customer record from your R/2 Systems database, create a remotely callable function module in the R/2 environment which retrieves customer records. Call this function from your R/3 System using a remote function call and listing the destination for the target R/2 System:
Pls. reward if useful -
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. -
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 -
Calling RFC Function module from JAVA
Hi All,
We have created a RFC Function Module for Billing Plan tab in Sales order (BDC). The function Module contains BDC. When we are running the same function module in SAP it is working fine. But when the FM is called in Java , it is allowing only maximum of 5 entries , when we trying to insert at 6th position in billing plan tab, we are getting an error.
Can any one help on this.
Points will be rewarded for helpful answers.
Thanks & Regards,
Kiran II think the problem is because of the number of lines displayed on the screen in the BDC session in the Billing Plan.
You might have to add the page down logic to your BDC program.
Maybe you are looking for
-
I am trying to get audio for my divx10 on my macbook am at a complete loss
Help!?! Am trying to download audio software to be able to hear the Divx movies I see on my screen. Any suggestions? I have a MacBook with Mavericks OS. I have already downloaded Divx10.
-
OS 10.4.6 disk will not initiate
I am trying us use Disk Utility to correct unexpected stoppages of my two browsers (Safari and Firefox) per BDAqua's Jan 3, 2009 suggestion. After some searching, I finally found my OS 10.4.6 disk. However, when I insert it into my iMac it fails to i
-
How to receive replies back to SAP user's inbox from external domain.
We are facing a scenario where an email should be sent from SAP to any external domain ( ie: abc.com ) and I know that we can trigger outgoing mail from SAP but not sure about receiving emails to a specific SAP User id's inbox (SBWP). I was searchin
-
Crystal Reports for Eclipse Free Version - What is the status of this tool?
I'm inquiring about the status of this tool now that SAP is on the scene. I used it about a year ago and am coming back to it - I'm not finding much on the new SAP support site. Is it being killed by SAP? I don't want to start a new project with a d
-
Hi All, Sorry for posting this question in the forum. I am going to present a presentation on Adapters. I have everything about the parameters about all adapters but don't have the exact uses of all adapters. So please let me know uses and where did