Created
August 19, 2012 15:10
-
-
Save jasper07/3395428 to your computer and use it in GitHub Desktop.
abap_contacts_create_entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
METHOD contacts_create_entity. | |
CONSTANTS: | |
co_folder TYPE string VALUE '/SAP/PUBLIC/ATCONTACTS'. | |
*--- get the values passed in | |
io_data_provider->read_entry_data( IMPORTING es_data = er_entity ). | |
*--- set handle to first 3 letters of firstname and first letter of last name | |
er_entity-handle = |{ er_entity-firstname(3) }{ er_entity-lastname(1) }|. | |
CONDENSE er_entity-handle. | |
er_entity-handle = to_upper( er_entity-handle ). | |
*--- assume there is an avatar image and create url | |
er_entity-avatar = |{ co_folder }/{ iv_entity_set_name }/{ er_entity-handle }.gif|. | |
GET TIME STAMP FIELD er_entity-updated. | |
INSERT INTO zat_contacts VALUES er_entity. | |
COMMIT WORK. | |
ENDMETHOD. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment