SAP DPWTY_GET_LAST_TIMESTAMP Function Module for Get time stamp of last change and check lock
DPWTY_GET_LAST_TIMESTAMP is a standard dpwty get last timestamp SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get time stamp of last change and check lock 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 dpwty get last timestamp FM, simply by entering the name DPWTY_GET_LAST_TIMESTAMP into the relevant SAP transaction such as SE37 or SE38.
Function Group: DPWTY_RFC
Program Name: SAPLDPWTY_RFC
Main Program: SAPLDPWTY_RFC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function DPWTY_GET_LAST_TIMESTAMP 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 'DPWTY_GET_LAST_TIMESTAMP'"Get time stamp of last change and check lock.
EXPORTING
* IV_TABLE_NAME = 'PNWTYH' "Table Name
IV_GUID = "GUID Warranty Claim
* IV_KEY_FNAME = 'PNGUID' "Field Name of guid key
* IV_FIELD_NAME = 'TIMSTMP' "Field Name of time stamp field
* IV_GNAME = 'PNWTYH' "Elementary Lock of Lock Entry (Table Name)
* IV_GARG = "Argument String (=Key Fields) of Lock Entry
IMPORTING
EV_FIELD_VALUE = "UTC Time Stamp in Long Form (YYYYMMDDhhmmss,mmmuuun)
EV_LOCKED = "Claim is locked
EV_USER = "User Name
IMPORTING Parameters details for DPWTY_GET_LAST_TIMESTAMP
IV_TABLE_NAME - Table Name
Data type: TABNAMEDefault: 'PNWTYH'
Optional: No
Call by Reference: No ( called with pass by value option)
IV_GUID - GUID Warranty Claim
Data type: WTY_GUIDOptional: No
Call by Reference: No ( called with pass by value option)
IV_KEY_FNAME - Field Name of guid key
Data type: FIELDNAMEDefault: 'PNGUID'
Optional: No
Call by Reference: No ( called with pass by value option)
IV_FIELD_NAME - Field Name of time stamp field
Data type: FIELDNAMEDefault: 'TIMSTMP'
Optional: No
Call by Reference: No ( called with pass by value option)
IV_GNAME - Elementary Lock of Lock Entry (Table Name)
Data type: EQEGRANAMEDefault: 'PNWTYH'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_GARG - Argument String (=Key Fields) of Lock Entry
Data type: EQEGRAARGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DPWTY_GET_LAST_TIMESTAMP
EV_FIELD_VALUE - UTC Time Stamp in Long Form (YYYYMMDDhhmmss,mmmuuun)
Data type: TEXT132Optional: No
Call by Reference: No ( called with pass by value option)
EV_LOCKED - Claim is locked
Data type: FLAGOptional: No
Call by Reference: No ( called with pass by value option)
EV_USER - User Name
Data type: UNAMEOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DPWTY_GET_LAST_TIMESTAMP 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_iv_table_name | TYPE TABNAME, " 'PNWTYH' | |||
| lv_ev_field_value | TYPE TEXT132, " | |||
| lv_iv_guid | TYPE WTY_GUID, " | |||
| lv_ev_locked | TYPE FLAG, " | |||
| lv_ev_user | TYPE UNAME, " | |||
| lv_iv_key_fname | TYPE FIELDNAME, " 'PNGUID' | |||
| lv_iv_field_name | TYPE FIELDNAME, " 'TIMSTMP' | |||
| lv_iv_gname | TYPE EQEGRANAME, " 'PNWTYH' | |||
| lv_iv_garg | TYPE EQEGRAARG. " |
|   CALL FUNCTION 'DPWTY_GET_LAST_TIMESTAMP' "Get time stamp of last change and check lock |
| EXPORTING | ||
| IV_TABLE_NAME | = lv_iv_table_name | |
| IV_GUID | = lv_iv_guid | |
| IV_KEY_FNAME | = lv_iv_key_fname | |
| IV_FIELD_NAME | = lv_iv_field_name | |
| IV_GNAME | = lv_iv_gname | |
| IV_GARG | = lv_iv_garg | |
| IMPORTING | ||
| EV_FIELD_VALUE | = lv_ev_field_value | |
| EV_LOCKED | = lv_ev_locked | |
| EV_USER | = lv_ev_user | |
| . " DPWTY_GET_LAST_TIMESTAMP | ||
ABAP code using 7.40 inline data declarations to call FM DPWTY_GET_LAST_TIMESTAMP
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.| DATA(ld_iv_table_name) | = 'PNWTYH'. | |||
| DATA(ld_iv_key_fname) | = 'PNGUID'. | |||
| DATA(ld_iv_field_name) | = 'TIMSTMP'. | |||
| DATA(ld_iv_gname) | = 'PNWTYH'. | |||
Search for further information about these or an SAP related objects