‎2009 Jan 07 8:31 AM
Hai,
I have developed one interactive report .In my basic list when I click any line(not any field) it is taking to next level report.But it should not go.
In between each record I put one line in my basic list.
How to control this?
Aany tips?
Jaheer
‎2009 Jan 07 8:46 AM
Hi Jaheer,
Use this code:-
Declare:-
DATA : FLDNAME(25),
FLDVALUE(25).
In 'AT LINE-SELECTION'.
AT LINE-SELECTION.
GET CURSOR FIELD FLDNAME VALUE FLDVALUE.
CASE FLDNAME.
WHEN <field1_name> or <field2_name>.
"process further list
WHEN OTHERS.
"display error message
ENDCASE.
Now when you click on any line GET CURSOR will retail the values of field_name and field_value in the used variables and the case the field_name, so that only valid entry by-pass to the next level of information.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
‎2009 Jan 07 8:37 AM
Hi,
I assume that you want to restrict the interaction to a particular field or particular line.
If I'm right, then
Here assume that the filed you want to click is of a wor area 'wa_tab' and field name id 'field1'
AT LINE-SELECTION.
GET CURSOR FIELD w_field. "A variable
CASE w_field.
WHEN 'WA_TAB-FIELD1'.
"Take to the next report
ENDCASE.Hope this helps you.
Regards,
Manoj Kumar P
‎2009 Jan 07 8:39 AM
Check in your User Command for the value that is returned when the User double clicks.
You could validate it. You will also have the type of line clicked. Check the parameters.
‎2009 Jan 07 8:43 AM
Hi,
Check the following code:
DATA: int TYPE i,
rspar LIKE rsparams OCCURS 10 WITH HEADER LINE.
RANGES seltab FOR int.
WRITE: 'Select a Selection!',
/ '--------------------'.
SKIP.
FORMAT HOTSPOT COLOR 5 INVERSE ON.
WRITE: 'Selection 1',
/ 'Selection 2',
/ 'Selection 3',
/ 'Selection 4'.
AT LINE-SELECTION.
CASE sy-lilli.
WHEN 4.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
WHEN 5.
CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
WHEN6.
CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.
ENDCASE.
Regards,
Bhaskar
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:17 PM
‎2009 Jan 07 8:46 AM
Hi Jaheer,
Use this code:-
Declare:-
DATA : FLDNAME(25),
FLDVALUE(25).
In 'AT LINE-SELECTION'.
AT LINE-SELECTION.
GET CURSOR FIELD FLDNAME VALUE FLDVALUE.
CASE FLDNAME.
WHEN <field1_name> or <field2_name>.
"process further list
WHEN OTHERS.
"display error message
ENDCASE.
Now when you click on any line GET CURSOR will retail the values of field_name and field_value in the used variables and the case the field_name, so that only valid entry by-pass to the next level of information.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
‎2009 Jan 07 9:34 AM
Hi,
Let me explain my requirement.
Report title
-
404000
-
405000
-
This is my basic list. When I click 404000, it should go to next report. But I click report title, it is going to next level report.But my requirement is it should not go next level report when I click report title.
Hope it clears...
Jaheer
‎2009 Jan 07 9:42 AM
hi,
refer to this code
DATA :val(18) TYPE c.
DATA: BEGIN OF i_mara OCCURS 0,
matnr(18) TYPE c,
ernam LIKE mara-ernam,
mtart LIKE mara-mtart,
meins LIKE mara-meins,
END OF i_mara.
DATA : BEGIN OF i_makt OCCURS 0,
matnr(18) TYPE c,
maktx LIKE makt-maktx,
END OF i_makt.
DATA: BEGIN OF i_marc OCCURS 0,
matnr(18) TYPE c,
werks LIKE marc-werks,
ekgrp LIKE marc-ekgrp,
END OF i_marc.
DATA v1 LIKE i_mara-matnr.
*selection screen layout.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK blk1.
START-OF-SELECTION.
SELECT matnr ernam mtart meins
FROM mara
INTO CORRESPONDING FIELDS OF i_mara
WHERE matnr IN s_matnr.
APPEND i_mara.
CLEAR i_mara.
ENDSELECT.
LOOP AT i_mara.
SELECT matnr maktx
FROM makt
INTO CORRESPONDING FIELDS OF i_makt
WHERE matnr = i_mara-matnr.
APPEND i_makt.
CLEAR i_makt.
ENDSELECT.
ENDLOOP.
WRITE:/1'Material Number',
20 'Name',
45 'Material type',
73 'Unit'.
LOOP AT i_mara.
WRITE:/1 i_mara-matnr,
20 i_mara-ernam,
45 i_mara-mtart,
73 i_mara-meins.
ENDLOOP.
CLEAR : i_mara, i_makt.
AT LINE-SELECTION.
if sy-lsind = 1.
GET CURSOR VALUE val.
LOOP AT i_makt WHERE matnr = val.
WRITE:/ i_makt-matnr,
i_makt-maktx.
ENDLOOP.
else.
........
endif.
thanks
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:18 PM
‎2009 Jan 07 8:53 AM
Hi,
u r problem is when u click on a particular field it should go to next level,for that one better option
is to display report output using 'REUSE_ALV_GRID_DISPLAY' put hotspot option for the field for
which u want to provide interactive
(OR)
USE HIDE fIELD1 OPTION AFTER WRITE statement .
Thanks & Regards,
Sateesh.