cancel
Showing results for 
Search instead for 
Did you mean: 

Error Message from BOPF Action check does not appear on UI

former_member383742
Participant

Hello SAP Experts,

I have as backend system SAP Netweaver 7.50 SP5 and as frontend system SAP Fiori Frontend Server 3.0. I generated a SAP Fiori Elements Application based on ABAP CDS View annotations (according to ABAP Programming Model on SAP Fiori) and I defined a custom BOPF action on the generated BOPF BO in order to perform a custom action.This action was also exposed via the annotation @UI.lineItem: [{ position: 10, type: #FOR_ACTION, dataAction: 'BOPF:ACTION_NAME', label: 'Action Test' }].

The actions should not be executable in case of certain conditions and therefore I implemented a Action Check for this action giving an error message in case that the action cannot be executed. My problem is that on UI side, the application shows an generic error message "This action cannot be performed for the selected object." and not the error message which I am providing within the BOPF action check...Could you please tell me if there is a SAP Note already which corrects this issue on Netweaver 7.50 SP5?

PS: I have the same application on another backend system with SAP Netweaver 7.51 SP2 and there the right error message is shown on UI side.

axel_mohnen_ctie
Explorer
0 Kudos

Hi Chiuaru,

Did you find a solution for this issue? I have exactly the same problem.

Thanks

Axel

ManojYadav
Explorer
0 Kudos

Hi chiuaru.catalin,

Did you find solution for this. I am also facing same issue.

Regards,

Manoj

Accepted Solutions (0)

Answers (2)

Answers (2)

girish_nayak05
Discoverer
0 Kudos

Hello ,

Since I recently faced the same issue, I am posting one of the possible solution for the same.

When the error is received from the BAPIRET table, the following could be used for populating the error message:

lv_message = <fs_msg>-message.
		
	CREATE OBJECT lo_cm TYPE /bobf/cm_frw_symsg
          EXPORTING
            severity           = /bobf/cm_frw_symsg=>co_severity_error              "Specify Severity here
            symptom            = /bobf/if_frw_message_symptoms=>co_bo_inconsistency
            lifetime           = /bobf/if_frw_c=>sc_lifetime_set_by_bopf
            mv_attr1           = <fs_msg>-message_v1
            mv_attr2           = <fs_msg>-message_v2
            mv_attr3           = <fs_msg>-message_v3
            mv_attr4           = <fs_msg>-message_v4
            message_text       = lv_message
            ms_origin_location = VALUE #(
              bo_key    = zif_i_inf_c=>sc_bo_key
              node_key  = zif_i_inf_c=>sc_node-main_node
              key       = <fs_key>
            ).
        eo_message->add_cm( EXPORTING io_message = lo_cm ). 
        
" It is important to set the flag as false, else program ends in short dump
ev_static_action_failed = abap_true. 


jan_nyfeler2
Explorer
0 Kudos

Did you find a solution?