Line Loops in B1UP

Boyum’s Usability Package gives you the ability to use Line Loops to do math on columns in a marketing document. I need to drop the total shipping weight of a Sales Order into a UDF, but I want to keep a running total as the user is entering the order.

To do this, create the UDF on the header table of whatever document you want (ORDR, OINV, etc.) Alternatively, you can use the Item Placement Tool to drop an empty field onto the document, but you might as well have the weight post to the database so that you can use it for reporting or other calculations.

Add a B1 Validation Config when the Item No. column is validated.

As with all B1UP Validation Configs, we have to define a trigger. So we’ll make the trigger when the Item No. column is Validated (exited).

The actual event that will fire to update our field.

Fromtype is 139 in our case (a Sales Order), Item 38, Column 1. We know this by going to View > System Information in SAP and then mousing-over the Item No. field in the Line Items.

So, when this field is validated, we’ll kick off a Universal Function. UF-028 looks like this:

Our actual Line Loop UF [UF-028]

This is the first time I had used a Line Loop, so I did the dicking around so that you don’t have to. Set the UF type to Line Loop. The “Line item UID” is where you set the Item UID of the lines you are performing calculations on, in our case Item 38. The other default values can stay the same.

In the “Final Result” section, we’ll set it to Always Execute, return the Result as string, and then execute another Universal Function, UF-029.

UF-029 – Drops the result of the line loop into the field on the form (or a UDF in a table).

So, the order of operations is pretty simple:
User exits the Item Number field -> A B1UP Validation Config runs -> Line Loop is executed [UF-028] and sums the weight column -> Line Loop result is passed to another UF [UF-029] which sets the field on our form to the Line Loop result.

You can call the result of the line loop and use its value in the UF with $[LLRESULT.NUMBER].

To be continued with other uses for line loops…

By: