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

Screen - Message handlin..

Former Member
0 Likes
947

Hi Gurus,

i have developed a screen with a table control.

Now as per the requirement , the Error message handling should be at one-shot while user presses save on the screen.

let me be clear:

if the user enters the data in the table control and after he presses save, then all the error messages shud be collected and displayed in a subscreen below the table control. It need not handle it row wise. all the errors for the total data shud be displayed in a error log which also shud be designed....

So can u guide me how to progress further for designing the error log and also the way t display in a sub-screen or container below the actual screen's table control data.

please give me a detailed explanation..... Thanks in advance..

chaitu..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
927

Hi Chaitanya,

Let me explian you the logic for your requirement.

First create a subscreen in the main screen.

Now while user clicks onthe Save button. At the PAI handle all the messages and insert the data into one internal table. Now when the subscreen calls, at PBO of the subscreen. use your internal table to display it in the subscreen.

Thanks,

Chidanand

8 REPLIES 8
Read only

Former Member
0 Likes
927

Hi,

In the PAI of the screen, Write the module..

In the module; Based on the SY-UCOMM (Function code of the save button, Write the validation to be performed).

Regards

Shiva

Read only

Former Member
0 Likes
928

Hi Chaitanya,

Let me explian you the logic for your requirement.

First create a subscreen in the main screen.

Now while user clicks onthe Save button. At the PAI handle all the messages and insert the data into one internal table. Now when the subscreen calls, at PBO of the subscreen. use your internal table to display it in the subscreen.

Thanks,

Chidanand

Read only

0 Likes
927

Hi,

should the subscreen be created in the main screen..

if so, where will the PAI or PBO of the subscreen exists..

or shud i create a screen with different no and then call this screen in the maiin screen, can u plz explain..

Read only

0 Likes
927

Hi Chaitu,

According to your requirement it all depends on whether to create a subscreen or another screen. If your client is asking for new screen go ahead with new screen else go with subscreen.

All the messages that you want to handle can be handled in both sub and new screen. Handle your messages in a messages class and trigger them in PAI according to messages that that you want to display.

Just for knowledge purpose want to know how many messages you are triggering where you are create subscreen for messages.

Cheers!!

Venk@

Read only

0 Likes
927

Hi venkat, the subscreen concept is Ok..

Now to display the data from the Error table collected, which type of Logic i shud use..

i have the table with messages, but iam using.

class: CL_GUI_ALV_GRID class for the display of the data by declaring a container in the subscreen..

1. i declared the subscreen.

2 in the subscreen i declared a container..

3. now using the Class CL_GUI_ALV_GRID, iam dispalying the data in the subscreen.

now my prob is the method set_table_for_first_display from the above class is used to display the data.

After the user corrects the entry , then the entry shud be removed from the subscreen...ok...so teh table is updated, but this method is not refreshing the data. can u suggest any other methods or classes to do the above logic...

Read only

0 Likes
927

Hi Chaitu,

I have not worked with the class that you have mentioned.

But similar to your issues like refreshing the data i worked with the text editor of clearing the data. Normally when we use refresh and clear keywords may not work in the case of containers.

I will give you example where i have cleared the data in the container.

CALL METHOD TEXT_EDITOR->GET_TEXTSTREAM

IMPORTING

TEXT = TEXT

CALL METHOD CL_GUI_CFW=>FLUSH

EXCEPTIONS

CNTL_SYSTEM_ERROR = 1

CNTL_ERROR = 2

OTHERS = 3.

  • MESSAGE TEXT TYPE 'I'.

WA_TAPD-TAPD = TEXT.

So my TEXT data is passed into workarea when it is saved i have to clear it for which i do like this

call method TEXT_EDITOR->SET_TEXTSTREAM

exporting

TEXT = '' "this make data clear.

Hope you got the concept which i want to tell , finally there might be class to refresh or clear your data. so search for that.

Cheers!!

Venk@

Read only

Former Member
0 Likes
927

Hi ,

U have to again use

CALL METHOD g_grid->refresh_table_display

  • EXPORTING

  • is_stable = itab(table in subscreen to be refreshed)

  • I_SOFT_REFRESH =

  • EXCEPTIONS

  • FINISHED = 1

  • others =2

otherwise the table not be refreshed and error entries be still there.

Thanks & Regards

Ruchi Tiwari

Read only

Former Member
0 Likes
927

I have inserted a subscreen in to the existing screen an dcollected all the errors. and then displayed as ALV in the subscreen.