2012 Oct 08 5:09 PM
I have a process which uses the ALV display with two different layouts. That layout data is then parsed through an xml function and the results stored as a flat file. The layout/column-ordering is thus critical to the structure of the xml. The first layout displays and stores correctly. The second layout displays correctly but stores the same as the first.
I understand why this is happening (the table used as the input data for the alv display doesnt change regardless of the layout, so passing that through the xml function always yields the same results when stored).
So my question is, what is the table name or technique used to achieve the results I need (basically i need to be able to store/retrieve the results EXACTLY as they are displayed)?
My first post, so apologies in advance if my post wasn't clear.
2012 Oct 08 6:06 PM
Hello Perry,
If I understand your query correctly you need to use the functionality of ALV grid of Layouts, right ? If so please check the standard SAP programs mentioned below they have the option of saving, creating and changing layouts.
BCALV_GRID_09 Saving Options for Layouts
BCALV_GRID_10 Load a layout before list display
BCALV_GRID_11 Test for new layout function modules
BCALV_TEST_GRID_LAYOUT Program BCALV_TEST_GRID_LAYOUT
BCALV_TEST_GRID_REPREP Program BCALV_TEST_GRID_LAYOUT
BCALV_TEST_GRID_REPREP_1 Program BCALV_TEST_GRID_LAYOUT
Also if you are using OOPS method of ALV display then you can use below FM
CL_GUI_ALV_GRID->GET_FRONTEND_LAYOUT "Get current Layout from Frontend"
Call method gr_alvgrid->get_frontend_layout
Importing
Es_layout = ls_layout.
Best regards,
Swanand
Hello Perry,
If I understand your query correctly you need to use the functionality of ALV grid of Layouts, right ? If so please check the standard SAP programs mentioned below they have the option of saving, creating and changing layouts.
BCALV_GRID_09 Saving Options for Layouts
BCALV_GRID_10 Load a layout before list display
BCALV_GRID_11 Test for new layout function modules
BCALV_TEST_GRID_LAYOUT Program BCALV_TEST_GRID_LAYOUT
BCALV_TEST_GRID_REPREP Program BCALV_TEST_GRID_LAYOUT
BCALV_TEST_GRID_REPREP_1 Program BCALV_TEST_GRID_LAYOUT
Also if you are using OOPS method of ALV display then you can use below FM
CL_GUI_ALV_GRID->GET_FRONTEND_LAYOUT "Get current Layout from Frontend"
Call method gr_alvgrid->get_frontend_layout
Importing
Es_layout = ls_layout.
Best regards,
Swanand
2012 Oct 08 6:06 PM
Hello Perry,
If I understand your query correctly you need to use the functionality of ALV grid of Layouts, right ? If so please check the standard SAP programs mentioned below they have the option of saving, creating and changing layouts.
BCALV_GRID_09 Saving Options for Layouts
BCALV_GRID_10 Load a layout before list display
BCALV_GRID_11 Test for new layout function modules
BCALV_TEST_GRID_LAYOUT Program BCALV_TEST_GRID_LAYOUT
BCALV_TEST_GRID_REPREP Program BCALV_TEST_GRID_LAYOUT
BCALV_TEST_GRID_REPREP_1 Program BCALV_TEST_GRID_LAYOUT
Also if you are using OOPS method of ALV display then you can use below FM
CL_GUI_ALV_GRID->GET_FRONTEND_LAYOUT "Get current Layout from Frontend"
Call method gr_alvgrid->get_frontend_layout
Importing
Es_layout = ls_layout.
Best regards,
Swanand
2012 Oct 08 6:25 PM
That wasnt quite what I was asking (was looking at how to save the data displayed by a layout, exactly in the same format as the layout). I figured it out, but those were good programs, so the credit is yours (he was explicitely defining the xml structure so i could use an if statement based on the layout chosen),
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |