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

How to call program in Module Pool

ashish_shah5
Participant
0 Likes
1,527

Hi frnds,

I Created Module Pool, While Click on FCTCODE-1, I want to call Program -ZABC.

How to resolve?

Regards,

1 ACCEPTED SOLUTION
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,179

Hi,

If that program has a t-code, then use:


CALL TRANSACTION '<t-code>'.

Or else you can use:-


SUBMIT <report_name> WITH <parameter> = <value>
                          <parameter> = <value>
                          AND RETURN.

Hope this helps you.

Regards,

Tarun

9 REPLIES 9
Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,180

Hi,

If that program has a t-code, then use:


CALL TRANSACTION '<t-code>'.

Or else you can use:-


SUBMIT <report_name> WITH <parameter> = <value>
                          <parameter> = <value>
                          AND RETURN.

Hope this helps you.

Regards,

Tarun

Read only

0 Likes
1,179

Dear Tarun,

I am aware about this statement, But I want to call program in Module Pool.

Regards

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,179

Hi,

>

> Dear Tarun,

>

> I am aware about this statement, But I want to call program in Module Pool.

>

>

> Regards

You can use SUBMIT keyword to call a program in module pool.


CASE sy-ucomm.
  WHEN '<fcode>'.
    SUBMIT <report_name> WITH <parameter> = <value> AND RETURN.
ENDCASE.

If this is not clear to you or not as per your requirement, then can you please explain your exact requirement.

Regards,

Tarun

Read only

0 Likes
1,179

Dear Tarun ,

I have already explain my requirement.

I have created 1 button in Module Pool.

After clicking on FCTCOE 1, I want to call Program which starts from Z....

Here I am not passing any parameter or values.

Just after click on my first button, I want to call Executable prog.

Hope Now u are clear.

Regards.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,179

Hi,

You must be giving some parameters values to the z executable program, when you execute the program in SE38.

If you have no parameters for the report, then just use code in PAI:-


MODULE user_command.
  CASE sy-ucomm.
    WHEN 'FCTCOE1'. "function code for button
      SUBMIT <report_name> AND RETURN. "use return if you need to return back after executing the zreport
  ENDCASE.
ENDMODULE.

Hope I am clear to you.

Regards,

Tarun

Read only

0 Likes
1,179

Have you had a look at the SAP user dialogs help on http://help.sap.com eg http://help.sap.com/saphelp_47x200/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm ? If not, I suggest that you do read it, especially the sections referring to the PAI event which is where you would put code to react to a function code.

Read only

Former Member
0 Likes
1,179

Hi,

refer the given below link

thanks

Arun

Read only

Former Member
0 Likes
1,179

Please refer to this link. This may help you..

http://www.abapprogramming.net/2007/06/lesson-25-calling-programs-and-passing.html

Regards,

Anirban.

Read only

matt
Active Contributor
0 Likes
1,179

Tarun had answered your question entirely correctly three times. Thread locked.