‎2009 Dec 23 11:32 AM
Hi,
I am using screen 100 PBO module to display my list with some editable fields in my output using CALL METHOD g_grid->set_ready_for_input.
In PAI module I am cross checking the input fields and if there are any errors I am displaying those error records by again calling screen 100.
But the new data doesn't replicate in the needed output.ie., if there are 3 records in the main o/p list in that if, 1 record is in error, I should display only that 1 record with one more field at the end stating error message in the column. I have taken measure to inculde the extra field in the fieldcategory.
Please help me by telling me that how I should pass the screen controls to get the need list.
Regards
Mac
‎2009 Dec 23 11:37 AM
Hi
First check by debugging,that data is getting refreshed in u internal table.if data got refreshed,then u need check the container.
**Create Container ALV Grid
IF g_cust_grid IS INITIAL.
Create Control Container for Grid
CREATE OBJECT g_cust_container
EXPORTING
container_name = g_container.
CREATE OBJECT g_cust_grid
EXPORTING
i_parent = g_cust_container.
ENDIF.
**Displaying data in grid
CALL METHOD g_cust_grid->set_table_for_first_display
EXPORTING
IS_LAYOUT = g_wa_layout2
CHANGING
it_fieldcatalog = g_t_fieldcat
it_outtab = g_t_screen.
Regards,
Raghu.
‎2009 Dec 23 11:37 AM
Hi
First check by debugging,that data is getting refreshed in u internal table.if data got refreshed,then u need check the container.
**Create Container ALV Grid
IF g_cust_grid IS INITIAL.
Create Control Container for Grid
CREATE OBJECT g_cust_container
EXPORTING
container_name = g_container.
CREATE OBJECT g_cust_grid
EXPORTING
i_parent = g_cust_container.
ENDIF.
**Displaying data in grid
CALL METHOD g_cust_grid->set_table_for_first_display
EXPORTING
IS_LAYOUT = g_wa_layout2
CHANGING
it_fieldcatalog = g_t_fieldcat
it_outtab = g_t_screen.
Regards,
Raghu.
‎2009 Dec 23 12:31 PM
I have seen it in the debug mode, the data is not getting refreshed.
When the screeen is called for the second time, I have put an condition like
IF g_custom_container IS INITIAL.
PERFORM create_and_init_alv CHANGING t_dspdat[]
gt_fieldcat.
ENDIF.
here the condition is getting failed. Earlier when screen 100 is called t_dspdat[] has 3 records and when this same screen is called second time t_dspdat[] has 1 record, but displays 3 records only.
How should I refresh the data.
Any help.
Regards
mac
‎2009 Dec 24 10:58 PM
Hi Mac Mohan,
In the same class, with set_table_for_first_display, there is one more method called refresh_table or just refresh().
Try to do use this.
‎2009 Dec 27 3:38 PM
Hi
You have several options:
1) After the user hits enter and PAI/PBO gets triggered you need to execute a soft refresh to get the data reflected in your data table. Then you can make your checks and inform the user
2) You can implement the event handler on_data_changed of the grid. This way you can check field by field when ever a field changes in the grid. You can raise errors and this way set the focus to the wrong cell.
‎2009 Dec 28 6:03 AM