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

BDC Call: Error Log

Former Member
0 Likes
751

Hi guys,

Hope you can help me out with this. In my program I output an alv grid, the user then selects relevant rows and presses Save. Then my program puts the selected rows into an internal table and sends them through a bdc call to transaction VL02N to update picked delivery data.

The issue I am facing is when an error occurs I don't have a convenient place to output my internal table MESSTAB. Essentially I would like to call the default screen 1000 and display the error messages, but my alv is using it. Is there a way to clear screen 1000 of the alv and display the error message.

I’m trying to avoid having to develop my own screen from scratch to display the data.

<b>Award points as always for helpful answers.</b>

Many Thanks,

Philip Johannesen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
689

Hi,

AFter the call transaction..

You can get the messages from the call transaction..

Then You can use the function module MESSAGES_INITIALIZE, MESSAGES_STORE & MESSAGES_SHOW..

Check this example..

call function 'MESSAGES_INITIALIZE'

exceptions

others = 1.

call function 'MESSAGE_STORE'

exporting

arbgb = '00'

msgty = 'E'

msgv1 = space

msgv2 = space

msgv3 = space

msgv4 = space

txtnr = '208'

exceptions

message_type_not_valid = 1

not_active = 2

others = 3.

call function 'MESSAGE_STORE'

exporting

arbgb = '00' " Message ID

msgty = 'W' " message type

msgv1 = space

msgv2 = space

msgv3 = space

msgv4 = space

txtnr = '208' " Message number.

exceptions

message_type_not_valid = 1

not_active = 2

others = 3.

call function 'MESSAGES_SHOW'

exporting

I_USE_GRID = 'X' " Comment for list display

batch_list_type = 'L'

exceptions

inconsistent_range = 1

no_messages = 2

others = 3.

Thanks,

Naren

4 REPLIES 4
Read only

suresh_datti
Active Contributor
0 Likes
689

Don't know if you would like this.. but you can pass the messtab to a popup function for display.. For ex: Pl take a look at the function module 'HR_BEN_SHOW_ERROR_POPUP'.

~Suresh

Read only

Former Member
0 Likes
690

Hi,

AFter the call transaction..

You can get the messages from the call transaction..

Then You can use the function module MESSAGES_INITIALIZE, MESSAGES_STORE & MESSAGES_SHOW..

Check this example..

call function 'MESSAGES_INITIALIZE'

exceptions

others = 1.

call function 'MESSAGE_STORE'

exporting

arbgb = '00'

msgty = 'E'

msgv1 = space

msgv2 = space

msgv3 = space

msgv4 = space

txtnr = '208'

exceptions

message_type_not_valid = 1

not_active = 2

others = 3.

call function 'MESSAGE_STORE'

exporting

arbgb = '00' " Message ID

msgty = 'W' " message type

msgv1 = space

msgv2 = space

msgv3 = space

msgv4 = space

txtnr = '208' " Message number.

exceptions

message_type_not_valid = 1

not_active = 2

others = 3.

call function 'MESSAGES_SHOW'

exporting

I_USE_GRID = 'X' " Comment for list display

batch_list_type = 'L'

exceptions

inconsistent_range = 1

no_messages = 2

others = 3.

Thanks,

Naren

Read only

0 Likes
689

Thanks for your quick responses. I used Naren's suggestion which was perfect for my solution. I've awarded points to all of you.

Many Thanks,

Philip Johannesen

Read only

Former Member
0 Likes
689

Hi Philip Johannesen,

Try to use the write statement, i hope when you come back from ALV output you can find output data which was written by write statement.

or else.

you can you can show the return messages of table MESSTAB in a pop-up ALV, you can check the prg: BCALV_GRID_AND_POPUP

Thanks,

Shaik Bhasha