Skip to Content

Calling report in a Function module.

Hi ABAPers,

I am trying to call an executable ABAP report within a FM using SUBMIT as follows:

Data: wa_flight type zabapreport .

loop at itab_flight into wa_flight .
submit "TAW10_BASICS_CALL_FUNCTION"
 with  "pa_carr" eq wa_flight-carrid 'I'
       "pa_occ" eq wa_flight-seatsocc 'I'
       "pa_paysu" eq wa_flight-paymentsum 'I'
       "pa_curr" eq wa_flight-currency 'I'
       and return .
   endloop.

but when i try to test the FM by passing values to itab_flight ie import parameter i get the following error..

On account of a branch in the program

(CALL FUNCTION/DIALOG, external PERFORM, SUBMIT)

or a transaction call, another ABAP/4 program

is to be loaded, namely "WITH".

However, program "WITH" does not exist in the library.

Possible reasons:

a) Wrong program name specified in an external PERFORM or

SUBMIT or, when defining a new transaction, a new

dialog module or a new function module.

b) Transport error

what am i doing wrong?

Thanks,

Anubhav.

ENDFUNCTION.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on May 20, 2008 at 05:37 PM

    Yes, get rid of the quotes around the parameter names and the program name.

    submit TAW10_BASICS_CALL_FUNCTION
     with  pa_carr = wa_flight-carrid
             pa_occ = wa_flight-seatsocc
             pa_paysu = wa_flight-paymentsum 
             pa_curr = wa_flight-currency
                and return .

    Regards,

    Rich Heilman

    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.