EML responses explain what the BO did

An EML request can be syntactically valid and still be rejected by the BO. Response tables carry different information:

  • MAPPED links a content ID to a created instance/key.
  • FAILED identifies instances whose requested operation failed.
  • REPORTED carries messages and other information for the consumer.

Not every operation uses all three in the same way. For example, a create can return mapped keys, while a read has a result plus failure and message responses.

Check the failure result

MODIFY ENTITIES OF ZR_PURCHASE_REQUEST
  ENTITY Request
  UPDATE FIELDS ( Status )
  WITH VALUE #( ( RequestId = 'PR-2207' Status = 'APPROVED' ) )
  FAILED DATA(failed)
  REPORTED DATA(reported).

IF failed-request IS INITIAL.
  DATA(result) = 'No request failure reported'.
ELSE.
  result = 'Inspect the failed request details'.
ENDIF.

In the real BO, inspect the entity-specific response components and message details from its generated types. FAILED being empty means this response did not identify a failed instance; it is not a substitute for checking the later commit outcome.

Sources

Developer practice · ABAP

Practice: check operation response tables

Submit a status update and branch on whether the Request entity appears in FAILED.

Choose your ABAP environment

This choice changes the output pattern checked here: WRITE belongs in a classic executable report, while out->write( ) uses the supplied output reference in an ABAP Cloud class-run method. It does not switch the language version of the other code; check release and API availability in your target system.

Complete the task and include the output statement shown for your selected environment. Variable names can differ if you use them consistently. This browser checker checks structure only; it does not compile or run ABAP.

0 required structures detected · 0 checks