08-21-2007 7:30 AM
If we write a hide statement below the 'write' statement ,and before the 'write ' statement what will happen instead of writing exactly in the 'write' statement.
08-21-2007 7:34 AM
Hi
HIDE is used when you are using interactive list. On the list, when you click on some value, you need to store the value in some field. You can use system commands to get the line and read it OR
you can use HIDE statement.
While looping the final table to be written on the list, before the write statement, when you give HIDE statement, then the value gets stored in that variable.
HIDE.
write:/itab-matnr.
Now, the value you clicked on will be stored in itab-matnr.
Regards,
Sankar
08-21-2007 7:34 AM
Hi
HIDE is used when you are using interactive list. On the list, when you click on some value, you need to store the value in some field. You can use system commands to get the line and read it OR
you can use HIDE statement.
While looping the final table to be written on the list, before the write statement, when you give HIDE statement, then the value gets stored in that variable.
HIDE.
write:/itab-matnr.
Now, the value you clicked on will be stored in itab-matnr.
Regards,
Sankar
08-21-2007 7:34 AM
Writing a hide before WRITE 😕 statement maps the value to the previouse line.
Writing a hide before WRITE 😕 statement maps the value to the next line.
08-21-2007 7:36 AM
Sandeep,
HIDE is used in Interactive Reports to store the value of the field on which we click on the report ouput and should be given in a loop.
K.Kiran.
A simple interactive report.
REPORT ZF no standard page heading LINE-SIZE 120 message-id zkk . .
tables: vbak,vbap,mara,ekpo.
data:begin of ivbak occurs 0,
vbeln like vbak-vbeln,
audat like vbak-audat,
ernam like vbak-ernam,
end of ivbak.
data:begin of ivbap occurs 0,
vbeln like vbap-vbeln,
posnr like vbap-posnr,
matnr like vbap-matnr,
end of ivbap.
data:begin of imara occurs 0,
matnr like mara-matnr,
mtart like mara-mtart,
mbrsh like mara-mbrsh,
matkl like mara-matkl,
spart like mara-spart,
end of imara.
data:begin of iekpo occurs 0,
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
bukrs like ekpo-bukrs,
werks like ekpo-werks,
meins like ekpo-meins,
netwr like ekpo-netwr,
end of iekpo.
data: total like ekpo-netwr.
select ebeln ebelp matnr bukrs werks meins netwr from ekpo into table iekpo where matnr = imara-matnr.
selection-screen begin of block test with frame title text-001.
select-options:s_vbeln for vbak-vbeln obligatory.
selection-screen end of block test.
****
*Basic list
****
select vbeln audat ernam from vbak into table ivbak
where vbeln in s_vbeln.
if sy-subrc = 0.
write:/'Date:-',sy-datum. "#EC NOTEXT
write:/'Time:-',sy-timlo. "#EC NOTEXT
write:/'List:-',sy-lsind. "#EC NOTEXT
uline .
WRITE:/1 sy-vline, 'Document No.' color 6, "#EC NOTEXT
15 sy-vline, 'Document Date' color 6, "#EC NOTEXT
30 sy-vline, 'Name of the Person' color 6, "#EC NOTEXT
49 sy-vline.
loop at ivbak.
uline.
write: /1 sy-vline ,
ivbak-vbeln hotspot on,
15 sy-vline,
ivbak-audat,
30 sy-vline,
ivbak-ernam,
49 sy-vline.
hide ivbak-vbeln.
endloop.
uline.
endif.
at line-selection.
***
*List 1.
***
select vbeln posnr matnr from vbap into table ivbap
where vbeln = ivbak-vbeln.
if sy-lsind = 1 .
write:/'Date:-',sy-datum. "#EC NOTEXT
write:/'Time:-',sy-timlo. "#EC NOTEXT
write:/'List:-',sy-lsind. "#EC NOTEXT
uline .
write:/1 sy-vline, 'Document No.' color 6, "#EC NOTEXT
15 sy-vline, 'Item' color 6, "#EC NOTEXT
25 sy-vline, 'Material No.' color 6, "#EC NOTEXT
41 sy-vline.
loop at ivbap.
uline .
write:/1 sy-vline,
ivbap-vbeln,
15 sy-vline,
ivbap-posnr,
25 sy-vline,
ivbap-matnr hotspot on,
41 sy-vline.
hide ivbap-matnr.
endloop.
uline .
endif.
at line-selection.
***
*List 2.
***
select matnr mtart mbrsh matkl spart from mara into table imara
where matnr = ivbap-matnr.
if sy-lsind = 2 .
write:/'Date:-',sy-datum. "#EC NOTEXT
write:/'Time:-',sy-timlo. "#EC NOTEXT
write:/'List:-',sy-lsind. "#EC NOTEXT
uline .
write:/1 sy-vline, 'Material No.' color 6, "#EC NOTEXT
18 sy-vline,'Material Type' color 6, "#EC NOTEXT
34 sy-vline,'Industrial Sector' color 6, "#EC NOTEXT
53 sy-vline,'Material Group' color 6, "#EC NOTEXT
69 sy-vline,'Division' color 6. "#EC NOTEXT
loop at imara.
uline .
write: /1 sy-vline,
imara-matnr hotspot on,
18 sy-vline,
imara-mtart,
34 sy-vline,
imara-mbrsh,
53 sy-vline,
imara-matkl,
69 sy-vline,
imara-spart.
hide imara-matnr.
endloop.
uline.
endif.
at line-selection.
select ebeln ebelp matnr bukrs werks meins netwr from ekpo into table iekpo where matnr = imara-matnr.
if sy-lsind = 3.
if sy-subrc ne 0.
Message I000(zkk).
leave to screen 0.
else.
write:/'Date:-',sy-datum."#EC NOTEXT
write:/'Time:-',sy-timlo."#EC NOTEXT
write:/'List:-',sy-lsind."#EC NOTEXT
uline .
write: /1 sy-vline, 'Pur Doc No.' color 6, "#EC NOTEXT
15 sy-vline, 'Item No. of Pur Doc' color 6, "#EC NOTEXT
35 sy-vline, 'Material No.' color 6, "#EC NOTEXT
53 sy-vline, 'Comp.Code' Color 6, "#EC NOTEXT
65 sy-vline, 'Plant' color 6, "#EC NOTEXT
73 sy-vline, 'Order Unit' color 6, "#EC NOTEXT
85 sy-vline, 'Net Ord Val' color 6, "#EC NOTEXT
103 sy-vline.
loop at iekpo.
uline.
write:/1 sy-vline,
iekpo-ebeln hotspot on,
15 sy-vline,
iekpo-ebelp,
35 sy-vline,
iekpo-matnr,
53 sy-vline,
iekpo-bukrs,
65 sy-vline,
iekpo-werks,
73 sy-vline,
iekpo-meins,
85 sy-vline,
iekpo-netwr left-justified, "#EC UOM_IN_MES
103 sy-vline.
hide iekpo-ebeln.
at end of netwr.
total = total + iekpo-netwr.
endat.
endloop.
uline.
write: /74 'Total:-','Rs.',Total left-justified. "#EC UOM_IN_MES
endif.
endif.
at line-selection.
if sy-lsind = 4.
set parameter id 'BES' field iekpo-ebeln.
call transaction 'ME23N' AND SKIP FIRST SCREEN.
endif.