도움 요청 드립니다.
우선
w1, w2, w3 라는 세개의 테이블이 있습니다.
w1 > w2로 값을 넣어주고...
w2 에서 on change of 로 첫번째 필드에 특정 값을 넣어 modify 해준후..
w2 > w3에 값을 넣어 줍니다. 이후 w1, w2는 refresh, clear가 됩니다.
이를 반복 했을 때에...on change of 는 한번밖에 실행이 되지 않습니다.
on change of f1 구분은 f1이 바뀌는 첫번째 값을 타게 되는데...
이때, 첫번째란 값은 어떤 시스템 값인가요? 이걸 refresh해서 사용하면 될꺼 같은데요..
on change of 가 여러번 실행 될수 있도록 하는 방법 부탁 드립니다!!
댓글 2
-
정군
2009.09.16 16:36
-
Risky
2009.09.16 18:23
Here we will start a list of frequently asked questions and their answers that don't belong on the general forum.
- How are "on change of" and "at end of" different?
- Event block "ON CHANGE OF" is now one of obsolete ABAP constructs. That's how it works: when execution reaches "on change of" the variable of question is compared with another hidden variable of the same type. And if the comparison failed then the block between ON and ENDON is executed and new value of the variable is stored in the hidden variable. Thus you can see that ON CHANGE OF always works at first comparison but the only case when the compared variable has initial value.
- AT END OF event block can only be used inside LOOPs, moreover you should not use it in LOOPs which have WHERE clause or the result will be unpredictable. Before use AT END OF (or AT NEW) make sure your internal table is sorted. AT END OF will work at the end of contiguos sequence of table records with the same value of field in question. But note that AT END OF will also work if any of the fields to the left has changed its value.
- Also:
- AT FIRST works at the very first loop pass, and AT LAST works at the last loop pass.
- How are "on change of" and "at end of" different?
loop 안에서 사용하시는 것이라면 AT을 쓰는게 맞는 거 같습니다.
Note
There are special control structures for processing control breaks in LOOP s on internal tables or extract datasets (AT).
라고 되어 있군요.
AT NEW f
를 사용해 보세요.