Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the error "some out table var is not assigned :<exporting parameter>" in AMDP

Former Member
0 Kudos

Hello Expert,

I want to do the join operation based on the internal table which is the importing parameter of the method in AMDP.

Below is the that I have implemented.

CLASS ZCL_HANA_AMDP DEFINITION

  PUBLIC

  FINAL

  CREATE PUBLIC .

  PUBLIC SECTION.

 

   INTERFACES:if_amdp_marker_hdb,

              if_shdb_def.

  

   TYPES: BEGIN OF ty_sflight,

                   carrid TYPE S_CARR_ID,

                   connid TYPE S_CONN_ID,

                END OF TY_SFLIGHT,

        

         BEGIN OF ty_flight_det,

            carrid TYPE S_CARR_ID,

            connid TYPE S_CONN_ID,

            cityfrom TYPE spfli-CITYFROM,

            cityto TYPE spfli-CITYTO,

         END OF TY_FLIGHT_DET.  

   TYPES: tt_sflight1 TYPE STANDARD TABLE OF ty_sflight WITH EMPTY KEY,

                tt_spfli TYPE STANDARD TABLE OF ty_flight_det WITH EMPTY KEY.

CLASS-METHODS: get_flight_details importing VALUE(iv_client) type mandt

                                              value(it_sflight) type tt_sflight1

                                    exporting value(et_sflight_det) type tt_spfli.

PROTECTED SECTION.

 

  PRIVATE SECTION.

ENDCLASS.

CLASS ZCL_HANA_AMDP IMPLEMENTATION.

METHOD get_flight_details BY DATABASE PROCEDURE

                          FOR HDB

                          LANGUAGE SQLSCRIPT

                          OPTIONS  READ-ONLY

                          USING spfli.

  et_flight_det = SELECT a.carrid, a.connid, b.cityfrom, b.cityto

                    from :it_sflight as a inner join spfli as b

                    on a.carrid = b.carrid and a.connid = b.connid

                    order by carrid;

                    

ENDMETHOD.

ENDCLASS.

But in the method implementation line it is showing the below error:

SQLSCRIPT message: some out table var is not assigned: ET_SFLIGHT_DET

Please help me to fix this problem.

Thanks & Best Regards,

Kailash

2 REPLIES 2

thomasgauweiler
Active Participant
0 Kudos

Looks like a typing error. You should use:

et_sflight_det = SELECT a.carrid, a.connid, b.cityfrom, b.cityto ...


instead of


et_flight_det = SELECT a.carrid, a.connid, b.cityfrom, b.cityto ...


Best Regards, Thomas

0 Kudos

Thank you Thomas..