Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change pointers for customizing table

Former Member
0 Likes
655

Hi,

Requirement is when ever a new entry is created/updated/deleted from the customized table 'ztable' an IDOC need to be generated.

Any one can help me out the proper steps to solve this.

Full points will be rewarded to the correct answer.

Urgent please !!!

Regards,

Suman

2 REPLIES 2
Read only

Former Member
0 Likes
498

1. In T-Code add all the table and its fields to a message type.

2. Create a program for triggering a Idoc.

3. In the program call the functional module 'CHANGE_POINTERS_READ' with the above message type, This FM will return those table fields that are changed to a specific date.

4. Pass read_not_processed_pointers parameter of the 'CHANGE_POINTERS_READ' as 'X' to get the latest changes. Ex:



        CALL FUNCTION 'CHANGE_POINTERS_READ'
          EXPORTING
            message_type                = gc_message_type
            creation_date_high          = s_erdat-high
            creation_date_low           = s_erdat-low
            creation_time_high          = gc_time_high
            creation_time_low           = gc_time_low
            read_not_processed_pointers = 'X'
          TABLES
            change_pointers             = lt_chgptrs_tab.

lt_chgptrs_tab will have all the table fields that are changed .

5. Trigger a Idoc with those values.

6. In the triggering is successful call FM 'CHANGE_POINTERS_STATUS_WRITE ' and pass those table fields that are sent through Idoc to write in database that the changes are already sent through Idocs. Ex:



    CALL FUNCTION 'CHANGE_POINTERS_STATUS_WRITE'
            EXPORTING
              message_type           = gc_message_type
            TABLES
              change_pointers_idents = gt_pointer_id.

          COMMIT WORK.

gt_pointer_id will have all the change pointer if from lt_chgptrs_tab table that are send through Idocs.

Read only

JozsefSzikszai
Active Contributor
0 Likes
498

hi Suman,

I guess there is an automatically generated maintenance screen (from SE11) to this ztable. SAP generates a function group and function modules for the maintenance. There are places where you can modify this FM to add your own logic, just have a look...

hope this helps

ec