cancel
Showing results for 
Search instead for 
Did you mean: 

Specify invalid item into BADI ME_PROCESS_REQ_CUST.

Former Member
0 Kudos

Hi experts,

I'm using a Badi ME_PROCESS_REQ_CUST method PROCESS_ACCOUNT. When one check is true I show an error message at item level, but is possible posting (save) the document.

I would need something similar to Method PROCESS_ACCOUNT->INVALIDATE from Badi ME_PROCESS_PO_CUST.

Any sugestion?

Thanks in advance.

Regards,

David.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi David,

Did you finally solve this issue? I have the same problem.

Former Member
0 Kudos

Hi Alberto,

You must use the method CHECK.

Regards,

David.

Former Member
0 Kudos

Hi

Are you able to still save the doucment even though you are getting the error..

Could not et you properly, You can always use method CHECK to stop saving PO.

Thanks & Regards

KK

Former Member
0 Kudos

Hi kishore,

I call the method Check from Method Process_Account and I fill the field CH_FAILED with 'X', but save the PR is still possible.

Regards,

David.

Former Member
0 Kudos

please provide details on what you are checking and what message being used and the code

BAdI works effectively for error messages

Thanks & Regards

KK

Former Member
0 Kudos

Hi,

I use the Method PROCESS_ACCOUNT.

Previously when I obtained an error I launched the error message with this class


CALL METHOD cl_message_mm=>create
    EXPORTING
      im_msgid         = id
      im_msgty         = msgty
      im_msgno         = NUMBER
      im_msgv1         = MESSAGE_V1
      im_msgv2         = MESSAGE_V2
      im_msgv3         = MESSAGE_V3
      im_msgv4         = MESSAGE_V4
      im_force_collect = mmpur_yes
    EXCEPTIONS
      OTHERS           = 0.

The error message is shown at item level, but save the document is possible.

Now when I obtain an error I follow the same steps, but I call the method Check.


IF NOT lv_error IS INITIAL.
    CALL METHOD if_ex_me_process_req_cust~check
    EXPORTING IM_HEADER = ob_header
              im_hold   = space
    CHANGING  ch_failed = lv_error.
  ENDIF.

The variable CH_FAILED is changed to 'X', but it's not work fine.

Thanks,

David.