(beas 9.1 PL: 08)
Via the cog wheel a script can be entered to control this setting with max. exceeding of planned quantity, and shortfall of planned quantity.
Important:
The script is executed only if something different than "allowed" was selected in the setting! Select "Yes with protocol", "No, Query" or "Query with protocol".
Available writable variables:
e_actionperexceeded
|
Allow exceeding planned quantity?
Return: I, IP, B, Q, QP (see above).
|
e_permorpostmat
|
Max. Exceeding (in %).
|
e_perminpostmat
|
Max. Shortfall (in %).
|
Available local readable variables:
e_belnr_id
|
WO document number.
|
e_belpos_id
|
Production position.
|
e_pos_id
|
Material position.
|
e_itemcode
|
Material item number.
|
If n values are entered, the setting applies.
The script is executed under the name function "script setting fert_actionperexceeded". In Debug Window you can search for it and view all available variables.
Important: the script may not begin with "select". Enter a short comment to describe.
Example:
In case the assembly begins with A, there should be a security query with protocol if planned quantity is exceeded by 10% or if there is a shortfall of 15 %.
// Check
select substring("ItemCode",1,1) into ls_string from "BEAS_FTPOS" where &
"BELNR_ID"=<e_belnr_id> and "BELPOS_ID"=<e_belpos_id>
if <ls_string> = A then
setvar=e_actionperexceeded=QP
setvar=e_permorpostmat=10
setvar=e_perminpostmat=15
end if
Example:
Only user with ID 2 is allowed to post material.
// only pers_id 2 can post out different quantity
setvar=e_actionperexceeded=B
if <currentpers_id> = 2 then
setvar=e_actionperexceeded=I
end if
|