# Userexits

Functions

## Post-Transition userexits
[Transition userexits]

### Functions
int | xchg_cpl_set_pst (const char *param1, const char *param2)
int | xchg_prd_unt_poa (const char *param1, const char *param2)
int | xchg_std_rel_pst (const char *param1, const char *param2)
int | xcps_grp_cmp_rst_prd (const char *param1, const char *param2)
int | xcps_rst_prd (const char *param1, const char *param2)
int | xedbstr_frr_upd_val (const char *param1, const char *param2)
int | xedbstr_tor_upd_val (const char *param1, const char *param2)
int | xedbusr_frr_upd_val (const char *param1, const char *param2)
int | xedbusr_post_sta_lgv ()
| Post-transition userexit that executes a LogiView procedure.
int | xedbusr_rst_prd (const char *param1, const char *param2)
int | xedbusr_tor_sa_uv (const char *param1, const char *param2)
int | xedbusr_tor_set_acc (const char *param1, const char *param2)
int | xedbusr_tor_upd_val (const char *param1, const char *param2)
int | xtxt_txt_upd_tra (const char *param1, const char *param2)

### Function Documentation

int xchg_cpl_set_pst | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-release transition userexit for Work Sets.

This userexit is called after the transition from "In Work" to "Complete" of a Work Set was done.
It calls a user defined post-release function for each change operation which is assigned to the Work Set (without customization this is the userexit xchg_std_rel_pst).

Parameters:

  context | The transition userexit context.
  param | Parameter to control the behavior of this userexit. Syntax like: "[/NO_INACTIVATE]" with possible arguments:
  /NO_INACTIVATE | from | Do not transfer predecessor to state WITHDRAWN, just update VAL_UNTIL date.

Returns:

  0 | OK
  Else | Error

See also:
  xchg_std_rel_pst

int xchg_prd_unt_poa | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Assigns the predecessor of an object to the "Until" relation.

Parameters:

  usxContext | The userexit context.
  param | Parameter to control the behavior of this function. Syntax like: "[/BYCHAIN|/BYFIELD=<fieldName>][/RESETCUR]" With possible arguments:
  /BYCHAIN |  | The predecessor is found by traversing the version chain.
  /BYFIELD | fieldName | The predecessor is found by selecting objects by a common reference field.
  If none of the two parameters are given, then the following default behavior applies: for objects of the entity EDB-ARTICLE, the key field EDB_ITM_REF is used. This is the same as passing /BYFIELD=EDB_ITM_REF. For all other entities, the version chain for the specific entity is used. This is the same as passing /BYCHAIN. The version chain is found through the VER view.
  /RESETCUR |  | If this parameter is given, the current flag (CUR_FLAG) of the predecessor is set to "false". Normally this is done when versioning an object, but sometimes a new version can also be created by just inserting a new object with a new revision number. The current flag can then explicitly be reset when inactivating the object.

Returns:

  0 | OK
  Else | Error

int xchg_std_rel_pst | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Standard post-release transition userexit for change operations.

This userexit is called for each change operation of a Work Set after a Work Set was completed. It is the default user-defined post-transition function which is executed when no other user defined a post-transition function.

For all new objects (objects which become valid through this change operation), a transition to a released state is executed.

For all obsolete objects (objects which become invalid through this change operation), a transition to an inactive state is executed.

Parameters:

  usxContext | The userexit context.
  param | Parameter to control the behavior of this userexit. Syntax like: "[/FROM=from][/NO_INACTIVATE]" with possible arguments:
  /FROM | from | With this parameter a specific "Valid From" date can be passed to the userexit.
  /NO_INACTIVATE | from | Do not transfer predecessor to state WITHDRAWN, just update VAL_UNTIL date.

Returns:

  0 | OK
  Else | Error

int xcps_grp_cmp_rst_prd | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Transition userexit for class-product component relation.

The userexit resets the predecessor of the class - product component relation.

Parameters:

  context | Transition userexit context
  param | Parameter to control the behavior of this function. Syntax is: "prg_ind /MASK=list" With possible arguments:
  | prg_ind | Progress indicator or precedessor.
  MASK | list | Name of list to use for a product family/product component relation. If not set, the list EDB-CNF-GRP-CMP-RLI is used.

Returns:

  0 | OK
  Else | Error

int xcps_rst_prd | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-transition userexit for product structure element.

Resets the predecessor of the product structure element by executing the transition to the specified state for the predecessor record.

Parameters:

  context | Transition userexit context
  param | Parameter see xedbusr_rst_prd

Returns:

  0 | OK
  1 | Error

See also:
  xedbusr_rst_prd

int xedbstr_frr_upd_val | ( | const char * | param1,
|  | const char * | param2
| ) |  |

This userexit updates the "Valid From/Until" fields of a relation record.

It is called when deactivating a structure record to set the effectivity (VALID_UNTIL) of the record to the intended VALID_UNTIL date.

Input form EDB-VAL-DAT-UNT is displayed and the user can modify the "Valid Until" date. After confirming the date, the field VAL_UNTIL of the relation record is updated.

The date values are also stored in the widget buffer with key `STAVAL`. This key contains a string in the following format: `"/ALL=0|1 /FROM=fromDate /UNTIL=untilDate"`. This mechanism is usually used to re-use date values which have been entered once for all selected records. But it can also be used to set specific dates in batch mode (Parameter /BAT) instead of using the field default values. If this userexit finds the key `STAVAL` in the widget buffer, it uses the values found there.

Parameters:

  usxContext | This is the context for a transition userexit. Unlike DataView action userexit contexts, the first character describing the mode can be either 'y' for a forward transition (new progress indicator > old progress indicator) or 'n' for a backward transition (new progress indicator < old progress indicator). The following characters describe the number of the affected row. Example: "y23", "n4".
  param | Parameter to control the behavior of this userexit. Syntax like: "[/BAT]" with possible arguments:
  BAT |  | Interactive input form to enter "Valid From" and "Valid Until" dates is not displayed. Field default values or values from the widget buffer are used for the date values (VAL_FROM/VAL_UNTIL)

Returns:

  0 | OK
  -1 | Database error.

See also:
  xedbstr_tor_upd_val

int xedbstr_tor_upd_val | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-transition (to release) userexit that updates effectivity dates for relation records.

This userexit is used during the release of a structure record to set the effectivity (VALID_FROM) of the record to the intended VALID_FROM date.

Input form `EDB-VAL-DAT` is displayed and the user can modify the "Valid From" and "Valid Until" dates. After confirming dates, the fields `VAL_FROM` and `VAL_UNTIL` of the relation record are updated.

The date values are also stored in the widget buffer with the key `STAVAL`. This key contains a string in the following format: `"/ALL=0|1 /FROM=fromDate /UNTIL=untilDate`. This mechanism is usually used to re-use date values which have been entered once for all selected records. But it can also be used to set specific dates in batch mode (Parameter /BAT) instead of using the field default values. When this userexit finds the key `STAVAL` in the widget buffer, it uses the values found there.

Parameters:

  usxContext | This is the context for a transition userexit. Unlike DataView action userexit contexts, the first character describing the mode can be either 'y' for a forward transition (new progress indicator > old progress indicator) or 'n' for a backward transition (new progress indicator < old progress indicator). The following characters describe the number of the affected row. Example: "y23", "n4".
  param | Parameter to control the behavior of this userexit. Syntax like: "[/BAT]" with possible arguments:
  BAT |  | Interactive input form to enter "Valid From" and "Valid Until" dates is not displayed. Field default values or values from the widget buffer are used for the date values (VAL_FROM/VAL_UNTIL).

Returns:

  0 | OK
  1 | Error occurred (mandatory field not in list EDB-VAL-DAT).
  -1 | Database error.

int xedbusr_frr_upd_val | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-transition (from release) userexit to update valid dates.

This userexit is usually called when deactivating an object to set the effectivity (VALID_UNTIL) of the record to the intended VALID_UNTIL date.

An interactive input form (EDB-VAL-DAT-UNT) is displayed and the "Valid Until" date can be entered. After confirming the date, the field VAL_UNTIL of the record is updated.

If this post-action userexit is running in batch-mode, the "Valid Until" date of the current element is set to the "Valid From" date of its successor (assuming the successor exists).

If the intended "Valid Until" date lies in the future (i.e. the successor is released in the future), the current view should not be set to "Production". Otherwise, it could happen that neither this element nor its predecessor (the current element) is available and no element to inactivate can be found.

If the successor is already valid, because its "Valid From" date is in the past, the "Valid Until" date of the current element is set to the current date "today".

If the parameter "/BAT" is not set and this userexit is not called in context with 'xedbusr_rst_prd', the input form EDB-VAL-DAT-UNT is displayed. In this case the "Valid Until" date is only a proposal, because it can be changed manually.

The date values are also stored in the widget buffer with key `STAVAL`. This key contains a string in the following format: `"/ALL=0|1 /FROM=fromDate /UNTIL=untilDate"`. This mechanism is usually used to re-use date values which have been entered once for all selected records. But it can also be used to set specific dates in batch mode (Parameter /BAT) instead of using the field default values. When this userexit finds the key `STAVAL` in the widget buffer, it uses the values found there.

Parameters:

  usxContext | This is the context for a transition userexit. Unlike DataView action userexit contexts, the first character describing the mode can be either 'y' for a forward transition (new progress indicator > old progress indicator) or 'n' for a backward transition (new progress indicator < old progress indicator). The following characters describe the affected row. Example: "y23", "n4".
  param | Parameter to control the behavior of this userexit. Syntax like: "[/BAT] [/RESET_CUR] [/VALDATE [/BYCHAIN|/BYFIELD=FieldName]]" with possible arguments:
  BAT |  | Interactive input form to enter "Valid From" and "Valid Until" dates is not displayed. Field default values or values from the widget buffer are used for the date values (VAL_FROM/VAL_UNTIL)
  RESET_CUR |  | Resets the current flag of the record. Default behavior is not to reset the current flag.
  VALDATE |  | Sets the "Valid Until" time of the current element to the "Valid From" time of the released element.
  If the parameter `/VALDATE` is used, it is possible to define how to find the successor (i.e. the already released element), similar to the userexit `xedbusr_rst_prd`:
  BYCHAIN |  | The successor is found by traversing the version chain.
  BYFIELD | field name list | The successor is found by selecting objects by one or multiple common reference fields.
  If none of the two parameters is given, the following default behavior applies: for objects of the entity `EDB-ARTICLE` the key field `EDB_ITM_REF` is used. This is the same as passing `/BYFIELD=EDB_ITM_REF`. For all other entities, the version chain for the specific entity is used. This is the same as passing `/BYCHAIN`.

Returns:

  0 | OK
  -1 | Database error.

See also:
  xedbusr_rst_prd, xedbusr_tor_upd_val

int xedbusr_post_sta_lgv | ( | ) |

Post-transition userexit that executes a LogiView procedure.

Post-transition userexit for the change & release management. It calls a LogiView decision table / procedure.

Note:
  The LogiView System stringvariable "STA" will be set to the value of 'cp_Status' (mode and row, e.g. "y23"). If 'cp_Argument' is not set, the name of the decision table (or procedure) to be called will be set according to the name of the current checksteps and "post_sta". e.g. Checksteps "STD-ORD" -> Decision table "STD_ORD/post_sta"

Parameters:

  cp_Status | Standard transition parameter with direction mode and current row.
  direction mode | description
  y | forward: new level indicator greater than old level
  n | backward: new level indicator less than old level
  cp_Arguments | Reserved.

Returns:

  0 | OK
  1 | Error occurred

int xedbusr_rst_prd | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-transition userexit that resets the status of the predecessor version.

If the current element has a predecessor that is still in the release state 'in change', the state of this predecessor will be changed to the given level (usually an inactive state).

Parameters:

  usxContext | This is the context for a transition userexit. Unlike DataView action userexit contexts, the first character describing the mode can be either 'y' for a forward transition (new progress indicator > old progress indicator) or 'n' for a backward transition (new progress indicator < old progress indicator). The following characters describe the affected row. Example: "y23", "n4".
  param | Parameter to control the behavior of this userexit. Syntax like: "State [/BYCHAIN|/BYFIELD=field1[, field2[, ...]]]" With possible arguments:
  State | progress indicator | Level to which the predecessor of the current element will be set.
  Additionally, the parameter determines how the predecessor is found:
  BYCHAIN |  | The predecessor is found by traversing the version chain.
  BYFIELD | field name list | The predecessor is found by selecting objects by one or more common reference fields.

If none of the two parameters is given, then the following default behavior applies: for objects of the entity `EDB-ARTICLE` the key field `EDB_ITM_REF` is used. This is the same as passing `/BYFIELD=EDB_ITM_REF`. For all other entities, the version chain for the specific entity is used. This is the same as passing `/BYCHAIN`.

Returns:

  0 | OK
  1 | Unable to set the level for the predecessor.
  2 | Missing / invalid level for the predecessor.

Example:
  The call syntax of this userexit might look like:

         xedbusr_... & xedbusr_rst_prd(250)

int xedbusr_tor_sa_uv | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-transition userexit which combines `xedbusr_tor_set_acc` and `xedbusr_tor_upd_val`.

