Hades' Land

Hades is the lord of the dead and ruler of the nether world, which is referred to as the domain of Hades or, by transference, as Hades alone.
« 你相信命运吗? | Home | [转帖]心不在焉时干的最牛事 »

PB和SAP通讯的例子

oleobject saprfc,connection2,funct,table_d,functions,funct2,intab,categ
long ll_status,result

saprfc = create oleobject
ll_status = saprfc.connecttonewobject("sap.functions")
connection2 = saprfc.connection
connection2.applicationserver = "112.12.2.10" //服务器IP
connection2.systemnumber = '00' //系统编号
connection2.client = '300' //客户端
connection2.user = 'wx-qpd' //RFC用户
connection2.password = 'baobei' //密码
connection2.language = 'zh' //语言
if connection2.logon(0,true) = false then
messagebox('connet sap','connect failed')
end if


//調用z_rfc_read_bom
funct = create oleobject
funct = saprfc.add("z_rfc_read_bom")

//convert oleobject in any variable to string
funct.exports("I_matnr", sle_1.text ) //輸入參數值
funct.exports("i_plant",sle_2.text)
funct.exports("i_bom_us",ddplb_1.text)
funct.exports("i_valid",rq)


if funct.call = false then //Call Rfc
messagebox('','Read bom call failed')
end if

int li_idx,li_row
oleobject oleitem
oleitem = funct.tables("export_bom")

for li_idx = 1 to oleitem.rowcount()
li_row = dw_zbarcode_tab.event pfc_addrow()
dw_zbarcode_tab. SetItem(li_row, "ITEM_CODE", oleitem.value(li_idx,"ITEM_CODE")
dw_zbarcode_tab. SetItem(li_row, "BARCODE", oleitemvalue(li_idx,"BARCODE")
next
  • 相关文章:
  • [转贴]call sap rfc_read_table  (2008-8-14 9:0:18)

    PowerBuilder 11.5 Build 1502 破解补丁  (2008-6-24 11:52:22)

    [转]SAP用户密码加密函数  (2008-6-23 9:48:25)

    [转]SAP 用户权限解剖  (2008-6-23 9:48:25)

    PowerBuilder 11.2 Build 8542 破解补丁  (2008-5-30 9:50:3)

    PowerBuilder 11.2 Build 8407 破解补丁  (2008-4-17 10:4:14)

    PowerBuilder 11.1 Build 8204 破解补丁  (2008-1-4 10:53:38)

    PowerBuilder 11.1 Build 8123 破解补丁  (2007-11-17 16:52:22)

    用VC创建供PB调用的DLL  (2007-11-3 12:38:26)

    用DLL连接PB和VC++编制的不同程序  (2007-11-3 12:34:41)

  • 评论

    发表评论

     
     
     
     
       

    ◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

     

    日历

    导航

      

    最近发表

    最新评论

    This Blog is Base on Z-blog,and modified by Hades Studio in China.
    © Copyright 2007-2010 Hades.All Rights Reserved.

    © Powered by Z-blog 1.8 Arwen Build 90619. 2007-2010, All Rights Reserved.