javaGrowing

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  92 随笔 :: 33 文章 :: 49 评论 :: 0 Trackbacks
Question: Can someone please tell the
difference between using funtion module REUSE_ALV_LIST_DISPLAY
or using class CL_GUI_ALV_GRID with method SET_TABLE_FOR_FIRST_DISPLAY.

Is the function module the old way of using ALV?

regards KIM

Answer:
I think the FM is just a simpler way of doing the same thing, but with fewer options open to you. I tend to use the object oriented way. Once you have done it the first time, it's pretty easy.

Answer:
Hello Kim

Yes function REUSE_ALV_LIST_DISPLAY is the old ALV that used to be only available internally at SAP. It makes use of normal WRITE statements to create the list.

Since 4.6 and the new frontend controls there is now a binary control in the users frontend that you can manipulate with CL_GUI_ALV_GRID. In order to use it successfully you need to be fairly comfortable with object oriented programming. SAP created a function called REUSE_ALV_GRID_DISPLAY (note the GRID not LIST) which is a "wrapper" function for people who are not familiar with OO and the ALV grid.

I strongly suggest that you take the time to get comfortable with OO and create the grid yourself and populate it with the method SET_TABLE_FOR_FIRST_DISPLAY. Do a search on this forum regarding ALV and I would guess 90% of the questions are from people using the function REUSE_ALV_GRID_DISPLAY and not creating the grid themselves. If you don't understand whats happening in the background it becomes quite difficult to debug when something goes wrong.

Regards

Dave
posted on 2008-02-27 16:01 javaGrowing 阅读(339) 评论(0)  编辑  收藏 所属分类: sap

只有注册用户登录后才能发表评论。


网站导航: