Skip to content

[TTYP] Add ABAP file format for table types - #775

Open
GuilhermeSaraiva96 wants to merge 8 commits into
mainfrom
ttyp
Open

[TTYP] Add ABAP file format for table types#775
GuilhermeSaraiva96 wants to merge 8 commits into
mainfrom
ttyp

Conversation

@GuilhermeSaraiva96

@GuilhermeSaraiva96 GuilhermeSaraiva96 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ZIF_AFF_TTYP_V1 ABAP interface defining the file format for ABAP Dictionary table types (TTYP)
  • Adds generated JSON schema ttyp-v1.json
  • Adds example file z_aff_example_ttyp.ttyp.json (sorted table with explicit key components)
  • Adds README.md with file structure documentation

@github-actions

github-actions Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

ABAP Doc Checks

  • Run ABAP Doc title/description casing check — ✓ all checks passed

@github-actions

Copy link
Copy Markdown
Contributor

AFF Review Process

Thank you for your contribution to the ABAP File Formats! 🎉

To help us manage reviews efficiently:

  • Add the awaiting-review label when ready for (re)review
  • See CONTRIBUTING.md for review process details

@hyperspace-pr-bot

Copy link
Copy Markdown
Contributor

Control Panel

Hi, I'm an AI-powered Review Bot that helps you with summarizing and reviewing pull requests.
To interact with me, just use the following actions:

  • 📝 Summarize PR
  • 🔍 Review
  • 🗑️ Delete all bot comments and reviews

Comment on lines +179 to +192
BEGIN OF ty_built_in_type,
"! <p class="shorttext">Data Type</p>
"! ABAP built-in data type name (e.g. CHAR, INT4, STRING)
"! $required
data_type TYPE c LENGTH 10,
"! <p class="shorttext">Length</p>
"! Length of the built-in type (relevant for length-variable types such as CHAR, NUMC)
"! $minimum 0
length TYPE i,
"! <p class="shorttext">Decimals</p>
"! Number of decimal places (relevant for DEC, CURR, QUAN)
"! $minimum 0
decimals TYPE i,
END OF ty_built_in_type.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this part can be reused from #727 when its merged

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the zif_aff_ddic_types_v1 file instead of a rebase. In DTEL, there is a ty_predefined_type, which corresponds to our ty_built_in_type. We should harmonize the name and move this object to the reusable ddic interface

Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/type/zif_aff_ttyp_v1.intf.abap Outdated
Comment thread file-formats/ttyp/examples/z_aff_example_ttyp.ttyp.json Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Comment thread file-formats/zif_aff_ddic_types_v1.intf.abap Outdated
Adds ZIF_AFF_TTYP_V1 interface, JSON schema, example, and README
for ABAP Dictionary table types (TTYP).
- Flatten ty_key_components to use zif_aff_types_v1=>ty_object_name_30 directly
- Simplify ABAP Doc descriptions (type kind, key definition, key uniqueness)
- Rename ty_prim_key_definition to ty_primary_key_definition
- Rename ty_init_and_access to ty_initialization_and_access
- Rename field init_and_access to initialization_and_access in ty_main
- Rename field sec_keys_allowed to secondary_keys_allowed in ty_key_settings
- Rename field access to access_type in ty_secondary_key
- Fix TYPE expression alignment
- Change secondary_keys_allowed to abap_bool
- Replace "How..." descriptions with title-style descriptions
- Regenerate JSON schema
- Update example for renamed/changed fields
@GuilhermeSaraiva96

Copy link
Copy Markdown
Contributor Author

First draft of TTYP. To be continued by the object type owners, as I do not have enough knowledge on this object type.

definition TYPE ty_primary_key_mode,
"! <p class="shorttext">Key Uniqueness</p>
"! Key uniqueness
uniqueness TYPE ty_key_uniqueness,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uniqueness TYPE ty_key_uniqueness,
key_uniqueness TYPE ty_key_uniqueness,

so that title, description and abap type are in sync

Comment on lines +233 to +235
"! <p class="shorttext">Key Definition</p>
"! Key definition
definition TYPE ty_primary_key_mode,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"! <p class="shorttext">Key Definition</p>
"! Key definition
definition TYPE ty_primary_key_mode,
"! <p class="shorttext">Key Mode</p>
"! Key mode
key_mode TYPE ty_primary_key_mode,

so that title, description and abap type are in sync

alias TYPE c LENGTH 30,
"! <p class="shorttext">Key Components</p>
"! Explicitly named key fields; relevant when definition is keyComponents
components TYPE ty_key_components,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
components TYPE ty_key_components,
key_components TYPE ty_key_components,

so that title, description and abap type are in sync

description TYPE zif_aff_types_v1=>ty_description_80,
"! <p class="shorttext">Access Type</p>
"! Access type of the secondary key
access_type TYPE ty_secondary_key_access,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
access_type TYPE ty_secondary_key_access,
access_type TYPE ty_access_type,

so that title, description and abap type are in sync

Comment on lines +217 to +219
"! <p class="shorttext">Key Definition</p>
"! Key definition
definition TYPE ty_secondary_key_definition,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"! <p class="shorttext">Key Definition</p>
"! Key definition
definition TYPE ty_secondary_key_definition,
"! <p class="shorttext">Key Mode</p>
"! Key mode
key_mode TYPE ty_secondary_key_mode,

"! Secondary key definition
"! $values {@link zif_aff_ttyp_v1.data:co_secondary_key_definition}
"! $default {@link zif_aff_ttyp_v1.data:co_secondary_key_definition.row_type}
TYPES ty_secondary_key_definition TYPE c LENGTH 14.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TYPES ty_secondary_key_definition TYPE c LENGTH 14.
TYPES ty_secondary_key_mode TYPE c LENGTH 14.

in ty_primary_key i saw that the abap type was called ty_primary_key_mode. If mode is the correct word for this field I prefer mode over the generic "definition"

CONSTANTS:
"! <p class="shorttext">Secondary Key Definition</p>
"! Secondary key definition
BEGIN OF co_secondary_key_definition,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BEGIN OF co_secondary_key_definition,
BEGIN OF co_secondary_key_mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants