2015 Feb 24 12:40 PM
I am using ALV GRID DISPLAY function module to display my alv report.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = GS_LAYOUT1
IT_FIELDCAT = IT_FCAT[]
* IT_SORT = S_SORT
I_CALLBACK_USER_COMMAND = 'SUB_USER_COMMAND'
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = IT_FINAL[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
After displaying i have changed the layout and set as Default.
Then i am using usercommand and on click of that button i am displaying another alv report but due to the change of layout no colums are coming for second alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = IT_FCAT1[]
* IT_SORT = S_SORT
* I_CALLBACK_USER_COMMAND = 'SUB_USER_COMMAND'
* I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = IT_ERROR[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
So what all i can do here so that the first layout wont affect the second alv report.
2015 Feb 24 1:47 PM
Fill the parameter IS_VARIANT, fill REPORT field with SY-REPID and give two different values for HANDLE so the layout won't mess as they currently are.
NB: Also don't pass SY-REPID as a parameter but use a local variable to pass the value (else will be converted to function group main program.
Question: Why do you develop a new report with a nearly obsolete tool, better use a class as CL_SALV_TABLE (display of data) or CL_GUI_ALV_GRID (display or update of data) - or are you developing in an obsolete SAP version?
Regards,
Raymond
2015 Feb 24 1:35 PM
hi yash,
did you check data in the internal table. is data available while you debug?
2015 Feb 24 1:47 PM
Fill the parameter IS_VARIANT, fill REPORT field with SY-REPID and give two different values for HANDLE so the layout won't mess as they currently are.
NB: Also don't pass SY-REPID as a parameter but use a local variable to pass the value (else will be converted to function group main program.
Question: Why do you develop a new report with a nearly obsolete tool, better use a class as CL_SALV_TABLE (display of data) or CL_GUI_ALV_GRID (display or update of data) - or are you developing in an obsolete SAP version?
Regards,
Raymond
2015 Feb 25 7:06 AM
Thankyou Raymond Giuseppi .
Actually report was already developed i need to solve this issue, generally i prefer oops only to display.