‎2008 Feb 19 7:19 AM
hi all,
i am working with modulepool programs
i designed screen with two buttons...
by click of first button i should get script to be displayed(designed it seperately) and by click of second button smartform (designed it seperately) should be displayed.
can you suggest me what to do.
‎2008 Feb 19 7:33 AM
Hi Ravi,
An SAP script is called using the OPEN_FORM, WRITE_FORM and CLOSE_FORM function modules, and a smartform is called using a combination of SSF_FUNCTION_MODULE_NAME and function module call (for the smartform interface).
Hence, now once you have embedded the two buttons in the screen, you would assign a function code to each button, say for SAP script the function code you assign is COD1 and for smartform button COD2.
Now in PAI Module in flow logic of screen where buttons are embedded you do the following:
CASE OKCODE. "Assuming OKCODE is your function code
WHEN 'COD1'.
Call sequence of OPEN_FORM, WRITE_FORM and CLOSE_FORM for SAP script display
WHEN 'COD2'.
Call sequence of SSF_FUNCTION_MODULE_NAME and the FM call for triggering the smartform.
ENDCASE.
Cheers,
Aditya
‎2008 Feb 19 9:35 AM
Hi aditya,
your concept seems clear, but is it practicable. I mean have you tried working on it and executed it. How will you design the screens for this scenario and how will you assign the sapscript and smartforms. Could you elaborate please. Thank you.
Regards.
‎2008 Feb 19 10:05 AM
Hi..
i worked out that problem.
its easy..but i used submit <report name> and return in the code
it worked and i got output.
‎2008 Feb 19 10:05 AM
Dear,
It sounds simple.
With differenct OK Codes ( When u push the button event genertated code ) of the two buttons...
Just call transacation of that report program (ABAP Pgm Calling SAP Script)
for eg Submit Zscript0001
In scond button click too
submit Zsmform0001.
if u also want to come back follow
submit Zsmform0001 and return.
I hope this will work,
Best Regards,
Pramendra
‎2011 Apr 18 12:49 PM
Dear,
It sounds simple.
With differenct OK Codes ( When u push the button event genertated code ) of the two buttons...
Just call transacation of that report program (ABAP Pgm Calling SAP Script)
for eg Submit Zscript0001
In scond button click too
submit Zsmform0001.
if u also want to come back follow
submit Zsmform0001 and return.
I hope this will work,
Best Regards,