on ‎2016 Jan 17 9:20 AM
Hello experts!
I'm trying to hardcode my master data load, filtering by an specific value of one attribute, but looks like my datamanager script is wrong, can you please advice?
The idea is to fill %SELECTION% variable here (I've got the XML from a successful execution with prompts)
INFO(%SELECTION%,<?xml version="1.0" encoding="utf-16"?><Selections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Selection Type="Attribute"><Attribute><ID>0MATL_TYPE</ID><Operator>1</Operator><LowValue>ZSFG</LowValue><HighValue /></Attribute></Selection><Selection Type="Hierarchy" ImportText="1" /><Selection Type="Language" TextType="2"><Language>E</Language></Selection><Selection Type="AttributeList"><Attribute>ZBPC_MAT</Attribute><Attribute>0BASE_UOM</Attribute><Attribute>0COMP_CODE</Attribute><Attribute>0CO_AREA</Attribute><Attribute>0CURRENCY</Attribute><Attribute>0DEL_FLAG</Attribute><Attribute>0DISMM</Attribute><Attribute>0DIVISION</Attribute><Attribute>0GROSS_WT</Attribute><Attribute>0MATL_GROUP</Attribute><Attribute>0MATL_TYPE</Attribute><Attribute>0NET_WEIGHT</Attribute><Attribute>0ORIGINGRP</Attribute><Attribute>0PRICE_MAT</Attribute><Attribute>0PRICE_UNIT</Attribute><Attribute>0PROD_HIER</Attribute><Attribute>0PROFIT_CTR</Attribute><Attribute>0PUR_GROUP</Attribute><Attribute>0P_PLANT</Attribute><Attribute>0RT_SUPS</Attribute><Attribute>0UNIT_OF_WT</Attribute><Attribute>0VAL_CLASS</Attribute><Attribute>ZBERW1</Attribute><Attribute>ZBERW2</Attribute><Attribute>ZBESKZ</Attribute><Attribute>ZDISLS</Attribute><Attribute>ZFLAVTX</Attribute><Attribute>ZMATCATTX</Attribute><Attribute>ZMATL_GRP</Attribute><Attribute>ZORGRPCT</Attribute><Attribute>ZORIGNGRP</Attribute><Attribute>ZPWFWGTFI</Attribute><Attribute>ZSHZET</Attribute><Attribute>ZSOBSL</Attribute><Attribute>ZSUBBRTX</Attribute><Attribute>ZSUBCATTX</Attribute><Attribute>0PLANT</Attribute></Selection><KeyDate>20160115</KeyDate><Relation><Value Right="Hierarchy" Left="Attribute">1</Value></Relation></Selections>)
And use it here:
TASK(/CPMB/BW_IOBJ_MASTER_SOURCE,MASTERDATA_SELECTION,%SELECTION%)
But the package ends with error (just a general error, no detail) . If I revert back to using standard prompt and manually enter the selection it works fine so I assume the rest of the code is working but the issue is related to my INFO XML format/syntax?
Best regards and thanks ahead!
/Laura
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
By the way, the selection can be reduced to:
INFO(%SELECTION%,<Selections><Selection Type="Attribute"><Attribute><ID>0MATL_TYPE</ID><Operator>1</Operator><LowValue>ZSFG</LowValue><HighValue /></Attribute></Selection><Selection Type="Hierarchy" ImportText="1" /><Selection Type="Language" TextType="2"><Language>E</Language></Selection><Selection Type="AttributeList"><Attribute>ZBPC_MAT</Attribute><Attribute>0BASE_UOM</Attribute><Attribute>0COMP_CODE</Attribute><Attribute>0CO_AREA</Attribute><Attribute>0CURRENCY</Attribute><Attribute>0DEL_FLAG</Attribute><Attribute>0DISMM</Attribute><Attribute>0DIVISION</Attribute><Attribute>0GROSS_WT</Attribute><Attribute>0MATL_GROUP</Attribute><Attribute>0MATL_TYPE</Attribute><Attribute>0NET_WEIGHT</Attribute><Attribute>0ORIGINGRP</Attribute><Attribute>0PRICE_MAT</Attribute><Attribute>0PRICE_UNIT</Attribute><Attribute>0PROD_HIER</Attribute><Attribute>0PROFIT_CTR</Attribute><Attribute>0PUR_GROUP</Attribute><Attribute>0P_PLANT</Attribute><Attribute>0RT_SUPS</Attribute><Attribute>0UNIT_OF_WT</Attribute><Attribute>0VAL_CLASS</Attribute><Attribute>ZBERW1</Attribute><Attribute>ZBERW2</Attribute><Attribute>ZBESKZ</Attribute><Attribute>ZDISLS</Attribute><Attribute>ZFLAVTX</Attribute><Attribute>ZMATCATTX</Attribute><Attribute>ZMATL_GRP</Attribute><Attribute>ZORGRPCT</Attribute><Attribute>ZORIGNGRP</Attribute><Attribute>ZPWFWGTFI</Attribute><Attribute>ZSHZET</Attribute><Attribute>ZSOBSL</Attribute><Attribute>ZSUBBRTX</Attribute><Attribute>ZSUBCATTX</Attribute><Attribute>0PLANT</Attribute></Selection><KeyDate>20160115</KeyDate><Relation><Value Right="Hierarchy" Left="Attribute">1</Value></Relation></Selections>)
Just tested the same script and it's working in my case.
Vadim
Thanks Vadim
The full script is here:
'PROMPT(MASTERSELECTION, %INFOOBJECT%, %SELECTION%, "Please select the infoobject and the selection",,)
'PROMPT(RADIOBUTTON,%WRITEMODE%,"Write Mode",2,{"Overwrite","Update"},{"1","2"})
'PROMPT(RADIOBUTTON,%FORMAT%,"Choose format.",1,{"Internal Format","External Format"},{"1","0"})
'PROMPT(TRANSFORMATION,%TRANSFORMATION%,"Transformation file:",,,Import.xls)
'PROMPT(DIMENSIONNAME,%DIMNAME%,"Dimension name:",,,%DIMS%)
PROMPT(RADIOBUTTON,%CLEAR_ALL%,"Clear all members for overwrite mode before loading?",0,{"No","Yes"},{"0","1"})
INFO(%SELECTION%,<?xml version="1.0" encoding="utf-16"?><Selections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Selection Type="Attribute"><Attribute><ID>0MATL_TYPE</ID><Operator>1</Operator><LowValue>ZSFG</LowValue><HighValue /></Attribute></Selection><Selection Type="Hierarchy" ImportText="1" /><Selection Type="Language" TextType="2"><Language>E</Language></Selection><Selection Type="AttributeList"><Attribute>ZBPC_MAT</Attribute><Attribute>0BASE_UOM</Attribute><Attribute>0COMP_CODE</Attribute><Attribute>0CO_AREA</Attribute><Attribute>0CURRENCY</Attribute><Attribute>0DEL_FLAG</Attribute><Attribute>0DISMM</Attribute><Attribute>0DIVISION</Attribute><Attribute>0GROSS_WT</Attribute><Attribute>0MATL_GROUP</Attribute><Attribute>0MATL_TYPE</Attribute><Attribute>0NET_WEIGHT</Attribute><Attribute>0ORIGINGRP</Attribute><Attribute>0PRICE_MAT</Attribute><Attribute>0PRICE_UNIT</Attribute><Attribute>0PROD_HIER</Attribute><Attribute>0PROFIT_CTR</Attribute><Attribute>0PUR_GROUP</Attribute><Attribute>0P_PLANT</Attribute><Attribute>0RT_SUPS</Attribute><Attribute>0UNIT_OF_WT</Attribute><Attribute>0VAL_CLASS</Attribute><Attribute>ZBERW1</Attribute><Attribute>ZBERW2</Attribute><Attribute>ZBESKZ</Attribute><Attribute>ZDISLS</Attribute><Attribute>ZFLAVTX</Attribute><Attribute>ZMATCATTX</Attribute><Attribute>ZMATL_GRP</Attribute><Attribute>ZORGRPCT</Attribute><Attribute>ZORIGNGRP</Attribute><Attribute>ZPWFWGTFI</Attribute><Attribute>ZSHZET</Attribute><Attribute>ZSOBSL</Attribute><Attribute>ZSUBBRTX</Attribute><Attribute>ZSUBCATTX</Attribute><Attribute>0PLANT</Attribute></Selection><KeyDate>20160115</KeyDate><Relation><Value Right="Hierarchy" Left="Attribute">1</Value></Relation></Selections>)
INFO(%TEMPNO1%,%INCREASENO%)
INFO(%TEMPNO2%,%INCREASENO%)
INFO(%TEMPNO3%,%INCREASENO%)
INFO(%TEMPNO4%,%INCREASENO%)
INFO(%TEMPNO5%,%INCREASENO%)
INFO(%TEMPNO6%,%INCREASENO%)
INFO(%TEMPNO7%,%INCREASENO%)
TASK(/CPMB/BW_IOBJ_MASTER_SOURCE,OUTPUTNO,%TEMPNO1%)
TASK(/CPMB/BW_IOBJ_MASTER_SOURCE,MASTERDATA_SELECTION,%SELECTION%)
TASK(/CPMB/BW_IOBJ_MASTER_SOURCE,INFOOBJECT,ZBPC_MAT)
TASK(/CPMB/BW_IOBJ_MASTER_SOURCE,MASTERDATA_FORMAT,1)
TASK(/CPMB/BW_IOBJ_TEXT_SOURCE,OUTPUTNO,%TEMPNO2%)
TASK(/CPMB/BW_IOBJ_TEXT_SOURCE,MASTERDATA_SELECTION,%SELECTION%)
TASK(/CPMB/BW_IOBJ_TEXT_SOURCE,INFOOBJECT,ZBPC_MAT)
TASK(/CPMB/BW_IOBJ_TEXT_SOURCE,MASTERDATA_FORMAT,1)
TASK(/CPMB/MERGE_IOBJ_MD_DATA,INPUTNO,%TEMPNO1%)
TASK(/CPMB/MERGE_IOBJ_MD_DATA,INPUTNO2,%TEMPNO2%)
TASK(/CPMB/MERGE_IOBJ_MD_DATA,MASTERDATA_SELECTION,%SELECTION%)
TASK(/CPMB/MERGE_IOBJ_MD_DATA,INFOOBJECT,%INFOOBJECT%)
TASK(/CPMB/MERGE_IOBJ_MD_DATA,OUTPUTNO,%TEMPNO3%)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,FORMULA_FILE_NO,%TEMPNO7%)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,TRANSFORMATIONFILEPATH,\ROOT\WEBFOLDERS\PWFP\COGS\DATAMANAGER\TRANSFORMATIONFILES\TF_COMPONENT_MASTER_DATA.XLS)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,SUSER,%USER%)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,SAPPSET,%APPSET%)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,SAPP,%APP%)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,DIMNAME,COMPONENT)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,OUTPUTNO,%TEMPNO4%)
TASK(/CPMB/SPLIT_IOBJ_MD_TXT_DATA,INPUTNO,%TEMPNO4%)
TASK(/CPMB/SPLIT_IOBJ_MD_TXT_DATA,OUTPUTNO,%TEMPNO5%)
TASK(/CPMB/SPLIT_IOBJ_MD_TXT_DATA,OUTPUTNO2,%TEMPNO6%)
TASK(/CPMB/IOBJ_SOURCE_MD_CONVERT,INPUTNO,%TEMPNO3%)
TASK(/CPMB/BPC_MASTER_DATA_TARGET,INPUTNO,%TEMPNO5%)
TASK(/CPMB/BPC_MASTER_DATA_TARGET,DIMNAME,COMPONENT)
TASK(/CPMB/BPC_MASTER_DATA_TARGET,WRITEMODE,1)
TASK(/CPMB/BPC_MASTER_DATA_TARGET,FORMULA_FILE_NO,%TEMPNO7%)
TASK(/CPMB/BPC_MASTER_DATA_TARGET,CLEAR_ALL,%CLEAR_ALL%)
TASK(/CPMB/BPC_TXT_DATA_TARGET,INPUTNO,%TEMPNO6%)
TASK(/CPMB/BPC_TXT_DATA_TARGET,DIMNAME,COMPONENT)
The error I get is the following:
/CPMB/MODIFY completed in 0 seconds
/CPMB/BW_IOBJ_MASTER_SOURCE completed in 1 seconds
/CPMB/BW_IOBJ_TEXT_SOURCE completed in 2 seconds
/CPMB/MERGE_IOBJ_MD_DATA completed in 0 seconds
/CPMB/CLEAR completed in 0 seconds
[Selection]
--------------------------------------------------------------
WRITEMODE = 2
FORMAT = Yes
CLEAR_ALL = No
[Message]
--------------------------------------------------------------
Task name MASTER DATA SOURCE:
Record count: 2399
Task name TEXT SOURCE:
Record count: 2399
model: COGS. Package status: ERROR
IF I leave %SELECTION% to be prompted the package works fine so I'm pretty sure the error is behind %SELECTION% filled by the XML.
Thanks again a lot !!
/Laura
I've also tried removing
" <?xml version="1.0" encoding="utf-16"?><Selections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">"
and just leaving
<Selections><Selection Type="Attribute">....</Selections>
as per your code and the error persists.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.