‎2007 Jan 08 2:36 PM
Hello All,
I am using tab strip in my program.I have diffrent tabs. I want make some fields as mandatory fields in some of the tabs.
1)If these fields are not filled how can i stop the program and ask the user to fill it.
2) After i stop the program my cursor position must be in the relavent tab and on the relavent field.
How can i fulfill the above two things in the normal report programming.
<b>Note:I am not using dialog programming.</b>
Regards,
Lisa.
‎2007 Jan 08 2:59 PM
Something like this.....
report zrich_0001
no standard page heading.
tables sscrfields.
selection-screen begin of screen 101 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_char1 type c.
selection-screen end of block b1.
selection-screen end of screen 101.
selection-screen begin of screen 102 as subscreen.
selection-screen begin of block b2 with frame title text-002.
parameters: p_char2 type c.
selection-screen end of block b2.
selection-screen end of screen 102.
selection-screen begin of screen 103 as subscreen.
selection-screen begin of block b3 with frame title text-003.
parameters: p_char3 type c.
selection-screen end of block b3.
selection-screen end of screen 103.
selection-screen begin of tabbed block one for 20 lines.
selection-screen tab (15) name1 user-command ucomm1
default screen 101.
selection-screen tab (17) name2 user-command ucomm2
default screen 102.
selection-screen tab (17) name3 user-command ucomm3
default screen 103.
selection-screen end of block one.
initialization.
name1 = 'Tab 1'.
name2 = 'Tab 2'.
name3 = 'Tab 3'.
at selection-screen output.
at selection-screen.
check sy-ucomm = space
or sy-ucomm = 'ONLI'.
if p_char2 is initial.
sscrfields-ucomm = 'UCOMM2'.
set cursor field 'P_CHAR2'.
message i001(00) with 'P_CHAR2 is not valid'.
endif.
start-of-selection.
Regards,
Rich Heilman
‎2007 Jan 08 2:53 PM
If you sub-screen displayed in table sstrip is active.
the obligatory statement will work.
oe esle on start-of-selection
write a code to check is initia and give appropriate message to user.
‎2007 Jan 08 2:59 PM
Something like this.....
report zrich_0001
no standard page heading.
tables sscrfields.
selection-screen begin of screen 101 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_char1 type c.
selection-screen end of block b1.
selection-screen end of screen 101.
selection-screen begin of screen 102 as subscreen.
selection-screen begin of block b2 with frame title text-002.
parameters: p_char2 type c.
selection-screen end of block b2.
selection-screen end of screen 102.
selection-screen begin of screen 103 as subscreen.
selection-screen begin of block b3 with frame title text-003.
parameters: p_char3 type c.
selection-screen end of block b3.
selection-screen end of screen 103.
selection-screen begin of tabbed block one for 20 lines.
selection-screen tab (15) name1 user-command ucomm1
default screen 101.
selection-screen tab (17) name2 user-command ucomm2
default screen 102.
selection-screen tab (17) name3 user-command ucomm3
default screen 103.
selection-screen end of block one.
initialization.
name1 = 'Tab 1'.
name2 = 'Tab 2'.
name3 = 'Tab 3'.
at selection-screen output.
at selection-screen.
check sy-ucomm = space
or sy-ucomm = 'ONLI'.
if p_char2 is initial.
sscrfields-ucomm = 'UCOMM2'.
set cursor field 'P_CHAR2'.
message i001(00) with 'P_CHAR2 is not valid'.
endif.
start-of-selection.
Regards,
Rich Heilman
‎2007 Jan 08 3:19 PM