Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Module pool programming

Former Member
0 Likes
821

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.

5 REPLIES 5
Read only

Former Member
0 Likes
619

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

Read only

0 Likes
619

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.

Read only

0 Likes
619

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.

Read only

Former Member
0 Likes
619

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

Read only

Former Member
0 Likes
619

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,