Skip to Content
0
Former Member
May 18, 2016 at 12:04 PM

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

1289 Views

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