on 04-01-2016 6:17 PM
I am try to use BAPI_ISUSMORDER_USERSTATUSSET to set a User Status of MCMP in a work order. My problem is that I don't know how to set the parameter for "Status" because it has sub categories for Internal (System Status) and External (User Status. Here is my script and any help would be appreciated.
var order = session.findById("wnd[0]/usr/txtPersonas_1456173699701").text;
var rfc = session.createRFC("BAPI_ISUSMORDER_USERSTATUSSET","");
rfc.setParameter("NUMBER", order);
rfc.setParameter("STATUS", "MCMP");
rfc.setParameter("INACTIVE", "");
rfc.send();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Andreas!
I worked with my Basis team and they helped me with the solution.
Here the script for all to enjoy!
var shortorder = session.findById("wnd[0]/usr/txtPersonas_1456173699701").text;
var order = ("000000000000" + shortorder).slice(-12);
var rfc = session.createRFC("BAPI_ISUSMORDER_USERSTATUSSET");
rfc.setParameter("NUMBER", order);
var statusStructure = { EXTERN: 'MCMP' };
rfc.setParameter("STATUS",JSON.stringify(statusStructure));
rfc.setParameter("INACTIVE", "");
rfc.requestResults('["RETURN"]');
rfc.send();
var ret = rfc.getResult("RETURN");
session.utils.log(JSON.stringify(statusStructure));
session.utils.log(ret);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.