Skip to Content
0
Former Member
Oct 19, 2011 at 03:28 PM

passing table to subroutine

34 Views

Hi all,

I have a problem passing a table into a subroutine.

Here lt_ekbe is the internal Table as declared as follows.

form Test. // The internal table lt_ekbe is declared in this subroutine.This subroutine Iam not allowed to change.
DATA: lt_ekbe  TYPE TABLE OF ekbe, 

Table is filled using the following routine.

PERFORM me_read_history TABLES lt_ekbe
                                 lt_ekbez
                          USING  ls_ekpo-ebeln
                                 ls_ekpo-ebelp.

end form.

In the following routine, I want to pass the lt_ekbe table and make a check as follows.But it shows an error that table is not defined.

form mwskz_from_rechnungsBeleg1 using ut_ekbe like lt_ekbe CHANGING fs TYPE mrer_item .
                               

data ls_ebke type ekbe.
READ TABLE ut_ebke into ls_ebke with key
                                   ebeln = fs-ebeln
				   BELNR = fs-rebzg
				   bwart = ''.

endform.

Could anyone give a hand on this..

Thanks

K