cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on using BRM Rules Edit API to modify the Decision tabl

Former Member
0 Kudos

Hi Experts

I was trying to use to BRM Rules Edit API (in CE 7.31) to modify the Decision table (DT) record (as per explained in below URL)

http://help.sap.com/saphelp_nw73ehp1/helpdata/de/e2/3620cef55842cca4632664212f31b1/content.htm?frame...

I have one ruleset and one DT in rules project.  I am able to read the record from the DT successfully by APIs, but when I try to modify it I am facing problem. After setting the new cell value for particular DT row, I am not able to commit the project to activate the updated record for DT. Could anybody help on this by providing some guidance for below syntax, it would be really great help.

Syntax ==>>   project.commit(rulesets , true);

Thanks & Regards,

pankaj

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Pankaj

You can use the following code for committing the changes

Create a IRuleSet Array and define its size as 1.

IRuleset[] rulesets = new IRuleset[1];

Assign its first element to the ruleset that you already created .

rulesets[0] = ruleset;

and you can commit using the IRuleSet Array

project.commit(rulesets, true);

Try using this code .

Regards

Mani Gupta

0 Kudos

Hi ,

I am facing similar issue as commit() allows only ruleset array.

Please share if you reached out to SAP for an answer ?

Thanks,

MB

Former Member
0 Kudos

Hi Mahantesh,

I was facing a similar problem regarding placing string values in dtRows element.

for example: dtRows[0].getCells()[0].setValue("string");

ends in an error if i tried to commit. This problem occurs if i edited colomns of BRM which has the type string.

There is an issue regarding the background pointer arithmetic in this case. For me the folllowing solutions worked fine: dtRows[0].getCells()[0].setValue("string".toString());

I just added the toString method, which forces creation of new variable in the context of the server.

Perhaps this could solve your problem.

Regards Patric

0 Kudos

Thanks Patrick. I will try this out.

Regards,

MB

Former Member
0 Kudos

Hi pankaj,

i'm facing the same problem. Did you solve your problem?

Thanks & Regards,

Patric