on 09-29-2010 10:56 PM
Hi, we try running ScriptLogic from Package using /CPMB/DEFAULT_FORMULAS inside button by VBA.
Application.Run "MNU_eTools_DATAMANAGER"
Application.Run "MNU_eData_RUNPACKAGE"
Application.Run "MNU_eDATA_SELECTPACKAGE", "Prueba", "/CPMB/DEFAULT_FORMULAS", "Company", "Financial Process"
The firts problem is the obligatory for PROMPT:
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA.LGF)
We reduce only for Category and working good, but is posible disable PROMPT ?
I try comment but code the ScriptLogic not working.
'PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
The second problem is when need request user_defined dimension in PROMPT, is posible ?
Thank you.
Hi,
I thought you can still use ' to comment out the statement as in the MS version. In NW, I dont remember exactly. As suggested, you can definitely try //
Coming to your next statement, You can definitely use user defined dimensions also. CATEGORY_DIM is just a alias name for your dimension. Instead of using CATEGORY_DIM, you can directly use the name of the dimension.
PROMPT(SELECTINPUT,,,,"CATEGORY,TIME,ACCOUNT")
Please note that there are no % signs around the dimension name. The dimensions names are separated by commas. And the entire list of the dimension names is enclosed within double qoutes. I have mentioned 3 dimension names for example. You can have other dimensions also.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
nilanjan chatterjee
Hi,
In your script, you have the statement,
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
This means that the script is expecting some value to come from the DM package. So you need to have the prompt statement to pass that value from DM to the script.
Hope this helps.
Thank you, i know and is good for other peoples read this post.
I define the points for you, in relation to Post Topic and previous answer :
Hi,
I thought you can still use ' to comment out the statement as in the MS version. In NW, I dont remember exactly. As suggested, you can definitely try //
Coming to your next statement, You can definitely use user defined dimensions also. CATEGORY_DIM is just a alias name for your dimension. Instead of using CATEGORY_DIM, you can directly use the name of the dimension.
PROMPT(SELECTINPUT,,,,"CATEGORY,TIME,ACCOUNT")
Please note that there are no % signs around the dimension name. The dimensions names are separated by commas. And the entire list of the dimension names is enclosed within double qoutes. I have mentioned 3 dimension names for example. You can have other dimensions also.
Hope this helps.
-
Now, Ethan Jewett
Hi,
Does the following actually work for you?
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
I don't think it will, because there is nothing assigned to the %SELECTION% variable.
Yes, this working for me in NW 7.5 SP03, is default code when make new DM package using "/CPMB/DEFAULT_FORMULAS"
Other point is for use HIER NODE in PROMPT for send to ScriptLogic code.
I need close this post and set points, then open this post for speak the "use HIER NODE in PROMPT for send to ScriptLogic code"
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
// works as comment in DM packages like in Scripts. You'd have to comment out (or delete) lines with PROMPT and TASK for SELECTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Comment using // not working.
i Try :
'PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
Return:
RUN_LOGIC:Set de dimensiones "CATEGORYDATAVALUE" no asignados a gestor de datos
Fallo
Aplicación: VENTAS status de paquete: ERROR
My ScriptLogic use :
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
I try too comment TASK :
'PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
'TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
Return:
Eror encontrado en BPC
Aplicación: VENTAS status de paquete: SUCCESS
I try too, delete all lines and only use LOGICFILENAME:
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
Return:
Eror encontrado en BPC
Aplicación: VENTAS status de paquete: SUCCESS
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
Then not working, all time get :
Eror encontrado en BPC
Any idea ?
Is necesary make Z ProcessChain ?
Thank you.
This is strange - // works for me in NW 7.5.
If you remove (comment out) PROMPT you have to remove (comment out) that TASK. So, I wonder what kind of error did you receive when you commented out both. Do you have Formula Log in your Package log?
If you are on NW 7.5 you don't have to copy that Process Chain, just make a copy of the DM Package.
Do you have any error message when you run COPIA_PCC.LGF in UJKT?
I try this :
//PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
//TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
And get Error and Formula Log :
RUN_LOGIC:Set de dimensiones "CATEGORYDATAVALUE" no asignados a gestor de datos
Fallo
Aplicación: VENTAS status de paquete: ERROR
COPIA_PCC.LGF working good when request CATEGORY in PROMPT.
This is my ScriptLogic:
//COPIA DESDE ENERO A DICIEMBRE, CAMIONES - CHILE
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET CeBe = PI1CA001
*XDIM_MEMBERSET CUENTA = ZACB0001, ZACB0002, ZACB0003, ZACB0004, ZACB0005, ZACB0009, ZACB0010
*XDIM_MEMBERSET Modelo = BAS(Camiones)
*XDIM_MEMBERSET Moneda_Ppto = CLP, USD
*XDIM_MEMBERSET PARAMETRO = DUMMY
*XDIM_MEMBERSET CentroDeCosto = DUMMY
*XDIM_MEMBERSET Sociedad = 1000
*XDIM_MEMBERSET Sucursales = dummy
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET TIME = %YEAR%.JAN
*XDIM_MEMBERSET MEASURES = "PERIODIC"
*WHEN TIME
*IS %YEAR%.JAN
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.FEB )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.MAR )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.APR )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.MAY )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.JUN )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.JUL )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.AUG )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.SEP )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.OCT )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.NOV )
*REC(EXPRESSION=%VALUE%, TIME = %YEAR%.DEC )
*ENDWHEN
*COMMIT
This line is problem :
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
But i need use CATEGORY the Current View or CATEGORY defined in AUTH.
My client not accept this in code ScriptLogic:
*XDIM_MEMBERSET CATEGORY = PLAN_V1
We use different versions, Any idea ?
I got confused with your requirements: are you running that script from a DM Package or in DEFAULT.LGF?
If you are running it from DM Package than Current View doesn't play any role.
If you are running it as a part of DEFAULT.LGF, that DM logic script doesn't play any role.
Your variable %CATEGORY_SET% is assigned a list of values based on place it was called from: DM package or DEFAULT.LGF. If it's called from DM package %CATEGORY_SET% will have values of all members of your CATEGORY Dimension. Is that what you want it to have? If it runs from Input Schedule than it has values taken from the Current View.
I got confused with your requirements: are you running that script from a DM Package or in DEFAULT.LGF?
Script is running from DM Package and name is COPIA_PCC.LGF
If you are running it from DM Package than Current View doesn't play any role.
Ok, understand.
Your variable %CATEGORY_SET% is assigned a list of values based on place it was called from: DM package or DEFAULT.LGF. If it's called from DM package %CATEGORY_SET% will have values of all members of your CATEGORY Dimension. Is that what you want it to have?
From DM Package i can set in PROMPT HIER NODE ?
If it runs from Input Schedule than it has values taken from the Current View.
Values in CurrentView is equal to used in Script, only difference is in CATEGORY.
CurrentView = PLAN_V1
And Script :
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
Thank you.
If your script is running from DM package and you want to assign CATEGORY values in "PROMPT HIER NODE" why do you want to comment out PROMPT in the DM package?
So, if you want to define CATEGORY values in the package you have to keep PROMPT and TASK in the package and put
*XDIM_MEMBERSET CATEGORY = $SELECTION$
in your script.
I still have some feeling that I misunderstood something.
Hi,
Does the following actually work for you?
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
I don't think it will, because there is nothing assigned to the %SELECTION% variable.
If you replace "XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%" in your script logic with "XDIM_MEMBERSET CATEGORY = PLAN_V1", then I think this data manager package will start working, or you'll at least get a different error. Is that correct?
The following should work without the script logic change, but still requires you to populate a value in the prompt:
PROMPT(SELECTINPUT,%SELECTION%,,,"%CATEGORY_DIM%")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
I think you need to assign at least one category in your selection in order for %CATEGORY_SET% to be populated in your script logic. If you want to pass through a category value from a data manager prompt (without prompting the user), then you need to hard-code the selection TASK parameter to the right category. Off the top of my head I do not know the syntax for the selection parameter, but I think you need to do something like the following:
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,"CATEGORY,PLAN_V1")
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,COPIA_PCC.LGF)
I doubt that will work because I probably got the syntax wrong, but hopefully it helps make the point about what you must do to make this happen.
Lastly: Is it possible to pass through the current value in the current view to the script logic using a data manager package? It sounds like this is really what you want to do, but unfortunately it is not possible. Sorry. Sure would be nice though!
Ethan
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
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.