Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Accounting document generate

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

Hi,

i am not able to find that FM <b>AC_DOCUMENT_CHECK</b>,

can you tell correct name?

Regards

vijay

Former Member
0 Kudos

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?

0 Kudos

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.

Former Member
0 Kudos

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.