cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass warning messages in any enhancement in S4HANA Cloud?

0 Kudos

Hello ,

I am able to pass error messages in a validation enhancement in S4HANA cloud.But if i try to pass a warning message by using 'W' instead of 'E' as the message type it doesn't works. Probably, its not supported but i am not sure.

Any help would be highly appreciated.

Regards,

Manish Kumar

GK817
Active Contributor

Hi Manish,

If error message is working, then warning message should also work.

Which enhancement are you using? I have worked on many validation BAdI implementations in S4HC and error/warning messages work fine.

GK

Accepted Solutions (1)

Accepted Solutions (1)

GK817
Active Contributor
0 Kudos

Hi Manish,

Warning message should work if error message is working ( so we are sure that control comes to messages).

Can you try using below code:

<ls_validationmessage>-systemmessageclass     = '/S4PPM/VAL_DET'.
    <ls_validationmessage>-systemmessagetype      = 'W'.
    <ls_validationmessage>-systemmessagenumber    = '000'.
    <ls_validationmessage>-systemmessagevariable1 = 'Please fill functional Area to Proceed'.

Answers (2)

Answers (2)

0 Kudos

Hi Gaurav,

Thanks for the answer.

Somehow in that particular enhancement only, the warning message type is not working. I tried for other enhancements, its working fine.

Nevertheless, i have a raised a ticket to SAP for the same.Hope to hear a solution soon.

Regards,

Manish Kumar

0 Kudos

Hi Gaurav,

Thanks for the quick reply.

Below are the details of the enhancement i am working on:

Business Context: Project Header

Badi Description: Project Validation

Below is the code i am using:

IF enterpriseproject-functionalarea IS INITIAL.

APPEND INITIAL LINE TO validationmessages ASSIGNING FIELD-SYMBOL(<ls_validationmessage>).

<ls_validationmessage>-systemmessageclass = 'FCO_COST_CENTER'.

<ls_validationmessage>-systemmessagetype = 'W'.

<ls_validationmessage>-systemmessagenumber = '031'.

<ls_validationmessage>-systemmessagevariable1 = 'Please fill Functional Area to proceed'. ENDIF.

Can you please help here.