cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Inbound AIF Issue

Former Member
0 Likes
4,595

Hi All,

I am new to SAP AIF and was trying out an AIF scenario for a simple inbound proxy. I have followed the cookbook 2.0 in order to create this scenario. When I try to test the same by executing the proxy I get the below error in it:

<faultDetail>

<severity>error</severity>

<text>Internal structure USER_DETAILS cannot be processed</text>

<id>030(/AIF/MES)</id>

</faultDetail>

The steps I have followed to create the scenario are:

  1. I have created a simple file to file scenario in PI. Where the source and the target structures are both same.
  2. In ECC we activated the inbound proxy and did the following coding in its method.

     METHOD <interface>~<method>.

      /aif/cl_enabler_proxy=>process_message(
      is_input =
input
      iv_exception_classname =
'ZAIFCX_MT_FT_RECEIVER1'
      ).

     ENDMETHOD.

3. In customizing (/AIF/CUST) I have created a namespace in Define namespace tab, assigned the inbound proxy class and a SAP data structure in the Define Interface tab. In the Define Structure Mappings tab the receiver structure assigned which is of below type maintained in ECC.

          

          MT_Receiver --> Line type

                USER_DETAILS-->  Table type

Name --> char20

Code --> char20

Phone--> numc10

Please help me in resolving the above error.

Thanks

Shivangi

Accepted Solutions (1)

Accepted Solutions (1)

thomaselsaesser
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Shivangi,

I think you used the F4 help in "Define Structure Mapping" to select the right structures, right? You should check in "Define Interface" if the proxy structure and the "record type" is filled correctly (this should be filled automatically when you enter the proxy class name). If this looks good, you could try to delete the "structure cache" (run transaction /AIF/DEL_STRUC_CACHE).

If this does not help, you should create an OSS message (component CA-GTF-AIF), so we can help you via OSS connection.

Best regards,

Thomas

Former Member
0 Likes

Hi Thomas,

Thanks for your quick reply.

I ran that transaction for structure cache refresh, that you had mentioned, a number of times and finally the error has changed from what it was earlier.

Now the error displays:

<faultDetail>

<severity>error</severity>

<text>Recursive
multi-level mapping (USER_DETAILS -> USER_DETAILS); check structure mapping
</text>

<id>116(/AIF/MES)</id>

</faultDetail>

The structures that I am using and the kind of mapping I have done is
mentioned below:

I have intentionally not mapped the phone field.

Kindly check if there is something that I have missed here that is resulting in the above error.

Thanks

Shivangi

Former Member
0 Likes

Hi Shivangi,

On the second screen shot it looks like you have entered @NAME and @CODE into column Fieldname 2. Those entries are actually causing the error. If you delete the entries in this column your mapping from NAME to NAME and CODE to CODE should work.

I will try to explain why the error occurs:

The columns Fieldname 1 to Fieldname 5 contain the fields that should be used to derive the value for Field in Destination Structure. Usually, you enter fields from the source structure into the columns Fieldname 1 to Fieldname 5. However, in some cases it also makes sence to use a field, that was already mapped from the destinations structure. In order to tell AIF that a field is from the destination structure an @-sign needs to be added to the field name.

Now, currently your mapping is defined to map NAME (from source structure) and @NAME(from destination structure) to field NAME (from destination structure). Since you try to use the same field NAME from the destination structure as source field and as destination field in the same field mapping, you have an recursive mapping.

Best regards,

Verena

Former Member
0 Likes

Hi Verena,

Thanks for your reply. I was able to correct the issue and now the mapping gets executed.

I am again facing an error. On executing the proxy I get a message-> call successful empty response. Although I have maintained a function module in the Define Actions --> Define Functions. But the function module is unable to assign and give the expected result. 

The objective of this function module is to take the data that is triggered on execution of the proxy and append the same in a Z Table. Please find the screen shot of the function module that I have created and used in the Define Action tab:

I had to make all the parameters optional as the system is not able to identify the type correctly and gives me the below error.

Please let me know if there is any other function module that should be maintained in order to execute this scenario. Kindly let me know what am I missing here.

Thanks

Shivangi

thomaselsaesser
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Shivangi,

I think you should follow exactly the cookbook with your implementation and copy the template function /AIF/FILE_TEMPL_PROCESS for your action function; then you have the right parameters that AIF expects.

The function should have these parameters.

IMPORTING:
TESTRUN TYPE  C
SENDING_SYSTEM TYPE  /AIF/AIF_BUSINESS_SYSTEM_KEY

TABLES:

RETURN_TAB STRUCTURE  BAPIRET2

CHANGING:
DATA TYPE     <your SAP structure>
CURR_LINE TYPE <your SAP structure or line type of your action>
SUCCESS TYPE  /AIF/SUCCESSFLAG
optional: OLD_MESSAGES TYPE  /AIF/BAL_T_MSG    <not really needed>

Then it should work.

If you tell me in which system / at which customer you are working, maybe I could help you directly.

Best regards,

Thomas

Former Member
0 Likes

Hi Thomas,

Thanks a lot for your help. I had already read the cookbook and could not find the template that you have mentioned. On implementing the FM based on this template I was able to resolve the issue.

Thanks again!

Regards

Shivangi

Answers (0)