How to replace # or Not assigned with blank in WAD

Creating and Using ABAP Classes 

Use

The Web Design API for Tables enables you to modify individual cell data in relation to content, display and navigation options. To do this, you create your own ABAP class that inherits the associated properties and parameters from the class CL_RSR_WWW_MODIFY_TABLE and you redefine one or more methods for this class.

Prerequisites

You have created a Web application that includes the Web item Table and/or the Web item Generic Navigation Block.

Procedure

Create ABAP Class

...

       1.      From the SAP Easy Access screen, choose Tools ® ABAP Workbench ® Development ® Class Builder (transaction SE24). See also Class Builder.

You can also use the Object Navigator from the ABAP Workbench (transaction SE 80) to generate a class. See also Object Navigator.

       2.      To create a new class, under Object Type, enter a technical name for your class (for example, ZCL_RSR_WWW_MODIFY_TABLE) and choose   (Create). The Create Class YourClassName dialog box then appears.

       3.      Save your class. You get to the Object Catalog screen.

       4.      Depending on the system configuration in regard to changes and the transport of objects, either choose a package or save your class as a local object. For more information, speak to your system administrator. The Class Builder: Change Class YOURCLASSNAME screen.

       5.      Choose Superclass on the Properties tab page. Under Inherits from, enter CL_RSR_WWW_MODIFY_TABLE as the superclass.

       6.      To see all of the inherited properties and methods of the class CL_RSR_WWW_MODIFY_CLASS in your ABAP class, choose  (Save).

       7.      On the Methods tab page, choose a method (for example, CHARACTERISTIC_CELL or  GET_CELL_INFO) that you want to redefine and choose  (Redefine).

       8.      To change the implementation of the method, call up the method name by double clicking.

       9.      To get back to the original screen, choose  (Back)

   10.      Save your changes.

   11.      To activate event linking, choose  (Activate).

Using an ABAP Class in a Web Template

To be able to use the ABAP class you created, it must be included in a Web template.

...

       1.      Open your Web template that contains the Web item Table and/or Generic Navigation Block in the BEx Web Application Designer.

       2.      Use the HTML tab page to switch to the HTML view of the Web Application Designer.

       3.      Navigate to the Object Tag of the Web Item Table and/or the Web Item Generic Navigation Block (CL_RSR_WW_ITEM_GRID and/or CL_RSR_WWW_ITEM_NAV_BLOCK) and insert the following parameter line into the HTML:

<object>…

<param name=“MODIFY_CLASS“ value=”YourClassName”/>

…</object>

<object>…

<param name=“MODIFY_CLASS“ value=”ZCL_RSR_WWW_MODIFY_TABLE”/>

…</object>

       4.      Save the changes.

       5.      Execute the Web template in the browser.

Debug ABAP Class

For test purposes, you can debug the ABAP class. By setting breakpoints in the redefined methods and using the ABAP debugger, you can determine when the individual methods are called and which information they provide. To better understand the individual methods, you can redefine the methods for test purposes. You can set a breakpoint on the individual method without inserting code. You can see all values for the parameters assigned to the method in the debugger. See also Debugger.

...

       1.      From the SAP Easy Access screen, choose Tools ® ABAP Workbench ® Development ® Class Builder (transaction SE24).

       2.      Under the object type, enter the name of the ABAP class you created.

       3.      Choose  (Change).

       4.      Double click on one of the methods in the Methods tab page that you have changed when creating your ABAP class.

       5.      To set an external (HTTP)  breakpoint in your method, in the menu, choose Utilities  ® Breakpoints  ® Set/Delete.

·         Two types of breakpoints exist: External (HTTP) Breakpoints enable debugging in the Web browser. Session Breakpoints enable debugging within transactions. BEx Web Applications are usually executed in the Web browser. The query monitor (RSRT2) transaction allows you to display a BEx Web application in the SAP GUI. Depending on how you call up your Web application you can choose the appropriate breakpoint type.

·         To be able to set an external breakpoint, you have to set the external debugging to active. You can set external debugging to active in the menu under Utilities ® Settings... ® ABAP Editor ® Debugging in the External Debugging field.  .

       6.      Close all Web browser windows or query monitor instances (RSRT2) before you call the Web application in which you have included your ABAP class. Otherwise the debugger could not stop at the set breakpoint. 

       7.      Execute the Web application in the Web browser or in the query monitor transaction. You reach the ABAP debugger that stops at the breakpoint you set.

Result

You have created an ABAP class and have redefined one or more methods to specifically change the display of tables and the generic navigation block with the help of the Web Design API for tables.

 

 

转载于:https://www.cnblogs.com/clsoho/archive/2012/09/13/2683253.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值