How you will catch errors in call transaction?

Answer Posted / p.lokesh

We will catch errors in the call transcation explicitly by
using Structure BDCMSGCOLL.
and FUNCITNO MODULE 'WRITE_FORMAT'.

Ex:
Data : bdc_msg type table of bdcmsgcoll with header line,
bdc_tab type table of bdcdata with header line.

CALL TRANSACTION 'MM01' using Bdc_tab mode N
updte S
messages into bdc_msg.
if sy-subrc = 0.
perform Error.
clear bdc_msg.
refresh bdc_msg.
endif.
Read table bdc_msg with key msgtype = 'E'.

if sy-subrc = 0.
call function 'FORMAT_MESSAGE'.
...
..
..

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is roll area?

561


Explain what are extracts?

619


Difference between Read and Get cursor?

1595


How do you document abap/4 programs? Do you use program documentation menu option?

690


when u prefer lsmw?

617






Difference between domain and data element? What are aggregate object?

597


What are the different types of internal table?

642


How to set an Enhancement point for a custom report?

1139


What are the basic object types? : sap abap hr

618


What is the length of function code at user-command?

744


What is static attribute

1069


Application Category?

913


What functions does a data dictionary perform ?

555


When to use logical database?

562


Explain what is step-loop? Explain all the steps?

700