09-08-2008 8:31 PM
Hello friends,
I have developed some custom programs Reports, for Z-Table updates.
say I have ZTest1, Ztest2 and Ztest3 as three custom programs as executable programs.
Now my job is to a diffrent program and have a common selection screen and have 3 push buttons. test1, test2, test3.
when the user clicks test1 button the program ZTest1 should be triggered and all updates should happend as is.
My question is how would i have a push button on the selection screen without using a module pool program and how the respective programs would trigger.
Please suggest.
ster
09-08-2008 8:49 PM
Hi,
Try this:
TABLES sscrfields.
DATA: program(5) type c.
SELECTION-SCREEN:
PUSHBUTTON 1(10) TEXT-001 USER-COMMAND CLI1,
PUSHBUTTON 1(10) TEXT-002 USER-COMMAND CLI2,
PUSHBUTTON 1(10) TEXT-003 USER-COMMAND CLI3.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
program = 'ZTEST1'.
WHEN 'CLI2'.
program = 'ZTEST2'.
WHEN 'CLI3'.
program = 'ZTEST3'.
ENDCASE.
SUBMIT (program) and RETURN.
Hope it will help
Regards
Marcin
09-08-2008 8:41 PM
You can use the FUNCTION KEY addition in the Selection-Screen statement.
Like:
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
For More info on the buttons check the online help on selection-screen.
To trigger, different programs you can use the SUBMIT program statment.
Regards,
Naimesh Patel
09-08-2008 8:43 PM
Hello,
One approach would be to use the PARAMETERS statement with the RADIOBUTTON addition.
Then in you program check which of teh radiobuttons the user has selected( P_x = 'X') and use the SUBMIT command to call the appropriate program.
Regards
Greg Kern
09-08-2008 8:44 PM
Hello Ster,
You can create buttons on the selection screen of your program.
Use Selection-screen PUSHBUTTON.
Selection-screen: PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 12(10) text-020 USER-COMMAND cli2.
Then use a Case statement START OF SELECTION
Case UCMND.
When 'cli1'.
Call transaction ztest1.....
or you can use radio buttons.
PARAMETERS: p_test1 RADIOBUTTON GROUP rad1 USER-COMMAND uc1,"
p_test2 RADIOBUTTON GROUP rad1 DEFAULT 'X'.
START OF SELECTION
If p_test1 = 'X'.
Call transaction ztest1
else if p_test2 = 'X'.
Call transaction ztest2....
Hope this helps.
Regards,
C
09-08-2008 8:49 PM
Hi,
Try this:
TABLES sscrfields.
DATA: program(5) type c.
SELECTION-SCREEN:
PUSHBUTTON 1(10) TEXT-001 USER-COMMAND CLI1,
PUSHBUTTON 1(10) TEXT-002 USER-COMMAND CLI2,
PUSHBUTTON 1(10) TEXT-003 USER-COMMAND CLI3.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
program = 'ZTEST1'.
WHEN 'CLI2'.
program = 'ZTEST2'.
WHEN 'CLI3'.
program = 'ZTEST3'.
ENDCASE.
SUBMIT (program) and RETURN.
Hope it will help
Regards
Marcin