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

SIMPLE DOUBT IN ALV INTERACTIVE REPORTING

Former Member
0 Likes
821

HI EXPERETS,

This is part of code in alv interactive reporting.

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

CASE R_UCOMM.

WHEN '&IC1'.

READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.

PERFORM BUILD_FIELDCATLOG_EKPO.

PERFORM EVENT_CALL_EKPO.

PERFORM POPULATE_EVENT_EKPO.

PERFORM DATA_RETRIEVAL_EKPO.

PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.

PERFORM DISPLAY_ALV_EKPO.

ENDCASE.

ENDFORM. "user_command

In This i didn't get wat's the meaning of WHEN '&IC1'.What is

actually &IC1 means.

plz help me.

Regards

Suresh kumar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
779

HI,

Suresh that is the Function Code, when the user selects any button from the ALV report that button which has the function code as '&IC1' shall gets triggered. All the buttons shall be defined with a function code while defining the GUI.

<b>Reward points if this helps,</b>

Kiran

5 REPLIES 5
Read only

Former Member
0 Likes
779

Hello,

&ic1 is event's function code for doubleclick .

Regards,

Deepu.K

Read only

Former Member
0 Likes
780

HI,

Suresh that is the Function Code, when the user selects any button from the ALV report that button which has the function code as '&IC1' shall gets triggered. All the buttons shall be defined with a function code while defining the GUI.

<b>Reward points if this helps,</b>

Kiran

Read only

Former Member
0 Likes
779

'&IC1' is nothing but user-command for click event..

Pls reward if useful

Read only

Former Member
0 Likes
779

HI

PLZ REFER TO THIS



*&---------------------------------------------------------------------*
*& Report  ZTESTDEMO_INTERACTIVE_LIST_2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZTESTDEMO_INTERACTIVE_LIST_2.

TABLES: MARA,MARC,MARD.


* internal table itab_mara 3 fields matnr, ernam,mtart
DATA: BEGIN OF ITAB_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,  " material number
ERNAM LIKE MARA-ERNAM,  " name of person who create
MTART LIKE MARA-MTART,  " Material Type
END OF ITAB_MARA.

* internal table itab_marc 3 fields matnr, werks,lvorm

DATA: BEGIN OF ITAB_MARC OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,  " Plant
LVORM LIKE MARC-LVORM,  " Flag Material for Deletion at Plant Level
END OF ITAB_MARC.

* internal table itab_mard 2 fields

DATA: BEGIN OF ITAB_MARD OCCURS 0,
MATNR LIKE MARD-MATNR,
LGORT LIKE MARD-LGORT,  " Storage Location
END OF ITAB_MARD.

SELECT-OPTIONS: S_MTART FOR MARA-MTART.

INITIALIZATION.

S_MTART-LOW = 'HALB'.
S_MTART-HIGH = 'HAWA'.
S_MTART-OPTION = 'BT'.
APPEND S_MTART.

START-OF-SELECTION.

SELECT MATNR ERNAM MTART FROM MARA INTO TABLE ITAB_MARA WHERE MTART IN
S_MTART.

PERFORM DISPLAY.


TOP-OF-PAGE.
WRITE:/2(15) 'MATERIAL NO',20(20) 'CREATED BY',45(15) 'MATERIAL TYPE'.


FORM DISPLAY.

LOOP AT ITAB_MARA.
WRITE:/ ITAB_MARA-MATNR UNDER 'MATERIAL NO' HOTSPOT ON,ITAB_MARA-ERNAM
UNDER 'CREATED BY',ITAB_MARA-MTART UNDER 'MATERIAL TYPE'.
HIDE: ITAB_MARA-MATNR.
ENDLOOP.

ENDFORM.

AT LINE-SELECTION.
CASE SY-LSIND.
WHEN 1.

SELECT MATNR WERKS LVORM FROM MARC INTO TABLE ITAB_MARC WHERE MATNR =
ITAB_MARA-MATNR.
PERFORM DISPLAY1.

WHEN 2.

SELECT MATNR LGORT FROM MARD INTO TABLE ITAB_MARD WHERE MATNR =
ITAB_MARC-MATNR.
PERFORM DISPLAY2.

when 3.
sy-lsind = 0.
ENDCASE.

FORM DISPLAY1.
LOOP AT ITAB_MARC.
WRITE:/ ITAB_MARC-MATNR HOTSPOT ON, ITAB_MARC-WERKS,ITAB_MARC-LVORM.
HIDE: ITAB_MARC-MATNR.
ENDLOOP.

WRITE:/ SY-LSIND.
ENDFORM.

FORM DISPLAY2.
LOOP AT ITAB_MARD.
WRITE:/ ITAB_MARD-MATNR, ITAB_MARD-LGORT.
ENDLOOP.
WRITE:/ SY-LSIND.

ENDFORM.

regards

ravish

<b>plz dont forget to reward points if useful</b>

Read only

Former Member
0 Likes
779

There are two things which needs to be passed to Form User command in order to activate the interactive ALV:

R_UCOMM LIKE SY-UCOMM : The Function code that triggered PAI. In this case the Function code '&IC1' is triggered once you double click on a particular row of the ALV i.e at the PAI event

RS_SELFIELD TYPE SLIS_SELFIELD: this is the row number of the ALV based on which you can populate the table for your next list.

<b>Please reward the helpful entries.</b>

Regards,

Raman.