SAP TCOR_DB_NTS_CHANGE_DOCS_CREATE Function Module for Prepare change documents and call '..._WRITE_DOCUMENT' module









TCOR_DB_NTS_CHANGE_DOCS_CREATE is a standard tcor db nts change docs create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Prepare change documents and call '..._WRITE_DOCUMENT' module 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 tcor db nts change docs create FM, simply by entering the name TCOR_DB_NTS_CHANGE_DOCS_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: TCOR_DB
Program Name: SAPLTCOR_DB
Main Program: SAPLTCOR_DB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TCOR_DB_NTS_CHANGE_DOCS_CREATE 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 'TCOR_DB_NTS_CHANGE_DOCS_CREATE'"Prepare change documents and call '..._WRITE_DOCUMENT' module
EXPORTING
* IV_TCODE = SY-TCODE "given transaction code or SY-TCODE
* IV_UDATE = SY-DATUM "
* IV_UTIME = SY-UZEIT "given time or SY-UZEIT
* IV_USERNAME = SY-UNAME "given username or SY-UNAME
* IV_FLG_UPDATE_TASK = ' ' "'X' = trigger update task processing, ' '=already in update task!)
* IT_NEW_NOTES_DATA = "Correspondence object notes
* IT_OLD_NOTES_DATA = "Correspondence object notes
.



IMPORTING Parameters details for TCOR_DB_NTS_CHANGE_DOCS_CREATE

IV_TCODE - given transaction code or SY-TCODE

Data type: CDHDR-TCODE
Default: SY-TCODE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_UDATE -

Data type: CDHDR-UDATE
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_UTIME - given time or SY-UZEIT

Data type: CDHDR-UTIME
Default: SY-UZEIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_USERNAME - given username or SY-UNAME

Data type: CDHDR-USERNAME
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_FLG_UPDATE_TASK - 'X' = trigger update task processing, ' '=already in update task!)

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IT_NEW_NOTES_DATA - Correspondence object notes

Data type: TCORY_CONOTES
Optional: Yes
Call by Reference: Yes

IT_OLD_NOTES_DATA - Correspondence object notes

Data type: TCORY_CONOTES
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for TCOR_DB_NTS_CHANGE_DOCS_CREATE 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_tcode  TYPE CDHDR-TCODE, "   SY-TCODE
lv_iv_udate  TYPE CDHDR-UDATE, "   SY-DATUM
lv_iv_utime  TYPE CDHDR-UTIME, "   SY-UZEIT
lv_iv_username  TYPE CDHDR-USERNAME, "   SY-UNAME
lv_iv_flg_update_task  TYPE XFELD, "   SPACE
lv_it_new_notes_data  TYPE TCORY_CONOTES, "   
lv_it_old_notes_data  TYPE TCORY_CONOTES. "   

  CALL FUNCTION 'TCOR_DB_NTS_CHANGE_DOCS_CREATE'  "Prepare change documents and call '..._WRITE_DOCUMENT' module
    EXPORTING
         IV_TCODE = lv_iv_tcode
         IV_UDATE = lv_iv_udate
         IV_UTIME = lv_iv_utime
         IV_USERNAME = lv_iv_username
         IV_FLG_UPDATE_TASK = lv_iv_flg_update_task
         IT_NEW_NOTES_DATA = lv_it_new_notes_data
         IT_OLD_NOTES_DATA = lv_it_old_notes_data
. " TCOR_DB_NTS_CHANGE_DOCS_CREATE




ABAP code using 7.40 inline data declarations to call FM TCOR_DB_NTS_CHANGE_DOCS_CREATE

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 TCODE FROM CDHDR INTO @DATA(ld_iv_tcode).
DATA(ld_iv_tcode) = SY-TCODE.
 
"SELECT single UDATE FROM CDHDR INTO @DATA(ld_iv_udate).
DATA(ld_iv_udate) = SY-DATUM.
 
"SELECT single UTIME FROM CDHDR INTO @DATA(ld_iv_utime).
DATA(ld_iv_utime) = SY-UZEIT.
 
"SELECT single USERNAME FROM CDHDR INTO @DATA(ld_iv_username).
DATA(ld_iv_username) = SY-UNAME.
 
DATA(ld_iv_flg_update_task) = ' '.
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!