【无标题】

title:ERP进程开发

使用一个进程引用另外一个进程函数

主要需求

在一个进程A运行的时候,点击后按钮后传参自动调用另外一个进程B里面的函数

开发步骤

1、在进程中查找符合传入参数的结果

stpapi.put.field("被调用进程名(aabbb1111m111)","被调用字段",str$(传入参数值 ))

2、查找启动进程

reta=stpapi.find("被调用进程名", error.msg)

3、返回值1则有结果,如果有确认框的情况下需要先选中yes再调用函数

if reta = 1 then		
						retval1=stpapi.enum.answer("被调用进程名", "弹出框名(aabbb1111)", tcyesno.yes)

注:弹出框的代码在左上角

4、返回值1则执行成功,进行调用函数

if  retval1=1 then
							stpapi.form.command("被调用进程名",5,"被调用的函数名",error.msg)//2进程,5函数
						endif
						

注:被调用的函数名在被调用进程的form commands里面查找,对应的是表格中的menu/session/function列

5、调用后结束进程

stpapi.end.session(""被调用进程名", error.msg)

最后在进行debug就可以啦!

*附上stpapi.form.command()方法的用法
void stpapi.form.command(string session, long command.type,
string command.prog, ref string err.mesg)
Arguments
Session: Name of the session on which this command runs.
command.type: The type of form command to be run. The following values
apply:
2: Session
5: Function
command.prog: The code of the session or the name of the function to be
run.
err.mesg: This parameter contains the text of the error message if the
function cannot complete normally.
Description
This function causes the specified form command to run in the specified
session.
Return Values
None.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值