21.03.2013 Views

Object Oriented ABAP

Object Oriented ABAP

Object Oriented ABAP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Dialog processing after COMMIT WORK statement<br />

How to perform dialog processing after commit work execution?<br />

In general, we may come across the scenario where, some dialog processing needs to be<br />

done after transaction “commit work”. It‟s explained here by considering a scenario.<br />

After filling all necessary details in the delivery document, user clicks on “save” button to<br />

create a delivery document. If any dialog processing (like pop-up to fill some details)<br />

required upon successful execution of COMMIT WORK statement. In this case, we can<br />

approach below method.<br />

Let me explain this by creating a custom class.<br />

Create an event handler method in the custom class ZTEST_HANDLER for the event<br />

TRANSACTION_FINISHED of the standard class CL_SYSTEM_TRANSACTION_STATE.<br />

Standard class: CL_SYSTEM_TRANSACTION_STATE<br />

Event name : TRANSACTION_FINISHED<br />

Note: This event gets triggered as soon as the COMMIT WORK gets executed.<br />

My custom class name : ZTEST_HANDLER<br />

My event handler method: CALL_DIALOG (Event TRANSACTION_FINISHED of standard class<br />

CL_SYSTEM_TRANSACTION_STATE attached to this custom method)<br />

1) Event handler method CALL_DIALOG<br />

2) Event handler method: CALL_DIALOG detailed view

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!