Create receipt document with beas Service Layer
// Create a receipt document with 5 new serial numbers
// in this example you can see, how to work with place holder
instance bsl b
setvar=ls_json=
for ll_loop=1 to 5
addvar=ls_json={"ItemCode":"RM_S","WhsCode":"01","DistNumber":"<time,hhmmss><ll_loop>","Quantity":1}
if <ll_loop> <> 5 then
addvar=ls_json=,
end if
next
setvar=ls_json={"DocumentLines":[<ls_json>]}
// in post command use only variable.
// follow is not working: b.post=receipt={"DocumentLines":[<ls_json>]}
// because the system convert placeholder only, if the string don't start with {
b.post=receipt=<ls_json>
messagebox=<b.ret_code> <b.ret_text> <b.ret_value>
destroy b