Customers Subroutines

Customer master data - account info, credit, 0301 records

Subroutine count: 3

Table of Contents


VB_0301.REV1

Signature: SUBROUTINE VB_0301(CO,REQTYPE,CUSTNO,CREC,C1287REC,COEREC,ADDFLAG,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_0301.REV1

PropertyValue
Status[+] analyzed
Safety[COND] conditional
PatternCRUD
Args8
DescriptionSave or delete customer records across three tables (CUSTOMER, CUSTOMER.1287, CUSTOMER.OE) based on REQTYPE. On delete, soft-deletes (sets CUSTOMER.1287 field 4 to ‘Y’) and cleans up cross-reference tables CUSTXREF and REFXCUST. Audit trail via S0912.
Dangerous REQTYPEDELETE, SAVE

Arguments:

IndexNameDirectionDescription
0COinCompany number
1REQTYPEinRequest type: ‘DELETE’ to soft-delete and remove cross-refs, any other value to add/update
2CUSTNOinCustomer number (combined with CO to form record key)
3CRECinCustomer master record data as dynamic array (written to CUSTOMER table on save)
4C1287RECinCustomer 1287 record data as dynamic array (written to CUSTOMER.1287 on save)
5COERECinCustomer OE record data as dynamic array (written to CUSTOMER.OE on save)
6ADDFLAGinAdd flag: true if adding a new record, false if updating existing
7MESSAGEoutResult message: ‘SAVED’ or ‘DELETED’

Tables Written: CUSTOMER, CUSTOMER.1287, CUSTOMER.OE, CUSTXREF, REFXCUST

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_0301.REV1",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  "",
                 "6":  ""
             }
}

VB_CREDIT.REV1

Signature: SUBROUTINE VB_0304(CO,REQTYPE,CUSTNO,CREDITREC,ADDFLAG,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_CREDIT.REV1

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternCRUD
Args6
DescriptionSave customer credit records to the CREDIT table. This subroutine only supports add/update operations (no DELETE branch); it always writes the credit record via MATWRITE with audit trail logging via S0911.
Dangerous REQTYPESAVE

Arguments:

IndexNameDirectionDescription
0COinCompany number
1REQTYPEinRequest type (unused - no DELETE branch, always performs add/update)
2CUSTNOinCustomer number (combined with CO to form record key)
3CREDITRECinCredit record data as dynamic array (written to CREDIT table on save)
4ADDFLAGinAdd flag: true if adding a new record, false if updating existing
5MESSAGEoutResult message: always ‘SAVED’

Tables Written: CREDIT

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_CREDIT.REV1",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  ""
             }
}

VB_CUSTOMER.REV1

Signature: SUBROUTINE VB_CUSTOMER(CO,REQTYPE,CUSTNO,CREC,C1287REC,COEREC,ADDFLAG,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_CUSTOMER.REV1

PropertyValue
Status[+] analyzed
Safety[COND] conditional
PatternCRUD
Args8
DescriptionSave or delete customer records across three tables (CUSTOMER, CUSTOMER.1287, CUSTOMER.OE) based on REQTYPE. Nearly identical to VB_0301.REV1. On delete, soft-deletes and cleans up cross-reference tables CUSTXREF and REFXCUST. Audit trail via S0912.
Dangerous REQTYPEDELETE, SAVE

Arguments:

IndexNameDirectionDescription
0COinCompany number
1REQTYPEinRequest type: ‘DELETE’ to soft-delete and remove cross-refs, any other value to add/update
2CUSTNOinCustomer number (combined with CO to form record key)
3CRECinCustomer master record data as dynamic array (written to CUSTOMER table on save)
4C1287RECinCustomer 1287 record data as dynamic array (written to CUSTOMER.1287 on save)
5COERECinCustomer OE record data as dynamic array (written to CUSTOMER.OE on save)
6ADDFLAGinAdd flag: true if adding a new record, false if updating existing
7MESSAGEoutResult message: ‘SAVED’ or ‘DELETED’

Tables Written: CUSTOMER, CUSTOMER.1287, CUSTOMER.OE, CUSTXREF, REFXCUST

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_CUSTOMER.REV1",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  "",
                 "6":  ""
             }
}


Last updated: 2026-02-05 11:29 PM