Skip to Content

How to call a module pool program and get its output

Hi All,

SUBMIT <prog name> ...

EXPORTING LIST TO MEMORY

AND RETURN.

Using the above SUBMIT in conjunction with FM - LIST_FROM_MEMORY and LIST_TO_ASCI, I can read the output of a report program. Now is there a way to do the same in case of a module pool program i.e I need to call a module pool program from my program and get its output.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

9 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 13, 2014 at 04:50 AM

    Hi,

    Which transaction are you trying to call. Suppose you want PO information from ME23N , you will get the information by calling BAPI 'BAPI_PO_GETDETAIL1'. Similarly for other transactions, you will have BAPI's to display the details. Check BAPI's ending with 'GET_DETAILS' .

    Regards,

    DPM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 13, 2014 at 05:35 AM

    Hi Anindya

    Is it a custom module pool or standard one..?Please provide the details

    Nabheet

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 13, 2014 at 06:00 AM

    Hi Anindya,

    As per information provided by you regarding your problem is less, but as pe your information ..i think you want to call module pool form your report.

    you have to use the following statements

    in report:-

    set parameter id <id name> field <Value>.

    CALL Transaction <TCode> and skip initial screen.

    in modulel pool pbo part:

    get parameter id <id name> field <Value>.

    hope it helps.

    regards,

    vikas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2014 at 06:59 AM

    Hi, look at abap program for tcode PRRW

    and form in it

    FORM fill_runtab.

    and select from db is

    SELECT pevst~type
    pevst~runid
    pevst~name
    pevst~simu
    pevsh~status
    pevsh~creator
    pevsh~creadate
    pevsh~creatime
    INTO CORRESPONDING FIELDS OF TABLE result_table
    FROM pevst JOIN pevsh
    ON pevsh~type = pevst~type
    AND pevsh~runid = pevst~runid
    WHERE pevst~type = 'TR'
    AND pevsh~actual = 'X'
    AND pevsh~status IN
    ('00','10','11','21','22','31','32','35','41','50','90','91')
    * end WBGK034117;
    * end WBGK024621;
    * Begin YEKL9CK037501
    AND pevsh~creator IN crea_so
    AND pevsh~creadate IN crdat_so
    AND pevst~runid IN runid_so.

    I recomend to use this select directly in your program

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 13, 2014 at 04:35 AM

    Hi,

    You can call using

    set parameter id <id name> field <Value>.

    CALL Transaction <TCode> and skip initial screen.

    For Eg,

    Set parameter id 'MAT' field 'Material1'.

    CALL TRANSACTION MM03 AND SKIP INITIAL SCREEN.

    Arivazhagan S

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 13, 2014 at 04:55 AM

    Hello.

    A module pool program cannot be executed without a tcode.

    So in order to invoke a module pool program, you have to use CALL TRANSACTION.

    In order to get output from it, you might export the data from Module pool program and import it in calling program.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2014 at 04:45 AM

    Hi,

    All module pool program can be initiated by a transaction code that has to be created in se 93 and then can use call transaction or if you just need to show the output in a screen , you can give call screen 9000 in your report program then double click on the screen and then design your screen accordingly.

    Warm Regards

    Suneesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2014 at 06:25 AM

    Hi Anindhya,

    Like Arun told we have to use call transaction, but to get the data you should export it to a memory id. But if you trying to call some standard module pool transactions, only some of them exports the results to memory id. So you better look for a BAPI for your purpose

    Regards,

    Ashish Kumar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2014 at 06:38 AM

    You can record bdc for that module and put in background mode,

    as per output is concern you can use memory concept to

    get output data.

    import export memory

    set get parameter id.

    etc...as per your requirement.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.