Beas Common Interface, WO BOM Issue

Article Type: Tips & Tricks

Product AREA: beas

TOPIC / SYSTEM AREA (beas): Work Order

System Functionality: Beas COMMON interface

 

Scenario description

The Beas Common Interface provides a very simple way to issue material during the Work Order process.

It is a functionality that has been implemented in Beas for a long time and can still be used under certain conditions.

But this functionality is not possible for batch or serial managed items!

 

This can be particularly suitable if, for example, manufacturing is carried out with another software tool and there is an SQL connection to the Beas database.

The issuing of the material is performed with a simple SQL insert statement.

 

Therefor the table BEAS_COMMON_INPUT is existing for inserting the SQL Statement, which is then executed via the running Beas Sever Manager. Another table BEAS_COMMON_OUTPUT can be used for the output of the BOM issuing (e. g. error code, error text).

 

Solution

For working with Beas Script via the Beas Common Interface the following fields of the table BEAS_COMMON_INPUT are to be filled:

 

COMMONTYP:                 bomissue

DOCNUM:                        document number of work order (table.field: “BEAS_FTHAUPT.BELNR_ID”)

LINENUMBER:                  position number of work order (table.field: “BEAS_FTPOS.BELPOS_ID”)

TEXTPARAMETER:            The to be booked positions with the following structure:

                         Position<tab>Quantity<tab>empty<tab>whscode<tab>bincode<tab>rfid<cr_lf>

                         You can concatenate the string in case of multiple BOM positions:

                         Example:

                         Position<tab>Quantity<tab>empty<tab>whscode<tab>bincode<tab>rfid<cr_lf>

                         Position<tab>Quantity<tab>empty<tab>whscode<tab>bincode<tab>rfid<cr_lf>

                         Explanation:

                         tab:                     ascii 9 (or  "#" for Test's)

                         cr_lf:                    ascii 13 + ascii 10

                         Position:             BEAS_FTPOS.POS_ID

                         Quantity:            to be booked quantity in the national-format according to                                                                              Windows settings (english: 10.5, german 10,5)

                         Empty:                nothing (in future: batchnum)

                         whscode :           warehouse code, if you don't use the default-warehouse, else empty.

                         Bincode:             bin code, if you work with bin warehouse

                         Rfid:                    rfid-code, if you work with rfid and bin warehouse

 

It is imperative that the sequence be followed here.

If an item of information is not required, leave it blank.

It is also possible to leave out the positions from the back to the front if they are not needed.

 

The result of the transaction will be inserted by Beas into BEAS_COMMON_OUTPUT:

COMMONTYP:             O = Ok, E = Error

ANSWERTYP:                0 = OK, 1 = Error

ANSWERTEXT:              if OK then empty else the last error text

PARAMETER1:              all generated documents entries

                                    Example:

                                    docentry[char 9]type (59 or 60)[char 13 + char 10]

                                    docentry[char 9]type (59 or 60)[char 13 + char 10]

                                    ([char 9]=tab, [char 13 + char 10]=CRLF)

REQUESTID:                 The same request id as in the BEAS_COMMON_INPUT (field: REQUESTID)

 

 

Examples:

Issue of 1 BOM entry with defined warehouse

WO Number: 5

WO Position (assembly): 10

BOM Item Position: 30

Quantity: 10.7

Warehouse: 02

 

insert into “BEAS_COMMON_INPUT” (“COMMONTYP”,”DOCNUM”,”LINENUMBER”,”TEXTPARAMETER”)
            values ('bomissue',5,10,'30<char 9>10.7<char 9><char 9>02<cr_lf>')

 

Issue of 2 BOM entries

WO Number: 15

WO Position (assembly): 40

BOM Item Position: 10, Quantity: 20.5

BOM Item Position: 20, Quantity: 10

 

insert into “BEAS_COMMON_INPUT” (“COMMONTYP”,”DOCNUM”,”LINENUMBER”,”TEXTPARAMETER”) &
            values ('bomissue',15,40,'10<char 9>20.5<cr_lf>20<char 9>10<cr_lf>')

 

 

 

Related to

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Comment author
    Francisco Gabriel Lopez Tiburcio
    • Edited
    Hello
    
    I tested the script you share and it creates the work order but does not add the item positions.
    
    Do you have the code to add them?
    
    Greetings.
    0

Please sign in to leave a comment.