Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 1.61 KB

DdlPositionDefineRule.md

File metadata and controls

71 lines (50 loc) · 1.61 KB

<-- previous rule | overview | next rule -->

Break before DEFINE etc.

Standardizes line breaks and indentation before DEFINE / EXTEND etc. keywords, entity name and WITH PARAMETERS.

Options

  • Break before DEFINE etc. keywords: [Always]
  • Indent if breaking: [0]
  • Break before entity name: [Never]
  • Indent if breaking: [2]
  • Break before WITH PARAMETERS: [Always]
  • Indent if breaking: [2]
  • Indent of parameters: [4]

Examples

@EndUserText.label: 'Any Description' define
   view
 entity
C_AnyEntity with
parameters
// comment
P_AnyParam   : AnyType,
  P_OtherParam : OtherType,
    P_ThirdParam : ThirdType

  as select from I_AnyEntity as AnyAlias

    left outer to one join I_OtherEntity as OtherAlias
      on AnyAlias.IdField = OtherAlias.IdField

{
  key AnyAlias.AnyKeyField,
      OtherAlias.AnyNonKeyField
}

Resulting code:

@EndUserText.label: 'Any Description'

define view entity C_AnyEntity
  with parameters
    // comment
    P_AnyParam   : AnyType,
    P_OtherParam : OtherType,
    P_ThirdParam : ThirdType

  as select from I_AnyEntity as AnyAlias

    left outer to one join I_OtherEntity as OtherAlias
      on AnyAlias.IdField = OtherAlias.IdField

{
  key AnyAlias.AnyKeyField,
      OtherAlias.AnyNonKeyField
}

Related code