Import functions
(ue_api_bom.of_importfunction)
concept:
1. load source bill of material list in the import datastore
2. optional: set filter in source
3. load new bom list with standard function
4. copy import datastore to new bom
5. modify sorting and other functionality
6. save new bom
object=ue_api_bom=import=(...)
checkstring
|
return value
"" = no
"bom" = bill of material - dbstring
Example:
Check if Clipboard a valid bill of material string
object=ue_api_bom=import=checkstring=<clipboard>
if <value> = bom then
messagebox=ok$Clipboard is a bill of material import string
end if
|
|
loadbom=<bom code>
loadrouting=<routing code>
|
declare=bomimport=ue_api_bom
bomimport.import.loadboam=A001
|
|
setlds=<datastoreobject>
|
declare=lds=ue_datastorevalues
lds=select * from "BEAS_STL" where "ItemCode"='A001'
declare=bomimport=ue_api_bom
bomimport.import.setlds=lds
|
|
loadfromstring=<area>=<format>=<importstring>
|
import from a string
area
you can set the "area", example "routing" - then it's importing only the area from XML-File. You can use this if you create the importstring with "import.copy2clipboard". If area is empty, then the importstring is only the data
format
the Format of the string. Current and default is "dbstring"
declare=lds=ue_datastorevalues
lds=select * from "BEAS_STL" where "ItemCode"='A001'
lds.saveas=dbstring
setvar=ls_exportstring=<value>
declare=bomimport=ue_api_bom
bomimport.import.loadfromstring===<ls_exportstring>
|
|
setrow=<row>
|
set current row for import datastore
|
insertrow
|
insert a new row in import datastore
|
art1_id
|
change material (BEAS_STL.ART1_ID). All primary information will copy from item code into the import datastore
|
checkbom
|
check all fields (not ART1_id), set all quantity fields. Source Quantity is INPUT_QTY. Mandatory is the INPUT_QTY, INPUT_FACTOR (default=1)
|
filter=version/date/variant=property
|
declare=bomimport=ue_api_bom
bomimport.import.loadbom=A001
// delete all, which not valid to Version 1
// result is only bom version 1
bomimport.import.version=1
Follow methodes available
date
|
Check Date gluetig_von,gueltig_bis
|
version
|
Check Version versionfrom, versionto, versionarea
|
variant
|
Check Variant A-Z
|
pos_id
|
Delete all Position which not inside the pos_id - string
Example:
bomimport.import.filter.pos_id=10,20,50
Import only 10,20,50, but not all other
|
|
|
delvalidation
|
Delete all Version information, Date Validation and so on
declare=bomimport=ue_api_bom
bomimport.import.loadbom=A001
bomimport.import.version=1
bomimport.import.delvalidation
|
|
import=typ
|
option typ
pos_id = replace all with same pos_id, add all other
pos_text = replace all with same pos_text, add all other
itemcode = replace all with same itemcode (art1_id), all all other
replace = delete current position, add new positions
add (standard) = add all new positions
Example: Copy A001-V1 to A001-V2
Replace by pos_id
declare=bomimport=ue_api_bom
// the new bom
bomimport.load=A001-V2
// the old bom
bomimport.import.loadbom=A001-V1
// now import
bomimport.import.import=pos_id
|
|
copy2clipboard
|
for bill of material
[beas-import]
[format]dbstring[/format]
[typ]bom[/typ]
[item]<itemcode>
[billofmaterial]
<database dbstring>
[/billofmaterial]
[/item]
[/beas-import]
For Routing
[beas-import]
[format]dbstring[/format]
[typ]routing[/typ]
[item]<itemcode>
[routing]
<database dbstring>
[/routing]
[/item]
[/beas-import]
|
|
copy2string
|
Copy import table in Variable "value" in dbstring - Format
|