‎2007 Jun 12 6:00 AM
Hi all,
I would like to pass data gotten by the method
as the parameter to another method .
For example ...
read_table(
EXPORTING
i_value = zclass001=>get_value( `CON-TEXT01` )
IMPORTING
e_out = l_wrk ).
But when I activate this method , error message is issued .
The massage is...
") IMPORTING e_Data "is not expected
I do not understand why the error is issued .
I apporogize for poor English , and asking rudimentary question .
SAP ECC 6.0
SAP_BASIS SAPKB70011
SAP_ABA SAPKA70011
Many thanks for your help.
Regards,
Masao
‎2007 Jun 12 7:28 AM
Hi Masao San,
Use the following.
lv_temp = zclass001=>get_value( `CON-TEXT01` ).
obj->read_table( EXPORTING i_value = lv_temp
IMPORTING e_out = l_wrk ).
But for this to work define get_value method as a functional method i.e. with RETURNING parameter.
CLASS-METHODS: get_value
IMPORTING im_text TYPE string
RETURNING value(re_value) TYPE i.
Award points if found useful.
Regards
Indrajit.
‎2007 Jun 12 7:28 AM
Hi Masao San,
Use the following.
lv_temp = zclass001=>get_value( `CON-TEXT01` ).
obj->read_table( EXPORTING i_value = lv_temp
IMPORTING e_out = l_wrk ).
But for this to work define get_value method as a functional method i.e. with RETURNING parameter.
CLASS-METHODS: get_value
IMPORTING im_text TYPE string
RETURNING value(re_value) TYPE i.
Award points if found useful.
Regards
Indrajit.
‎2007 Jun 12 12:17 PM
Thank you for answering .
I'm sorry for my bad explanation .
But I do not want to restore zclass001=>get_value( `CON-TEXT01` )
to the local work .
I would like to pass "zclass001=>get_value( `CON-TEXT01` )"
to read_table directory .
Because I have to write a lot of parameters for the method "get_value" ,
and call method "read_table" many times .
And about the method "get_value" ...
Import parameter : I_ID type string
Export parameter : R_TEXT type string
METHOD get_value.
INCLUDE: zghri00002.
FIELD-SYMBOLS: <fs> TYPE ANY.
ASSIGN (i_id) TO <fs>.
r_text = <fs>.
ENDMETHOD.
This method is for calling text-synbols of zclass001
and for calling constants of another ABAP include zghri00002 .
So , I would like to call method like "get_value" ,
and pass value of the method "get_value" to another method .
‎2007 Jun 12 7:31 AM
hi,
for parameters (for the report) you can have simple import parameters but for select options you can use a table type like range (for example RSELOPTION) as importing parameter
REgards