Skip to Content

Approval Workflow on Item Master

One of our clients wanted to implement the single level approval workflow on Item Master. Scenario is - Whenever a concerned User creates an Item into an Item Master that item must be sent to the particular Manager for review/update. I have created workflow with Conditional Start Event as start point. This event checks a UDF field (valuesYes/No/Pending) for value initial value Y for items and then it should execute the script tasks to set the field value to P (not working). Please help. Script is as below- var param = company.getRecordsetParams(); var query = "select ItemCode from OITM where U_Is_New = \'y\' " print(query); param.setQuery(query); var recordset = company.getRecordset(); recordset .doQuery(param); //Update if(recordset.read()){ var field = recordset.getField(0); var ItemCode= field.getColumnValue(); print("ItemCode = " + ItemCode); var imService = company.getBusinessService("4"); IM = company.getBusinessObject("4",ItemCode); IM.getUserFields().put("U_Is_New","P"); imService.update(IM); }

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 08 at 04:08 PM

    Hi Anurag,

    Are you certain you wanted to post in the SAP Business Workflow space? SAP Workflow incorporates ABAP-based methods into tasks.

    If you're sure you're talking SAP Workflow here, then give us a clue what the error message is, what you've tried to solve the error, where you've looked for help, etc.

    Sue

    Add comment
    10|10000 characters needed characters exceeded