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

Problem in selection-screen(when saving data)

Former Member
0 Likes
2,578

Hi Expert,

I have a selection screen. i want to save data in ztable by clicking save. But when i click on save a Variant Attributes screen appear. But i want when i click on save then data save in ztable. please guide me expert ???

1 ACCEPTED SOLUTION
Read only

sivaganesh_krishnan
Contributor
0 Likes
2,246

Hi raj,

If you want to Custom Save button then do the following steps,

1. create a pf status and inside this under function keys in PBO,  as this

2. Inside PAI , check for ok_code is 'SAVE' , then write the necessary insert statement for inserting data in the table.

Regards,

Sivaganesh

9 REPLIES 9
Read only

arivazhagan_sivasamy
Active Contributor
0 Likes
2,246

When click on save in the report program, it will ask us to save as variant.

If you want to save the selection screen data, create a push button in selection screen.

In at-selection screen event, write a logic to save the data to Ztable.

Or, create module pool program and save the data.

Arivazhagan S

Read only

0 Likes
2,246

Actually i dont want to create push-button in selection-screen. I want to save data in ztable without pushbutton. When i click on save then data saved in ztable.

Read only

mayur_priyan
Active Participant
0 Likes
2,246

Hi,

As per my understanding you want to use the PF-status of a selection screen defined by the system, and don't want to create a custom push button.

Please check the below link, which shows how to use the standard PF-status for custom use.

http://scn.sap.com/thread/747332

Regards,

Mayur Priyan. S

Read only

0 Likes
2,246

Given is the print screen

After Fill the data want to click on save. But when i click on save a variant screen appeared. Simply i want after filling data when i click on save the data save in table without asking variant.

Read only

0 Likes
2,246

We understood your requirement. It is seen that the default SAVE option on the selection screen is for 'Saving a Variant'. Hence you have to create a custom PF-status and using them inside the report program using the Function Modules which have been marked in the link which I provided.

Read only

sivaganesh_krishnan
Contributor
0 Likes
2,247

Hi raj,

If you want to Custom Save button then do the following steps,

1. create a pf status and inside this under function keys in PBO,  as this

2. Inside PAI , check for ok_code is 'SAVE' , then write the necessary insert statement for inserting data in the table.

Regards,

Sivaganesh

Read only

Former Member
0 Likes
2,246

Hi Raj,

  • RS_SET_SELSCREEN_STATUS

Sets another GUI status defined in the same ABAP program, or deactivates functions of the standard GUI status.

  • RS_EXTERNAL_SELSCREEN_STATUS

          Sets a GUI status defined in an external function group. You must use the SET PF-STATUS statement to set the status in a special function module in this function group. You must pass the name of the function module that sets the status as a parameter to the function module RS_EXTERNAL_SELSCREEN_STATUS.

REPORT demo_sel_screen_status.

DATA itab TYPE TABLE OF sy-ucomm.

PARAMETERS test(10) TYPE c.

AT SELECTION-SCREEN OUTPUT.
  APPEND: 'PRIN' TO itab,
          'SPOS' TO itab.
  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
       EXPORTING
            p_status  = sy-pfkey
       TABLES
            p_exclude = itab.

In this example, the Print and Save as variant functions are deactivated. To find out the function codes of the standard GUI status, choose System ® Status and double-click the GUI status field.

Regards,

Ashish Kumar

Read only

Former Member
0 Likes
2,246

Hi Raj,

Instead of doing it as report do it in modulepool.

So u can have ur custom screen where you can define set pf status.

Here save is ur function code.

In PAI write logic to save data to ztable.

Regards

Vineesh B

Read only

Former Member
0 Likes
2,246

Dear Raj,

In your Report add ur update Statments here :

AT SELECTION-SCREEN.

   case sy-ucomm.

     when 'SPOS'.


        " Updating Your table ztable

       ENDCASE.