cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Replacing selection screen in /CPMB/LOAD_INFOPROV_UI

Former Member
0 Kudos
907

Hi there folks,

I have a process in my BPC model to pull in data from an existing Info Provider, using normal transformation and conversion files.

I actually don't want my users to have/need to select anything, so I have commented out the selections required and hard-coded the technical names required in an XML string.

The only thing I want the user to select is the time period. But when I create a variable and try to amend this in the script at runtime, the value just gets ignored. I have added the REPLACEPARAM function in my code, but it doesn't seem to change anything.

In fact, since I've added this I now get an error in the package log:


Cannot configure parameter REPLACEPARAM in task /CPMB/INFOPROVIDER_CONVERT

model: Consolidation. Package status: RUNNING

Prior to adding this, it completed with a warning as it picked the first period in the TIME dim, which is empty.

Am I missing something? I'd really like to be able to achieve this in the package, rather than copying and changing (and probably breaking) the standard process chain, if that's possible.

This package pulls in data from another BPC model, which I wanted to try so that the resulting process can be more easily maintained by the BPC Admin in the future.

Here is the code (and attached too, I've left it exactly as it is in BPC, comments and all). Any suggestions are welcome!

Thanks very much,

Jason

DEBUG(ON)

'PROMPT(INFOPROVIDERSELECTION,%InforProvide%,%SELECTION%,"Please select the InfoProvider and set selection (InfoProvider list is restricted by both BW and BPC authority)",,)

'PROMPT(TRANSFORMATION,%TRANSFORMATION%,"Transformation file:",,,Import.xls)

'PROMPT(RADIOBUTTON,%TARGETMODE%,"Handling of records in target",0,{"Append","Overwrite records with match key","Replace data in same data region of Entity, Category, Time and Audit ID"},{"0","1","2"})

'PROMPT(RADIOBUTTON,%RUNLOGIC%,"Select whether to run default logic for stored values after importing",1,{"Yes","No"},{"1","0"})

'PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when importing data.",1,{"Yes, check for work status settings before importing","No, do not check work status settings"},{"1","0"})

PROMPT(SELECTINPUT,%PER%,,,"%TIME_DIM%")

PROMPT(KEYDATE,%KEYDATE%,"Key date",0)

'INFO(%DATE%,%PER%)

INFO(%EQU%,=)

INFO(%TAB%,;)

INFO(%TEMPNO1%,%INCREASENO%)

INFO(%ACTNO%,%INCREASENO%)

INFO(%KEYDATE%,)

TASK(/CPMB/INFOPROVIDER_CONVERT,OUTPUTNO,%TEMPNO1%)

TASK(/CPMB/INFOPROVIDER_CONVERT,ACT_FILE_NO,%ACTNO%)

TASK(/CPMB/INFOPROVIDER_CONVERT,TRANSFORMATIONFILEPATH,\ROOT\WEBFOLDERS\BPC_SHOPRITE\Consolidation\DATAMANAGER\TRANSFORMATIONFILES\TD_FROM_INTGRP.xls)

TASK(/CPMB/INFOPROVIDER_CONVERT,SUSER,%USER%)

TASK(/CPMB/INFOPROVIDER_CONVERT,SAPPSET,%APPSET%)

TASK(/CPMB/INFOPROVIDER_CONVERT,SAPP,%APP%)

TASK(/CPMB/INFOPROVIDER_CONVERT,FILE,/CPMB/YFIQSTF)

TASK(/CPMB/INFOPROVIDER_CONVERT,INFOPROV_SELECTION,<Selections xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Selection Type="Selection"><Attribute><ID>/CPMB/YFDEP6R</ID><Operator>1</Operator><LowValue>ACTUAL</LowValue><HighValue /></Attribute><Attribute><ID>/CPMB/YFDQCIK</ID><Operator>1</Operator><LowValue>PERIODSELECT</LowValue><HighValue /></Attribute></Selection><Selection Type="FieldList"><FieldID>/CPMB/YFD4GUK</FieldID><FieldID>/CPMB/YFDEP6R</FieldID><FieldID>/CPMB/YFDH5N6</FieldID><FieldID>/CPMB/YFDQCIK</FieldID><FieldID>/CPMB/YFDXW8B</FieldID></Selection></Selections>)

TASK(/CPMB/INFOPROVIDER_CONVERT,KEYDATE,%KEYDATE%)

TASK(/CPMB/INFOPROVIDER_CONVERT,REPLACEPARAM,PERIODSELECT%EQU%%PER%)

TASK(/CPMB/LOAD_IP,PREPROCESSMODE,0)

TASK(/CPMB/LOAD_IP,TARGETMODE,2)

TASK(/CPMB/LOAD_IP,INPUTNO,%TEMPNO1%)

TASK(/CPMB/LOAD_IP,ACT_FILE_NO,%ACTNO%)

TASK(/CPMB/LOAD_IP,RUNLOGIC,0)

TASK(/CPMB/LOAD_IP,CHECKLCK,0)

TASK(/CPMB/LOAD_IP,KEYDATE,%KEYDATE%)

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Jason,

The line: TASK(/CPMB/INFOPROVIDER_CONVERT,REPLACEPARAM,PERIODSELECT%EQU%%PER%)

is absolutely incorrect - INFOPROVIDER_CONVERT doesn't support REPLACEPARAM:

If you want to select somehow TIME - use PROMT(TEXT to get the value and put the resulting variable inside xml for INFOPROV_SELECTION

Vadim

Former Member
0 Kudos

Hi Vadim,

Yeah, I had the feeling REPLACEPARAM wasn't supported, I just wasn't sure how to check this directly, for myself.

OK, so before I used the REPLACEPARAM idea, I did try simply adding the %PER% variable directly into my XML string, like this:

<Attribute><ID>/CPMB/YFDEP6R</ID><Operator>1</Operator><LowValue>ACTUAL</LowValue><HighValue /></Attribute><Attribute><ID>/CPMB/YFDQCIK</ID><Operator>1</Operator><LowValue>%PER%</LowValue><HighValue /></Attribute>...

But this is the scenario I mentioned, where the package runs but doesn't return any data (with a warning as there are apparently no records). But there is DEFINITELY data there, so it's seems to just ignore my variable.

I just tried this again though, and in the package log, it seems %PER% is holding more info than I expected to see:


PER = /BPC/Consolidation/PRIVATEPUBLICATIONS/JMAIDMENT/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:TIME|2014.001

Might it be this causing the problem? That when the XML is parsed, instead of seeing 2014.001, it is seeing this whole string instead? Perhaps it doesn't know how to interpret this string?

Very odd indeed.

Thanks as always for the quick reply.

Best wishes,

Jason

former_member186338
Active Contributor
0 Kudos

I have already told you - use PROMPT(TEXT, not PROMPT(SELECTINPUT, because SELECTINPUT (or SELECT etc...) will result in:

PER = /BPC/Consolidation/PRIVATEPUBLICATIONS/JMAIDMENT/TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:TIME|2014.001

And not in:

2014.001

Vadim

P.S. PROMPT(TEXT,... and PROMPT(COMBOBOX,... will result in simple text string!

Former Member
0 Kudos

Whoops, my mistake - I forgot to amend the PROMPT function.

Looks like I'll go with this then, shame there isn't a more elegant way to do it.

Thanks for your help Vadim!

former_member186338
Active Contributor
0 Kudos

You can use long COMBOBOX with manually created list for number of years:

PROMPT(COMBOBOX,%PER%,"Select Period",0,,{2014.001,2014.002,2014.003,2014.004,2014.005})

or 2 COMBOBOX's - for Year and for Month!

Vadim

Answers (0)