time entry with beas script
RespondidaDear experts, hi to all,
My SAP B1 version is 9.2 PL 08
and
Be.as version is 9.2(5.29) PL:05 HF:5
I am trying to run 2 scripts; one to start a time time entry and one to end it.
I don't have any problem when I am working with base resource of an operation.
But when alternative resource that was defined on route was choosen a problem occures on closing the entry.
Below you see my script ;
When
wotime=barcode=<ls_barcode>
line runs an error message occurs:
Error select from beas_ftapl (SQL error code: -1)
And code keep on running and on line:
wotime=save
another error came:
Error select beas_fthaupt/pos wo_time Errorplace:1800 (Error: No entry found)
For this operation:
Barcode for alternative resource is 3000015001
Barcode for base resource is 3000015
Nummer column on table beas_ftapl is 3000015
I think that barcode number is used on search at table beas_ftabl and no record returns.
I change
wotime=barcode=<ls_barcode>
to
wotime=barcode=3000015
and it runs.
How can I separately give these two numbers.(barcode and beas_ftabl nummer)
Or is there any other problem.
Thanks.
setvar=ls_aplatz_id=KYN02
setvar=ls_barcode0=3000015001
datetime ldt_fromdate
integer ll_buchnr_id
string ls_barcode
string ls_aplatz_id
select top 1 BUCHNR_ID,BARCODE,AB,APLATZ_ID into ll_buchnr_id,ls_barcode,ldt_fromdate,ls_aplatz_id from BEAS_FTSTMP
where APLATZ_ID=<ls_aplatz_id,dbstring> and BARCODE=<ls_barcode0,dbstring>
declare=wotime=ue_api_time
wotime=addline
wotime=barcode=<ls_barcode>
if <return> = -1 then
return failure
end if
wotime=ftstmpnumber=<ll_buchnr_id>
wotime=ftstmp_buchnr_id=<ll_buchnr_id>
setvar=e_buchnr_id=<ll_buchnr_id>
wotime=APLATZ_ID=<ls_aplatz_id>
wotime=user=01
wotime=fromdate=<ldt_fromdate,yyyy/mm/dd>
wotime=fromtime=<ldt_fromdate,hh:mm>
wotime=todate=<now,yyyy/mm/dd>
wotime=totime=<now,hh:mm>
wotime=quantity=5
wotime=scrap_rm=1
wotime=addscrappid=01=1
wotime=timecalc
wotime=save
destroy=wotime
-
Comentario oficial
Hello Halim,
Due the complexity of the case, please contact your SAP Partner to get support for this scripts, if your Partner can't help you they can contact our support development team.
Iniciar sesión para dejar un comentario.
Comentarios
1 comentario