1 / 17

MORE ABOUT ABAP TABLES

MORE ABOUT ABAP TABLES. Fixed Domain Fields. We often want a table to have fixed field values Conceptually similar to an enumeration in .NET Create a domain as before having a data type Specify the list of valid values Make sure to activate the domain Create and activate the data element.

vivian
Download Presentation

MORE ABOUT ABAP TABLES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MORE ABOUT ABAP TABLES

  2. Fixed Domain Fields • We often want a table to have fixed field values • Conceptually similar to an enumeration in .NET • Create a domain as before having a data type • Specify the list of valid values • Make sure to activate the domain • Create and activate the data element

  3. Fixed Field Domains • Enter value list in the domain

  4. Fixed Field Domains

  5. Fixed Field Domains

  6. Currency Fields • Create the domain and data element using the CURR data type • Create the reference field as follows:

  7. Foreign Keys • In SAP, they are used as lookup fields for entry checks • They provide a way to limit values when there are too many to practically use domain lists

  8. Foreign Keys

  9. More Detail on Append Structures • We mentioned that append structures are used to enhance SAP and customer tables • Remember that you need an access key to modify SAP tables and the activity is risky!

  10. Append Structures (Implementation) • A table can have many append structures (modifications) • An append structure can only be used by one table though • Use the customer naming convention for append structures (leading Y or Z)

  11. Append Structures (Implementation) • Note that you must allow enhancements on the table

  12. Append Structure (Illustration)

  13. Append Structure (Creating 1)

  14. Append Structure (Creating 2)

  15. Include Structures • Use to create common data structures shared by multiple tables • Conceptually similar to a C #include • Includes should be places before appends • Be careful with includes having primary keys

  16. OpenSQL • Really a hybrid between SQL and ABAP • They add a layer between SAP and the underlying database • INSERT, UPDATE, DELETE work as expected • The MODIFY statement will UPDATE if a record exists and INSERT if not • Return code is placed in SY-SUBRC

  17. INSERT Example

More Related