Entering content frame

Syntax documentation GET_LOCAL_HISTORY_ID Locate the document in its SAP Library structure

Use

Method GET_LOCAL_HISTORY_ID of the service object defines a local history ID. Either a reference to a data object or a string as history ID (history_txt) must be passed as import parameter. If a data object is passed, it must have a direct or indirect reference to an elementary Dictionary type (data element), since the parameter ID specified is used as the history ID for this data element. For example, the method can pass a reference to a data object that is associated with an elementary component of a Dictionary structure (DATA: var TYPE strucname-compname.) or a data object that directly is associated with a data reference (DATA: var TYPE dtelname.).

Parameters and Exceptions

Import parameters:

 

DATA_OBJECT_REF

Reference to a data object

 

HISTORY_TXT

History ID

Return parameters:

 

HISTORY_ID

Local history ID

Exceptions:

 

CX_BSP_SERVICES_PARAM

 
 

CX_BSP_SERVICES_NOTFOUND

 

Example

Event OnInitialization

* declaration

data: dataref type ref to data.

data: flightstruct type sflight.

 

* fill data reference

get reference of flightstruct-carrid into dataref.

* get local history id

try.

    carrid_local_his   = runtime->ddic_utils->get_local_history_id(

                   data_object_ref    = dataref ).

catch cx_bsp_services into l_ex_services.

*   catch exception into message object

    errortext = l_ex_services->get_text( ).

    call method messages->add_message

         exporting condition = 'HISTORY_ID’

                   message = errortext

                   severity = CL_BSP_MESSAGES=>CO_SEVERITY_ERROR.

    carrid_his = 'sap.myapplication.carrid'.

endtry.

Layout

<form method="post">

    <input type="text"

             name="carrid_value"

             vcard_name=" <%=carrid_local_his%> "

             value=" " />

  <input type="submit"

               name="OnInputValue(OK)"

               value="OK"/>

</form>

See also:

Field History

GET_HISTORY_ID

 

 

Leaving content frame