Application Development and Automation 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: 
Read only

Accounting document generate

Former Member
0 Likes
841

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
Read only

Former Member
0 Likes
767

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
Read only

Former Member
0 Likes
767

Hi,

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

can you tell correct name?

Regards

vijay

Read only

Former Member
0 Likes
767

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?

Read only

0 Likes
767

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.

Read only

Former Member
0 Likes
768

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.