X12 SH856 SOTPII (optional T/P) using direct by key
SOTI or SOPI depending on an attribute in the SHIPMENT level
Subscribe to keep this site alive! Under new management but as always, still 100% FREE. Anyone with the IBM i is a friend of ours.
SOTI or SOPI depending on an attribute in the SHIPMENT level
The Challenge:
I have a translation format that is catering to all of my X12-SH 856's that has SOTI. A new trading partner wants to send them two types of ASNs: SOTI and SOPI - everything will be the same except one is sending HL-T and the other HL-P and it will be based on an attribute from the shipment file. We want to implement this is very minimal impact in the system. Is it possible to have one format with optional Tare/Pack?
Analysis:
The SOTPI with optional T/P has been successfully implemented using the SuEDR - Sequential using Externally Defined Records. This was easily done because when using the Access Method SuEDR, the map relies on the sequence of the records in the UFD to fill in the mappings and drives at what hierarchy it is at. And the "optionality" of T/P or both is driven by data from a field in the file on that level. But when using the Access Method Direct by Key (DBK), this concept will not work. Firstly because the "optionality" is based on an attribute in the shipment level. To be able to make the tare/pack optional is by creating a JOINT logical linking the Tare/Pack with shipment and do a select/omit against the SCAC attribute.
Solution:
Decide whether or not you need a new SOTI format for this new trading partner. If this new trading partner can use the existing SOTI format:
A. You will need to create a logical on the Shipping file that would omit the SOPI transactions of the new trading partner. The logical will be selected this way: SELECT PARTNER is NOT 'ACE' or PARTNER is equal to 'ACE' and tare only (SCAC='FEDEX').
B. Go to the existing SOTI UFD and replace the shipment file with the new logical in 1.A.
C. And create another logical on the Shipping file for the SOPI of the new trading partner: SELECT PARTNER is equal to 'ACE' and pack only (SCAC='USPS').
D. Create a new SOPI format using the new SOPI UFD in 1.C.
If a new SOTI format is needed:
A. You will need to create a logical on the Shipping file that would omit the trading new trading partner. The logical will go be selected this way: SELECT PARTNER is NOT 'ACE'.
B. Go to the existing SOTI UFD and replace the shipment file with the new logical in 2.A.
C. Create another logical on the Shipping file for the SOTI for the new trading partner: SELECT PARTNER is equal to 'ACE' and tare only (SCAC='FEDEX').
D. Create a new SOTI format using the new SOTI UFD in 2.C.
E. And create another logical on the Shipping file for the SOPI: SELECT PARTNER is equal to 'ACE' and pack only (SCAC='USPS').
F. Create a new SOPI format using the new SOPI UFD in 2.E.