cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Table declaration

Former Member
0 Kudos

Hi Experts,

     I need an internal table to reuse in my applicationn frequently in all my views.

      So i declared an internal table in attributes section of component controller.

      but when i using the internal table in one of the methods of component controller itself it showing error.

     declared an internal table GT_EMAIL of associated type ZTT_EMAIL in attributes section of component controller.

      ZTT_EMAIL is a table type of line structure BAPIADTTX.

      when i am using this GT_EMAIL its giving an error.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Could you please tell us the error?

Former Member
0 Kudos

Method GET_USERNAME

Field "GT_EMAIL" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement. .

Former Member
0 Kudos

Are you using WD_THIS for accessing the internal table?

If not, this error would come.

In the component controller use WD_THIS->GT_EMAIL to access the table

and in any view use WD_COMP_CONTROLLER->GT_EMAIL to access the table.

Former Member
0 Kudos

i am using this attribute in function module BAPI_USER_GET_DETAIL

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

    EXPORTING

      username             = iv_userid

     cache_results        = 'X'

   IMPORTING

*   LOGONDATA            =

*   DEFAULTS             =

     address              = ls_address

*   COMPANY              =

*   SNC                  =

*   REF_USER             =

*   ALIAS                =

*   UCLASS               =

*   LASTMODIFIED         =

*   ISLOCKED             =

    TABLES

*   PARAMETER            =

*   PROFILES             =

*   ACTIVITYGROUPS       =

      return             = ls_return

*   ADDTEL               =

*   ADDFAX               =

*   ADDTTX               =

*   ADDTLX               =

   ADDSMTP               =  GT_EMAIL

*   ADDRML               =

*   ADDX400              =

*   ADDRFC               =

*   ADDPRT               =

*   ADDSSF               =

*   ADDURI               =

*   ADDPAG               =

*   ADDCOMREM            =

*   PARAMETER1           =

*   GROUPS               =

*   UCLASSSYS            =

*   EXTIDHEAD            =

*   EXTIDPART            =

*   SYSTEMS              =

            .

chengalarayulu
Active Contributor
0 Kudos

Hi Venkat,

Please replace with wd_this->gt_mail OR wd_comp_controller->gt_mail instead of GT_MAIL.

Former Member
0 Kudos

Yes.

Instead of using

ADDSMTP               =  GT_EMAIL

use it like

ADDSMTP               =  WD_THIS->GT_EMAIL

Former Member
0 Kudos

Thank You Kushboo,

It was a simple error i didn't notice at all.

Thank you very much for your help.

now its working fine

Answers (0)