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

hide statment

Former Member
0 Likes
1,291

hi,

I want know why hide statment behaves differently

when i put this before the write statment.

Thanks & Regards,

Radhakrishna.

12 REPLIES 12
Read only

Former Member
0 Likes
1,248

Hi

For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event.

the list will be generated after the write statement.

so Hide before the write statement is meaningless

Read only

Former Member
0 Likes
1,248

Hi,

Read the Hide help .

HIDE f.

The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Constants in the HIDE Area.

Effect

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.

The selection can be made using:

AT LINE-SELECTION

AT PFx

AT USER-COMMAND

READ LINE

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).

System fields that are particularly useful in interactive reporting are listed in the system fields for lists documentation.

Note

You cannot save lines or components of lines of an internal table that is addressed using a field symbol to the HIDE area. (Compare the ASSIGNING addition to the READ and LOOP statements). Assign the contents of the line or component to a global variable and save this instead.

Exceptions

Non-Catchable Exceptions

Cause: The field is too long for HIDE.

Runtime Error: HIDE_FIELD_TOO_LARGE

Cause: Cannot apply HIDE to a table line or component of a table line.

Runtime Error: HIDE_ILLEGAL_ITAB_SYMBOL

Cause: HIDE is not possible in a local field.

Runtime Error: HIDE_NO_LOCAL: HIDE

Cause: HIDE is not possible on an empty page.

Runtime Error: HIDE_ON_EMPTY_PAGE

Just select hide and click on F1. (it will give the help)

regards

vijay

Read only

Former Member
0 Likes
1,248

Can you provide your code which behaves differently?

Read only

0 Likes
1,248

hi Wenceslaus ,

data : begin of t_posnr occurs 0,

posnr like vbap-posnr,

end of t_posnr.

select-options : s_vbeln for vbak-vbeln.

START-OF-SELECTION.

SET PF-STATUS 'YRK'.

loop at s_vbeln.

hide s_vbeln-low.

write : / s_vbeln-low.

endloop.

CLEAR P_TEST.

at line-selection.

select posnr into table t_posnr from vbap where vbeln eq s_vbeln-low.

loop at t_posnr.

write 😕 t_posnr-posnr.

endloop.

IN this when press one sales order number i am getting

result of below sales order numer item detials .

why it's happening like that?

pls tell me how to debug hide area??

*

*

Read only

0 Likes
1,248

Hi

HIde statement stores the values of the row according to the cursor position. That's why it is giving the previous values because while excuting the current line it has the values of the previous line

Read only

0 Likes
1,248

Hi,

you should use Hide after the write statement, but you are using before write statement, so you will always get the values differently..

it should be otherway...

loop at s_vbeln.
write : / s_vbeln-low.
hide s_vbeln-low.
endloop.

Read only

0 Likes
1,248

Unless there is some value in the screen you cannot make it available to the buffer using the HIDE statement.

So, it is mandatory to have HIDE ONLY AFTER THE WRITE statement.

Read only

Former Member
0 Likes
1,248

HI Radha

can you send your code

Read only

Former Member
0 Likes
1,248

<b>The HIDE statement should be executed immediately at the statement that has set the list cursor in the row.

HIDE in an empty page is not possible.</b>

You can modify your code as:

data : begin of t_posnr occurs 0,

posnr like vbap-posnr,

end of t_posnr.

select-options : s_vbeln for vbak-vbeln.

START-OF-SELECTION.

SET PF-STATUS 'YRK'.

loop at s_vbeln.

<b> write : / s_vbeln-low.

hide s_vbeln-low.</b>

endloop.

CLEAR P_TEST.

at line-selection.

select posnr into table t_posnr from vbap where vbeln eq s_vbeln-low.

loop at t_posnr.

write 😕 t_posnr-posnr.

endloop.

Read only

0 Likes
1,248

hi Wenceslaus,

U r absolutely true, I am also aware of that.

but my question is y its behaves differently when i put before the write statement.

I think there will be some technical reason behind this, I am trying to debug hide area but i can't find?

thats the reason i posted it.

Thanks & Regards,

Radhakrishna.

Read only

Former Member
0 Likes
1,248

HI radhakrishanan

I have given you the reason.

Hide statement stores - in the current list level - the content of the variable dobj together with the current list line whose line number is contained in sy-linno. The data type of the variables dobj must be flat and no field symbols can be specified that point to rows of internal tables, and no class attributes can be specified. The stored values can be read as follows:

For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event - are assigned to the respective variables.

<b>So the Hide statement stores the values of the current cursor position in the list. You have given the hide before the write statement. so it stores the values of the previous line and comes to teh write statement.</b>

Message was edited by: Harikishore Sreenivasulu

Read only

0 Likes
1,248

You can think of the HIDE area as a table, in which the system stores the names and values of all HIDE fields for each list and line number. As soon as they are needed, the system reads the values from the table.

When you use HIDE the system places the line details into this HIDE area. Hence when you call HIDE the system reads the last line and hence it is mandatory to have a WRITE before it to execute correctly.

Ps: Reward points if helpful.