Skip to main content

Batch change status - workordermanagement:receipt - example?

Answered

Comments

3 comments

  • Martin Heigl

    Hi,

    you use a very old documentation. Please use help.beascloud.com
    We don't have this possibility not anymore.

    With follow script you have the possibility to change all batch information AFTER creation of the document

    https://help.beascloud.com/script/index.html?exampleafterreceipt.htm

    regards

    Martin

     

     

     

  • Fabio

    Hi, i create materialmanagement.src but not working.

    I want the batch to be changed to 0 - available but it didn't run.
    Does this command work in SAP's native Goods Receipt PO?

    of course this is a simple test, I will do a more complex querie after it works

     

    function ReceiptEnd 
    instance bsl b
    instance datastore dtw
    dtw=(v2)select  "IBT1"."ItemCode","OBTN"."SysNumber" &
       from "IBT1"  &
       inner join "OBTN" on "OBTN"."ItemCode"="IBT1"."ItemCode" and "OBTN"."DistNumber"="IBT1"."BatchNum"  &
       inner join "OITM" on "OITM"."ItemCode"="IBT1"."ItemCode" &
       where "IBT1"."BaseType"=20 and "IBT1"."BaseEntry"=<e_ReceiptDocEntry> ;
    for loop = 1 to <dtw.rowcount>
       dtw.setrow=<loop>
       b.put=BatchNumber("<dtw.itemcode>",<dtw.sysnumber>)<tab>{"Status":"0"}
       if <b.ret_code> <> 1 then
           messagebox=error$$<b.ret_text>
       end if
    next
    destroy=dtw
    end function

     

    Regards

    Fabio.

     

  • Martin Heigl

    Hi Fabio,

    this is only working, if you create the receipt over Beas.

    If you want to do this for documents created by native SAP, you can use the transaction notification - procedure.
    Note: Here you must know, what you do.

Please sign in to leave a comment.