‎2008 Jun 05 10:15 AM
in interactive reporting what statement/keyword is to be given so that the secondary list is displyed only through one particular field and not by other fields of the primary/basic list.
‎2008 Jun 05 10:47 AM
USE
GET CURSOR FILED f VALUE v.
AND CHECK THIS FIELD f NE TO some filed on which u wants to goto sencondary list.
if so do nothig.
declare these fields f and v.
if u didn't get just debug and check.
‎2008 Jun 05 10:16 AM
Hi Ayesha,
Welcome to SDN.
You can use HIDE for a field which you would like to make use of in fetching secondary list.
Also use
getcursor feild <field name> value <value>
Reward points if this helps,
kiran
‎2008 Jun 05 10:23 AM
thnks fr ur reply...i have used the hide statement but still i am able to go to the secondary list through other fields.
‎2008 Jun 05 10:27 AM
hi,
using hide we get secondary list even if we click on the blank places and other fields but its not recommend as they may lead to error results so they introduced GET CURSOR with the help of it we can restrict the enduser to click only on the particular field and get correct results
hope you understand
reward if helpful
prasanth
Edited by: prasanth kasturi on Jun 5, 2008 11:29 AM
‎2008 Jun 05 10:17 AM
hi,
use get cursor field fname value fval.
see the example code
TABLES: mara, marc, makt.
DATA: wa_mara LIKE mara,
it_mara TYPE TABLE OF mara,
wa_marc LIKE marc,
it_marc TYPE TABLE OF marc,
wa_makt LIKE makt,
it_makt TYPE TABLE OF makt.
DATA: value(20) TYPE c.
data : val(18) type c.
data : v_var(18) type n.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
START-OF-SELECTION.
SELECT * FROM mara INTO TABLE it_mara
WHERE matnr IN s_matnr.
LOOP AT it_mara INTO wa_mara.
WRITE: / wa_mara-matnr COLOR COL_KEY INTENSIFIED ON hotspot on,
wa_mara-ersda COLOR COL_KEY INTENSIFIED ON.
ENDLOOP.
AT LINE-SELECTION.
CASE sy-lsind.
WHEN '1'.
GET CURSOR FIELD value value val.
IF value = 'WA_MARA-MATNR'.
move val to v_var.
SELECT * FROM marc INTO TABLE it_marc
WHERE matnr = v_var.
IF it_marc IS INITIAL.
MESSAGE 'NO RECORDS FOUND' TYPE 'I'.
ELSE.
LOOP AT it_marc INTO wa_marc.
WRITE: / wa_marc-matnr COLOR COL_KEY hotspot on ,
wa_marc-werks COLOR COL_KEY .
ENDLOOP.
ENDIF.
ELSE.
MESSAGE 'CLICK ON THE MATERIAL NUMBER' TYPE 'I'.
ENDIF.
WHEN '2'.
GET CURSOR FIELD value value val.
IF value = 'WA_MARC-MATNR'.
move val to v_var.
SELECT * FROM makt INTO TABLE it_makt
WHERE matnr = v_var.
IF it_makt IS INITIAL.
MESSAGE 'NO RECORDS FOUND' TYPE 'I'.
ELSE.
LOOP AT it_makt INTO wa_makt.
WRITE: / wa_makt-matnr COLOR COL_KEY ,
wa_makt-spras COLOR COL_KEY ,
wa_makt-maktx COLOR COL_KEY .
ENDLOOP.
ENDIF.
ELSE.
MESSAGE 'CLICK ON THE MATERIAL NUMBER' TYPE 'I'.
ENDIF.
ENDCASE.
TOP-OF-PAGE.
WRITE: 'MATERIAL MASTER DETAILS'.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-lsind.
WHEN '1'.
WRITE: 'PLANT DETIALS'.
WHEN '2'.
WRITE: 'MATERIAL DESCRIPTION'.
ENDCASE.
regards
prasanth
‎2008 Jun 05 10:17 AM
‎2008 Jun 05 10:20 AM
Hi,
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SALES'.
GET CURSOR FIELD FNAM VALUE VAL.
IF FNAM = 'W_KNA1-KUNNR'.
SELECT VBELN ERDAT
FROM VBAK
INTO TABLE I_VBAK
WHERE KUNNR = V_VAL.
IF I_VBAK IS INITIAL.
MESSAGE 'NO RECORDS FOUND' TYPE 'I'.
ELSE.
Reward If helpfull.
Naresh
‎2008 Jun 05 10:47 AM
USE
GET CURSOR FILED f VALUE v.
AND CHECK THIS FIELD f NE TO some filed on which u wants to goto sencondary list.
if so do nothig.
declare these fields f and v.
if u didn't get just debug and check.