2006 Mar 09 10:01 AM
hi frnd's,
Selection-screen had one submit button,when i click that an
Alv list is displayed.
When i click the back button in alvlist it comes back to the selection-screen,then when i change some datas and agin click the submit button means the prevoius dats in the list is also displayed.
what can i do for that.
can anybody help me.
2006 Mar 09 12:00 PM
Hi Suganya,
Thanks for your esteemed reply...
I tried and made the neccessaryu changes...
Just clear gt_fieldcat[] in FORM BUILDPROJECT as follows...
<b>
FORM BUILDPROJECT.
* DATA FIELD CATALOG
* Explain Field Description to ALV
DATA: FIELDCAT_LN TYPE SLIS_FIELDCAT_ALV.
CLEAR GT_FIELDCAT[].</b>It works now.
Regards,
Wenceslaus.
hi frnd's,
Selection-screen had one submit button,when i click that an
Alv list is displayed.
When i click the back button in alvlist it comes back to the selection-screen,then when i change some datas and agin click the submit button means the prevoius dats in the list is also displayed.
what can i do for that.
can anybody help me.
2006 Mar 09 10:03 AM
Hi,
Did you clear the internal table?
Did you use APPENDING... table anywhere.
2006 Mar 09 10:08 AM
yes i am using the internal table and also the append query
2006 Mar 09 10:11 AM
Then clear the table each time in AT START OF SELECTION.
REFRESH itab.
2006 Mar 09 10:12 AM
Hi Suganya,
Refresh your Itab first..
in select statement are you using
select * into table or Appending table..
in either case use
REFRESH itab.
before..
regards
satesh
2006 Mar 09 10:25 AM
Now i am not getting the previous datas but,the table is displayed twice with new datas.
2006 Mar 09 10:28 AM
Hi Suganya,
Then try to clear all your fieldcatalogs...
Before building it...
Or can you display your code...
2006 Mar 09 10:30 AM
Hi Suganya,
Are you using Block_List_Append..or
if the table has duplicate entries..
just use
sort itab.
delete adjacent duplicates ..
before calling ALV
regards
satesh
2006 Mar 09 10:47 AM
The table structure is displayed twice and both sum is added and displayed.if it is 2 means it adds with other and diplaying the total 4.
2006 Mar 09 11:30 AM
y the alv is displayed twice when the submit button is pressed pls explain.
can this be changed.
2006 Mar 09 11:39 AM
I'm sure it can be changed!
But we can't make predictions unless your code is posted or sent...
2006 Mar 09 11:45 AM
*selection screen elements
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p1 RADIOBUTTON GROUP rad1 USER-COMMAND BB.
SELECTION-SCREEN:COMMENT 5(10) text-001 FOR FIELD p1.
PARAMETERS P2 like USR02-BNAME.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p3 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN:COMMENT 5(10) text-002 FOR FIELD p3.
PARAMETERS P4 like zttime-zclient.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN PUSHBUTTON /20(18) report1 USER-COMMAND DISP_DATA.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'DISP_DATA'.
IF P1 EQ 'X'.
PERFORM BUILDPROJECT.
PERFORM DISP_USER.
SORT ITAB1.
PERFORM CALL_ALV.
ELSE P3 EQ 'X'.
PERFORM BUILDPROJECT.
PERFORM DISP_CLIENT.
SORT ITAB1.
PERFORM CALL_ALV.
ENDIF.
&----
*& Form BUILDPROJECT
&----
text
----
FORM BUILDPROJECT.
DATA FIELD CATALOG
Explain Field Description to ALV
DATA: FIELDCAT_IN TYPE SLIS_FIELDCAT_ALV.
FIELDCAT_LN-FIELDNAME = 'BNAME'. "username
FIELDCAT_LN-TABNAME = 'ITAB1'.
FIELDCAT_LN-REF_TABNAME = 'USR02'. "<- REF TABLE IN THE DICTIONNARY
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'ZPROJECT'.
FIELDCAT_LN-TABNAME = 'ITAB1'.
FIELDCAT_LN-REF_TABNAME = 'ZTTIME'. "<- REF TABLE IN THE DICTIONNARY
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
ENDFORM.
FORM CALL_ALV.
ABAP List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_STRUCTURE_NAME = 'ITAB1'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_SORT = GT_SORT[]
IT_EVENTS = GT_EVENTS[]
IS_PRINT = GS_PRINT
TABLES
T_OUTTAB = ITAB1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. "CALL_ALV
FORM DISP_USER.
REFRESH ITAB1.
SELECT DISTINCT * FROM ZTTIME WHERE UNAME = P2.
MOVE FIELD1 TO ITAB1-FIELD1.
MOVE FIELD2 TO ITAB1-FIELD2.
APPEND ITAB1.
ENDSELECT.
ENDFORM. "DISP_PROJECT
2006 Mar 09 10:03 AM
Hi,
Try to free the container before you leave the screen.
g_container->free( ).I hope this helps.
Roland
2006 Mar 09 10:05 AM
hi suganya,
1. thats not bcos of alv problem.
2. its bcos your ITAB
may have not been cleared like this :
refresh itab.
regards,
amit m.
2006 Mar 09 10:06 AM
Hi Suganya,
just refresh the itab...
REFRESH itab.
before using the select statement..
regards
satesh
2006 Mar 09 10:15 AM
Hi ,
Clear and refresh the itab in the initilisation event.
Hope this solves it.
Thanks and Regards,
Sriranjani Chimakurthy.
2006 Mar 09 11:39 AM
Hi,
you can refresh the ALV list by calling
REFRESH_TABLE_DISPLAY method of CL_GUI_ALV_GRID.
call this method in PBO.
syntax
DATA : WA_LVC_S_STBL TYPE LVC_S_STBL.
CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE = WA_LVC_S_STBL
Hope this helps..
Regards,
Shashank
2006 Mar 09 12:00 PM
Hi Suganya,
Thanks for your esteemed reply...
I tried and made the neccessaryu changes...
Just clear gt_fieldcat[] in FORM BUILDPROJECT as follows...
<b>
FORM BUILDPROJECT.
* DATA FIELD CATALOG
* Explain Field Description to ALV
DATA: FIELDCAT_LN TYPE SLIS_FIELDCAT_ALV.
CLEAR GT_FIELDCAT[].</b>It works now.
Regards,
Wenceslaus.
2006 Mar 09 12:31 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |