Application Development and Automation 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: 

Warning Message at MIRO Badi

former_member377111
Participant
0 Kudos
541

Hi,

While trying to trigger a warning using badi invoice_post sytem not showing warning message.Please help

5 REPLIES 5

former_member262988
Active Contributor
0 Kudos
178

HI,

Can you please elaborate your requirement ,so that exact badi can be searched.

Thanks,

Shailaja Ainala.

0 Kudos
178

User wants to check a checkbox in PO level and trigger a waring msg during MIRO.But even if i try with all posibilites im not able to trugger a warning.Please find the below code for the BADI

INVOICE_UPDATE

DATA:LV_ZLDPNTY TYPE EKPO-ZLDPNTY,

WA_RSEG TYPE RSEG.

LOOP AT TI_RSEG_NEW INTO WA_RSEG.

SELECT SINGLE ZLDPNTY FROM EKPO INTO LV_ZLDPNTY WHERE EBELN = WA_RSEG- EBELN AND EBELP = WA_RSEG-EBELP.

IF LV_ZLDPNTY = 'X'.

MESSAGE ID 'ZFI' TYPE 'W' NUMBER '010' DISPLAY LIKE 'W'..

ENDIF.

ENDLOOP.

0 Kudos
178

Hi

try the following:


DATA:LV_ZLDPNTY TYPE EKPO-ZLDPNTY,
WA_RSEG TYPE RSEG.
LOOP AT TI_RSEG_NEW INTO WA_RSEG.
SELECT SINGLE ZLDPNTY FROM EKPO INTO LV_ZLDPNTY 
WHERE EBELN = WA_RSEG- EBELN 
AND EBELP = WA_RSEG-EBELP.
IF LV_ZLDPNTY = 'X'.

* Here goes your message
MESSAGE W010(ZFI) RAISING error_with_message.

ENDIF.
ENDLOOP.

Best regards

Edited by: Pablo Casamayor on Mar 24, 2009 3:09 PM

former_member262988
Active Contributor
0 Kudos
178

Hi,

Once try this way ..........use the function module MRM_FINAL_CHECK ....in this use enhancement spot

and try tho check the records in the internal table t_drseg ......and do validations.

Thanks,

Shailaja Ainala.

former_member705122
Active Contributor
0 Kudos
178

Hi,

Refer Interface documentation of Badi 'INVOICE_UPDATE' you will find answer.

You should note that no system messages can be send in the methods. One exception here is the method CHANGE_AT_SAVE. Within this method, a system message can be issued if the exception ERROR_WITH_MESSAGE is triggered.

Regards

Adil