10-20-2011 10:51 AM
Hi All,
There is an existing 'z' Sap query and the inofet is created using the data source 'Data retreival by program'(Data structure:BAPIEXPLOSIONLIST).
I got the requirement to add onemore radiobutton(for Costing Run) to the selection screen of exsiting query and when the radio button is clicked on, it should display two more fields (Costing Run name and Costing Run date).So,I have added the below lines in the existing Infoset.
1.Under the extras button and in data read program tab,I have added the below code for radio button and the two fields for selection.
PARAMETERS p_cstrun LIKE jest-inact RADIOBUTTON GROUP cost.
SELECT-OPTIONS sp_kaid FOR keko-kalaid MODIF ID s1.
SELECT-OPTIONS sp_kadt FOR keko-kaladat MODIF ID s1.
2.Under the extras button and in code tab and in at seletion-screen output,I have added the below logic to enable those fields dynamically.
LOOP AT SCREEN.
IF p_CSTRUN EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
screen-invisible = 0.
screen-active = 1.
MODIFY SCREEN.
elseif p_CSTRUN NE 'X' AND SCREEN-GROUP1 EQ 'S1' .
screen-invisible = 1.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
After adding this,the existing selection-screen format has been changed.Please look at the below changes.
->Actually,there are two blocks in the existing screen with block titles.Now they are replaced with some different text
->And one more block for output format and under that the layout field selection was there in previous selection screen.Now this layout field text is changed to 'Sap Listviewer' and some butto has also come additionaly in the output format.
How to retreive the old selection-screen with previous texts and formats.
Can any one suggest to resolve the issue?
Thanks in advance!!
Best Regards,
Mounika
10-20-2011 11:17 AM
10-20-2011 12:12 PM
This is the complete code of selection-screen
SELECTION-SCREEN BEGIN OF BLOCK issel
WITH FRAME TITLE text-S01.
SELECTION-SCREEN SKIP.
PARAMETERS p_cstcur LIKE jest-inact USER-COMMAND ex DEFAULT 'X' RADIOBUTTON GROUP cost .
PARAMETERS p_cstfut LIKE jest-inact RADIOBUTTON GROUP cost.
PARAMETERS p_cstprv LIKE jest-inact RADIOBUTTON GROUP cost.
*Begin of Insert CBDK972000
PARAMETERS p_cstrun LIKE jest-inact RADIOBUTTON GROUP cost.
SELECT-OPTIONS sp_kaid FOR keko-kalaid MODIF ID s1.
SELECT-OPTIONS sp_kadt FOR keko-kaladat MODIF ID s1.
*End of Insert CBDK97200
SELECTION-SCREEN SKIP.
PARAMETERS p_niv_g LIKE jest-inact DEFAULT 'X'.
PARAMETERS p_niv_a LIKE jest-inact DEFAULT ''.
PARAMETERS p_niv_f LIKE jest-inact DEFAULT ''.
SELECT-OPTIONS sp_disgr FOR marc-disgr MEMORY ID lev NO-DISPLAY.
SELECTION-SCREEN SKIP.
PARAMETERS p_newfil LIKE jest-inact DEFAULT ''.
SELECTION-SCREEN END OF BLOCK issel.
SELECTION-SCREEN BEGIN OF BLOCK csel
WITH FRAME TITLE text-s02.
SELECT-OPTIONS sp_mtart FOR mara-mtart OBLIGATORY
NO INTERVALS NO-EXTENSION MEMORY ID mta.
SELECT-OPTIONS sp_werks FOR mbew-bwkey OBLIGATORY
NO INTERVALS NO-EXTENSION MEMORY ID bwk.
SELECT-OPTIONS sp_matnr FOR mara-matnr MEMORY ID mat.
SELECTION-SCREEN END OF BLOCK csel.