Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with FM BAL_DB_SAVE

albanisela
Discoverer
0 Kudos

Hello all,

I have an issue while using FM BAL_DB_SAVE.
I have created a custom function in which i implemented a logic that creates a log entry in tcode SLG, with some message.
Everything works fine if i run the function.
The issue i have is when this function gets called from a oData method, which in itself is called from a FIORI app. This method before calling my function, calls a BAPI BAPI_ENTRYSHEET_CREATE and when my function gets called, the FM BAL_DB_SAVE returns sy-subrc = 2, meaning save_not_allowed.
After debugging the BAPI i found out that this BAPI also calls FM BAL_DB_SAVE inside of it.
I think that this is the reason of my issue, but i am not being able to fix it.

Can anyone please help me?
Thank you!

1 REPLY 1

Sandra_Rossi
Active Contributor

I guess it's SLG1, not SLG.

According to the documentation, the exception SAVE_NOT_ALLOWED is triggered if the log doesn't contain any message.