2007 Aug 27 4:46 AM
I need to display 2 separate selection screens prior to executing the report.
1. A selection screen to enter the material & plant
2. Based on the material and plan another selection screen to display the inspection characteristics associated with the material and be able to select (as checkbox) the inspection characteristic that needs to be used as filtering criteria.
The first selection screen I can do. But how do I invoke the second selection screen that displays the insp. char. Also how do I design such a selection screen and populate the contents
I would like something like
[CheckBox] Inspection Plan Inspection Characteristic [Editable upper limit] [Ediatable Lower Limit]
But other ideas to implement this are welcome as well.
2007 Aug 27 4:50 AM
Megan,
Say thanks to SDN.No need to give points to this.
TABLES:EBAN.
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
p_matnr TYPE eban-matnr MODIF ID g1,
sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
str_loc TYPE eban-lgort MODIF ID g4.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
SELECTION-SCREEN END OF SCREEN 100.
*name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.
TYPE-POOLS slis.
AT SELECTION-SCREEN OUTPUT.
IF rad1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4'.
screen-active = '1'.
screen-input = 0.
ELSEIF screen-group1 = 'G2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF rad2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.
screen-active = '0'.
ELSEIF screen-group1 = 'G2'.
screen-active = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF mtr = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1'.
screen-input = 1 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF sloc = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G4'.
screen-input = 1 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
clear sy-ucomm.
iflag = 1.
K.Kiran.
I need to display 2 separate selection screens prior to executing the report.
1. A selection screen to enter the material & plant
2. Based on the material and plan another selection screen to display the inspection characteristics associated with the material and be able to select (as checkbox) the inspection characteristic that needs to be used as filtering criteria.
The first selection screen I can do. But how do I invoke the second selection screen that displays the insp. char. Also how do I design such a selection screen and populate the contents
I would like something like
[CheckBox] Inspection Plan Inspection Characteristic [Editable upper limit] [Ediatable Lower Limit]
But other ideas to implement this are welcome as well.
2007 Aug 27 4:50 AM
Hi..
This is the Sample report coding that will surely help u in this req:
REPORT zselfile1 .
TABLES:sscrfields.
**Create the Additional Selection screen to input filename
SELECTION-SCREEN: BEGIN OF SCREEN 10.
PARAMETERS: p_file TYPE rlgrap-filename.
SELECTION-SCREEN: END OF SCREEN 10.
**Create Application Toolbar Button on the Standard selection Screen
SELECTION-SCREEN FUNCTION KEY 1. "Its fcode will be FC01
PARAMETERS : p_werks TYPE marc-werks.
INITIALIZATION.
sscrfields-functxt_01 = 'Enter File'. "Assign the Text to the Button
AT SELECTION-SCREEN.
CASE sscrfields-ucomm. "Check the Fcode
WHEN 'FC01'.
CALL SELECTION-SCREEN 10 STARTING AT 5 8 ENDING AT 85 20.
ENDCASE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME' "Local file browser
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
START-OF-SELECTION.
***Your list processing.
<b>Reward if Helpful</b>
2007 Aug 27 4:50 AM
Megan,
Say thanks to SDN.No need to give points to this.
TABLES:EBAN.
SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
rad2 RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
p_matnr TYPE eban-matnr MODIF ID g1,
sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
str_loc TYPE eban-lgort MODIF ID g4.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
SELECTION-SCREEN END OF SCREEN 100.
*name = 'FETCH'.
title = 'Test Report'.
CALL SELECTION-SCREEN '100'.
TYPE-POOLS slis.
AT SELECTION-SCREEN OUTPUT.
IF rad1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4'.
screen-active = '1'.
screen-input = 0.
ELSEIF screen-group1 = 'G2'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF rad2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1' OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.
screen-active = '0'.
ELSEIF screen-group1 = 'G2'.
screen-active = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF mtr = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G1'.
screen-input = 1 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF sloc = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'G4'.
screen-input = 1 .
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
clear sy-ucomm.
iflag = 1.
K.Kiran.
2007 Aug 27 4:51 AM
Hello Megan,
I do not think SAP allows this directly
But, you could use one trick
design two programs, one with the first selection screen and the second program with your final selection screen
make a TCODE for the second program (from SE93)
use the function module 'COPF_CALL_TRANSACTION' in your first selection screen
you could pass the parameters by exporting to memory in the first program and then importing them in the second and using it in the INITIALIZATION event
2007 Aug 27 2:29 PM
Kiran, that is not really what I am looking for. My requirement is a lot more complicated. I need to have a selection screen to enter the material and plant (which I can do), based on the input, populate the inspection characteristics for the material and plant and allow the user to chose the insp. char. for which the report should run. So there will be 2 different selection screens prior to the execution of the report. thank you.
2007 Aug 27 2:53 PM
Megan,
You can display in the same screen, you will need to do Object oriented ALV for this, based on material and plant selection display the ALV grid in the same screen, the ALV grid will show the material characteristics, you can provide f4 help in the grid display to allow user to choose the inspection characteristics.
I have done similiar thing where requirement was to create material along with user defined characteristics.
2007 Aug 27 2:37 PM
Narayana Varma
I think your code will help me with my solution. Thank you.
Does any one know how to change the Execute icon to a custom text one. Also I dont want to lose the F8 functionality doing so.