DeleteAllRelatedLocations

Delete All Related Locations

Major Business Rule

Object Name: B4100201

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description
Purpose

This function deletes all Item Location records (F41021) that are related to an Item Branch record 

(F4102).


Setup Notes and Prerequisites

The Short Item Number (ITM) and Branch/Plant (MCU) fields are required parameters.


If the Save PBIN parameter = '1', the primary bin will not be deleted from the Item Location table.


If the Delete Zero Qty Location parameter = '1', only the locations with zero quantities will be 

deleted.


Technical Specification


This function deletes all Item Location records for the Item Branch key passed in.  The logic flows 

as follows:


If    Delete Zero Qty Location parameter not equal '1'

IfSave PBIN parameter not equal '1'
Delete F41021 with Short Item Number and Branch/Plant
Else
Delete F41021 with Short Item Number, Branch/Plant and 'S' in PBIN  
End
Else
Read F41021 for all locations with Short Item Number and Branch/Plant

While record exists in F41021

If  all qty buckets are zero
If   Save PBIN parameter not equal '1'
Delete
Else
If   Primary bin (LIPBIN) not equal   'P'
Delete
End
End
End
Read next record

end

end




Data Structure

D4100201 - Delete All Related Locations

Parameters:
Data Item Data Structure DescriptionI/ORequired

ITMShort Item NumberIY

MCUBranch/PlantIY

EV01Save PBININ

EV02Delete Zero Qty LocationIN


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

cSavePrimaryBinEV01charNONENONE

'1' = Do not delete Primary Bin
^

cDeleteZeroQtyLocationOnlyEV02charNONENONE

1' = Delete only the Location with Zero Qty
^

Related Functions

N7000950 B4100201 - Plug and Play - 41

Related Tables

F41021 Item Location File