Show TOC

Client Data Bag APILocate this document in the navigation structure

The EPCF Client Data Bag API provides methods to store data in a transient data buffer on the client. For background information, see Client Data Bag .

EPCM.storeClientData(nameSpace, name, value)

This method saves the value parameter under a key, which is a concatenation of the nameSpace and name parameters. If the key already exists, the stored data is overwritten.

Sample Code
                  <SCRIPT language ="JavaScript">
  var selectedPerson = "John Doe"
  EPCM.storeClientData( "urn:com.sap.myObjects", "person",
  selectedPerson );
</SCRIPT>

               

EPCM.loadClientData(nameSpace, name)

Retrieves the data stored under the key, which is a concatenation of the nameSpace and name parameters. If the key does not exist, the method returns null .

Sample Code
                  <SCRIPT language ="JavaScript">
  var person=EPCM.loadClientData("urn:com.sap.myObjects", "person");
  if ( person != null ){
  /* process person */
  }
</SCRIPT>

               

EPCM.deleteClientData(nameSpace, name)

This method deletes the key, which is a concatenation of the nameSpace and name parameters.

Sample Code
                  <SCRIPT language ="JavaScript">
  EPCM.deleteClientData( "urn:com.sap.myObjects", "person" );
</SCRIPT>