Page 1 of 1

CGAddPromptValues function problem

Posted: Mon Feb 11, 2013 2:18 pm
by em_past
Hi,
I've got a problem with this function.
In a SAP BW there is a BEX PROMPT made on 'createDate' dimension.
I tried to use it like that:

size = CGPromptSize();
name = CGPromptGetNextMember(0 - (size - 1));
CGAddPromptValues(name,
'20130117',
'20130117');

But it returns an error:
"2500000228","ZB","17.01.2013","40","31.12.2012","ZAP","ZPK/87010000","2","V6","6953332.000000",
Wiersz źródła danych (14) (datasource row) Błąd (error): Data wiersz procedury (procedures row) (16): Niepoprawny klucz (invalid key): Nazwa wymiaru(dimension name): "ZFIGL02P_nrDok", Nazwa elementu(element name) (klucz(key)): "2500000228"

So it looks like there is a problem with dimension name 'ZFIGL02P_nrDok'.
I've read that the problem can be with path to dimension and that i sould use MUN path.
So i've changed this function like this:
CGAddPromptValues(nazwaPyt,
'[ZFIGL02P_COGNOS_TEST].[Utworzono dnia].[Utworzono dnia].[Utworzono dnia Poz. 0]->:[BW].[0CREATEDON].[20130116]',
'[ZFIGL02P_COGNOS_TEST].[Utworzono dnia].[Utworzono dnia].[Utworzono dnia Poz. 0]->:[BW].[0CREATEDON].[20130116]');

The MUN path should be good - i checked it in Report Studio, but an error is the same.
Do you know may be something about this function?
Should i set something at creating BEX PROMPT in SAP BW?
Off course when i set BEX PROMPT values in PROMPT Tab in my proccess everything is fine. But i'd like to set PROMPT value dynamically.

Re: CGAddPromptValues function problem

Posted: Mon Feb 11, 2013 3:39 pm
by tomok
Why are you asking Report Studio questions in a TM1 forum? There are several Cognos BI forums around and I'm sure they would be better equipped to handle this type of question.

Re: CGAddPromptValues function problem

Posted: Mon Feb 11, 2013 6:53 pm
by moby91
It looks like you are using the Package Connector to query SAP BW and import the query results into TM1.


Regarding the MUN you seem to refer to the IBM Technote 1614922 ->

http://www-01.ibm.com/support/docview.w ... wg21614922
CGAddPromptValues does not pass prompt value to SAP BW


Regarding to set a Prompt dynamically you seem to refer to the item 14 on Prompt Editing in the paragraph "Connecting to Published Packages" of the manual TM1 Turbo Integrator Guide ->

http://pic.dhe.ibm.com/infocenter/ctm1/ ... kage_GV309
TM1 TurboIntegrator 9.5.2
Importing Data Using the IBM Cognos TM1 Package Connector > Establishing a Connection to the Cognos BI Server
Connecting to Published Packages

14. Prompt Editing


See the thread

http://www.tm1forum.com/viewtopic.php?f=3&t=5009
Help TI problem using IBM Cognos Package Connector

in this form.

Re: CGAddPromptValues function problem

Posted: Tue Feb 12, 2013 11:02 am
by em_past
Yes, i've reaad it, but there aren't response to my question.
According to the documentation my function is correct and should be in this form:

size = CGPromptSize();
name = CGPromptGetNextMember(0 - (size - 1));
CGAddPromptValues(name,
'20130117',
'20130117');

But it is not. I think that i should set some value in SAP BW, don't you know?
Unfortunately ihaven't directly access to SAP BW, I'm working only on COGNOS (so FM, TM1, TI etc.)

And it is a TM1 question, because i'm talking about TI proccess.

Best regards!

Re: CGAddPromptValues function problem

Posted: Fri Feb 15, 2013 2:38 pm
by dr.nybble
It seems that the error your are getting is not related to setting prompts -- that appears to be working (see my post in the other thread for a hint on how to find out what the prompt values should look like).

You are getting data back but it is complaining that there is no element called "2500000228" in dimension "ZFIGL02P_nrDok".

Double-check the elements in that dimension.

Re: CGAddPromptValues function problem

Posted: Tue Feb 19, 2013 9:14 am
by em_past
Thanks for help!

But when i set prompt value 'by hand', in tab dimensions -> prompts in TI proccess, everything is fine. So my package should be OK i think.
But thanks a lot for help - it's really helpful message that settings for my prompt are in .blb file :-)