‎2007 May 03 6:02 PM
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.
Im 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
‎2007 May 03 6:13 PM
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
‎2007 May 03 6:07 PM
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
‎2007 May 03 6:13 PM
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
‎2007 May 04 9:30 AM
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
‎2007 May 03 6:19 PM
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