Dear All,
We are trying to build a planning application which contains a table with sales docs, items and materials in rows and an input ready key figure in columns. If the user selects a material from the table, a pop up appears on the screen where she/he can determine the key figure value (from 1 to 10) that should be populated to each rows with the same material number.
The application is based on a BEx Query which has a formula variable. In fox formula I'm using this variable to define the value of key figure. (highlighted with red)
DATA DOC_NUM TYPE ZDOC_NUM.
DATA ITEM TYPE ZITEM.
DATA KEYFIG TYPE ZDEC_ID.
DATA VAR_1 TYPE I.
DATA MATERIAL TYPE ZMATERIAL.
DATA USER TYPE ZUSERNAME.
DATA TIMESTMP TYPE ZTIMESTMP.
DATA CALDAY TYPE 0CALDAY.
DATA IPROV TYPE 0INFOPROV.
VAR_1 = VARV( Z_COND_VAR_01 ).
USER = VARV( Z_USERNAME_VAR_001 ).
TIMESTMP = VARV( Z_TIMESTAMP_VAR_001 ).
CALDAY = VARV( 0DAT ).
IPROV = ZODEC_NT.
FOREACH DOC_NUM, ITEM.
{ ZKEYFIG, CALDAY, IPROV, DOC_NUM, ITEM, TIMESTMP, USER } = VAR_1.
ENDFOR.
In Design Studio application I have the following code:
APPLICATION.setVariableValueExt("Z_COND_VAR_01", DROPDOWN_2.getSelectedValue());
PS_2.setVariableValueExt("Z_MATERIAL_OFFLINE_SEL", CROSSTAB_1.getSelectedMember("ZMATERIAL").externalKey);
PS_2.execute();
After the execution of the Sequence I get the message "Variable Z_COND_VAR_01 has to be restricted to a single value". If I define a default value for the variable, the sequence runs with this default value properly. So it means that the planning variable doesn't receive the value from DS.
I also tried the following code:
APPLICATION.setVariableValueExt("Z_COND_VAR_01", "2");
PS_2.setVariableValueExt("Z_MATERIAL_OFFLINE_SEL", CROSSTAB_1.getSelectedMember("ZMATERIAL").externalKey);
PS_2.execute();
But the result was the same.
I have executed the sequence in BEx Analyzer and it works properly.
Maybe the type mismatch could be the problem: The variable in planning function is an Int. but in DS I can only pass string values to variable.
Can anybody help me to solve this issue?
Systems: BW on HANA 7.4 SP12, DS 1.6 SP1 patch 2.
I found this note, which looks similar to my issue, but it's for DS 1.3.:
https://launchpad.support.sap.com/#/notes/2001601/E
Thanks and Regards,
Adam