Alfonso Monsalv
8th October 2018, 23:36
Hi everybody:
How I can execute a command from the program script in Infor-LN ?
See details:
I have a program script that I need to execute a command from the program script code.
I want a process a Warehosing Order.
Do you know how to do it ?
My code Below:
function process.warehousing.order()
|this function process the Warehousing Order if the header status is not received .
{
err.msg = ""
stpapi.put.field("whinh2100m100", "whinh200.oorg", str$ (whinh200.oorg))
stpapi.put.field("whinh2100m100", "whinh200.orno", str$ (whinh200.orno))
stpapi.put.field("whinh2100m100", "whinh200.oset", str$ (whinh200.oset))
afs_ret = stpapi.find("whinh2100m100", err.msg)
if afs_ret = 1 then
stpapi.form.command("whinh2100m100", 5, "automatic.process", err.msg) |call the process function from this session
if not isspace(err.msg) then |--Error Message Location does not Exist
rprt_send()
else
err.msg = "Order Not Process / Lines not found for the Warehousing Order "
rprt_send()
endif
stpapi.end.session("whinh2100m100")
stpapi.end.session("whinh2100m100")
else
err.msg = "Warehousing Order not Found in the table "
rprt_send()
endif
}
How I can execute a command from the program script in Infor-LN ?
See details:
I have a program script that I need to execute a command from the program script code.
I want a process a Warehosing Order.
Do you know how to do it ?
My code Below:
function process.warehousing.order()
|this function process the Warehousing Order if the header status is not received .
{
err.msg = ""
stpapi.put.field("whinh2100m100", "whinh200.oorg", str$ (whinh200.oorg))
stpapi.put.field("whinh2100m100", "whinh200.orno", str$ (whinh200.orno))
stpapi.put.field("whinh2100m100", "whinh200.oset", str$ (whinh200.oset))
afs_ret = stpapi.find("whinh2100m100", err.msg)
if afs_ret = 1 then
stpapi.form.command("whinh2100m100", 5, "automatic.process", err.msg) |call the process function from this session
if not isspace(err.msg) then |--Error Message Location does not Exist
rprt_send()
else
err.msg = "Order Not Process / Lines not found for the Warehousing Order "
rprt_send()
endif
stpapi.end.session("whinh2100m100")
stpapi.end.session("whinh2100m100")
else
err.msg = "Warehousing Order not Found in the table "
rprt_send()
endif
}