Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in BADI Me21n

Former Member
0 Kudos


Hello Experts,

Urgent help required

I have stuck in one problem  .

I have used the badi process_item .

I had created a enhancement in me21n to make tax code as mandatory field.

Enhancement is working fine E04 system but when it is moved to T04 systems it is not working correctly

i.e, After passing  the tax code value the status bar showing message as "No message issued during check " But  message bar is showing the message  please enter tax code

So help me in solving this issue.

* Fehlermeldung wenn Steuerkennzeichen nicht gepflegt ist bei EKORG 0001

  IF ( sy-tcode = 'ME21N' OR sy-tcode = 'ME22N' ) and re_hdrdata-ekorg = '0001' AND re_data-pstyp NE '7' and re_data-mwskz IS INITIAL and re_data-LOEKZ eq ''.

* IF sy-tcode = 'ME21N' OR sy-tcode = 'ME22N'.

*    IF re_hdrdata-ekorg = '0001' AND re_hdrdata-bsart NE 'UB'. " U02848 3.10.2013 15:12 CET

*      IF re_data-mwskz IS INITIAL.

*      message id 'ZMSG' type 'E' number '008'.

************************************************************************** Commenting and Adding code by Madhu 17.12.2013

*    IF sy-langu EQ 'E'.

*      MESSAGE 'Please enter the Tax code' TYPE 'E'.

*      EXIT.

*    ELSE.

*      MESSAGE 'Bitte Steuerkennzeichen pflegen' TYPE 'E'.

*      EXIT.

*    ENDIF.

          mmpur_metafield mmmfd_tax_code.

          mmpur_message_forced 'E' 'ME' '563' '' '' '' ''.

* invalidate the object

          CALL METHOD im_item->invalidate( ).

*************************************************************************** end of code by Madhu 17.12.2013

*      ENDIF.

*    ENDIF.

  ENDIF.

I have attached the process_item  complete code.

5 REPLIES 5

Former Member
0 Kudos

The best option would be to put a break point with the "mmpur_message_forced 'E' 'ME' '563' '' '' '' ''. in the T04 system since int works in the parent system it would be hard to identify the reason.

Also check the message class also to ensure the same is available in taget system.

Hope it helps.

Former Member
0 Kudos

Hi,

Have you check the all conditions in ME21N.  Put the break point check once again. I did not find any thing wrong in the coding.

IF ( sy-tcode = 'ME21N' OR sy-tcode = 'ME22N' ) and

      re_hdrdata-ekorg = '0001' AND

      re_data-pstyp NE '7' and   " can you check this

       re_data-mwskz IS INITIAL and

       re_data-LOEKZ eq ''.   " can you check this

          mmpur_metafield mmmfd_tax_code.

          mmpur_message_forced 'E' 'ME' '563' '' '' '' ''.

endif.

himanshu_gupta13
Employee
Employee
0 Kudos

Hiiii,

what do you mean here by E04 &  T04 systems?

many thanks / Himanshu gupta

nabheetscn
Active Contributor
0 Kudos

Please read the documentation for understanding about meta fields and do accordingly by forcing message via meta fields.

Nabheet

Former Member
0 Kudos

Hi

re_data-LOEKZ eq "????"  , Please Check Once your Code .

Regard's

Smruti