06-16-2006 2:39 PM
Hi Friends,
I am calling a function module and then checking my Sy-Subrc value.
In my debugging mode everything is wroking fine and the sy-subrc value is 0. my code is below.
if sy-subrc <> 0.
message e003(ZSDBDS).
endif.
It is still giving me an error message, (e003(ZSDBDS)).
Shejal.
06-16-2006 2:43 PM
Hi,
Find out all occurences of
message e003(ZSDBDS) in function module main program
and put break-point and check.
Regards,
Amole
06-16-2006 2:40 PM
Hi Shejal,
Probably the same error message is being triggered at some other place in the code?
Regards,
ravi
06-16-2006 2:42 PM
06-16-2006 2:45 PM
check if the values coming from function module is triggering the error message?
if it is in loop then check again...
06-16-2006 2:47 PM
Debug the program, and place a breakpoint on "message"...When you run it, it will stop on the error message -;)
Greetings,
Blag.
06-16-2006 2:49 PM
Its a new error message and it is no where in the program or anywhere else.
Shejal.
06-16-2006 2:50 PM
06-16-2006 2:51 PM
Hi
Show your complete code. we will also try to get the same error message.
Regards
vijay
06-16-2006 2:52 PM
Detail code,
if i_input-PREPAID_COLLECT <> 'P'.
message e002(ZSDBDS).
else.
CALL FUNCTION 'ZSD_GET_RATE_DETAIL' DESTINATION 'RFC_APP'
EXPORTING
SERVER = ZSD_BDS_COMMUNI-SERVER
DATABASE = ZSD_BDS_COMMUNI-ZDATABASE
USERID = ZSD_BDS_COMMUNI-USERID
PASSWORD = ZSD_BDS_COMMUNI-PASSWORD
CONNECTIONSTRING = ZSD_BDS_COMMUNI-CONNECTIONSTRING
INQUIRYUSERID = ZSD_BDS_COMMUNI-INQUIRYUSERID
INQUIRYID = ZSD_BDS_COMMUNI-INQUIRYID
TABLES
INQUIRY_INPUT = i_input
INQUIRY_CHARGES = i_charges
INQUIRY_OUTPUT_DETAILS = i_output_details
INQUIRY_ERRORS = i_errors
EXCEPTIONS
OTHERS = 1 .
endif.
if sy-subrc <> 0.
message e003(ZSDBDS).
endif.
let me know if you need anything else guys.
Shejal.
06-16-2006 2:55 PM
Hi,
if i_input-PREPAID_COLLECT <> 'P'.
message e002(ZSDBDS).
else.
CALL FUNCTION 'ZSD_GET_RATE_DETAIL' DESTINATION 'RFC_APP'
EXPORTING
SERVER = ZSD_BDS_COMMUNI-SERVER
DATABASE = ZSD_BDS_COMMUNI-ZDATABASE
USERID = ZSD_BDS_COMMUNI-USERID
PASSWORD = ZSD_BDS_COMMUNI-PASSWORD
CONNECTIONSTRING = ZSD_BDS_COMMUNI-CONNECTIONSTRING
INQUIRYUSERID = ZSD_BDS_COMMUNI-INQUIRYUSERID
INQUIRYID = ZSD_BDS_COMMUNI-INQUIRYID
TABLES
INQUIRY_INPUT = i_input
INQUIRY_CHARGES = i_charges
INQUIRY_OUTPUT_DETAILS = i_output_details
INQUIRY_ERRORS = i_errors
EXCEPTIONS
OTHERS = 1 .
<b>if sy-subrc <> 0.
message e003(ZSDBDS).
endif.</b>
endif.
Regards
vijay
06-16-2006 2:56 PM
06-16-2006 2:56 PM
Hi Shejal,
I understand that this part of the code is in a loop of the intrenl table i_input.
Are you sure it has only one entry?
It must be having multiple entries and hence it is not stipping at the error for some entries and may be triggered for some other entry.
regards,
Ravi
06-16-2006 2:59 PM
I have tried to put the break point at the exact same place where you have specified and the value is '0'.
however when i did the test i had commented the
if sy-subrc <> 0.
message e003(ZSDBDS).
endif.
the reason for commenting was without being commented it directly gave me the error message, inspite of having the break point much before the error message.
shejal.
Shejal.
06-16-2006 3:06 PM
06-16-2006 3:07 PM
Thanks everybody for all the suggestions. However if any one is intrested in the entire code i will be more than happy to mail you guys.
Shejal.
06-16-2006 3:08 PM
06-16-2006 3:10 PM
NO rich u got me wrong. when i uncomment the message and have a break piont before the message it is giving me the error message directly, where as i am excepting it to stop at the break point. so i had uncommented the message and then had a break point just to check the sy-subrc value. when i uncmmented it its working fine and gives me results. but i need to check the condition.
shejal.
06-16-2006 3:17 PM
Hi,
you do this...
since FM has exception. but you are not handling the FM exception.just check it.
CALL FUNCTION 'ZSD_GET_RATE_DETAIL' DESTINATION 'RFC_APP'
EXPORTING
SERVER = ZSD_BDS_COMMUNI-SERVER
DATABASE = ZSD_BDS_COMMUNI-ZDATABASE
USERID = ZSD_BDS_COMMUNI-USERID
PASSWORD = ZSD_BDS_COMMUNI-PASSWORD
CONNECTIONSTRING = ZSD_BDS_COMMUNI-CONNECTIONSTRING
INQUIRYUSERID = ZSD_BDS_COMMUNI-INQUIRYUSERID
INQUIRYID = ZSD_BDS_COMMUNI-INQUIRYID
TABLES
INQUIRY_INPUT = i_input
INQUIRY_CHARGES = i_charges
INQUIRY_OUTPUT_DETAILS = i_output_details
INQUIRY_ERRORS = i_errors
EXCEPTIONS
OTHERS = 1 .
<b>if sy-subrc <> 0.
message e003(ZSDBDS).
endif</b>.
Regards
vijay
06-16-2006 3:23 PM
Are you sure the error message is coming out of this piece of code?
06-16-2006 3:26 PM
06-16-2006 3:27 PM
06-16-2006 3:28 PM
06-16-2006 3:29 PM
Your current code
IF i_input-prepaid_collect <> 'P'.<b><-- You are
checking this <u>current record</u></b>
MESSAGE e002(zsdbds).
ELSE.
CALL FUNCTION 'ZSD_GET_RATE_DETAIL' DESTINATION 'RFC_APP'
EXPORTING
server = zsd_bds_communi-server
database = zsd_bds_communi-zdatabase
userid = zsd_bds_communi-userid
password = zsd_bds_communi-password
connectionstring = zsd_bds_communi-connectionstring
inquiryuserid = zsd_bds_communi-inquiryuserid
inquiryid = zsd_bds_communi-inquiryid
TABLES
inquiry_input = i_input <b><-- but passing the entire table here?</b>
inquiry_charges = i_charges
inquiry_output_details = i_output_details
inquiry_errors = i_errors
EXCEPTIONS
OTHERS = 1.
ENDIF.
IF sy-subrc <> 0. <b><-- why is this outside of the ENDIF
as pointed out by Vijay before?</b>
MESSAGE e003(zsdbds).
ENDIF.
06-16-2006 3:31 PM
First I am checking the condition
if i_input-PREPAID_COLLECT <> 'P'.
if it does not meet i dont want to call the FM.
Hence i have and endif after the FM call.
However i tried the other way with endif, as you guys have recommended but no change.
shejal.
06-16-2006 3:35 PM
Can you please do one thing? Go to SE91, enter this ZSDBDS message class and enter the number 003 and then do a where used list. See where else this message is being issued. I think you may be getting this from somewhere else.
06-16-2006 3:38 PM
I dont have anything in the source code of function module.
FUNCTION ZSD_GET_RATE_DETAIL.
*"----
""Local interface:
*" IMPORTING
*" VALUE(SERVER) TYPE CHAR50 OPTIONAL
*" VALUE(DATABASE) TYPE CHAR50 OPTIONAL
*" VALUE(USERID) TYPE VBAK-ERNAM OPTIONAL
*" VALUE(PASSWORD) TYPE CHAR30 OPTIONAL
*" VALUE(CONNECTIONSTRING) TYPE CHAR30 OPTIONAL
*" VALUE(INQUIRYUSERID) TYPE CHAR30 OPTIONAL
*" VALUE(INQUIRYID) TYPE CHAR10 OPTIONAL
*" TABLES
*" INQUIRY_INPUT STRUCTURE ZSD_INQUIRY_INPUT OPTIONAL
*" INQUIRY_CHARGES STRUCTURE ZSD_INQUIRY_CHARGES OPTIONAL
*" INQUIRY_OUTPUT_DETAILS STRUCTURE ZSD_INQUIRY_OUTPUT_DETAILS
*" OPTIONAL
*" INQUIRY_ERRORS STRUCTURE ZSD_INQUIRY_ERRORS OPTIONAL
*"----
ENDFUNCTION.
Shejal.
06-16-2006 3:40 PM
check the values in i_input table. whether there is null values r there which doesn't meet the condition.
if there r any null values appended then change select statement.
06-16-2006 3:42 PM
The point is, if you keep the 'IF SY-SUBRC <> 0' outside the previous ENDIF, there is a chance that this error message is raised even if the rfc is not executed. Let us say, before the 'I_INPUT-PREPAID_COLLECT <> 'P'.', sy-subrc is not zero and this condition is satisfied. Then your function module will not be executed, but still the error message will be raised because SY-SUBRC was already non-zero.
Second, you are probably looping at I_INPUT and checking this condition, but when it comes to calling the function module, you are passing the entire table. Which means, you will be passing the entire internal table to the RFC, for every record of the internal table, assuming PREPAID_COLLECT <> 'P' in every record. Is that what you want to do?
Srinivas
06-16-2006 3:48 PM
Srinivas can i have your eamil id please. I would like to send you the code. I am kind of a bit confused on your previous message or you can mail on shejal_79@yahoo.com. i will reply back.
Shejal.
06-16-2006 3:53 PM
Before the fM, clear the return code.
and move the sy-subrc check immediately after the FM call.
06-16-2006 2:42 PM
Hi,
check if import is commented or not.
call function 'TEST'
export
<b> import</b>
if sy-subrc <> 0.
endif.
Regards
Amole
06-16-2006 2:43 PM
Hi,
Find out all occurences of
message e003(ZSDBDS) in function module main program
and put break-point and check.
Regards,
Amole
06-16-2006 3:34 PM
Hi Shejal,
Execute the program in debug mode. Once you are in debug screen, click Breakpoint -> Breakpoint at -> Statement. In the statement field, put 'message' as keyword.
Now execute the program (F8). The program will stop at the place where the error message is being called. That will give you an idea from where message is actually coming.
Cheers,
Vikram
Pls reward for helpful replies!!
06-16-2006 3:39 PM
Hi Shejal Shetty,
if i_input-PREPAID_COLLECT <> 'P'.
message e002(ZSDBDS).
else.
<u><b>* Initialize the return code
CLEAR: SY-SUBRC.</b></u>
CALL FUNCTION 'ZSD_GET_RATE_DETAIL' DESTINATION 'RFC_APP'
EXPORTING
SERVER = ZSD_BDS_COMMUNI-SERVER
DATABASE = ZSD_BDS_COMMUNI-ZDATABASE
USERID = ZSD_BDS_COMMUNI-USERID
PASSWORD = ZSD_BDS_COMMUNI-PASSWORD
CONNECTIONSTRING = ZSD_BDS_COMMUNI-CONNECTIONSTRING
INQUIRYUSERID = ZSD_BDS_COMMUNI-INQUIRYUSERID
INQUIRYID = ZSD_BDS_COMMUNI-INQUIRYID
TABLES
INQUIRY_INPUT = i_input
INQUIRY_CHARGES = i_charges
INQUIRY_OUTPUT_DETAILS = i_output_details
INQUIRY_ERRORS = i_errors
EXCEPTIONS
OTHERS = 1 .
<u><b>* Here u can check the return code
if sy-subrc <> 0.
message e003(ZSDBDS).
endif
endif..</b></u>
<u><b>* Don't check here
if sy-subrc <> 0.
message e003(ZSDBDS).
endif.</b></u>
- Selvapandian Arunachalam
06-16-2006 4:13 PM
Got your code. I don't see why this error message should be raised even though sy-subrc = 0. There are other changes that can be made to the code, but they are not relavant to this issue, so I won't touch upon them.
Just a hunch. Did you activate the code, and generate the main program of this user exit?
Message was edited by: Srinivas Adavi
Of course apart from the question about the position of your IF SY-SUBRC <> 0.