Skip to Content

Problem with the use of MEREQ001.

Hello all,

I have implemented a check while creating Purchase requisition(me51n). In which if a user tries to make a purchase requisition for assets and he maintains wrong plant ( i.e the one which is not maintained in the Asset master) an error message will be thrown. Now when a user enters wrong plant error message is been thrown , but even after the plant entry is corrected during the same session , error message is still coming. So the user is required to close the session and begin the me51n again with correct plant entry to escape from the error message , which is making the whole process tedious. Pls tell me how to solve this issue.

Enhancement used : MEREQ001

Component used: EXIT_SAPLMEREQ_010.

Thanks and Regards,

Sij.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Posted on Jul 15, 2011 at 04:45 AM

    Hello,

    As per ur suggestion i have created an implementation using SE19 . But will you please elaborate the process since for the first time I am using BADI. I see a lot of Methods under the Interface tab like Initialize , Open and so on , which one should i opt for.

    Your suggestions will be very valuable.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 14, 2011 at 11:59 AM

    Hi Sij,

    can you paste your code.

    Regards,

    Madhu.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 14, 2011 at 12:06 PM

    Hello madhu,

    Thanks fo ur prompt reply.

    The following is the code:

    break: sslabap.

    data: wa_eban LIKE LINE OF im_t_eban,

    it_eban like im_t_eban, " all purchase requisition related data.

    wa_ebkn like line of im_t_ebkn,

    it_ebkn like im_t_ebkn,

    lv_werks like wa_eban-werks.

    if ( sy-tcode = 'ME51N').

    LOOP AT im_t_eban INTO WA_EBAN.

    if wa_eban-bsart eq 'ZAST'.

    read table im_t_ebkn into wa_ebkn with key bnfpo = wa_eban-bnfpo.

    if sy-subrc eq 0.

    select single werks from anlz into (lv_werks) where ANLN1 = wa_ebkn-anln1.

    if sy-subrc eq 0.

    if lv_werks ne wa_eban-werks.

    MESSAGE 'Maintain proper Plant ' TYPE 'E'.

    endif.

    endif.

    endif.

    endif.

    ENDLOOP.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 15, 2011 at 05:21 AM

    Hello,

    I proceeded as ur per suggestions , but couldn't get the ANLN1 field in L_ITEM structure.

    I need to compare WERKS field maintained in ANLN1(Asset) master data with that of WERKS maintained in L_ITEM.

    And throw error message if both are not the same.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 15, 2011 at 05:57 AM

    Hello madhu,

    I am doing coding inside CHECK interface.

    And i am following as per ur last post.

    but how to use lto_items = im_header->get_items( ). "Get PR items statement.

    When i typed this line its showing error at closing bracket.

    Then i coded as follows

    data : it_items type mmpur_requisition_items,

    wa_items type mmpur_requisition_item .

    call METHOD im_header->get_items.

    How to get data in it_items internal table.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 15, 2011 at 09:21 AM

    Hello all,

    I solved my issue by referring to the below link which exactly resembled my scenario.

    [problem with EXIT_SAPLMEREQ_010;

    Thanks Mr.Madhu for your assistance.

    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.