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

ME21N / ME22N - User exit name to make tax code (MWSKZ) field mandatory

Hi,

Transaction Codes: ME21N / ME22N

I want to make tax code MWSKZ field mandatory for specific purchase orders types and specific company codes.

Can anyone please tell me the name of user exit / BADI availiable for that.

Regards,

Ajitrao

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2008 at 07:48 AM

    Hello,

    the tax code is in the tab inovice ,

    see there are somany exit for this this tcode i am unble to say that just keep break-point in every exit and run the tcode when u enter any value in taxcode check wch exit is truggering then u can write the code there.

    thank u

    santhosh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      follow this sytax....

      • LOOP AT it_itab INTO wa_itab.

      *

      • IF sy-uname = wa_itab-uname.

      *

      • IF screen-name = 'VBAK-LIFSK'.

      • screen-input = 1.

      • MODIFY SCREEN.

      • ENDIF.

      *

      • IF screen-name = 'VBAK-FAKSK'.

      • screen-input = 1.

      • MODIFY SCREEN.

      • ENDIF.

      *

      • ENDIF.

      • ENDLOOP.

      *

      *

      • IF screen-name = 'KOMV-KBETR'.

      • screen-input = 0.

      • MODIFY SCREEN.

      • ENDIF.

  • author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2008 at 08:49 AM

    Hi,

    You can use BADI ME_PROCESS_PO_CUST Method PROCESS_ITEM.

    Remember to include INCLUDE mm_messages_mac in your method to display errors in the gui.

    The advantage of using this method over the screen modification is that BADI will not allow a save of the PO, and this check will also work if you use BAPIs (BAPI_PO_CREATE, BAPI_PO_CHANGE). The screen mods will not work in the BAPIs.

    SAMPLE CODE

    INCLUDE mm_messages_mac.

    data: lv_current_item TYPE MEPOITEM.

    lv_current_item = im_item->get_data( ).

    if lv_current_item-MWSKZ is initial.

    im_item->invalidate( ).

    mmpur_message_forced 'E' 'ZZ' '999' '' '' '' ''.

    endif.

    You can get the header data and make checks on Company codes etc....

    Edited by: Serge on Nov 12, 2008 9:55 AM

    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.