Quantcast
Channel: Ariba Exchange: Message List
Viewing all articles
Browse latest Browse all 3363

Re: Query

$
0
0

SELECT

    Requisition.UniqueName AS RequisitionNumber,

    Requisition.Requester.Name AS Requester,

    Requisition.Requester AS RequesterBaseID,

    Requisition.Name AS RequisitionTitle,

    Requisition.SubmitDate AS SubmitDate,

    Requisition.ApprovedDate AS ApprovedDate,

    Requisition.TotalCost.ApproxAmountInBaseCurrency AS RequisitionTotal,

    Requisition.TotalCost.AmountInReportingCurrency AS RepRequisitionTotal,    

    Requisition.StatusString AS StatusString,

    ApprovalRequests.Reason AS Reason,

    ApprovalRequests.State AS ApprovalState,

    ApproverRole.Name AS ApproverName,

    Approver AS ApproverNameBaseID,

    ApprovedBy.Name AS ApprovedByName,

    ApprovedBy AS ApprovedByNameBaseID

FROM

    ariba.purchasing.core.Requisition

    JOIN ariba.approvable.core.ApprovalRequest USING ApprovalRequests

    LEFT OUTER JOIN ariba.user.core."User" AS ApprovedBy USING ApprovalRequest.ApprovedBy

    LEFT OUTER JOIN ariba.user.core.Approver AS ApproverRole USING ApprovalRequest.Approver

WHERE ApprovalRequest.State  = 8   --- will give you all approved records , state = 2 gives you active approver ready to approve

     Requisition.UniqueName = 'PR2729937'

 

 

hope this helps


Viewing all articles
Browse latest Browse all 3363

Trending Articles