It calls the userexit `xedbusr_tor_set_acc` followed by `xedbusr_tor_upd_val`. This userexit is usually called when releasing an object to set its effectivity date and the access for its child elements.

Parameters:

  usxContext | This is the context for a transition userexit. Unlike DataView action userexit contexts, the first character describing the mode can be either 'y' for a forward transition (new progress indicator > old progress indicator) or 'n' for a backward transition (new progress indicator < old progress indicator). The following characters describe the affected row. Example: "y23", "n4".
  param | Parameter to control the behavior of this userexit. Please refer to `xedbusr_tor_set_acc` and `xedbusr_tor_upd_val` for a description of all possible parameters.

Returns:

  0 | OK
  -1 | Error in userexit `xedbusr_tor_set_acc`.
  -3 | Error in userexit `xedbusr_tor_upd_val`.
  -2 | Action was aborted (in userexit `xedbusr_tor_upd_val`).

int xedbusr_tor_set_acc | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-transition (to release) userexit to set access for refine elements.

It gets the access rights (owner, group, world) of the current element and sets these values for all structure records in the refine table. This userexit is usually called when releasing an object to set the access of structure records to the same access as the current record.

Parameters:

  usxContext | This is the context for a transition userexit. Unlike DataView action userexit contexts, the first character describing the mode can be either 'y' for a forward transition (new progress indicator > old progress indicator) or 'n' for a backward transition (new progress indicator < old progress indicator). The following characters describe the affected row. Example: "y23", "n4".
  param | Parameter to control the behavior of this userexit. Syntax like: "[/TAB_REF=refine_table]" With possible arguments:
  TAB_REF | refine table name | Optional argument to set the name of the refine table (e.g. `T_MASTER_STR`). For the entities `EDB-PROJECT`, `EDB-ORDER`, `EDB-ARTICLE` and `EDB-DOCUMENT` the name of the refine table will be set automatically, if this option is not set.

Returns:

  0 | OK
  1 | Name of the refine table was not passed as a parameter, and the current entity is none of `EDB-PROJECT`, `EDB-ORDER`, `EDB-ARTICLE` and `EDB-DOCUMENT`.
  Else | Error occurred.

int xedbusr_tor_upd_val | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Post-transition (to release) userexit that updates effectivity dates.

This userexit is usually called when releasing an object to set the effectivity date (VALID_FROM) of the record to the intended VALID_FROM date.

The input form `EDB-VAL-DAT` is displayed and the user can modify "Valid From" and "Valid Until" dates. After confirming these dates, the fields `VAL_FROM` and `VAL_UNTIL` of the entity record are updated.

The date values are also stored in the widget buffer with the key `STAVAL`. This key contains a string in the following format: `"/ALL=0|1 /FROM=fromDate /UNTIL=untilDate"`.

Date values must be passed in the format "MM-DD-YYYY HH:MI:SS". This mechanism is usually used to re-use date values which have been entered once for all selected records. But it can also be used to set specific dates in batch mode (Parameter /BAT) instead of using the field default values. When this userexit finds the key `STAVAL` in the widget buffer, it uses the values found there.

Parameters:

  usxContext | This is the context for a transition userexit. Unlike DataView action userexit contexts, the first character describing the mode can be either 'y' for a forward transition (new progress indicator > old progress indicator) or 'n' for a backward transition (new progress indicator < old progress indicator). The following characters describe the affected row. Example: "y23", "n4".
  param | Parameter to control the behavior of this userexit. Syntax like: "[/BAT]" With possible arguments:
  BAT |  | Interactive input form to enter "Valid From" and "Valid Until" dates is not displayed. Field default values or values from the widget buffer are used for the date values (VAL_FROM/VAL_UNTIL).

Returns:

  0 | OK
  1 | Error occurred (mandatory field is not in list EDB-VAL-DAT).
  -1 | Database error.

See also:
  xedbusr_rst_prd, xedbusr_frr_upd_val

int xtxt_txt_upd_tra | ( | const char * | param1,
|  | const char * | param2
| ) |  |

Refreshes the text instance text.

Checks for field EDB_INS_ID of text instance. Calls pre-field userexit to set the categories. Calls post-field userexit to refresh the text instance text.

Note:
  This is required for e.g. In Work -> In Approval transition.

Parameters:

  cpParameter | Standard parameter with working mode and current row.
  cpArguments | Parameter to control the behavior of this function. Not currently used.

Returns:

  0 | OK
  Else | Error

Copyright © 2007-2012, Oracle and/or its affiliates.