How to interchange quickly from shipper number to edi sequence number?

jdrouil

New Member
I am writing a custom report where the user keys in a shipper/asn number, and I report a combination of data from the abs_mstr and various edi_ecommerce files (e.g.: edmfr_mstr).

I know I can get at it using edmfr_mft_idx edmfr_mft_idx_val, but these are not indexed in the table, so this access is SLOW, especially for a single-ASN inquiry.

I also know I can get to the batch number using abs_export_batch on the "s" level abs_mstr record.

Any tips? Thanks,

Joe

PS: This client is running EB 2.1, Linux.
 

jdrouil

New Member
Here is what I came up with. The following example displays the header record structure when provided a shipper number and domain as input. It first finds the sequence number from a relatively short file, then uses it to garner information from a much longer one. This sped up the search on a single shipper from 4 minutes down to a few seconds.

for each edmfr_mstr no-lock
where edmfr_domain = temp-domain
and edmfr_mft = "abs_mstr"
and edmfr_mft_idx = "abs_id,abs_shipfrom"
and edmfr_mft_idx_val = string(temp-shipper-no + "," + temp-domain",
each edmfrd_det where edmfrd_domain = temp-domain
and edmfrd_mfd_seq = edmfr_mfd_seq
and edmfrd_mfd_rec_seq = 1
:
display edmfrd_det with 1 column width 440.

Hope this helps someone!

- Joe
 
Top