cancel
Showing results for 
Search instead for 
Did you mean: 

RAP : Error messages behaving differently

shavneet1
Participant
0 Kudos

Hello Colleagues ,

I have one simple error message , on validation. I get the error message in the form of pop up (Which i do not want), as shown in the screenshot below.

Code for the above message is as follows:

LOOP AT ItemDataset INTO DATA(ItemData).

lv_item_no = ItemData-ebelp.

IF ItemData-netpr > 0 AND ItemData-eliverytimewe IS INITIAL .

APPEND VALUE #( %tky = ItemData-%tky ) TO failed-items.

APPEND VALUE #( %tky = ItemData-%tky

%msg = NEW zscp_rfx_msg_defn(

textid = zscp_rfx_msg_defn=>delivery_time

mv_value = lv_item_no

severity = if_abap_behv_message=>severity-error )

%element-EliveryTimeWe = if_abap_behv=>mk-on

) TO reported-items.

Endif.

What i would i like is message at the left footer , with hyperlinks , which points to the error.

Code for the above error message is as follows :

LOOP AT childdataset INTO DATA(childdata).

IF childdata-MatGrp IS INITIAL.

APPEND VALUE #( %tky = childdata-%tky ) TO failed-activitymaster.

APPEND VALUE #( %tky = childdata-%tky

%msg = NEW zbp_ditp_r_msgdefn(

textid = zbp_ditp_r_msgdefn=>matr_grp

severity = if_abap_behv_message=>severity-error )

%element-MatGrp = if_abap_behv=>mk-on

) TO reported-activitymaster.

ENDIF.

There is no difference in the code , but error message is behaving differently.Or may be something is there which i am missing.

Your help is appreciated here.

ramjee.korada amangarg andre.fischer Thanks and Regards ,Shavneet Singh



View Entire Topic
SAPDEV1
Discoverer
0 Kudos

Hello,

I had this error too.

For me, the reason was my validation was on a child so it is mandatory to filled the path with the root parent.
SAPDEV1_0-1714661271617.png

After that, message popover and state area works well.

https://help.sap.com/docs/abap-cloud/abap-rap/state-messages

As you can see in my code, another problem was my %is_draft from key was 00 (I don't know why maybe an impact from my determination before) and here it wants 01 (logic I'm in draft when I save) and 00 for root. After it propose well the link in message popover.

Best regards.