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

Error message in MB_DOCUMENT_BEFORE_UPDATE

Hi All,

I have to use a error message in MB_DOCUMENT_BEFORE UPDATE method. before error message I need to update one customize tabele.

If I used like this.

ROLLBACK WORK.

UPDATE customize table.

COMMIT WORK.

will it create any inconsistency in MM and ML even I am using COMMIT work in MB_DOCUMENT_BEFORE_UPDATE.

Please suggest me as its very urgent.

Thanks ,

sandeep.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 06:19 AM

    Sandeep ,

    u cannt use BADI to raise Error messages ? what u can do is u can make use of Error Log ? in that u can like this ?

        msg-vbeln  = w_lips-vbeln.
        msg-posnr  = w_lips-posnr.
        msg-msgty  = 'E'.
        msg-msgid  = 'YW2'.
        msg-msgno  = '042'.
        msg-msgv1  =
        'Avail.dt for this Item/batch is later than today'.
        msg-msgv2  = w_lips-lfimg.
        msg-msgv3  = w_lips-meins.
        msg-msgv4  = w_lips-charg.
        append msg to ct_log.

    <b>in addition to RB , u cannt rollback , but what u can do is u can change data in the table which are avail at this stage ? and u can update ur Ztable with Update Command.

    and coming to error message ? try @ ur end and let me know the status.</b>Regards

    Prabhu

    Message was edited by: Prabhu Peram

    Message was edited by: Prabhu Peram

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 06:14 AM

    Hi,

    You cant issue error message of type 'E' inside the BADI, you can use fm 'POPUP_TO_CONFIRM' to display the message in a popup screen,

    If you dont want to update both custom & standard tables after the error message you can issue 'LEAVE PROGRAM', command to leave the control out of the program,

    Hope this helps,

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 06:25 AM

    Hi !

    Never do any COMMIT or ROLLBACK within a BADI or User-Exit.

    You will interrupt the DB-Transaction (LUW) of the original-program !

    What you can do...

    You can call a Function-Module in TRFC. Within that you can update your own table.

    Regards

    Rainer

    Some points would be fine of that helped a bit.

    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.