02-24-2014 4:11 AM
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 ???
02-24-2014 5:06 AM
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
02-24-2014 4:23 AM
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
02-24-2014 4:37 AM
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.
02-24-2014 4:48 AM
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
02-24-2014 4:57 AM
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.
02-24-2014 5:55 AM
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.
02-24-2014 5:06 AM
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
02-28-2014 9:19 AM
Hi Raj,
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
02-28-2014 10:31 AM
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
02-28-2014 12:51 PM
Dear Raj,
In your Report add ur update Statments here :
AT SELECTION-SCREEN.
case sy-ucomm.
when 'SPOS'.
" Updating Your table ztable
ENDCASE.