‎2007 Apr 02 6:52 PM
I have a source file of about 10 fields,i was able to fetch 9 ,but the rest one field info ,i need to use rfc .The resp FM is on another server.i've come up with code like
CALL FUNCTION 'ZCIC_QOS_DATA' DESTINATION 'CRM_DEV'
EXPORTING
ASCNO = KNA1VV-KUNNR
IMPORTING
QOSYTD = GV_QOSYTD
TABLES
QOSDATA = IT_QOSDATA.
but its givin dump.
ascno is input for the rfc and qosytd is output.
pls help me.wats wrong in it.
‎2007 Apr 02 10:17 PM
Hi,
What is the short dump you are getting?
First of all, handle exception in your code. There no exception handling in your code, that might be the cause of short dump.
See this code. Also, for handling exception you have to define these exception on the "Exceptions" tab in function module.
CALL FUNCTION 'ZCIC_QOS_DATA' DESTINATION 'CRM_DEV'
EXPORTING
ascno = kna1vv-kunnr
IMPORTING
qosytd = gv_qosytd
TABLES
qosdata = it_qosdata
EXCEPTIONS
communication_failure = 01
system_error = 02.
CASE sy-subrc.
WHEN 0.
WRITE:/ 'Success'.
WHEN 1.
WRITE:/ 'Communication error'.
WHEN 2.
WRITE:/ 'System error'.
WHEN OTHERS.
WRITE:/ 'Unknown errors'.
ENDCASESecondly, debug your code and see why and where this error is happening. Give the error message from short dump (Tcode ST22) so we can give solution.
Regards,
RS
‎2007 Apr 02 8:51 PM
‎2007 Apr 02 9:57 PM
Did you check if the RFC destination, CRM_DEV, is defined in SM59. For any RFC to work, the destination has to be defined in SM59. Also try adding exceptions to your function module
DATA : l_msgtext(100) type c.
CALL FUNCTION 'ZCIC_QOS_DATA' DESTINATION 'CRM_DEV'
EXPORTING
ASCNO = KNA1VV-KUNNR
IMPORTING
QOSYTD = GV_QOSYTD
TABLES
QOSDATA = IT_QOSDATA
EXCEPTIONS
communication_failure = 1 MESSAGE l_msgtext
system_failure = 2 MESSAGE l_msgtext.
You will know what exactly the error is in the l_msgtext. Also check ST22 to see why the program dumped, that might throw more light.
hith
Sunil Achyut
‎2007 Apr 02 10:17 PM
Hi,
What is the short dump you are getting?
First of all, handle exception in your code. There no exception handling in your code, that might be the cause of short dump.
See this code. Also, for handling exception you have to define these exception on the "Exceptions" tab in function module.
CALL FUNCTION 'ZCIC_QOS_DATA' DESTINATION 'CRM_DEV'
EXPORTING
ascno = kna1vv-kunnr
IMPORTING
qosytd = gv_qosytd
TABLES
qosdata = it_qosdata
EXCEPTIONS
communication_failure = 01
system_error = 02.
CASE sy-subrc.
WHEN 0.
WRITE:/ 'Success'.
WHEN 1.
WRITE:/ 'Communication error'.
WHEN 2.
WRITE:/ 'System error'.
WHEN OTHERS.
WRITE:/ 'Unknown errors'.
ENDCASESecondly, debug your code and see why and where this error is happening. Give the error message from short dump (Tcode ST22) so we can give solution.
Regards,
RS
‎2007 Apr 11 9:01 PM
thank u .My prob with the prog is solved.rfc was workin gud with just table and no input/output parameters...however exception handling is a helpful topic and so rewarded.
‎2007 Apr 03 12:15 AM
FUNCTION ZLETRARFWBI001.
*"----
""Interfase local
*" IMPORTING
*" VALUE(LINEAS) TYPE IW_NOLINES
*" TABLES
*" TI_FECHAS STRUCTURE ZLETRADATES OPTIONAL
*" TI_TRANS_PLAN_PT STRUCTURE ZLETRATPLST
*" TI_LOADS STRUCTURE ZLETRATKNUM OPTIONAL
*"----
ENDFUNCTION.
And this is the CORRECT code of my call to the RFC
CALL FUNCTION 'ZLETRARFWBI001' destination VL_DEST
EXPORTING
LINEAS = VL_LINEAS
TABLES
TI_FECHAS = TI_FECHAS
TI_TPLST = TI_TPLST
TI_LOADS = TI_LOADS
EXCEPTIONS
system_failure = 1 MESSAGE VL_MESS
communication_failure = 2 MESSAGE VL_MESS.
‎2007 Apr 03 12:26 AM
Check if your RFC destination is active - go to SM59 to select your RFC dest and test it.
How did you declare variable VL_DEST?