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: 

Display Message when value is changed in ME51n (BADI ME_PROCESS_REQ_CUST )

Former Member
0 Kudos

Hi All,

While creating a purchase requisition,my requirement is to default requisitioner field if empty with first two characters of the costcenter or if the requisitioner is not empty first two chars of the costcenter and the value entered in requsistioner field and then issue a message saying that the field value has been changed.

I am able to populate the values but not the message.

Can someone tell how I can display the message using the BAdi

ME_PROCESS_REQ_CUST after changing the values.

I used Process_Account and Process_Item methods of the BAdi for implementing this.

In Process_Item method, i am sending the changed values using

call method im_item->set_data

exporting im_data = ls_item.

How can I pass the message in this metho.d

1 ACCEPTED SOLUTION

Former Member
0 Kudos

In the similar BADI in Purchase Order there are a series of pre-defined macros available with which to issue messages. These place the messages into the standard list box used to display messages by SAP. there are also methods INVALIDATE() for the Header and Item which you use to prevent the record being saved until the user fixes the issue. If you do not do this, the data can be saved without correction.

Check if there is anything similar for the Purchase Requisition BADI - In the PO one it is documented in the BADI documentation and in the BADI example code.

Andrew

5 REPLIES 5

Former Member
0 Kudos

Hi Viswas,

You cannot use a warning message in BADIs or exits and it will result in an error message. You can try using Information message as usage of this message type doesn't effect the processing of the code after it.

Example:

if percent = 16.

message e000(zzz) with 'Hi' .

endif.

Message will be reported in a pop of information box.

reward if useful.

regards,

Vikas

Former Member
0 Kudos

In the similar BADI in Purchase Order there are a series of pre-defined macros available with which to issue messages. These place the messages into the standard list box used to display messages by SAP. there are also methods INVALIDATE() for the Header and Item which you use to prevent the record being saved until the user fixes the issue. If you do not do this, the data can be saved without correction.

Check if there is anything similar for the Purchase Requisition BADI - In the PO one it is documented in the BADI documentation and in the BADI example code.

Andrew

0 Kudos

I was able to solve my issue using the Macros

Thanks,

Viswas

0 Kudos

Hi Viswas,

I am having the same problem, i am validating the glaccount and raising error message, its showing the error message but if i press save it saves the PR with invalid glaccount the same is working in PO but not PR.

Can you tell me how u have done through Macro.

Atul

0 Kudos

Hi Viswas,

I am also having the same issue, i need to display the warning message into the status bar using BADI.

Could you please help me out on this.

Thanks & Regards,

Pooja Joshi.