cancel
Showing results for 
Search instead for 
Did you mean: 

SAP AIF Index table always stores first occurrence of E1EDK14-ORGID in key fields. Can't store VKORG

Jamalpur
Explorer
0 Kudos
948

Hi,

How to store a value based on Qualifier in SAP AIF Index table when we have multiple occurrences of an inbound IDOC segment of ORDER05. If we need the ability to search IDOCs in /n/AIF/ERR based on Sales Org or Sales Office. Index table is always storing the first occurrence of segment E1EDK14-ORGID.
While defining key fields who to add a condition based on Qualifier of segment E1DK14 or any such segment which can repeat.

Thanks,

Harshit Jamalpur

 

brittamangei
Product and Topic Expert
Product and Topic Expert
0 Kudos

The determination of key fields by qualifier was released with the following notes:

3416275 - Qualifier for Key Fields

3456899 - Key Field Qualifier: Key field qualifier for single index table fields

Both notes are required to enable the feature.

Accepted Solutions (0)

Answers (4)

Answers (4)

sebastian_gottmann3
Participant

Hi @Jamalpur ,

SAP published a new note which may help you: https://me.sap.com/notes/3416275

Based on that note, you can define keyfields based on qualifieres.

Regards,
Sebastian

Jamalpur
Explorer
0 Kudos

Thank you very much @sebastian_gottmann3 Sebastian. I have tried to implement this note and all its prerequisites and now it has enhanced the view with additional fields where we can specify Qualifier and a value for it. Also, it has updated lots of classes and function groups. But it's still not helping.

I tried to dig in a little deeper to see where it was going wrong. It may fetch values based on qualifier in method /AIF/CL_ENABLER_BASE=>STORE_SINGLE_KEYFIELDS, which got updated as per this note.

But during Inbound IDOC it calls via different class /AIF/CL_ENABLER_IDOC=>STORE_SINGLE_KEYFIELDS. So I guess SAP needs to also update this class & method.

Or is there another note which needs to be implemented.

Thanks again for this valuable information and help.

brittamangei
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi @Jamalpur, sorry that you stumbled about the issue. We will have a look at the note and check why this is not working. Fastes way to stay up to date on the issue is if you open an incident on component BC-SRV-AIF.
lei_su
Product and Topic Expert
Product and Topic Expert
0 Kudos

The error message "Use a different index table for single selection; 010 field" indicates you have wrongly maintained the same table in field Message Idx Table (/AIF/CUST => Define Namespace-Specific Features => Define Interface-Specific Features) as the concerned multiple index table.

You should either leave it empty (then the default /AIF/STD_IDX_TBL will be used) or maintain your own single-index table in field Message Idx Table (/AIF/CUST => Define Namespace-Specific Features => Define Interface-Specific Features).

Jamalpur
Explorer
0 Kudos

Hi @lei_su, Thank you again for your help. I maintained the previous Single Index table in SAP Application Interface Framework > Error Handling > Define Namespace-Specific Features. And Multi Index table under, SAP Application Interface Framework > Error Handling > Define Interface-Specific Features.
Now no error while saving.
The result of this is that it stores a single entries in Single Index table ( Z copy of AIF/STD_IDX_TBL ) and Two/multiple entries in Multi Index table ( Z copy of  /AIF/MIDX_TEMPL ) based on different values we have in IDOC. 
In single Index table, not all Key fields values are not getting stored. And in Multi Index table, It looks like it will store multiple entries of only one Key fields. In my case I have 5 key fields of which 3 can have multiple values for which we want to search based on Qualifier.
But this isn't helping in searching failures based on Key Values

lei_su
Product and Topic Expert
Product and Topic Expert
0 Kudos

Define Key Fields.png

lei_su
Product and Topic Expert
Product and Topic Expert
0 Kudos

In this case, you should not define a single-index field since there could be multiple values corresponding to a single message. Instead, you need to define a multiple-index field:

Choose "Multiple selection" from the dropdown list box "Multi. Selection Type", then press Enter key, and then the field "Message Index Table Name" will be visible, where you can insert your own multiple-index table. You can define your own multiple -index table (Copy the template table /AIF/MIDX_TEMPL to you own and then add the interface-specific fields e.g. sales organizations to the table end).

I don't think you mean the new feature "3416275 - Qualifier for Key Fields" that aims to reduce the number of entries to the index table.

Jamalpur
Explorer
0 Kudos

Thank You very much @lei_su, for your suggestions. I create a new table ( copy of /AIF/MIDX_TEMPL) and added my key fields in it and changes the settings in

SAP Application Interface Framework > Error Handling > Define Interface-Specific Features

set Multi.Selection Type to M. Multiple Selection and gave the new Table name in Message Index Table Name.

When I save it gives an error Use a different index table for single selection; 010 field in SAP AIF I also changed the Index table name in

SAP Application Interface Framework > Error Handling > Define Namespace-Specific Features.
Could please tell where it might be going wrong.

prashant_s
Discoverer
0 Kudos

Hello,
Is your issue solved?
In my case I have multiple(4 records) values in same segments and it is updating index table with 1st segment only. But I want to pick value for 3rd record.

prashant_s_0-1724960980479.png

I have implemented a note mentioned in issue and maintained it as below

prashant_s_1-1724961064718.png

Here, I want to pick sales organization for qualifier '008' which is at 3rd place.
Could you please guide and help here.