CL_BFW_WEBRESOURCE_POC - POC Browser Framework: Abstract Superclass Web Resource

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Functionality

The CL_BFW_WEBRESOURCE_POC class serves the central administration of data objects from different sources in the R/3 System. These data objects are from now on referred to as Web resources.

Web resources include:

  • HTML texts
  • MIME objects (images, videos, sounds, and so on)
  • Documents (such as Word, PDF)
  • SAPscript texts
  • And more

The Web resources can originate from different sources. At present, the following sources are supported:

  • WR,,,,SAP Web Repository (transaction SMW0)

  • SSCRIPT,,R/3 SAPscript

  • KP,,,,R/3 Knowledge Provider (in progress)

  • TEMP,,Temporary storage (not persistent!)

  • External source (such as HTTP). This source is, however, only used as a placeholder for URLs thatdo not point to the R/3 System. This ensures that all URLs can be processed, irrespective of whether the data can be reached or not.

Web resources are always identified by URLs. External resources can have URLs in the usual format, suchas "http://www.sap-ag.de/index.html". To access Web resources on the R/3 database, however, the following naming convention must be applied:

SAPR3-<quelle>-<name>

This means that all URLs that point to objects in the R/3 System must start with SAPR3 and are followed by the source of the object, separated by a hyphen. The sourcesyou can use at present are listed above (see abbreviated source names in bold). The source is followed by the name of the "file", again separated by a hyphen. The file name is source-specific.

You can use class methods to create new Web resources or read existing resources from the database,always passing on an URL. The system then returns a reference to the instantiated object. The object offers various methods for data manipulation.

Relationships

The cl_bfw_webresource_poc is an abstract superclass for specific subclasses that implement the functions of individual sources. The following subclasses have been implemented:

  • cl_bfw_webresource_wr_poc
  • cl_bfw_webresource_temp_poc
  • cl_bfw_webresource_sscript_poc
  • cl_bfw_webresource_ext_poc

The classes are created dynamically depending on the URL. For this reason, you can add any number ofsources by simply inheriting other classes from cl_bfw_webresource_poc. The naming convention cl_bfw_webresource_<source>_poc must be followed.

The dynamic instantiation is made by the cl_bfw_webresource_manager__poc class (delegated bycl_bfw_webresource_poc).

Example

data: o_webres type ref to cl_bfw_webresource_poc.

* Creating a temporary Web resource
call method cl_bfw_webresource_poc=>create
     exporting  url  = 'SAPR3-TEMP-ABC.HTML'
     importing  o_webresource = o_webres.

* ...Or loading a persistent Web resource from the Web Repository:
call method cl_bfw_webresource_poc=>get
     exporting  url = 'SAPR3-WR-bild.jpg'
     importing  o_webresource = o_webres.

* Reading data
call method o_webres->get_data
     importing data = ....

Notes

Further information

See the documentation for classes cl_bfw_webresource_wr_poc, cl_bfw_webresource_temp_poc,cl_bfw_webresource_sscript_poc, cl_bfw_webresource_ext_poc, andcl_bfw_webresource_manager_poc


rdisp/max_wprun_time - Maximum work process run time   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.


Length: 4396 Date: 20120526 Time: 091854     triton ( 143 ms )