SAP ABAP Data Element O2BODYWRITER (BSP Element: Manipulation of Element Content)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-BSP (Application Component) Business Server Pages
     SBSP_DEVTAGLIB (Package) Development Environment Objects for Taglib Support
Basic Data
Data Element O2BODYWRITER
Short Description BSP Element: Manipulation of Element Content  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type CHAR1    
Data Type CHAR   Character String 
Length 1    
Decimal Places 0    
Output Length 1    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 Manip. 
Medium 19 Manipulat. Content 
Long 32 Manipulation of Element Content 
Heading  
Documentation

Definition

Activate this option if it is necessary for the BSP element to manipulate its content.

Use

After this option is activated, the interface attribute M_OUT contains a BodyWriter that manages the content of the BSP element. You can use the BodyWriter methods to manipulate the content.

Important: You must redefine the interface method DO_AT_END, in which the content of the BodyWriter is explicitly transferred to the BodyWriter of a surrounding BSP element (see the last two rows in the example). If this is not done, the content of the element is discarded.

Dependencies

Example

The BSP element is to convert its whole content to upper case:

METHOD IF_BSP_ELEMENT~DO_AT_END. 
DATA: l_content TYPE STRING.

l_content = m_out->get_content( ).
TRANSLATE l_content TO UPPER CASE.
m_out->clear( ).
m_out->print_string( l_content ).
m_out->flush_to_previous_writer( ).
ENDMETHOD.
History
Last changed by/on SAP  20040312 
SAP Release Created in 620