Activity Commitment Detail Report link to PO Line Detail

 1 Replies
 0 Subscribed to this topic
 43 Subscribed to this forum
Sort:
Author
Messages
Carl Gifford
Basic Member
Posts: 11
Basic Member
    I am trying to write an AC Committment Detail report in Crystal (using SQL) and would like to be able to reference the specific PO Line (POLINE) record. Is this possible.

    I am using the ACCOMMITX table and can find the PO from this table, but I cannot seem to find a link to the specific PO Line. Is this possible?

    Thanks,
    Eddie Smith
    Advanced Member
    Posts: 39
    Advanced Member
      To get the PO information you will need to join the MMDIST table to your query. Below is a query we use to get both RQ and PO information on our activities.

      select T1.ACTIVITY
      ,T2.DOC_NBR_NUM
      ,T3.NAME
      ,T2.LINE_NBR
      ,T2.DOC_NUMBER
      ,T1.TRAN_AMOUNT
      ,T1.SYSTEM
      ,T1.PERIOD
      ,T1.FISCAL_YEAR
      from LAWPROD901.dbo.MMDIST T2
      ,LAWPROD901.dbo.ACCOMMITX T1
      ,LAWPROD901.dbo.GLSYSTEM T3
      where T2.COMPANY=T1.COMPANY
      and T2.ACCT_UNIT=T1.ACCT_UNIT
      and T2.ACTIVITY=T1.ACTIVITY
      and T2.ACCT_CATEGORY=T1.ACCT_CATEGORY
      and T2.ATN_OBJ_ID=T1.ATN_OBJ_ID
      and T3.COMPANY=T2.COMPANY
      and T1.COMPANY=115
      and rtrim(T1.ACTIVITY_GRP)='CAPPROJ'
      order by 1 asc, 2 asc, 5 asc