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

ALV doubt

Former Member
0 Likes
838

Hi experts,

I am adding the 'download to sreadsheet' icon in the application toolbar and i am calling using its function code '&xxl'.When i run the application i am getting the run time error.

can anyone guide me in this.

Here is the sample code which is causing me the error in the class ID.

WHEN '&XXL'.

DATA:ME TYPE REF TO CL_GUI_ALV_GRID,

YOU TYPE REF TO CL_GUI_CONTAINER.

CREATE OBJECT YOU

EXPORTING

CLSID = 'clsid'.

CREATE OBJECT ME

EXPORTING

I_PARENT = YOU.

DATA:LV_UCOMM TYPE SY-UCOMM.

LV_UCOMM = '&XXL'.

CALL METHOD ME->set_function_code

CHANGING c_ucomm = LV_UCOMM.

Thanx in advance.

Hi experts,

I am adding the 'download to sreadsheet' icon in the application toolbar and i am calling using its function code '&xxl'.When i run the application i am getting the run time error.

can anyone guide me in this.

Here is the sample code which is causing me the error in the class ID.

WHEN '&XXL'.

DATA:ME TYPE REF TO CL_GUI_ALV_GRID,

YOU TYPE REF TO CL_GUI_CONTAINER.

CREATE OBJECT YOU

EXPORTING

CLSID = 'clsid'.

CREATE OBJECT ME

EXPORTING

I_PARENT = YOU.

DATA:LV_UCOMM TYPE SY-UCOMM.

LV_UCOMM = '&XXL'.

CALL METHOD ME->set_function_code

CHANGING c_ucomm = LV_UCOMM.

Thanx in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
779
add the code in bold and try....

WHEN '&XXL'.
DATA:ME TYPE REF TO CL_GUI_ALV_GRID,
YOU TYPE REF TO CL_GUI_CONTAINER.
<b>if you is initial.</b>
CREATE OBJECT YOU
EXPORTING
CLSID = 'clsid'.
CREATE OBJECT ME
EXPORTING
I_PARENT = YOU.
<b>endif.</b>
DATA:LV_UCOMM TYPE SY-UCOMM.
LV_UCOMM = '&XXL'.
CALL METHOD ME->set_function_code
CHANGING c_ucomm = LV_UCOMM.

Message was edited by: Chandrasekhar Jagarlamudi

Read only

Former Member
0 Likes
779

Hi Satheesh,

Waht does the Runtime Error say?

Prashanth

Read only

Former Member
0 Likes
779

try with this

CLSID = 'CLSID'.

.

Regards

Prabhu

Read only

Former Member
0 Likes
779

changed my previous code , pls check

if you is initial.

*code

endif.

Read only

0 Likes
779

HI EXPERTS,

I have changed the code as u all suggested but i am still facing the same problem.can anyone solve this.

The run time is related to the CLSID.

WHEN '&XXL'.

DATA:ME TYPE REF TO CL_GUI_ALV_GRID,

YOU TYPE REF TO CL_GUI_CONTAINER.

IF YOU IS INITIAL.

CREATE OBJECT YOU

EXPORTING

CLSID = 'CLSID'.

CREATE OBJECT ME

EXPORTING

I_PARENT = YOU.

ENDIF.

DATA:LV_UCOMM TYPE SY-UCOMM.

LV_UCOMM = '&XXL'.

CALL METHOD ME->set_function_code

CHANGING c_ucomm = LV_UCOMM.

Read only

0 Likes
779

Try this....

WHEN '&XXL'.
DATA:ME TYPE REF TO CL_GUI_ALV_GRID,
YOU TYPE REF TO CL_GUI_CONTAINER.
IF YOU IS INITIAL.
CREATE OBJECT YOU
EXPORTING
<b>CONTAINER_NAME</b> = 'CLSID'.
CREATE OBJECT ME
EXPORTING
I_PARENT = YOU.
ENDIF.
DATA:LV_UCOMM TYPE SY-UCOMM.
LV_UCOMM = '&XXL'.
CALL METHOD ME->set_function_code
CHANGING c_ucomm = LV_UCOMM.