          SUBROUTINE (OID,GEN.LIST,LDID.LIST,PRD.LIST,QTY.LIST,UOM.LIST)
** Version# 4.0002[22] - 09/20/2013 - 01:08pm - TSMITH - eclipse
*** V4.0002 Change - Custom Coding . - 09/20/2013 - TSMITH - eclipse
** Copied from BP OE.GET.LDID.PRDS Version# 4 - 03/22/2012 - 12:56pm - KEVINM - main

*** Subroutine - OE.GET.LDID.PRDS
*-------------------------------------------------------------------------*
*** This subroutine is used to get a list of LDIDs of an order generation
*** and a list of product IDs associated with the LDIDs
*-------------------------------------------------------------------------*
*** OID       - The Order ID                                         [IN]
*** GEN.LIST  - VM List of open order gens                           [IN]
*** LDID.LIST - AM Delimited List of line item ids                   (OUT)
*** PRD.LIST  - AM Delimited List of product ids                     (OUT)
*** QTY.LIST  - AM Delimited List of line item quantites             (OUT)
*** UOM.LIST  - AM Delimited List of unit of measures                (OUT)
*-------------------------------------------------------------------------*
*** COMMON: LED,LD are used but not modified.
*-------------------------------------------------------------------------*

          MATBUILD SV.LED FROM LED
          MATBUILD SV.LD  FROM LD
          MATREAD LED FROM LEDFILE,OID ELSE RETURN
          LDID.LIST = ''
          PRD.LIST = ''
          QTY.LIST = ''
          UOM.LIST = ''
          GEN.CT = DCOUNT(GEN.LIST<1>,VM)
          FOR GEN.I = 1 TO GEN.CT
             GEN = GEN.LIST<1,GEN.I>
             OE.GET.LDID.LIST CURR.LDID.LIST,OID,GEN
             CURR.LDID.LIST = RAISE(CURR.LDID.LIST)
             CT = DCOUNT(CURR.LDID.LIST,AM)
             CURR.PRD.LIST = ''
             FOR LDN = 1 TO CT
                LDID = CURR.LDID.LIST<LDN>
                LOCATE LDID IN LDID.LIST SETTING POS ELSE
                   *IF NUM(LD(1)) THEN CONTINUE
                   LD.GET LDID
                   PRD.LIST<-1>  = RAISE(RAISE(LD(3)<1,1,2>))
                   QTY.LIST<-1>  = LD(4)
                   UOM.LIST<-1>  = LD(23)
                   LDID.LIST<-1> = LDID
                END
             NEXT LDN
          NEXT GEN.I

          MATPARSE LED FROM SV.LED
          MATPARSE LD FROM  SV.LD
          CONVERT AM TO "~" IN PRD.LIST
          RETURN
*-------------------------------------------------------------------------*
!TSMITH~09/20/13~13:08
