Skip to Content
0
May 20, 2008 at 05:26 PM

Calling report in a Function module.

346 Views

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.