‎2007 Oct 17 11:41 AM
both Get Cursor and HIDE are used to stored record of a field and goes to secondary list .
then wt is the difference between GET CURSOR V/S HIDE.
‎2007 Oct 17 11:42 AM
‎2007 Oct 17 11:43 AM
‎2007 Oct 17 11:45 AM
Hi Sandeep
Have a Look on the links:
GET CURSOR
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/get_curs.htm
HIDE
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/hide.htm
Regards,
Sree
‎2007 Oct 17 11:50 AM
check the program DEMO_LIST_HIDE for hide technique.
DEMO_LIST_GET_CURSOR for get cursor 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.
GET CURSOR: stores the value in the variable we declare in our code.
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.
*************************************
GET CURSOR : Transfers the name of the field at the cursor position to the field f.
DATA: CURSORFIELD(20),
GLOB_FIELD(20) VALUE 'global field',
REF_PARAMETER(30) VALUE 'parameter by reference',
VAL_PARAMETER(30) VALUE 'parameter by value',
FIELD_SYMBOL(20) VALUE 'field symbol'.
FIELD-SYMBOLS: <F> TYPE ANY.
PERFORM WRITE_LIST USING REF_PARAMETER VAL_PARAMETER.
ASSIGN GLOB_FIELD TO <F>.
AT LINE-SELECTION.
GET CURSOR FIELD CURSORFIELD.
WRITE: / CURSORFIELD, SY-SUBRC.
FORM WRITE_LIST USING RP VALUE(VP).
DATA: LOK_FIELD(20) VALUE 'local field'.
ASSIGN FIELD_SYMBOL TO <F>.
WRITE: / GLOB_FIELD, / LOC_FIELD,
/ RP, / VP,
/ 'literal', / FIELD_SYMBOL.
ENDFORM.
HIDE : The contents of f related to the current output line are stored. If this line is selected, f is filled automatically with the stored value.
You do not have to output the field with WRITE in order to be able to store its value.
The HIDE statement does not support structures that contain tables (deep structures).
‎2007 Oct 19 5:00 AM