2025 Apr 05 4:39 PM - edited 2025 Apr 05 4:48 PM
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.
Request clarification before answering.
User | Count |
---|---|
95 | |
15 | |
10 | |
8 | |
5 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.