04-14-2006 10:51 AM
hi
I have used a funtion module to generate a Accounting document .The generation is working perfectively.
but I also use a fm called AC_document _check to check whether the document exists.it always giving me sy-subrc = 0 even if docu exist
what should i do
sarang
04-14-2006 12:11 PM
The function module AMBU_CALL_AC_DOCUMENT_CHECK does not have an exception as such so sy-subrc will always be 0.
The function module will execute regardless of any error.
In order to handle exceptions, use an internal table of errors and pass it to T_RETURN of the TABLES parameter in the fuction module.
Then you can find whether the function module is being executed correctly or not.
04-14-2006 11:00 AM
Hi,
i am not able to find that FM <b>AC_DOCUMENT_CHECK</b>,
can you tell correct name?
Regards
vijay
04-14-2006 11:34 AM
Hi sarangan,
Could not find any such function module like AC_DOCUMENT_CHECK.
Are you talking about AMBU_CALL_AC_DOCUMENT_CHECK or you are using your own function module?
04-14-2006 11:40 AM
In case you are using AMBU_CALL_AC_DOCUMENT_CHECK then it does not have any exceptions and as a result every time this function is used (as far as i understand) it will finally change sy-subrc = 0.
04-14-2006 12:11 PM
The function module AMBU_CALL_AC_DOCUMENT_CHECK does not have an exception as such so sy-subrc will always be 0.
The function module will execute regardless of any error.
In order to handle exceptions, use an internal table of errors and pass it to T_RETURN of the TABLES parameter in the fuction module.
Then you can find whether the function module is being executed correctly or not.