I_ACMAPPLASSIGNMENTITEMUOM

CDS View

ACM Application Doucment Assignment Item UoM

I_ACMAPPLASSIGNMENTITEMUOM is a CDS View in S/4HANA. ACM Application Doucment Assignment Item UoM. It contains 12 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_ACMOrderDeliveryAssignment view from COMPOSITE ACM Order Delivery Assignment

Fields (12)

KeyField CDS FieldsUsed in Views
KEY ACMPrecursorDocumentNumber ACMPrecursorDocumentNumber 1
KEY ApplicationDocument ApplicationDocument 1
KEY LoadDataCaptureObjId LoadDataCaptureObjId 1
KEY PredecessorDocumentItem PredecessorDocumentItem 1
ACMApplicationDataUoM ACMApplicationDataUoM 1
ACMDeliveredAdjustedQuantity ACMDeliveredAdjustedQuantity 1
ACMDeliveredUoM ACMDeliveredUoM 1
ACMPrecursorDocumentType ACMPrecursorDocumentType 1
ACMReferenceDocument2 ACMReferenceDocument2 1
ACMReferenceType3 ACMReferenceType3 1
LoadDataCaptureApplInstruction LoadDataCaptureApplInstruction 1
Material Material 1
@AbapCatalog.sqlViewName: 'IACMAPPLASGUOM'
@AbapCatalog.compiler.compareFilter: true
//@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel:{
               usageType: {
                 dataClass: #TRANSACTIONAL,
                 serviceQuality: #C,
                 sizeCategory: #L
               }
}
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@EndUserText.label: 'ACM Application Doucment Assignment Item UoM'
define view I_ACMApplAssignmentItemUoM
  as select from           I_ACMOrderApplicationDocData  as ApplDocData

    left outer to one join I_ACMMaterialUnitCnvrsnFactor as BaseConvFactor    on  BaseConvFactor.Material        = ApplDocData.Material
                                                                              and BaseConvFactor.AlternativeUnit = ApplDocData.UnitOfMeasure


    left outer to one join I_ACMMaterialUnitCnvrsnFactor as PQtyConvFactor    on  PQtyConvFactor.Material        = ApplDocData.Material
                                                                              and PQtyConvFactor.AlternativeUnit = ApplDocData.ACMDeliveredUoM

    left outer to one join I_ACMMaterialUnitCnvrsnFactor as BaseConvFactorApp on  BaseConvFactorApp.Material        = ApplDocData.Material
                                                                              and BaseConvFactorApp.AlternativeUnit = ApplDocData.ACMApplicationDataUoM

    left outer to one join I_ACMMaterialUnitCnvrsnFactor as PQtyConvFactorApp on  PQtyConvFactorApp.Material        = ApplDocData.Material
                                                                              and PQtyConvFactorApp.AlternativeUnit = ApplDocData.ACMDeliveredUoM


