Application Development 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: 

Secondary List

Former Member
0 Kudos

Hi all,

I want to create a secondary list for my o/p of a report.how to use hide statement..

my requirement:

write : / ekko-ebeln.

so now i will get a list of PO numbers..i want to place a hotspot

FORMAT HOTSPOT ON COLOR COL_KEY.

write 😕 ekko-ebeln.

FORMAT HOTSPOT OFF.

Now i m getting the HAND symbol when ever i move my cursor near to PO numbers in o/p...

Now i need to write logic whenever i click on that particular PO it should open its details(line item etc)..getting line items logic i have placed in

PERFORM GET_DETAILS.

but i can i know that the user have selected that particular PO and at runtime where it is stored and how can i display line item details in other screen..

Please help...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi srikanth

check the program DEMO_LIST_HIDE for hide technique.

HIDE: hide statement buffers the record temporarily that is selected by the user in the previous list,which is then compared at the next level for corresponding details to be displayed.

Check this for HIDE.

http://www.sap-img.com/abap/a-sample-hide-get-cursor-in-interactive-programming.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbabf135c111d1829f0000e829fbfe/content.htm

and have look on this also


*&---------------------------------------------------------------------*
*& Report SAPMZMMPO
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
 
REPORT SAPMZMMPO no standard page heading.
 
tables: ekko.
 
DATA: f(40) TYPE c, off TYPE i, lin TYPE i, val(10) TYPE c, len TYPE i.
 
data: begin of iekko occurs 0,
bukrs like ekko-bukrs,
bsart like ekko-bsart,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
ebeln like ekko-ebeln,
lifnr like ekko-lifnr,
bedat like ekko-bedat,
end of iekko.
 
data: begin of iekpo occurs 0,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
meins like ekpo-meins,
netpr like ekpo-netpr,
matkl like ekpo-matkl,
werks like ekpo-werks,
lgort like ekpo-lgort,
eeind like rm06e-eeind,
end of iekpo.
 
data: begin of ilfa1 occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
stras like lfa1-stras,
ort01 like lfa1-ort01,
end of ilfa1.
 
*parameters: p_ebeln like ekko-ebeln default '4500006130'.
select-options: s_ebeln for ekko-ebeln DEFAULT '4500006130' TO '4500006135'
OPTION bt SIGN i.
*start-of-selection.
 
start-of-selection.
 
select bukrs bsart ekorg ekgrp ebeln lifnr bedat
from ekko into corresponding fields of table iekko
where ebeln in s_ebeln.
 
loop at iekko.
write:/ iekko-ebeln HOTSPOT COLOR 5 INVERSE ON,
iekko-lifnr HOTSPOT COLOR 3 INVERSE ON ,
iekko-bukrs,iekko-bsart,iekko-ekorg,iekko-ekgrp.
hide: iekko-ebeln,iekko-lifnr.
endloop.
 
* iekko-lifnr,iekko-ebeln.
 
at line-selection.
 
GET CURSOR FIELD f VALUE val .
* WRITE: / 'Field: ', f,
* / 'Offset:', off,
* / 'Line: ', lin,
* / 'Value: ', (10) val,
* / 'Length:', len.
 
case sy-lsind.
 
when 1.
 
*if val = iekko-ebeln.
if f = 'IEKKO-EBELN'.
select ebeln ebelp menge meins lgort werks
matnr matkl netpr from ekpo
into corresponding fields of table iekpo
where ebeln = iekko-ebeln.
* for all entries in iekko where ebeln = iekko-ebeln.
loop at iekpo.
write:/ iekpo-ebelp,iekpo-matnr,iekpo-menge,iekpo-meins,
iekpo-werks,iekpo-lgort,iekpo-matkl,iekpo-netpr.
endloop.
endif.
*if val = iekko-lifnr.
if f = 'IEKKO-LIFNR'.
select lifnr name1 stras ort01 from lfa1
into corresponding fields of table ilfa1
where lifnr = iekko-lifnr.
loop at ilfa1.
write:/ ilfa1-lifnr,ilfa1-name1,ilfa1-stras,ilfa1-ort01.
endloop.
endif.
 
when others.
leave screen.
endcase.
 

Regards

Rk

4 REPLIES 4

Former Member
0 Kudos

Hi,

FORMAT HOTSPOT ON COLOR COL_KEY.

write 😕 ekko-ebeln.

Hide EKKO-EBELN.

FORMAT HOTSPOT OFF.

....

...

At Line-Selection

Select Ebeln

Ebelp

from ekpo

