Skip to Content
author's profile photo Former Member
Former Member

Trapping System Form Close Row, Cancel Document, etc

Hi All,

I have an application which maintains Call-Off Sales and Purchase Orders by Creating Child Orders from a Parent. It maintains the outstanding quantities, etc, on the Parent when the Child is created. All of this is working fine, except....

If on CHILD document I select, either by right click or Data menu, the options Cancel, Close, Close Row etc. I cannot trap the event and adjust the Parent Order accordingly.

Running the SAP supplied Event Logger it is showing a Form Loading (Form 0) which is the confirmation request to perform the action. I cannot trap this event in my add-on as it does not seem to be passed outside of the standard SAP application. I have no event filtering on at this time so should be seeing ALL events.

Any ideas?

Many thanks,


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Aug 27, 2009 at 05:28 PM


    You can code in the FormDataEvents section. In FormDataEvents there is an event type called FormDataUpdate.

    If you cancel a document, you will get the code running through the form data events. It's event type will be FormDataUpdate.

    So do this

    In form data events, beforeAction = true

    collect the value for 'Canceled' from the database.

    Also collect the same value when beforeAction = false.

    If both values are different, that means, a Cancel document action was initiated.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2009 at 08:02 AM

    Thank you very much Anoop. I don't think I would have found that in a million years! One thing though...Your method works well for the Close/Cancel event but the Close Row/Cancel Row are a bit more tricky. I have managed to do it by saving the Document Rows in a ##TEMP table on DATA_LOAD and then re-reading the rows and comparing the contents on DATA_UPDATE. It works OK but seems a bit messy. Is there a way of identifying the Closed/Deleted rows provided in the API?

    Anyway, thank you very much once again.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.