================ 아래 구문을 봐주세요 ===========================
* 선택라인 가져오기..
CLEAR : gt_row_no, gt_row_no[].
CALL METHOD grf_grid_0101_1->get_selected_rows
IMPORTING
et_row_no = gt_row_no.
=================================================================
안녕하세요~
궁금한것이 있어서 문의드립니다.
한 화면에 텝스트립이 4개이고 각각 서브스크린에 alv grid 가 1개씩 총 4개가 들어갑니다.
그래서
CALL METHOD grf_grid_0101_1->get_selected_rows
에서 " grf_grid_0101_1 " 이 부분을 다이나믹 하게 받고 싶습니다.
잘 안되더라구요..
해결 방법 좀 알려주시면 정말 감사하겠습니다.
감사합니다 ~ !!
좋은 하루 되세요~
댓글 3
-
MadMax
2010.06.22 23:31
-
맑은하늘
2010.06.23 02:48
CLEAR : gt_row_no, gt_row_no[].
CALL METHOD grf_grid_0101_1->get_selected_rows
IMPORTING
et_row_no = gt_row_no.
를 예로 들면 다이나믹도 좋은데요. 그냥 perform 쓰시면 될 것 같네요.
ex) perform 예.
perform get_selected_rows changing grf_grid_0101_1
gt_row_no.
form get_selected_rows changing cl_grid type ref to cl_gui_alv_grid
ct_row_no type table.
clear ct_row_no.
CALL METHOD cl_grid->get_selected_rows
IMPORTING
et_row_no = ct_row_no.
endform.
dynamic 보다는 그냥 편하게 perform 으로 대상 매개변수만 바꾸시는 것이
보시기도 편하고 사용도 그리 어렵지 않아 좋을 것 같습니다. ^^
-
고양이야옹
2010.06.26 01:42
메소드를 다이나믹하게 받는것이 아니라 인스턴스를 다이나믹하게 받고자 하시네요
HELP Call Method 에 자세히 나와 있습니다. 참고하세요..
요약: Method Name 을 변수 처리 하시려면 () 사용.
CALL METHOD - dynamic_meth
Syntax
... (meth_name)
| cref->(meth_name)
| iref->(meth_name)
| (class_name)=>(meth_name)
| class=>(meth_name)
| (class_name)=>meth ... .
Alternatives:
1. ... (meth_name) ... .
2. ... cref->(meth_name) ... .
3. ... iref->(meth_name) ... .
4. ... (class_name)=>(meth_name) ... .
5. ... class=>(meth_name) ... .
6. ... (class_name)=>meth ... .
Effect
: These names are used to dynamically specify methods. For meth_name and class_name, character-type fields are expected, which must contain the name of a method or a class in upper case during the execution of the statement.
Alternative 1
... (meth_name) ... .
Effect
: This form is only possible for methods of the same class
Alternative 2
... cref->(meth_name) ... .
Effect
: This form is possible for all visible methods of objects. cref can be any class reference variable that points to an object that contains the method specified in meth_name.
Alternative 3
... iref->(meth_name) ... .
Effect
: This form is possible for all visible interface methods of objects. iref can be any interface reference variable that points to an object that contains the interface method specified in meth_name.
Note
In contrast to access using class reference variables, interface reference variables can only be used to access interface components, and not to access all components, even with dynamic access.
Alternative 4
... (class_name)=>(meth_name) ... .
Alternative 5
... class=>(meth_name) ... .
Alternative 6
... (class_name)=>meth ... .
Effect
: These forms are possible for all visible static methods. Both the class and method can be dynamically specified. The class class and the method meth can also be specified directly.