into table t_ekpo

where ebeln = ekko-ebeln.

Loop at t_ekpo into w_ekpo.

Write: / w_ekpo-ebeln, w_ekpo-ebelp.

EndLoop.

or

Data: fnam(15) type c,

fval type ekko-ebeln.

FORMAT HOTSPOT ON COLOR COL_KEY.

write 😕 ekko-ebeln.

FORMAT HOTSPOT OFF.

At line-selection.

Get Cursor Field fnam Value fval.

unpack fval to fval.

Select Ebeln

Ebelp

from ekpo

into table t_ekpo

where ebeln = fval.

Loop at t_ekpo into w_ekpo.

Write: / w_ekpo-ebeln, w_ekpo-ebelp.

Santhosh

Message was edited by:

Kaluvala Santhosh

0 Kudos

Here how can i know which ebeln i have selected??

0 Kudos

Hi,

Internally the system, stores the ebeln in a Area called Hide Area..when you click on a particular ebeln system returns the value into ekko-ebeln..which u can use in the select statement

santhosh

Former Member
0 Kudos

Hi srikanth

check the program DEMO_LIST_HIDE for hide technique.

HIDE: hide statement buffers the record temporarily that is selected by the user in the previous list,which is then compared at the next level for corresponding details to be displayed.

Check this for HIDE.

http://www.sap-img.com/abap/a-sample-hide-get-cursor-in-interactive-programming.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbabf135c111d1829f0000e829fbfe/content.htm

and have look on this also


*&---------------------------------------------------------------------*
*& Report SAPMZMMPO
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
 
REPORT SAPMZMMPO no standard page heading.
 
tables: ekko.
 
DATA: f(40) TYPE c, off TYPE i, lin TYPE i, val(10) TYPE c, len TYPE i.
 
data: begin of iekko occurs 0,
bukrs like ekko-bukrs,
bsart like ekko-bsart,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
ebeln like ekko-ebeln,
lifnr like ekko-lifnr,
bedat like ekko-bedat,
end of iekko.
 
data: begin of iekpo occurs 0,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
meins like ekpo-meins,
netpr like ekpo-netpr,
matkl like ekpo-matkl,
werks like ekpo-werks,
lgort like ekpo-lgort,
eeind like rm06e-eeind,
end of iekpo.
 
data: begin of ilfa1 occurs 0,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
stras like lfa1-stras,
ort01 like lfa1-ort01,
end of ilfa1.
 
*parameters: p_ebeln like ekko-ebeln default '4500006130'.
select-options: s_ebeln for ekko-ebeln DEFAULT '4500006130' TO '4500006135'
OPTION bt SIGN i.
*start-of-selection.
 
start-of-selection.
 
select bukrs bsart ekorg ekgrp ebeln lifnr bedat
from ekko into corresponding fields of table iekko
where ebeln in s_ebeln.
 
loop at iekko.
write:/ iekko-ebeln HOTSPOT COLOR 5 INVERSE ON,
iekko-lifnr HOTSPOT COLOR 3 INVERSE ON ,
iekko-bukrs,iekko-bsart,iekko-ekorg,iekko-ekgrp.
hide: iekko-ebeln,iekko-lifnr.
endloop.
 
* iekko-lifnr,iekko-ebeln.
 
at line-selection.
 
GET CURSOR FIELD f VALUE val .
* WRITE: / 'Field: ', f,
* / 'Offset:', off,
* / 'Line: ', lin,
* / 'Value: ', (10) val,
* / 'Length:', len.
 
case sy-lsind.
 
when 1.
 
*if val = iekko-ebeln.
if f = 'IEKKO-EBELN'.
select ebeln ebelp menge meins lgort werks
matnr matkl netpr from ekpo
into corresponding fields of table iekpo
where ebeln = iekko-ebeln.
* for all entries in iekko where ebeln = iekko-ebeln.
loop at iekpo.
write:/ iekpo-ebelp,iekpo-matnr,iekpo-menge,iekpo-meins,
iekpo-werks,iekpo-lgort,iekpo-matkl,iekpo-netpr.
endloop.
endif.
*if val = iekko-lifnr.
if f = 'IEKKO-LIFNR'.
select lifnr name1 stras ort01 from lfa1
into corresponding fields of table ilfa1
where lifnr = iekko-lifnr.
loop at ilfa1.
write:/ ilfa1-lifnr,ilfa1-name1,ilfa1-stras,ilfa1-ort01.
endloop.
endif.
 
when others.
leave screen.
endcase.
 

Regards

Rk