Beas Script error with DI-API and BuchnrID Answered

Bin Liao

Hi,

we met a trouble while running our Beas script, and it gave me two error messages:

First message :

DI-API of_getbusinessobject 30:  You are not connected to a company Error calling external object function getbusinessobject at line 14 in function of_getbusinessobject of object ue_api_sbo.
sourcecode=ue_api_time.of_wip
buchnr_id=15517

 

Second Message :

Key fields ´Buchnr Id´ in line 1 need to be unambiguous. Values stored there are already in use.
col=Buchnr Id
row=1
column-name=buchnr_id,
info=copy of datastore saved on C:\Windows\TEMP\beas\databaseerror.xls
dberror=<sql>select ~"ADDITIONAL_PCOSTVK~",~"EXTERNAL_COST~",~"RUEST_VK~",~"PostInDocEntry~",~"MENGE_SCHLECHT~",~"ADDITIONAL_PC_GK~",~"RM_ME~",~"ABGKZ~",~"JOURNALENTRY~",~"RESOURCENPOS_ID~",~"UDF10~",~"ZEIT~",~"PCOSTVK~",~"ERFUSER~",~"POS_ID~",~"ADDITIONAL_PC_VK~",~"TIMEFACTOR~",~"DisplayName~",~"ANDTSTAMP~",~"PERS_ID~",~"CANCELD~",~"SlaveFromMaster~",~"PostInBoMDocEntry~",~"CANCEL~",~"UDF15~",~"AUFTRAG~",~"UDF2~",~"BUCHNR_ID~",~"UDF3~",~"ADDITIONAL_PCOSTGK~",~"UDF5~",~"UDF6~",~"ADDITIONAL_COST_VK~",~"BPLId~",~"UDF7~",~"UDF8~",~"UDF9~",~"BELPOS_ID~",~"BatchNum~",~"ENDZEIT~",~"KOSTEN_GK~",~"Project~",~"RUEST_GK~",~"AUSWAERTSBEARBEITUNG~",~"LogInfo~",~"MENGE_GUT_RM~",~"DocDate~",~"GRUND~",~"PCOSTGK~",~"ANDUSER~",~"BELNR_ID~",~"WKZ_ID~",~"ANFZEIT~",~"KSTST_ID~",~"UDF1~",~"MENGE_SCHLECHT_RM~",~"RM_FAKTOR~",~"UDF4~",~"APLATZ_ID~",~"ADDITIONAL_COST_GK~",~"TYP~",~"UDF11~",~"UDF12~",~"UDF13~",~"UDF14~",~"MENGE_GUT~",~"PRJUID~",~"PostOutDocEntry~",~"TIMETYPE_ID~",~"PTIMETYPE_ID~",~"KOSTEN_VK~",~"STATIONNAME~",~"PROCESS_ID~",~"ERFTSTAMP~",~"BPLName~" from ~"BEAS_ARBZEIT~" where 1=2</sql>

 

Beas script we used :

setglobal=errortext=
declare=wotime=ue_api_time
wotime=woreset
wotime=new
wotime=check_presence=false
wotime=cancel=N
wotime=pers_id=999
wotime=belnr_id=158
wotime=belpos_id=20
wotime=pos_id=20
wotime=manualbooking=N
wotime=parallel=N
wotime=aplatz_id=01
wotime=timetype_id=AA
wotime=messagetype=R
wotime=quantity_rm=0
wotime=minute=230
wotime=docdate=2021/09/02
wotime=fromdate=2021/9/1 15:10:30
wotime=todate=2021/9/2 16:17:04
wotime=fromtime=15:10
wotime=totime=16:17
wotime=save
if <wotime.ret_code> n= 1 then
if <global:errortext> <> then
setvar=is_answerid=1
setvar=is_answertext=<global:errortext>
else
setvar=is_answerid=0
setvar=is_answertext=<e_docentry>
end if
end if
if <wotime.ret_code> n= -1 then
setvar=is_answerid=1
setvar=is_answertext=<global:errortext>
end if
--
second script
etglobal=errortext=
declare=wotime=ue_api_time
wotime=woreset
wotime=new
wotime=check_presence=false
wotime=cancel=N
wotime=pers_id=999
wotime=belnr_id=158
wotime=belpos_id=20
wotime=pos_id=20
wotime=manualbooking=N
wotime=parallel=N
wotime=aplatz_id=01
wotime=timetype_id=BB
wotime=messagetype=A
wotime=quantity_rm=0
wotime=minute=230
wotime=docdate=2021/09/02
wotime=fromdate=2021/9/1 15:10:30
wotime=todate=2021/9/2 16:17:04
wotime=fromtime=15:10
wotime=totime=16:17
wotime=save
if <wotime.ret_code> n= 1 then
if <global:errortext> <> then
setvar=is_answerid=1
setvar=is_answertext=<global:errortext>
else
setvar=is_answerid=0
setvar=is_answertext=<e_docentry>
end if
end if
if <wotime.ret_code> n= -1 then
setvar=is_answerid=1
setvar=is_answertext=<global:errortext>
end if

 

Best Regards,

Bin

Comments

3 comments

  • Comment author
    Martin Heigl

    Hi Bin,


    This funciton need the DI-API

    You became the error message "You are not connected to a company"

    A problem with the connection to DI-API is existing. I don't know how you started the application...
    Or the system lost the connection while the program was running.

     

    regards

    Martin

    0
  • Comment author
    Bin Liao

    Hi Martin,

    Thanks for your reply.

    Looks like most of error we met are caused by AI-API.

    I have restart beas server but the problemss still exist :(

    Can you give me some advice ?

     

    0
  • Comment author
    Martin Heigl

    Hi Bin,

    i see, you use variable "is_answer". This is used in the beas common interface.
    Means: You use this script in a service.

    Question is: do you have this error always or only over night? Do you have any services which restart the SQL Server? 
    Do you use the DI-API use on other station? (in this case you create a disconnect from the first station)

    The reasons can be complete different. Not simple to say anything with less informations.

    regards

    Martin

    0

Please sign in to leave a comment.