Application Development and Automation 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: 
Read only

Getting import parameter "type any" from method

Former Member
0 Likes
2,061

Hi everyone,

I'm having some problems trying to get an export parameter from a method because that parameter is type any. I can't declare data "type any", and if i use a field-symbol i get an error.

<b>The method i'm using:</b>

method GET_DATA_ATTRIBUTE .

*{ INSERT A4IK008107 1

field-symbols: <any> type any,

<attribute> type crmt_ic_attribute_data.

read table attributes assigning <attribute> with table key name = iv_name.

if <attribute> is assigned.

assign <attribute>-value->* to <any>.

e_value = <any>.

else.

raise exception type cx_crm_bdc_no_data.

endif.

*} INSERT

endmethod.

<b>My code is:</b>

Data: s_GUID type CRMT_GENIL_OBJECT_GUID.

TRY.

call method __bdc->GET_DATA_ATTRIBUTE

EXPORTING

IV_NAME = 'BTOrder'

IMPORTING

E_VALUE = s_GUID.

CATCH CX_CRM_BDC_NO_DATA.

ENDTRY.

Hi everyone,

I'm having some problems trying to get an export parameter from a method because that parameter is type any. I can't declare data "type any", and if i use a field-symbol i get an error.

<b>The method i'm using:</b>

method GET_DATA_ATTRIBUTE .

*{ INSERT A4IK008107 1

field-symbols: <any> type any,

<attribute> type crmt_ic_attribute_data.

read table attributes assigning <attribute> with table key name = iv_name.

if <attribute> is assigned.

assign <attribute>-value->* to <any>.

e_value = <any>.

else.

raise exception type cx_crm_bdc_no_data.

endif.

*} INSERT

endmethod.

<b>My code is:</b>

Data: s_GUID type CRMT_GENIL_OBJECT_GUID.

TRY.

call method __bdc->GET_DATA_ATTRIBUTE

EXPORTING

IV_NAME = 'BTOrder'

IMPORTING

E_VALUE = s_GUID.

CATCH CX_CRM_BDC_NO_DATA.

ENDTRY.

1 REPLY 1
Read only

FredericGirod
Active Contributor
0 Likes
781

Hi,

maybe have a look to the class : CL_ALV_TABLE_CREATE

the method CREATE_DYNAMIC_TABLE pass parameters "type ref to data".

Rgd

Frédéric