SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.

Install SAP Free

ABAP AMDP Procedure Output Parameter Type must be Structured

If method contains a database procedure, row type of output parameters must be structured. Additionally, all components of the row type must be elementary. ABAP programmers developing AMDP procedures must convert output table parameters' row types to structured row types. Otherwise SAP developers cannot activate AMDP procedure successfully.

When I try to activate AMDP procedure on SAP HANA Studio, I see following error message:
The method "GET_PLANT_BY_SALESORG" contains a database procedure, which means that the row type of "OUT_TAB" must be structured. All components of the row type must be elementary.

ABAP method contains AMDP database procedure, row type must be structured

The AMDP activation error is because the PLANTS table type is based on an elementary type WERKS_D data element.

plants table type with elementary type, data element

But for AMDP output parameters, the row type of the table must be structured not elementary.
To resolve this issue, I created a structure which includes only the WERKS field of WERKS_D data element as seen in below.

plant struture with single field werks

Additionall I created a new ABAP Data Dictionary object as Table Type using above structure as its row type.

DDIC table type object with rows with structured row type

When I modify AMDP class code for the procedure method definition by replacing the PLANTS table type with new table type, the AMDP activation is succeeded immediately.

AMDP output parameter with table type having rows with structured row type

SAP Tutorials

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table

Meetup Sunumu 1 meetup

Copyright © 2004 - 2020 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems