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

interactive list

Former Member
0 Likes
813

hi all

how r u?

i have made a report which shows the following output

doc no----


matirial no

now i want to show the doc no detail

so i want to try that

when i clik on doc no it shud save only doc no

and when i click on matirial number then it shud save only matrial number

i hav tried read line but it saves the whole line

and also can we know which field of the line has been selected???

plz explain with eamples and step by step

points wil b rewarded.

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
795

Hi

Sure, check this example. This will only allow selection on lines items = 1

report zrich_0002 no standard page heading.

data: iekpo type table of ekpo with header line.

data : cursor_field(30),

field_value(30) .

start-of-selection.

select * into corresponding fields of table iekpo

from ekpo up to 100 rows.

loop at iekpo.

if iekpo-ebelp = '1'.

format hotspot on.

write:/ iekpo-ebeln, iekpo-ebelp.

hide iekpo-ebeln.

format hotspot off.

else.

write:/ iekpo-ebeln, iekpo-ebelp.

endif.

endloop.

at line-selection.

set parameter id 'BES' field iekpo-ebeln.

call transaction 'ME23' and skip first screen.

<b>Reward if usefull</b>

8 REPLIES 8
Read only

Former Member
0 Likes
795

HI,

in that case use GET CURSOR...

rgds,

bharat.

Read only

0 Likes
795

HI BHARAT

can u explaint how to use

get cursor wid an exaxmple?

Read only

0 Likes
795

HI,

see this simple interactive example.

data:matnr(18) value 'abcd'.

data:ernam(18) value 'bharat'.

data:fld(30).

data:val1(30).

write:/ matnr,ernam.

at LINE-SELECTION.

get cursor field fld.

write:/ 'you have clicked on',fld.

get cursor field fld value val1.

WRITE:/ val1.

rgds,

bharat.

Read only

Former Member
0 Likes
796

Hi

Sure, check this example. This will only allow selection on lines items = 1

report zrich_0002 no standard page heading.

data: iekpo type table of ekpo with header line.

data : cursor_field(30),

field_value(30) .

start-of-selection.

select * into corresponding fields of table iekpo

from ekpo up to 100 rows.

loop at iekpo.

if iekpo-ebelp = '1'.

format hotspot on.

write:/ iekpo-ebeln, iekpo-ebelp.

hide iekpo-ebeln.

format hotspot off.

else.

write:/ iekpo-ebeln, iekpo-ebelp.

endif.

endloop.

at line-selection.

set parameter id 'BES' field iekpo-ebeln.

call transaction 'ME23' and skip first screen.

<b>Reward if usefull</b>

Read only

0 Likes
795

hi naresh

set parameter id 'BES' field iekpo-ebeln.

can u explain this statement

Read only

paruchuri_nagesh
Active Contributor
0 Likes
795

hi

&----


*& Report ZPRG6 *

*& *

&----


*& *

*& *

&----


REPORT ZPRG6 .

tables: kna1, vbak, vbap.

select-options: s_kunnr for kna1-kunnr.

data: begin of itab occurs 0,

kunnr like kna1-kunnr,

name like kna1-name1,

end of itab.

data: begin of jtab occurs 0,

vbeln like vbak-vbeln,

netwr like vbak-netwr,

end of jtab.

data: begin of ktab occurs 0,

posnr like vbap-posnr,

matnr like vbap-matnr,

end of ktab.

data: v_fnam(10), v_fval(10).

start-of-selection.

select kunnr name1 from kna1 into table itab where kunnr in s_kunnr.

loop at itab.

write:/ itab-kunnr hotspot, itab-name.

hide itab-kunnr.

endloop.

at line-selection.

case sy-lsind.

when 1.

select vbeln netwr from vbak into table jtab where kunnr = itab-kunnr.

loop at jtab.

write:/ jtab-vbeln hotspot, jtab-netwr.

hide jtab-vbeln.

endloop.

when 2.

select posnr matnr from vbap into table ktab where vbeln = jtab-vbeln.

loop at ktab.

write:/ ktab-posnr, ktab-matnr hotspot.

endloop.

when 3.

get cursor field v_fnam value v_fval.

set parameter id 'MAT' field v_fval.

call transaction 'MM02'.

endcase.

top-of-page.

write:/ 'Custom Deatils Report'.

top-of-page during line-selection.

case sy-lsind.

when 1.

write:/ 'Sales Details Report'.

when 2.

write:/ 'Item Details Report'.

endcase.

reward for use ful points

regards

Nagesh.Paruchuri

Read only

Former Member
0 Likes
795

hI

You do like this, declare one variable CURSORFIELD of type string.

Then after statment AT LINE-SELECTION.

write this statment.

GET CURSOR FIELD CURSORFIELD.

Now check the value of CURORFIELD i.e.

IF CURSORFIELD is 'ITAB-MATNR'(i.e. the name of field for which you want to make INteractive list.

and inside this IF and ENDIF you write your all write statments.

ENDIF.

<b>REWARD IF USEFULL</b>

Read only

0 Likes
795

thanx all

i wil try all this

thanx all for ur kind support