C_PurDocListPRStatus

DDL: C_PURDOCLISTPRSTATUS SQL: CDOCLPRSTATUS Type: view CONSUMPTION

Purchase Requisition Status

C_PurDocListPRStatus is a Consumption CDS View that provides data about "Purchase Requisition Status" in SAP S/4HANA. It reads from 1 data source (I_Purchaserequisitionitem) and exposes 3 fields with key fields PurchaseRequisition, PurchaseRequisitionItem.

Data Sources (1)

SourceAliasJoin Type
I_Purchaserequisitionitem eban from

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName CDOCLPRSTATUS view
EndUserText.label Purchase Requisition Status view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
VDM.private true view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY PurchaseRequisition I_Purchaserequisitionitem PurchaseRequisition
KEY PurchaseRequisitionItem I_Purchaserequisitionitem PurchaseRequisitionItem
char2OrderedendendendasCompletionStatus
@AbapCatalog.sqlViewName: 'CDOCLPRSTATUS'
@EndUserText.label: 'Purchase Requisition Status'
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@VDM.private: true


/***********************************************************************************************************/
/*   ME2STAR:  Purchasing Requisition Item status  
     10 : Deleted
     08 : Rejected
     22 : Created
     23 : Ordered
     21 : Approved                                                                 */
/***********************************************************************************************************/

define view C_PurDocListPRStatus 
 as select from I_Purchaserequisitionitem as eban
 {key eban.PurchaseRequisition,
  key eban.PurchaseRequisitionItem,
    case eban.IsDeleted
       when 'X' then cast('10' as abap.char(2)) --> "Deleted" 
       when 'L' then cast('10' as abap.char(2)) --> "Deleted" 
       when 'S' then cast('10' as abap.char(2)) --> "Deleted" 
         else
           case eban.PurReqnReleaseStatus
             when  '08' then cast('16' as abap.char(2)) --> "Release Rejected"
            // when  '02' then cast('21' as abap.char(2)) --> "Release Approved"

           // when  '05' then cast('21' as abap.char(2)) --> "Release Approved"

            else case eban.ProcessingStatus
                when 'N' then cast('27' as abap.char(2)) --> "Created"

                  else cast('23' as abap.char(2)) --> "Ordered"
                   
                                     
                 end 
             
               end 
            
            end  as CompletionStatus
            } group by eban.PurchaseRequisition, eban.PurchaseRequisitionItem, eban.ProcessingStatus, eban.PurReqnReleaseStatus,eban.IsDeleted;                
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEREQUISITIONITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/