Show TOC

Syntax documentationClient Data Bag API Locate 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.

Example Example

  1. <SCRIPT language ="JavaScript">
      var selectedPerson = "John Doe"
      EPCM.storeClientData( "urn:com.sap.myObjects", "person",
      selectedPerson );
    </SCRIPT>
    
End of the code.
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.

Example Example

  1. <SCRIPT language ="JavaScript">
      var person=EPCM.loadClientData("urn:com.sap.myObjects", "person");
      if ( person != null ){
      /* process person */
      }
    </SCRIPT>
    
End of the code.
EPCM.deleteClientData(nameSpace, name)

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

Example Example

  1. <SCRIPT language ="JavaScript">
      EPCM.deleteClientData( "urn:com.sap.myObjects", "person" );
    </SCRIPT>
    
End of the code.