cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RAP - Error on validation message highlight

2,659

Hello,

I have a validation running on save for Child entity, which is a list item within my object page, and I'm unable to properly highlight a field as you can see on the following print - the row is marked as unknown.

Shouldn't the following set of parameters be enough to provide a non-state message with a highlight? I'm also feeding %tky to failed-child.

reported-child=
  VALUE #(
    BASE reported-child(
      %tky = ls_child-%tky
      %path = VALUE #(
        root-%is_draft = ls_child-%is_draft
        root-%key-RootUUID = ls_child-RootUUID
      )
      %msg = new_message(
        id       = 'ZTEST_MSG'
        number   = '018'
        severity = if_abap_behv_message=>severity-error
      )
      %element-%field-allocatedquantity = if_abap_behv=>mk-on
      "%state_area = 'qty_not_null'
      "%element-%assoc-_root = if_abap_behv=>mk-on
    )
).
"OData response 

{
    "error": {
        "code": "ZTEST_MSG/018",
        "message": "Allocated Quantity must be informed.",
        "target": "$Parameter/_it/_Child(ChildUUID=000d3a17-2339-1eed-ae8d-a23793571f23,IsActiveEntity=true)/AllocatedQuantity",
        "@SAP__common.ExceptionCategory": "Provider_Application_Error",
        "innererror": {
            "ErrorDetails": {
                "@SAP__common.Application": {
                    "ComponentId": "BC-ESI-ESF-GW",
                    "ServiceRepository": "SRVD",
                    "ServiceId": "ZTEST_SRV",
                    "ServiceVersion": "0001"
                },
                "@SAP__common.TransactionId": "039B658AE04600D0E0063F06F0085867",
                "@SAP__common.Timestamp": "20230301220915.319091",
                "@SAP__common.ErrorResolution": {
                    "Analysis": "Use ADT feed reader \"SAP Gateway Error Log\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details",
                    "Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
                }
            }
        }
    }
}

I've refrained from using state messages because of a seemingly known issue, mentioned in a guide (https://github.com/SAP-archive/teched2020-DEV260/tree/main/exercises/ex9). Unfortunately, I couldn't find any information on which versions first presented the issue or which version solves it. Uncommenting %state_area on the excerpt above causes me the same error that is shown on the next print.

I'm currently on an on-prem system running 2021 FPS2.

Please, am I missing anything?

Best regards,

Rodrigo.

Accepted Solutions (0)

Answers (2)

Answers (2)

Andreas_M
Explorer

Hi rodrigo,

I had the same problem and I found the solution for this problem during debugging in Frontend.

You need to add %is_draft = '01' in your reported-child structure, because the UI is filtering on IsActiveEntity=true in the Object Page Table as you are still in draft mode when filling failed.

Cheers
Andreas

Edna_B
Explorer
0 Kudos

Thank you, that worked for me!
I added this to my reported structure.

 

%path-root_entity-%is_draft = if_abap_behv=>mk-on

 

 

sandeep_rs
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Could you recreate the issue with the browser console on (just before save is clicked) and export the call trace i.e., the .har file so that we can see the request/response cycle when the save button is clicked?

Also is this is a Fiori Elements OData V2 / V4 app?

Thanks and Best Regards,

Sandeep

0 Kudos

Hi Sandeep, thanks for your response!

I'm using OData V4, currently. I'll have get back with the HAR file once I have access to the system again.

BR,

Rodrigo.