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

How to save a layout using SET PF-STATUS save button.

Former Member
0 Likes
3,198

Hi all,

Am a newbie to ABAP and the issue am having is, The user needs a save layout feature in the output of the report and needs it to be implemented further when ever it is required. As we are using set pf-status for desired buttons in the output am having no idea of what to be coded when the user command is "SAVE" or any other option. The output is displayed with the help of OOALV concept.

The parameters we are using to display the report are

o_grid type ref to cl_gui_alv_grid

o_cust_cont type ref to cl_gui_custom_container

t_fieldcat type lvc_t_fcat

s_layout type lvc_s_layo

t_fieldcatalog type lvc_t_fcat.

CALL METHOD o_grid->set_table_for_first_display.

Exporting

i_save = 'A'

is_layout = s_layout

i_default = 'X'.

Changing

it_outtab = t_final

it_fieldcaalog = t_fieldcatalog.



Kindly help me out.

With Regards,

Jnaneswar.

1 ACCEPTED SOLUTION
Read only

former_member1716
Active Contributor
2,338

Hello Jnaneswar Modukuri,

For Saving a layout you can make use of available features of ALV, You need not write any code for it.

You can also copy the PF status of standard programs to your custom programs . Below links can help you understand the concepts.

ALV

Discussion

Regards!

3 REPLIES 3
Read only

former_member1716
Active Contributor
2,339

Hello Jnaneswar Modukuri,

For Saving a layout you can make use of available features of ALV, You need not write any code for it.

You can also copy the PF status of standard programs to your custom programs . Below links can help you understand the concepts.

ALV

Discussion

Regards!

Read only

2,338

i.e. the possible buttons for CL_GUI_ALV_GRID in fullscreen mode are there -> Goto SE41 give program SAPLKKBL and status STANDARD_FULLSCREEN.

And don't forget IS_VARIANT:

CALL METHOD o_grid->set_table_for_first_display.
  Exporting
    i_save = 'A'
    is_variant = VALUE #( report = sy-repid ) " <======== IMPORTANT
    is_layout = s_layout
    i_default = 'X'.
  Changing
    it_outtab = t_final
    it_fieldcaalog = t_fieldcatalog.
Read only

Former Member
0 Likes
2,338

Thanks for your support Satish Kumar Balasubramanian & Sandra Rossi I have resolved the issue by your support.

With Regards,

Jnaneswar.