Change Logs For ZTables Using SCDO Transaction Code - 6 (SAP ABAP).
Submitted By: Shilpa Gunjan (LnT Infotech)
14) Click On editor and make the following changes as shown:
COMPLETE CODE:
FORM change_log.
DATA : it_zptp_3rd_dis_tes TYPE STANDARD TABLE OF zptp_3rd_dis_tes,
wa_old_zptp_3rd_dis_tes TYPE zptp_3rd_dis,
wa_new_zptp_3rd_dis_tes TYPE zptp_3rd_dis.
DATA: tabix type c.
DATA: it_log_table TYPE TABLE OF cdtxt,
wa_log_table TYPE cdtxt.
SELECT * FROM zptp_3rd_dis_tes
INTO TABLE it_zptp_3rd_dis_tes.
LOOP AT total.
IF <action> IS ASSIGNED AND <vim_total_struc> IS ASSIGNED AND <action> NE space.
MOVE <vim_total_struc> TO wa_new_zptp_3rd_dis_tes.
READ TABLE it_zptp_3rd_dis_tes INTO wa_old_zptp_3rd_dis_tes WITH KEY ekorg = wa_new_zptp_3rd_dis_tes-ekorg
lifnr = wa_new_zptp_3rd_dis_tes-lifnr.
tabix = sy-tabix.
concatenate 'TE' tabix into wa_log_table-textart separated by '_' .
wa_log_table-teilobjid = 'ZPTP_3RD_DIS_TES'.
wa_log_table-textart = 'TEST'.
wa_log_table-textspr = 'EN'.
wa_log_table-updkz = <action>.
APPEND wa_log_table TO it_log_table.
CALL FUNCTION 'ZPTP_3RD_DIS_TE_WRITE_DOCUMENT'
EXPORTING
objectid = 'ZPTP_3RD_DIS_TES'
tcode = sy-tcode
utime = sy-uzeit
udate = sy-datum
username = sy-uname
* PLANNED_CHANGE_NUMBER = ' '
object_change_indicator = <action>
planned_or_real_changes = <action>
no_change_pointers = <action>
upd_icdtxt_zptp_3rd_dis_te = <action>
n_zptp_3rd_dis_tes = wa_new_zptp_3rd_dis_tes
o_zptp_3rd_dis_tes = wa_old_zptp_3rd_dis_tes
upd_zptp_3rd_dis_tes = <action>
TABLES
icdtxt_zptp_3rd_dis_te = it_log_table.
ENDIF.
CLEAR: wa_new_zptp_3rd_dis_tes, wa_old_zptp_3rd_dis_tes.
ENDLOOP.
ENDFORM. "change_log
After the coding part is over, activate the include program and also activate the function group. Then come back to the events screen and save the event in a transport request.
Now go to SM30. And enter the table name and click on change.
<<PREVIOUS PAGE NEXT PAGE>>
ALSO READ:
- Change Logs For ZTables Using SCDO Transaction Code - Page 1.
- Change Logs For ZTables Using SCDO Transaction Code - Page 2.
- Change Logs For ZTables Using SCDO Transaction Code - Page 3.
- Change Logs For ZTables Using SCDO Transaction Code - Page 4.
- Change Logs For ZTables Using SCDO Transaction Code - Page 5.
- Change Logs For ZTables Using SCDO Transaction Code - Page 6.
- Change Logs For ZTables Using SCDO Transaction Code - Page 7.
Your suggestions and comments are welcome in this section.
Please mail all your contributions to administrator@abapmadeeasy.com We request you to mention your Name, Designation, Experience & Organization you are working for. Your posts will be verified and posted in this site with your name.