Skip to Content
0
Former Member
Nov 27, 2006 at 03:47 AM

Concept of hide and clear

118 Views

Problem understanding hide and clear concept...

for example, in the code below, it works fine with the write statement and have no problem with the output value when use the back button.

however, when i use it to call a transaction (eg. mm03) and pass the value over, it seems to be a value behind (eg. when i click on row1, it gives a previously stored value. Press back button and when i click on row2, it gives me value of 1. Press back button and when i click on row5, it gives me value of 2. so the clear doesn't seem to "clear")

what could be the problem? hope to understand this concept of hide and clear better (eg. when to clear?)...

Cheers,

Charles

ABAP newbie 😊

DATA number(18) TYPE c. 

START-OF-SELECTION. 
  CLEAR number. 
  DO 9 TIMES. 
    WRITE: / 'Row', (2) sy-index. 
    number = sy-index. 
    HIDE number. 
  ENDDO. 

AT PF8. 
  CHECK NOT number IS INITIAL. 
  CALL TRANSACTION 'MM03'. 
  SET PARAMETER ID 'MAT' FIELD number. 
  CLEAR number. 

*  WRITE: / 'Cursor was in row', (2) NUMBER.