首页 > 应用开发 > IT综合 > BAdI: Web Item
Use
This Business Add-In (BAdI) can be utilized in the usage of documents on BW objects.
With this BADI you are able to change HTML created from "Document Lists" items or specify it entirely yourself.
Specifically you can change the HTML for
Use:
Standard settings
The BAdI can be used more than once and is not dependent on a filter.
Activities
After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.
If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:
Example
Again you can find examples in the method documentation for the IF_EX_RSOD_ITEM_DOC_LIST interfaces.
Also see:
Methods
Change the context (selection) output
Modify the output of the "Additional Functions" pushbutton
Modify the overall output of the item
***************************************************
You can use this method to modify the context output (of the selection) for the item.
You can change the HTML coding in parameter C_HTML or you can formulate it yourself completely.
Extensive documentation is available for the following parameters in the CHANGE_RENDERING method:
C_T_HTML: HTML generated from the item for the context
Here, the HTML coding is stored in a table. A row exists in table C_T_HTML for each dropdown box in the context. Each row has two entries:
You can delete and insert rows and also change the content within a row. The changed table is displayed from the item using a HTML table.
***************************************************
You can use this method to modify the output of the "Additional Functions" pushbutton.
You can change the HTML coding in parameter C_HTML or you can formulate it yourself completely.
Extensive documentation is available for the following parameters in the CHANGE_RENDERING method:
C_HTML HTML generated from the item for the document list
This can be changed and/or added to.
***************************************************
You can use this method to change the HTML generated from the "List of Documents" item or to formulate it completely yourself.
The HTML coding in parameter C_HTML is changed or formulated completely by you.
I_R_PAGE: Reference to the page, that is, to the Web application template.
For example, you can use method I_R_PAGE->GET_TEMPLATE_NAME to get the technical name of the template.
I_R_ITEM: Reference to the item "List of Documents".
You can use attribute I_R_ITEM->N_NAME to access the name of the item (as maintained in the Web Application Designer).
Additionally, you can also use attribute I_R_ITEM->N_R_ATTRIBUTE to access the attributes of the items. In the following example, the system gets the value of the parameter SHOW_PROPERTIES (properties are displayed):
L_SHOW_PROPERTIES = I_R_ITEM->N_R_ATTRIBUTE->GET( ID = I_R_ITEM->C_PARAMETER_SHOW_PROPERTIES).
Additional properties of the item:
The following item methods are of interest here:
I_R_CONTEXT: Reference for documents selection. The following methods are of interest here:
The following parameters contain the fragments of the HTML coding. These HTML fragments in this method can be displayed in a different order or with a different layout using HTML tables.
I_HTML_BACK: HTML Coding for the pushbutton "Close and Back"
I_T_HTML_SEARCH: HTML Coding for the search
I_T_HTML_CONTEXT: HTML Coding for the context (the selection). This coding conists of a table with two columns. The first column contains the labels- the second one contains the dropdown boxes. The item displays this information using an HTML table.
I_HTML_FUNCTIONS: HTML Coding pushbutton "Additional Functions". This coding consists of a table with one column. The item displays this information using an HTML table.
I_HTML_LIST: HTML Coding of document list.
C_HTML: HTML generated from item as string.
This can be changed or enhanced. For example, you can create an HTML table with 2 cells. You add the HTML code generated from the item into the first cell. In the second cell you add your own specific HTML. You then return the entire HTML code in parameter C_HTML.
***************************************************
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7941665/viewspace-970846/ ,如需转载,请注明出处,否则将追究法律责任。