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

RAP: Issue Calling Standard FM IQS4_ADD_DATA_NOTIFICATION (COMMIT restriction)

NguyenTanTai
Discoverer
0 Likes
305

Hello everyone,

I am currently developing a RAP-based Fiori application and have a requirement to update data from a custom table in the UI to a notification using the standard function module IQS4_ADD_DATA_NOTIFICATION.

I added a custom button on the UI that retrieves data from the selected line and then calls this function module to perform the update. However, based on RAP architecture, function modules or BAPIs that contain explicit COMMIT WORK or ROLLBACK WORK statements are not allowed. When triggering the action, I encounter a BEHAVIOR_ILLEGAL_STATEMENT dump.

I am aware of possible approaches such as using a background job or bgPF (background processing framework). However, I am looking for guidance on the most suitable and recommended solution for this specific scenario

Has anyone faced a similar issue or found a suitable workaround for this scenario in RAP?

I would appreciate any guidance or best practices.

Thank you,

Accepted Solutions (0)

Answers (2)

Answers (2)

AbhishekSharma
Active Contributor
0 Likes

Hi @NguyenTanTai 

Commit is restricted in RAP because its handled by Framework...

You may use solution suggested by @Vignesh_S1 

SAP suggested way to use legacy BAPI or FM in RAP application by creating API service for that FM/BAPI using ACO PROXY Code ACO_PROXY

AbhishekSharma_0-1776787005459.png

Hope this helps...

Thanks-

 

Vignesh_S1
Explorer
0 Likes

You can create a custom wrapper encapsulating the standard FM and calling the wrapper with destination NONE.