Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Adding SI_CURRENT_VALUES to a CR parameter

Hi All!

I kindly as your help on a task that sounds simple, but I just don't know how to make it.


I'm working with BO XI R2 SP4 and I'm tryig to adapt a javascript file that deletes and updates CR parameter values from CMS, so that it also adds values.



Althought I've managed to add values to the parameter, with this line of code:


oInfo.ProcessingInfo.Properties.Item("SI_PROMPTS").Properties.Item("SI_PROMPT" + p).Properties.Item("SI_CURRENT_VALUES").Properties.Add("SI_VALUE"+ (Countvals+1), 'CustomerX');


The added value (CustomerX in this case) gets committed, but it doesn't appear on CMC



The issue can be clearly seen on the Query Builder results:



The values I'm creating don't have the same property structure as the ones that have been created manually and visible in CMC.


I've tried to add properties to the value I managed to create (in the screenshot, SI_VALUE6), with the lines below, but all I get is a blank content in Query Builder and no change in CMC.


...("SI_CURRENT_VALUES").Properties.item("SI_VALUE6").Properties.Add("SI_DATA",newID);
...("SI_CURRENT_VALUES").Properties.item("SI_VALUE6").Properties.Add("SI_OPTIONS", 0);
...("SI_CURRENT_VALUES").Properties.item("SI_VALUE6").Properties.Add("SI_DESCRIPTION", "");
...("SI_CURRENT_VALUES").Properties.item("SI_VALUE6").Properties.Add("SI_SHOWDESCONLY", "false");



I guess I need to create a new collection and add it as a property of the SI_CURREENT_VALUES, but how to do that?


I've tried to emulate the property with this block of code, but I get an error saying that I 'm not providing enough parameters at the second line below...


var newCollection = oInfoStore.NewInfoObjectCollection();
var newInfoObject = newCollection.Add();
newInfoObject.Properties.Add("SI_DATA", 'Customer6');
newInfoObject.Properties.Add("SI_OPTIONS", 0);
newInfoObject.Properties.Add("SI_DESCRIPTION", "");
newInfoObject.Properties.Add("SI_SHOWDESCONLY", "false");
newInfoObject.Title = "SI_VALUE"+ (Countvals+1);

... and I honestly wouldn't know what to enter as PluginInfo.


I've read whatever is available on the net, and I did find the solution for Java or .NET that use a report parameter kind of object, but not for this COM javascript.


Can you please help?

Alvaro




QB-Empty.JPG (85110 B)
Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question