cancel
Showing results for 
Search instead for 
Did you mean: 

RAP Framework Validation Fail and Custom Table LOG doesn't write the LOG (Rollback)

former_member302911
Active Participant
0 Kudos

Hi,

the scenario is pretty simple:

  1. External System Call an OData BTP Service (Post Operation - Create Method)
  2. BTP Service Call an External Rest Service for POST Informations
  3. External Rest Service fails
  4. The procedures Catch the errors and write a Custom Header/Item Table
  5. Trigger Framework Failed / Reported of Create Method

The LOG table at Step 4 is not written probably because the step 5 trigger a Framework Rollback.

There is a way or alternative way to write the LOG Table ?

Thanks,

Angelo.

Accepted Solutions (0)

Answers (3)

Answers (3)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert

Hi Angel,

what about using the application log framework?

Application Logs | SAP Help Portal

You can create your own application log object and read and write to it.

Kind regards,

Andre

former_member302911
Active Participant

Hi Andre,

yes it is an alternative, we use Application Logs to log the messages of Application Jobs.

We use a custom solution for LOGS simply to add some custom fields like Class, Method, HTTP Status and to have a Header / Item Application for better readibility.

It is really hard to think that there is no way to start a new luw for this scenarios.

Thank you,

Angelo.

SiddharthaR
Advisor
Advisor

Hi Angel,

I am assuming it is an unmanaged service .

Did you explore the option of updating the LOG table in a RFC FM in a new LUW.

former_member302911
Active Participant
0 Kudos

Hi Siddhartha,

Yes, it is an Unmanaged Service.

I tried to encapsulate all the logic for LOG in a RFC Function Module and I tried to use the addidions

  • IN UPDATE TASK
  • STARTING NEW TASK
  • IN BACKGROUND TASK AS SEPARATE UNIT

BTP do not love this additions because is not valid in restricted language scope.

Tried also to use addition DESTINATION 'NONE' but generate a Runtime Error (RFC_ILLEGAL_CALL_ON_SAPCP) and also to switch Function Module Process Type from RFC to Update, the problem persist.

AleGuarneri
Explorer
0 Kudos

I have exactly the same problem dealing with std Application Log. Can't figure out a way to save the logs in the DB, already tried everything mentioned here, with no luck.

Shall I open a ticket to SAP Support?

Thanks

BR

Alex