Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to save session using CALL TRANSACTION

Former Member
0 Likes
956

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.

4 REPLIES 4
Read only

Former Member
0 Likes
768

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.

Read only

0 Likes
768

Thanks for the suggestion Chenna.

But can you please elaborate on this.

I did not get much of what you suggested.

Read only

Former Member
0 Likes
768

Hi Saket,

Use " Format_message " function module, it will give all the error records and reprocess the error records.

Regards,

Sathish

Read only

Former Member
0 Likes
768

Thanks Chenna.

Finally i did as u suggested.