SAP RP_TS_CREATE_OBJECT Function Module for Creates an HR object for the TemSe
RP_TS_CREATE_OBJECT is a standard rp ts create object SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Creates an HR object for the TemSe processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for rp ts create object FM, simply by entering the name RP_TS_CREATE_OBJECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: RPTS
Program Name: SAPLRPTS
Main Program:
Appliation area: P
Release date: 21-Jan-1997
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RP_TS_CREATE_OBJECT pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'RP_TS_CREATE_OBJECT'"Creates an HR object for the TemSe.
EXPORTING
OBJKN = "Area name (creator program)
OBJNR = "Object number
EMPFG = "Recipient
* VERSN = '01' "Version number
* SWNUM = '2' "Control number assignment (object number)
* OWNNR = ' ' "Own FM handling (several TemSe objects)
* OBJIN = "Object information
* ENQLOCK = 'N' "
IMPORTING
TSOBJ = "Name of TemSe object
OBJHD = "File block handle for the TemSe object
EXCEPTIONS
FB_CALL_HANDLE = 1 FB_OBJECT_ALREADY_EXIST = 10 FB_NR_OVERFLOW = 11 ENQ_FOREIGN_LOCK = 12 ENQ_SYS_FAIL = 13 ENQ_OTHER = 14 FB_ERROR = 2 FB_RSTS_NOCONV = 3 FB_RSTS_OTHER = 4 NO_OBJECT = 5 NO_PERMISSION = 6 FB_NR_NO_OBJECT = 7 FB_NR_NOT_INTERN = 8 FB_NR_NOT_FOUND = 9
IMPORTING Parameters details for RP_TS_CREATE_OBJECT
OBJKN - Area name (creator program)
Data type: RPTSTYPE-OBJKNOptional: No
Call by Reference: No ( called with pass by value option)
OBJNR - Object number
Data type: RPTSTYPE-OBJNROptional: No
Call by Reference: No ( called with pass by value option)
EMPFG - Recipient
Data type: RPTSTYPE-EMPFGOptional: No
Call by Reference: No ( called with pass by value option)
VERSN - Version number
Data type: RPTSTYPE-VERSNDefault: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SWNUM - Control number assignment (object number)
Data type: RPTSTYPE-SWNUMDefault: '2'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OWNNR - Own FM handling (several TemSe objects)
Data type: RPTSTYPE-OWNNRDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJIN - Object information
Data type: RPTSTYPE-OBJINOptional: Yes
Call by Reference: No ( called with pass by value option)
ENQLOCK -
Data type: RSTSTYPE-PROMDefault: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RP_TS_CREATE_OBJECT
TSOBJ - Name of TemSe object
Data type: RPTSTYPE-TSOBJOptional: No
Call by Reference: No ( called with pass by value option)
OBJHD - File block handle for the TemSe object
Data type: RPTSTYPE-OBJHDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FB_CALL_HANDLE - Error with handles at the CALL interface
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_OBJECT_ALREADY_EXIST - TemSe object already exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_NR_OVERFLOW - Number interval is used up
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENQ_FOREIGN_LOCK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENQ_SYS_FAIL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENQ_OTHER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_ERROR - Error in/at function module
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_RSTS_NOCONV - Required conversion not possible
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_RSTS_OTHER - TemSe C System - Other Errors Reported
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_OBJECT - Required TemSe object does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PERMISSION - No authorization for this operation
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_NR_NO_OBJECT - Number range object does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_NR_NOT_INTERN - No internal number range assignment
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FB_NR_NOT_FOUND - Number interval does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RP_TS_CREATE_OBJECT Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_objkn | TYPE RPTSTYPE-OBJKN, " | |||
| lv_tsobj | TYPE RPTSTYPE-TSOBJ, " | |||
| lv_fb_call_handle | TYPE RPTSTYPE, " | |||
| lv_fb_object_already_exist | TYPE RPTSTYPE, " | |||
| lv_fb_nr_overflow | TYPE RPTSTYPE, " | |||
| lv_enq_foreign_lock | TYPE RPTSTYPE, " | |||
| lv_enq_sys_fail | TYPE RPTSTYPE, " | |||
| lv_enq_other | TYPE RPTSTYPE, " | |||
| lv_objhd | TYPE RPTSTYPE-OBJHD, " | |||
| lv_objnr | TYPE RPTSTYPE-OBJNR, " | |||
| lv_fb_error | TYPE RPTSTYPE, " | |||
| lv_empfg | TYPE RPTSTYPE-EMPFG, " | |||
| lv_fb_rsts_noconv | TYPE RPTSTYPE, " | |||
| lv_versn | TYPE RPTSTYPE-VERSN, " '01' | |||
| lv_fb_rsts_other | TYPE RPTSTYPE, " | |||
| lv_swnum | TYPE RPTSTYPE-SWNUM, " '2' | |||
| lv_no_object | TYPE RPTSTYPE, " | |||
| lv_ownnr | TYPE RPTSTYPE-OWNNR, " ' ' | |||
| lv_no_permission | TYPE RPTSTYPE, " | |||
| lv_objin | TYPE RPTSTYPE-OBJIN, " | |||
| lv_fb_nr_no_object | TYPE RPTSTYPE, " | |||
| lv_enqlock | TYPE RSTSTYPE-PROM, " 'N' | |||
| lv_fb_nr_not_intern | TYPE RSTSTYPE, " | |||
| lv_fb_nr_not_found | TYPE RSTSTYPE. " |
|   CALL FUNCTION 'RP_TS_CREATE_OBJECT' "Creates an HR object for the TemSe |
| EXPORTING | ||
| OBJKN | = lv_objkn | |
| OBJNR | = lv_objnr | |
| EMPFG | = lv_empfg | |
| VERSN | = lv_versn | |
| SWNUM | = lv_swnum | |
| OWNNR | = lv_ownnr | |
| OBJIN | = lv_objin | |
| ENQLOCK | = lv_enqlock | |
| IMPORTING | ||
| TSOBJ | = lv_tsobj | |
| OBJHD | = lv_objhd | |
| EXCEPTIONS | ||
| FB_CALL_HANDLE = 1 | ||
| FB_OBJECT_ALREADY_EXIST = 10 | ||
| FB_NR_OVERFLOW = 11 | ||
| ENQ_FOREIGN_LOCK = 12 | ||
| ENQ_SYS_FAIL = 13 | ||
| ENQ_OTHER = 14 | ||
| FB_ERROR = 2 | ||
| FB_RSTS_NOCONV = 3 | ||
| FB_RSTS_OTHER = 4 | ||
| NO_OBJECT = 5 | ||
| NO_PERMISSION = 6 | ||
| FB_NR_NO_OBJECT = 7 | ||
| FB_NR_NOT_INTERN = 8 | ||
| FB_NR_NOT_FOUND = 9 | ||
| . " RP_TS_CREATE_OBJECT | ||
ABAP code using 7.40 inline data declarations to call FM RP_TS_CREATE_OBJECT
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single OBJKN FROM RPTSTYPE INTO @DATA(ld_objkn). | ||||
| "SELECT single TSOBJ FROM RPTSTYPE INTO @DATA(ld_tsobj). | ||||
| "SELECT single OBJHD FROM RPTSTYPE INTO @DATA(ld_objhd). | ||||
| "SELECT single OBJNR FROM RPTSTYPE INTO @DATA(ld_objnr). | ||||
| "SELECT single EMPFG FROM RPTSTYPE INTO @DATA(ld_empfg). | ||||
| "SELECT single VERSN FROM RPTSTYPE INTO @DATA(ld_versn). | ||||
| DATA(ld_versn) | = '01'. | |||
| "SELECT single SWNUM FROM RPTSTYPE INTO @DATA(ld_swnum). | ||||
| DATA(ld_swnum) | = '2'. | |||
| "SELECT single OWNNR FROM RPTSTYPE INTO @DATA(ld_ownnr). | ||||
| DATA(ld_ownnr) | = ' '. | |||
| "SELECT single OBJIN FROM RPTSTYPE INTO @DATA(ld_objin). | ||||
| "SELECT single PROM FROM RSTSTYPE INTO @DATA(ld_enqlock). | ||||
| DATA(ld_enqlock) | = 'N'. | |||
Search for further information about these or an SAP related objects