Skip to Content
0

JavaScript workflow SAP b1 9.2

Jul 12, 2017 at 10:16 AM

134

avatar image

Hi all,

Can someone help me please...

I need to implement a workflow for BP or item creation, when a user create it, the script must turn it automatically into inactive, and the workflow have to continue until a certain superuser turn the master data into active manually.

I found an example which is doing it, below is the used script :

var BPCode= CurrentProcess.B1Obj('dataObject1');

var bpService = company.getBusinessService("2");

var bp = company.getBusinessObject("2", BPCode.getCardCode());

var frozenType=Utility.getEnumValue(bp, "FrozenType", "tYES");

var validType=Utility.getEnumValue(bp, "ValidType", "tNO");

bp.setFrozen(frozenType);

bp.setValid(validType);

bpService.update(bp);

When executing this task (SAP HANA 9.2 PL7), the workflow stops and shows me an error : "Client received SOAP Fault from server: [OCRD.RelCode] , 'Field cannot be updated (ODBC -1029)' Please see the server log to find more detail regarding exact cause of the failure."

But the weird thing, when I try to execute it in another company (SAP SQL 9.1 PL8), the task is executed without any error!

Could someone help me to make it work on Hana?

Thanks in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers