2009 Apr 27 8:08 AM
Hi All,
I am using a BDC to create/change a Vendor through CALL TRANSACTION t code.
Now i have a scenario where the user wants that if the BDC fails then along with the error
messages he wants the session details(kind of log) so that he can go in SM35 and run the
correct the errors.
Please suggest on how to achieve this if I am using CALL TRANSACTION.
Thanks in Advance,
Saket.
Hi All,
I am using a BDC to create/change a Vendor through CALL TRANSACTION t code.
Now i have a scenario where the user wants that if the BDC fails then along with the error
messages he wants the session details(kind of log) so that he can go in SM35 and run the
correct the errors.
Please suggest on how to achieve this if I am using CALL TRANSACTION.
Thanks in Advance,
Saket.
2009 Apr 27 8:23 AM
for this you can provide the appilication log
first cretae the object and subobjects in SLG0 with any name you want
after that you can move all error messages to your internal table. gt_messages
after executing the porgam you look the error log in SLG1 tcode
DATA: lt_obj_long_no TYPE STANDARD TABLE OF balnri.
CALL FUNCTION 'APPL_LOG_WRITE_MESSAGES'
EXPORTING
object = 'YTEST'
subobject = 'YTEST'
update_or_insert = 'I'
TABLES
messages = gt_messages
EXCEPTIONS
object_not_found = 1
subobject_not_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'APPL_LOG_WRITE_DB'
EXPORTING
object = 'YTEST'
subobject = 'YTEST'
TABLES
object_with_lognumber = lt_obj_long_no
EXCEPTIONS
object_not_found = 1
subobject_not_found = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2009 Apr 27 10:04 AM
Thanks for the suggestion Chenna.
But can you please elaborate on this.
I did not get much of what you suggested.
2009 Apr 27 10:15 AM
Hi Saket,
Use " Format_message " function module, it will give all the error records and reprocess the error records.
Regards,
Sathish
2009 Nov 09 12:47 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |