Beas Service Layer (BSL), working with Beas Script and Datastores

  • Updated

A Beas DataStore is a repository for storing and managing collections of data. This functionality is also available in Beas with Beas Script and could be very useful

 For this, the BSL objects are a very good help, because you often know only the functionality, but the associated tables are not in your mind.

 Look in the BEAS Script Documentation and search for the appropriate BSL object for your desired query.

blobid0.png

1.1. Getting the reservations of WO Serial Numbers

Write a short Script with BSL Object WorkorderSerialNumberReservation:

 

// My WO for retrieving

setvar=v_belnr_id=243

setvar=v_belpos_id=10

 

// Delete/Clear previous DataStore

destroy=my_bsl

// Declare DataStore

declare=my_bsl=ue_datastorevalues

// Assign the BSL Object

my_bsl.bsl=WorkorderSerialNumberReservation(<v_belnr_id>,<v_belpos_id>)

 

// Getting the corresponding values via loop

for loop=1 to <my_bsl.rowcount>

   my_bsl.setrow=<loop>

   setvar=v_docentry=<my_bsl.docentry>

   setvar=v_linenum=<my_bsl.linenumber>

   setvar=v_distnumber=<my_bsl.distnumber>

   setvar=v_qty=<my_bsl.quantity>

   setvar=v_remain_qty=<my_bsl.remainingquantity>

   // working with these results (e. g. in a function)

   my_function()

next

// Delete/Clear used DataStore

destroy=my_bsl

 

 

In this example the DataStore has 2 result lines in the loop:

 

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.