{
  key ApplDocData.ApplicationDocument,
  key ApplDocData.ReferenceApplicationItem,
  key ApplDocData.ACMPrecursorDocumentNumber,
  key ApplDocData.PredecessorDocumentItem,
  key ApplDocData.LoadDataCaptureObjId,
      ApplDocData.LoadDataCaptureApplInstruction,
      ApplDocData.ACMLoadDataCaptureItmStatusObj,
      ApplDocData.ApplicationItemCategory,
      ApplDocData.Material,
      ApplDocData.ACMReferenceType3,
      ApplDocData.ACMApplicationDataUoM,
      ApplDocData.ACMReferenceDocument2,
      @Semantics.unitOfMeasure: true
      ApplDocData.ACMDeliveredUoM,
      @Semantics.quantity.unitOfMeasure: 'ACMDeliveredUoM'
      ApplDocData.ACMDeliveredAdjustedQuantity,
      ApplDocData.ACMPrecursorDocumentType,

      //ACMDeliveredQuantity UoM Conversion

      case
               when  BaseConvFactor.QuantityNumerator   is not initial
                 and BaseConvFactor.QuantityNumerator   is not null
                 and BaseConvFactor.QuantityDenominator is not initial
                 and BaseConvFactor.QuantityDenominator is not null
                 and PQtyConvFactor.QuantityNumerator   is not initial
                 and PQtyConvFactor.QuantityNumerator   is not null
                 and PQtyConvFactor.QuantityDenominator is not initial
                 and PQtyConvFactor.QuantityDenominator is not null
                 then cast(ApplDocData.ACMDeliveredQuantity *
                         division((BaseConvFactor.QuantityNumerator * PQtyConvFactor.QuantityDenominator),
                                  (PQtyConvFactor.QuantityNumerator * BaseConvFactor.QuantityDenominator),9) as abap.dec( 13, 3 ) )
               else unit_conversion( quantity => ApplDocData.ACMDeliveredQuantity,
                                     source_unit => ApplDocData.UnitOfMeasure,
                                     target_unit => ApplDocData.ACMDeliveredUoM,
                                     error_handling => 'SET_TO_NULL')
           end as ACMDeliveredQuantity,
      //ACMOverfillQuantity UoM Conversion

      case
               when  BaseConvFactorApp.QuantityNumerator   is not initial
                 and BaseConvFactorApp.QuantityNumerator   is not null
                 and BaseConvFactorApp.QuantityDenominator is not initial
                 and BaseConvFactorApp.QuantityDenominator is not null
                 and PQtyConvFactorApp.QuantityNumerator   is not initial
                 and PQtyConvFactorApp.QuantityNumerator   is not null
                 and PQtyConvFactorApp.QuantityDenominator is not initial
                 and PQtyConvFactorApp.QuantityDenominator is not null
                 then cast(cast(ApplDocData.ACMOverfillQuantity as abap.quan( 13, 3 )) *
                         division((BaseConvFactorApp.QuantityNumerator * PQtyConvFactorApp.QuantityDenominator),
                                  (PQtyConvFactorApp.QuantityNumerator * BaseConvFactorApp.QuantityDenominator),9) as abap.dec( 13, 3 ) )
               else unit_conversion( quantity => ApplDocData.ACMOverfillQuantity,
                                     source_unit => ApplDocData.ACMApplicationDataUoM,
                                     target_unit => ApplDocData.ACMDeliveredUoM,
                                     error_handling => 'SET_TO_NULL')
           end as ACMOverfillQuantity,
      //ProvisionalOverfillQuantity UoM Conversion

      case
               when  BaseConvFactorApp.QuantityNumerator   is not initial
                 and BaseConvFactorApp.QuantityNumerator   is not null
                 and BaseConvFactorApp.QuantityDenominator is not initial
                 and BaseConvFactorApp.QuantityDenominator is not null
                 and PQtyConvFactorApp.QuantityNumerator   is not initial
                 and PQtyConvFactorApp.QuantityNumerator   is not null
                 and PQtyConvFactorApp.QuantityDenominator is not initial
                 and PQtyConvFactorApp.QuantityDenominator is not null
                 then cast(cast(ApplDocData.ProvisionalOverfillQuantity as abap.quan( 13, 3 )) *
                         division((BaseConvFactorApp.QuantityNumerator * PQtyConvFactorApp.QuantityDenominator),
                                  (PQtyConvFactorApp.QuantityNumerator * BaseConvFactorApp.QuantityDenominator),9) as abap.dec( 13, 3 ) )
               else unit_conversion( quantity => ApplDocData.ProvisionalOverfillQuantity,
                                     source_unit => ApplDocData.ACMApplicationDataUoM,
                                     target_unit => ApplDocData.ACMDeliveredUoM,
                                     error_handling => 'SET_TO_NULL')
           end as ProvisionalOverfillQuantity,
      //ACMUnderFillQuantity UoM Conversion

      case
               when  BaseConvFactorApp.QuantityNumerator   is not initial
                 and BaseConvFactorApp.QuantityNumerator   is not null
                 and BaseConvFactorApp.QuantityDenominator is not initial
                 and BaseConvFactorApp.QuantityDenominator is not null
                 and PQtyConvFactorApp.QuantityNumerator   is not initial
                 and PQtyConvFactorApp.QuantityNumerator   is not null
                 and PQtyConvFactorApp.QuantityDenominator is not initial
                 and PQtyConvFactorApp.QuantityDenominator is not null
                 then cast(cast(ApplDocData.ACMUnderFillQuantity as abap.quan( 13, 3 )) *
                         division((BaseConvFactorApp.QuantityNumerator * PQtyConvFactorApp.QuantityDenominator),
                                  (PQtyConvFactorApp.QuantityNumerator * BaseConvFactorApp.QuantityDenominator),9) as abap.dec( 13, 3 ) )
               else unit_conversion( quantity => ApplDocData.ACMUnderFillQuantity,
                                     source_unit => ApplDocData.ACMApplicationDataUoM,
                                     target_unit => ApplDocData.ACMDeliveredUoM,
                                     error_handling => 'SET_TO_NULL')
           end as ACMUnderFillQuantity,
      //ProvisionalUnderfillQuantity UoM Conversion

      case
               when  BaseConvFactorApp.QuantityNumerator   is not initial
                 and BaseConvFactorApp.QuantityNumerator   is not null
                 and BaseConvFactorApp.QuantityDenominator is not initial
                 and BaseConvFactorApp.QuantityDenominator is not null
                 and PQtyConvFactorApp.QuantityNumerator   is not initial
                 and PQtyConvFactorApp.QuantityNumerator   is not null
                 and PQtyConvFactorApp.QuantityDenominator is not initial
                 and PQtyConvFactorApp.QuantityDenominator is not null
                 then cast(cast(ApplDocData.ProvisionalUnderfillQuantity as abap.quan( 13, 3 )) *
                         division((BaseConvFactorApp.QuantityNumerator * PQtyConvFactorApp.QuantityDenominator),
                                  (PQtyConvFactorApp.QuantityNumerator * BaseConvFactorApp.QuantityDenominator),9) as abap.dec( 13, 3 ) )
               else unit_conversion( quantity => ApplDocData.ProvisionalUnderfillQuantity,
                                     source_unit => ApplDocData.ACMApplicationDataUoM,
                                     target_unit => ApplDocData.ACMDeliveredUoM,
                                     error_handling => 'SET_TO_NULL')
           end as ProvisionalUnderfillQuantity

}
where
       ApplDocData.ApplicationItemCategory = 'A'
  and(
       ApplDocData.ACMReferenceType3       = 'A'
    or ApplDocData.ACMReferenceType3       = 'C'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACMMATERIALUNITCNVRSNFACTOR",
"I_ACMORDERAPPLICATIONDOCDATA"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/