{"id":3802,"date":"2018-06-10T06:50:28","date_gmt":"2018-06-10T06:50:28","guid":{"rendered":"https:\/\/www.int4.com\/?p=1540"},"modified":"2020-05-18T15:28:15","modified_gmt":"2020-05-18T13:28:15","slug":"sap-aif-multi-index-table","status":"publish","type":"post","link":"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table","title":{"rendered":"SAP AIF multi index table with single index tables"},"content":{"rendered":"
<\/p>\n

SAP AIF multi index and single index tables<\/strong><\/h2>\n<\/span>\n

Hi there! In this blog I will show you how you can use SAP AIF<\/strong> multi index table and single index tables in your interfaces.<\/p>\n

This blog is the extension of the previous blog: How To Create a Single Index Table in SAP AIF<\/a> and therefore some steps will be explained in a more general way. You can always visit the previous blog in case you occur any issues with details, but I believe that you won’t have any problems, as you mastered this knowledge last time reading the previous blog! \ud83d\ude42<\/p>\n<\/div>\n

Multiple selection index tables are used in situations you want to create additional selection screen for the values, that appear more than once in a single message (for example plant ID on item level or material number in Sales Order).<\/p>\n

In this blog I will show you how to use multiple index table to handle selection for the material number in inbound IDoc sales order interface in IDoc segment E1EDP01-E1EDP19-IDTNR.\u00a0<\/strong><\/p>\n

How to create SAP AIF multi index table?<\/h3>\n

First of all, you have to create an additional table based on a template table: \/AIF\/MIDX_TEMPL<\/strong>\u00a0\u00a0<\/strong>in transaction SE11<\/strong>. Once you created the table, add a field MATNR <\/strong>at the end of the table with type MATNR, <\/strong>in the same way, you did it for single index table. In addition, you will see, that this template table contains\u00a0another field COUNTER, <\/strong>that has our favourite data type: INT4 <\/strong>\ud83d\ude42 This field is added right after MSGUID <\/strong>field and has to be defined as Key field:<\/p>\n

\"\"<\/a>

Template table for SAP AIF <\/em>multi index table<\/em><\/p><\/div>\n

 <\/p>\n

Module pool program for SAP AIF multi index table<\/h3>\n

Next, we have to create or extend existing module pool program. I will extend the module pool used in previous blog with the select options for material number. In case of any issues see the following code snippet of this program. For multiple index table, we need additional S_MAT <\/strong>select-options.<\/p>\n

PROGRAM\u00a0ZAIF_SEL_SCREEN_0001.<\/em>
\nDATA:\u00a0gv_po_num\u00a0TYPE\u00a0bstkd,<\/em>
\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0gv_kunnr\u00a0\u00a0TYPE\u00a0kunag,<\/em>
\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0gv_matnr\u00a0\u00a0TYPE\u00a0matnr.<\/em><\/p>\n

SELECTION-SCREEN\u00a0BEGIN\u00a0OF\u00a0SCREEN\u00a00001\u00a0AS\u00a0SUBSCREEN.<\/em>
\nSELECT-OPTIONS:<\/em>
\n\u00a0\u00a0\u00a0\u00a0s_po\u00a0\u00a0FOR\u00a0gv_po_num,<\/em>
\n\u00a0\u00a0\u00a0\u00a0s_kun\u00a0FOR\u00a0gv_kunnr,<\/em>
\n\u00a0\u00a0\u00a0\u00a0s_mat\u00a0FOR\u00a0gv_matnr.<\/em>
\n\u00a0\u00a0\u00a0\u00a0.<\/em>
\nSELECTION-SCREEN\u00a0END\u00a0OF\u00a0SCREEN\u00a00001.<\/em><\/p>\n

AT\u00a0SELECTION-SCREEN\u00a0OUTPUT.<\/em>
\n\u00a0\u00a0\/aif\/cl_global_tools=>get_value_from_mem(\u00a0).<\/em><\/p>\n

 <\/p>\n

SAP AIF Customization required for multi index tables<\/h3>\n

In the last step, you have to configure newly created index table in AIF Customizing. Go to transaction \/n\/AIF\/CUST<\/strong> and go to SAP Application Interface Framework –> Error Handling –> Define Interface-Specific Features<\/em>.<\/p>\n

Here you can see one difference between a single index and multi-index tables configuration. For single index table you have to add table name in Define Namespace-Specific features <\/em>first. For multiple index tables you shouldn’t do it, because you will add it directly in Interface-Specific features.<\/p>\n

Add a New entry. As first thing change Multi.Selection Type<\/em> to M Multiple Selection<\/strong> and click ENTER.\u00a0<\/em>Then fill all the rest information as the one shown in the screenshot below:<\/p>\n

\"SAP<\/a>

SAP AIF multi index\u00a0table customization<\/p><\/div>\n

Congrats! Multiple index table in SAP AIF is configured properly!<\/p>\n

Now when you send via WE19 or SOAPUI a message with two line items and you open your multi-index table in SE16N you should see two entries with the same SAP AIF GUID, but with different material numbers. Thanks to this we know, that our AIF multi-index works!<\/p>\n

\"Content<\/a>

Content Preview of SAP AIF Multi Index table in SE16n<\/p><\/div>\n

Conclusion<\/h3>\n

I hope that creation and configuration of SAP AIF MultiIndex tables and Single Index tables are now a piece of cake for you!<\/p>\n

I am curious, for which field do you use multi index tables in your scenarios?<\/p>\n

We are describing this and other processes in the more detailed way in our new book on which we are still working on. I can tell you, that book will be available in October as an E-Bite on SAP Press!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

SAP AIF multi index tables combined with single-index tables<\/p>\n","protected":false},"author":10,"featured_media":5670,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":""},"categories":[1],"tags":[30,45],"acf":[],"yoast_head":"\nSAP AIF multi index table with single index tables - step by step<\/title>\n<meta name=\"description\" content=\"Learn how to use SAP AIF multi index table together with single index tables. Enable this for your SAP AIF interface in order to make monitoring easier for business users!\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SAP AIF multi index table with single index tables - step by step\" \/>\n<meta property=\"og:description\" content=\"Learn how to use SAP AIF multi index table together with single index tables. Enable this for your SAP AIF interface in order to make monitoring easier for business users!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table\" \/>\n<meta property=\"og:site_name\" content=\"INT4\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-10T06:50:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-18T13:28:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test11988.futurehost.pl\/wp-content\/uploads\/2018\/06\/SAP_AIF_Multi_Index_tables_single_table_Nowak.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mateusz Nowak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mateusz Nowak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table\",\"url\":\"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table\",\"name\":\"SAP AIF multi index table with single index tables - step by step\",\"isPartOf\":{\"@id\":\"https:\/\/test11988.futurehost.pl\/#website\"},\"datePublished\":\"2018-06-10T06:50:28+00:00\",\"dateModified\":\"2020-05-18T13:28:15+00:00\",\"author\":{\"@id\":\"https:\/\/test11988.futurehost.pl\/#\/schema\/person\/87c3e874c8211745f3806c3a529d627d\"},\"description\":\"Learn how to use SAP AIF multi index table together with single index tables. Enable this for your SAP AIF interface in order to make monitoring easier for business users!\",\"breadcrumb\":{\"@id\":\"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test11988.futurehost.pl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SAP AIF multi index table with single index tables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test11988.futurehost.pl\/#website\",\"url\":\"https:\/\/test11988.futurehost.pl\/\",\"name\":\"INT4\",\"description\":\"Your soft landing in SAP API testing\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test11988.futurehost.pl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/test11988.futurehost.pl\/#\/schema\/person\/87c3e874c8211745f3806c3a529d627d\",\"name\":\"Mateusz Nowak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/test11988.futurehost.pl\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/85470b120bc6761f1327d06134c7289a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/85470b120bc6761f1327d06134c7289a?s=96&d=mm&r=g\",\"caption\":\"Mateusz Nowak\"},\"description\":\"SAP Integration consultant since 2016. Mateusz is the author of SAP Press Book: Interface Monitoring and Error Handling with SAP AIF. He's also a trainer in the openSAP course Virtualize and Automate Your SAP Testing Using Int4 IFTT. Matt has been involved in multiple integrational projects as ABAP Developer, AIF lead and consultant. Skilled at a variety of tools and development techniques including ABAP, AIF, PO, BRFplus, IDocs, Adobe Forms, Smartforms, IDocs, ALE, SCPI.\",\"url\":\"https:\/\/test11988.futurehost.pl\/author\/mnow\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SAP AIF multi index table with single index tables - step by step","description":"Learn how to use SAP AIF multi index table together with single index tables. Enable this for your SAP AIF interface in order to make monitoring easier for business users!","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_GB","og_type":"article","og_title":"SAP AIF multi index table with single index tables - step by step","og_description":"Learn how to use SAP AIF multi index table together with single index tables. Enable this for your SAP AIF interface in order to make monitoring easier for business users!","og_url":"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table","og_site_name":"INT4","article_published_time":"2018-06-10T06:50:28+00:00","article_modified_time":"2020-05-18T13:28:15+00:00","og_image":[{"width":"1200","height":"627","url":"https:\/\/test11988.futurehost.pl\/wp-content\/uploads\/2018\/06\/SAP_AIF_Multi_Index_tables_single_table_Nowak.png","type":"image\/png"}],"author":"Mateusz Nowak","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mateusz Nowak","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table","url":"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table","name":"SAP AIF multi index table with single index tables - step by step","isPartOf":{"@id":"https:\/\/test11988.futurehost.pl\/#website"},"datePublished":"2018-06-10T06:50:28+00:00","dateModified":"2020-05-18T13:28:15+00:00","author":{"@id":"https:\/\/test11988.futurehost.pl\/#\/schema\/person\/87c3e874c8211745f3806c3a529d627d"},"description":"Learn how to use SAP AIF multi index table together with single index tables. Enable this for your SAP AIF interface in order to make monitoring easier for business users!","breadcrumb":{"@id":"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test11988.futurehost.pl\/sap-aif-multi-index-table#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test11988.futurehost.pl\/"},{"@type":"ListItem","position":2,"name":"SAP AIF multi index table with single index tables"}]},{"@type":"WebSite","@id":"https:\/\/test11988.futurehost.pl\/#website","url":"https:\/\/test11988.futurehost.pl\/","name":"INT4","description":"Your soft landing in SAP API testing","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test11988.futurehost.pl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/test11988.futurehost.pl\/#\/schema\/person\/87c3e874c8211745f3806c3a529d627d","name":"Mateusz Nowak","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/test11988.futurehost.pl\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/85470b120bc6761f1327d06134c7289a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/85470b120bc6761f1327d06134c7289a?s=96&d=mm&r=g","caption":"Mateusz Nowak"},"description":"SAP Integration consultant since 2016. Mateusz is the author of SAP Press Book: Interface Monitoring and Error Handling with SAP AIF. He's also a trainer in the openSAP course Virtualize and Automate Your SAP Testing Using Int4 IFTT. Matt has been involved in multiple integrational projects as ABAP Developer, AIF lead and consultant. Skilled at a variety of tools and development techniques including ABAP, AIF, PO, BRFplus, IDocs, Adobe Forms, Smartforms, IDocs, ALE, SCPI.","url":"https:\/\/test11988.futurehost.pl\/author\/mnow"}]}},"_links":{"self":[{"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/posts\/3802"}],"collection":[{"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/comments?post=3802"}],"version-history":[{"count":0,"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/posts\/3802\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/media\/5670"}],"wp:attachment":[{"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/media?parent=3802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/categories?post=3802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test11988.futurehost.pl\/wp-json\/wp\/v2\/tags?post=3802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}