Skip to Content
avatar image
Former Member

ME21N user exit

hi,

can anybody tell me how to post messege in Me21n transaction with userexit.

Regards.

Kusum.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    Sep 29, 2008 at 10:28 AM

    hi kusum,

    Screen Exit

    Please remove the TDS-related input fields on the PO entry screen on the customer data tab (PO line details).

    u2022 TDS account

    u2022 TDS cost code

    u2022 TDS sub code

    1. Goto Transaction Code Me21n

    Fill the following fields

    Enter

    Give the input values in following fields from ORGDATA TAB

    Purchasing org

    Purchasing group

    Company code

    Vendor

    Enter

    Select Customer Data tab like following

    USER EXIT : MM06E005 (Customer fields in purchasing document )

    Goto : T.Code : SMOD

    Give the Enhacement Name : MM06E005

     Click on Display

    Click on Components Push Button

    Double click on function module EXIT_SAPMM06E_016( Export Data to Customer Subscreen for Purchasing document item)

    Double click on Include ZXM06O01.

    Insert the following coding in that include

    SET PARAMETER ID 'BUK' FIELD g_ekko-bukrs.

    LOOP AT SCREEN.

    IF screen-name = 'EKPO_CI-ISMSUBTITLE1'.

    screen-input = '0'.

    MODIFY SCREEN.

    ENDIF.

    *>>>>>>>>>>>>>>>>>>>>>> Begin of insert CR336/BG1 >>>>>>>>>>>>>>>>>>>>>>

    IF screen-name = 'G_EAN11'.

    screen-input = '0'.

    MODIFY SCREEN.

    ENDIF.

    *<<<<<<<<<<<<<<<<<<<<<<< End of insert CR336/BG1 <<<<<<<<<<<<<<<<<<<<<<<

    *>>>>>>>>>>>>>>>>>> Begin of Changes for K896570/501411945 <<<<<<<<<<<<<

    IF screen-name = 'EKPO_CI-TDSACCOUNT'.

    screen-input = '0'.

    MODIFY SCREEN.

    ENDIF.

    IF screen-name = 'EKPO_CI-TDSCOST'.

    screen-input = '0'.

    MODIFY SCREEN.

    ENDIF.

    IF screen-name = 'EKPO_CI-TDSSUB'.

    screen-input = '0'.

    MODIFY SCREEN.

    ENDIF.

    *>>>>>>>>>>>>>>>>>> End of Changes for K896570/501411945 <<<<<<<<<<<<<

    *>>>>>>>>>>>>>>>>>>>>>> Begin of insert SM1 >>>>>>>>>>>>>>>>>>>>>>

    IF ( screen-name = 'EKPO_CI-TDSACCOUNT'

    OR screen-name = 'EKPO_CI-TDSCOST'

    OR screen-name = 'EKPO_CI-TDSSUB'

    OR screen-name = 'TDS_TXT_1'

    OR screen-name = 'TDS_TXT_2'

    OR screen-name = 'TDS_TXT_3'

    OR screen-name = 'TDSACCOUNT-DESC'

    OR screen-name = 'TDSCOST-DESC'

    OR screen-name = 'TDSSUB-DESC' ).

    IF g_ekko-bukrs(2) 'U6'. "not a theatrical company

    screen-invisible = '1'.

    screen-input = '0'.

    ELSEIF g_flag = 0. "display only

    screen-invisible = '0'.

    screen-input = '0'.

    ELSEIF g_flag = 1. "change

    screen-invisible = '0'.

    *>>>>>>>>>>>>>>>>>> Begin of Changes for K896570/501411945 <<<<<<<<<<<<<

    u2022 screen-input = '1'. "Fharook Syed

    screen-input = '0'. "Fharook Syed

    *>>>>>>>>>>>>>>>>>> End of Changes for K896570/501411945 <<<<<<<<<<<<<

    ENDIF.

    IF screen-name = 'EKPO_CI-TDSACCOUNT'.

    screen-required = '1'.

    ENDIF.

    MODIFY SCREEN.

    ENDIF.

    *>>>>>>>>>>>>>>>>>>>>>> End of insert SM1 >>>>>>>>>>>>>>>>>>>>>>

     save & activate.

    Repeat the above process in ME21N to see customer data fileds in CUSTOMER DATA tab

    After the above Modifications CUSTOMER DATA is displaying like this

    regards,

    Vamshi

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 29, 2008 at 10:28 AM

    hi

    Welcome to SDN

    Check this

    user-exit-or-badi-for-me21n

    Regards

    pavan

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 29, 2008 at 10:31 AM
    post messege in Me21n transaction

    5 Mins of efforts 😊

    BADi ME_PROCESS_PO_CUST
    Method either from PROCESS_HEADER  "If message on Header 
    
    PROCESS_ITEM   "If message on line Item

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 10:47 AM

    hi,

    first of all thanks all of u 4 quick reply on my question.

    i have got user exits , and developed the code also.

    here I just have to check some value and post message to transaction me21n,

    but the problem is like I don't think we can directly post message to transaction me21n, because it is havig its own message format, like when we save it comes in message log form.

    i just want how should I post that message so that it would come in the message log of the tran, me21n

    thanks .

    regards.

    kusum.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 11:11 AM

    I am using user exit for it,

    error message can be raised ,

    just wanted to confirmed is there any FM to post message for Me21n Or directly we can do by MESSAGE E001(ZK) WITH WL_MSG1 WL_MSG2 .

    regards.

    kusum

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 11:52 AM

    i just want the exact way to post message to Me21n.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 29, 2008 at 12:59 PM

    actually the exact requirement is

    In Transaction ME21N (EnjoySAP: Purchase Order), you want to issue a

    customer-specific error message. The error message should appear in the

    error log of the application. In addition, you would like to navigate to

    the incorrect field.

    Regards.

    Kusum.

    Add comment
    10|10000 characters needed characters exceeded