‎2007 Jul 30 11:12 AM
Hi,
I have to call subscreen in report when radio button selected in the selection screen. I don't want to create the module pool program for subscreens. I want to call the subscreen with in the report.
Could any one help it on this issue.
Good points for good answers.
Regards,
kishore
‎2007 Jul 30 11:17 AM
TABLES : mara, marc, sscrfields.
DATA : gt_itab LIKE mara OCCURS 0 WITH HEADER LINE.
DATA : gt_itab1 LIKE marc OCCURS 0 WITH HEADER LINE.
*Subscreen 1
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN ULINE.
SELECT-OPTIONS : so_matnr FOR mara-matnr.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 100.
*Subscreen 2
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN ULINE.
SELECT-OPTIONS : so_werks FOR marc-werks.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 200.
SELECTION-SCREEN : FUNCTION KEY 1,
FUNCTION KEY 2.
SELECTION-SCREEN : BEGIN OF TABBED BLOCK sub FOR 20 LINES,
END OF BLOCK sub.
INITIALIZATION .
sscrfields-functxt_01 = 'Material Number'.
sscrfields-functxt_02 = 'Plant'.
sub-prog = sy-repid.
sub-dynnr = 100.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN '0100'.
IF sscrfields-ucomm = 'FC02'.
sub-dynnr = 200.
ELSE.
sub-dynnr = 100.
ENDIF.
WHEN '0200'.
IF sscrfields-ucomm = 'FC01'.
sub-dynnr = 100.
ELSE.
sub-dynnr = 200.
ENDIF.
ENDCASE.
TOP-OF-PAGE.
PERFORM header_display.
START-OF-SELECTION.
CASE sub-dynnr.
WHEN '100'.
CLEAR gt_itab.
REFRESH gt_itab.
SELECT matnr mtart matkl meins FROM mara INTO CORRESPONDING FIELDS
OF TABLE gt_itab WHERE matnr IN so_matnr.
PERFORM records_display TABLES gt_itab.
WHEN '200'.
CLEAR gt_itab1.
REFRESH gt_itab1.
SELECT matnr werks pstat ekgrp FROM marc INTO CORRESPONDING FIELDS
OF TABLE gt_itab1 WHERE werks IN so_werks.
PERFORM records_display1 TABLES gt_itab1.
ENDCASE.
&----
*& Form records_display
&----
text
----
-->P_GT_ITAB text
----
FORM records_display TABLES l_gt_itab STRUCTURE gt_itab.
LOOP AT l_gt_itab.
WRITE : / l_gt_itab-matnr UNDER text-003,
l_gt_itab-mtart UNDER text-004,
l_gt_itab-matkl UNDER text-005,
l_gt_itab-meins UNDER text-006.
ENDLOOP.
ENDFORM. " records_display
&----
*& Form records_display1
&----
text
----
-->P_GT_ITAB text
----
FORM records_display1 TABLES l_gt_itab1 STRUCTURE gt_itab1.
LOOP AT l_gt_itab1.
WRITE : / l_gt_itab1-matnr UNDER text-003,
l_gt_itab1-werks UNDER text-004,
l_gt_itab1-pstat UNDER text-005,
l_gt_itab1-ekgrp UNDER text-006.
ENDLOOP.
ENDFORM. " records_display1
&----
*& Form header_display
&----
text
----
--> p1 text
<-- p2 text
----
FORM header_display.
FORMAT COLOR 6 INVERSE ON INTENSIFIED ON. "COL_HEADING
WRITE AT 5 text-003.
WRITE AT 20 text-004.
WRITE AT 40 text-005.
WRITE AT 70 text-006.
SKIP 1.
FORMAT COLOR OFF INVERSE OFF INTENSIFIED OFF.
ENDFORM. " header_display
regards
anju
‎2007 Jul 30 11:17 AM
Hi
Without creating any SCREEN (sub screen or general normal Screen) in SE51 tcode how you will call a screen
In the report we can use the statement CALL SCREEN <screen No>
But we have to design our screen first and in that design the subscreen and do all related stuff for that then we can call from report
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 30 1:29 PM
Hi,
Thanks for reply. My requirement is to display selection screen fields in main selection screen when i am selected the radiobutton. Let's say If i select radiobutton1 the corresponding screen fields should appear in the same selection-screen. else if i select radiobutton2 corresponding screen fields should appear in same selection-screen.
regards,
Kishore