cancel
Showing results for 
Search instead for 
Did you mean: 

EML : Business Object Interface Exception Handling

adnanmaqbool
Contributor
0 Kudos
131

Dear All

Please support that how to read messages returned by Business Object Interface programmatically.

We can read the response through debugging, but how to read same using ABAP.

 In below code

REPORTED DATA(reported)

OR

is having %MSG having the error message but final structure is only available at runtime.

MODIFY ENTITY I_ProductionOrderTP
CREATE FIELDS ( 
 product
 productionplant
 productionversion
 productionordertype
 orderplannedtotalqty
 productionunit
 basicschedulingtype
 )
AUTO FILL CID WITH VALUE #(
 (
 %data-product = 'FG228'
 %data-productionplant = '1010'
 %data-productionversion = '0001'
 %data-productionordertype = 'YBM1'
 %data-orderplannedtotalqty = 5
 %data-productionunit = 'ST'
 %data-basicschedulingtype = '4'
 )
 )
FAILED DATA(failed)
REPORTED DATA(reported)
MAPPED DATA(mapped).

IF failed IS INITIAL.
 COMMIT ENTITIES BEGIN
 RESPONSES
 FAILED DATA(failed_commit)
 REPORTED DATA(reported_commit).

 IF sy-subrc = 0 AND failed_commit IS INITIAL.
 CONVERT KEY OF i_productionordertp
 FROM TEMPORARY VALUE #( %pid = mapped-productionorder[ 1 ]-%pid
 %tmp = mapped-productionorder[ 1 ]-%key )
 TO FINAL(ls_finalkey).
 ENDIF.
 COMMIT ENTITIES END.

 " Number of created Order: ls_finalkey-productionorder

ELSE.
 ROLLBACK ENTITIES.
ENDIF.

 

Accepted Solutions (0)

Answers (0)