SAP Function RPY_ENTITY_READ - Read entity type

Parameter Reference Type Length Default Optional Text
CICO_MODE RPYDMGF-CICOMODE C 1 'R' X Checkin / checkout mode
CICO_REQUEST_NO RPYDMGF-CICOREQUNO C 20 SPACE X Checkin / check out administration number
ENTITY_ID RPYDMEN-ENTITY_ID C 26 ID of the entity type to be read
LANGUAGE SYST-LANGU C 1 SY-LANGU X Language for reading the descriptions
WITH_ALIASES RPYDMGF-FLAG C 1 'X' X Read with alias names?
WITH_ASSIGNED_TABLE_OR_VIEW RPYDMGF-FLAG C 1 'X' X Read with table / view assignment?
WITH_ATTRIBUTES RPYDMGF-FLAG C 1 'X' X Read with attributes?
WITH_FORMATTED_DOCUMENTATION RPYDMGF-FLAG C 1 SPACE X Read with formatted documentation?
WITH_INGOING_RELATIONSHIPS RPYDMGF-FLAG C 1 'X' X Read with ingoing relationships?
WITH_INGOING_SPECIALIZATIONS RPYDMGF-FLAG C 1 'X' X Read with ingoing specializations?
WITH_OUTGOING_RELATIONSHIPS RPYDMGF-FLAG C 1 SPACE X Read with outgoing relationships?
WITH_OUTGOING_SPECIALIZATIONS RPYDMGF-FLAG C 1 SPACE X Read with outgoing specializations?
WITH_OUTGOING_SPEC_CATEGORIES RPYDMGF-FLAG C 1 'X' X Read with outgoing specializations?
WITH_SAPSCRIPT_DOCUMENTATION RPYDMGF-FLAG C 1 'X' X Read with SAPscript documentation?
WITH_WHERE_USED_LIST RPYDMGF-FLAG C 1 SPACE X Read with where-used-list?

Parameter Reference Type Length Text
ASSIGNED_TABLE_OR_VIEW RPYDMTV u 138 Table / view assignment
ENTITY_INFO RPYDMEN u 143 Basic information on entity type

Parameter Reference Length Optional Text
ALIASES RPYDMAL 141 X Aliases
ATTRIBUTES RPYDMAT 208 X Attributes
ERRORS RPYGSER 268 Error information
FORMATTED_DOCUMENTATION RPYDMFD 73 X Documentation in formatted form
INGOING_RELATIONSHIPS RPYDMRL 292 X Ingoing relationships
INGOING_SPECIALIZATIONS RPYDMSP 229 X Ingoing specializations
OUTGOING_RELATIONSHIPS RPYDMRL 292 X Outgoing relationships
OUTGOING_SPECIALIZATIONS RPYDMSP 229 X Outgoing specializations
OUTGOING_SPEC_CATEGORIES RPYDMSC 145 X Specialization Types
SAPSCRIPT_DOCUMENTATION RPYDMSD 134 X Documentation in SAPscript form
WHERE_USED_LIST RPYDMHI 119 X Where-used List

Functionality
The function module RPY_ENTITY_READ reads information for ONE entitytype of the Data Modeler and supplies them in the form of structuresand tables.
The transport object (entity type) and further infromation in theenvironment of the transport object are read.
INCLUDE RPY_UENO_TRANSPORT_OBJECT OBJECT DOKU ID TX
INCLUDE RPY_UENO_WITH OBJECT DOKU ID TX
INCLUDE RPY_DM_ERRORS OBJECT DOKU ID TX

Example
With the following example you select all relevant information aboutone entity type, in this case materials.Precisely the transport object is selected.
* Declaration of variables
data: c_entity_id like rpydmen-entity_id,
s_entity_info like rpydmen,
s_assigned_table_or_view like rpydmtv.
data: t_errors like rpygser occurs 10 with header line.
data: t_aliases like rpydmal occurs 5,
t_formatted_documentation like rpydmfd occurs 250,
t_sapscript_documentation like rpydmsd occurs 250,
t_attributes like rpydmat occurs 250,
t_ingoing_specializations like rpydmsp occurs 10,
t_outgoing_specializations like rpydmsp occurs 10,
t_ingoing_relationships like rpydmrl occurs 50,
t_outgoing_relationships like rpydmrl occurs 50,
t_outgoing_spec_categories like rpydmsc occurs 10,
t_where_used_list like rpydmhi occurs 100.
* Determine entity type to be read
c_entity_id = '11027'. " Material
* Call Repository-API
call function 'RPY_ENTITY_READ'
exporting
cico_mode = 'R'
cico_request_no = ' '
entity_id = c_entity_id
language = sy-langu
with_aliases = 'X'
with_formatted_documentation = ' '
with_sapscript_documentation = 'X'
with_attributes = 'X'
with_ingoing_specializations = 'X'
with_outgoing_specializations = ' '
with_ingoing_relationships = 'X'
with_outgoing_relationships = ' '
with_outgoing_spec_categories = 'X'
with_assigned_table_or_view = 'X'
with_where_used_list = ' '
importing
entity_info = s_entity_info
assigned_table_or_view = s_assigned_table_or_view
tables
errors = t_errors
aliases = t_aliases
formatted_documentation = t_formatted_documentation
sapscript_documentation = t_sapscript_documentation
attributes = t_attributes
ingoing_specializations = t_ingoing_specializations
outgoing_specializations = t_outgoing_specializations
ingoing_relationships = t_ingoing_relationships
outgoing_relationships = t_outgoing_relationships
outgoing_spec_categories = t_outgoing_spec_categories
where_used_list = t_where_used_list.
* Error handling
loop at t_errors.
if ...
...
endif.
endloop.

Further information
Further information on the structures and tables involved in callingRPY_ENTITY_READ is available in:
Entity type
Alias
Attribute
Specialization category
Specialization
Relationship
Assigned table or view
Formatted documentation
SAPscript documentation
General fields
Error table
The following function modules also belong to the Repository API of theData Modeler and may be of interest to you:
RPY_ENTITY_MULTI_READ
RPY_ENTITY_SELECT
RPY_ENTITY_UPDATE
RPY_ENTITY_INSERT
RPY_ENTITY_DELETE
RPY_DATA_MODEL_READ
RPY_DATA_MODEL_MULTI_READ
RPY_DATA_MODEL_SELECT
RPY_DATA_MODEL_UPDATE
RPY_DATA_MODEL_INSERT
RPY_DATA_MODEL_DELETE
You will find more general information about the Data Modeler and datamodelling
in the online documentation for the Data Modeler
in the book 'Data Modeler' from the series about the AbaP/4 DevelopmentWorkbench
in method guide 'SAP Information Model' (product number 50007795).