on 11-02-2014 11:15 PM
Hello,
This is an inbound interface scenario.
I have a function module defined for an AIF action. This function module is based on the template /AIF/FILE_TEMPL_PROCESS
The function module has a changing parameter "Success" of type /AIF/SUCCESSFLAG
If everything is OK I pass a "Y" to this parameter.
If not, I pass an "N"
The issue that I face when I pass an "N" is:
1. If I run this interface via SPROXY, the error raised in the /aif/err transaction is an "application error" (which is good)
but if I run this via placing the CSV in PI the error raised in the /aif/err transaction is an "system error".
It should always be an application error
2. No matter where I run it from (sproxy or pi), the response message seen in sxmb_moni is an exception (shown below). I guess it should not be an exception. I am passing "N" to success so that it is flagged as an error in AIF
Hi Prem,
how do you call AIF in your proxy class? Do you call /AIF/CL_ENABLER_PROXY=>PROCESS_MESSAGE? There is a parameter for the exception class. Did you check if you pass the correct exception class name? You have to pass the name of the exception that the proxy raises. Maybe there is a typo or something.
Best regards,
Verena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prem,
when did you defined in your proxy method the code for the method /aif/cl_enabler_proxy, before or after you defined your interface in aif/cust?
Best regards,
Ionut
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prem,
I try to use always messages in RETURN_TAB to control success or failed.
Perhaps this information could help you and use the SUCCESS flag only for an overwrite.
had you have the chance to look in to Verena Wörner's document "Template Function Modules of the SAP Application Interface Framework". For the FM /AIF/FILE_TEMPL_PROCESS she gave following extra hint:
"Note that you should not raise an error. Instead, you should fill return table RETURN_TAB with your messages. If there is a message of type E or A in the return table, the SAP Application Interface Framework implies that the function call was not successful. However, you may overwrite this behavior. You can set the SUCCESS indicator to “Y” explicitly to indicate success even though the RETURN_TAB contains error messages. You can set the SUCCESS indicator to N explicitly to indicate failure even though RETURN_TAB does not contain error messages."
Perhaps this information could help you.
Kind regards
Christoph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christoph,
Thanks for replying. Yes, a few minutes after I posted my question I happened to read the article you mentioned . I stopped explicity setting the success flag and let the AIF framework read my RETURN_TAB for 'E' or 'A' messages. It still throws an exception though.
Best regards,
Prem
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.