
The GET_HISTORY_ID method of the service object determines a global history ID. Either one reference to a data object or an individual string as history ID (history_txt) must also be transferred as the importing parameter. If a data object is specified, this must have a direct or indirect reference to an elementary dictionary type (data element), since the parameter ID specified for this data element is used as the history ID. For example, a reference to a data object with a reference to an elementary component in a Dictionary structure ( DATA: var TYPE strucname-compname) or a data object with a direct reference to a data element ( DATA: var TYPE dtelname) can be transferred.
Parameters and Exceptions
|
Importing Parameter: |
|
|
DATA_OBJECT_REF |
Reference to a data object |
|
HISTORY_TXT |
History ID |
|
Returning Parameter: |
|
|
HISTORY_ID |
Global History ID |
|
Exceptions: |
|
|
CX_BSP_SERVICES_PARAM |
|
|
CX_BSP_SERVICES_NOTFOUND |
Event OnInitialization
* declaration
data: dataref type ref to data.
data: flightstruct type sflight.
* fill data reference
get reference of flightstruct-carrid into dataref.
* get global history id
try.
carrid_his = runtime->ddic_utils->get_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.Carrid'.
endtry.
Layout
<form method="post">
<input type="text"
name="carrid_value"
vcard_name=" <%=carrid_his%> "
value=" " />
<input type="submit"
name="OnInputValue(OK)"
value="OK"/>
</form>