2011 Oct 19 4:28 PM
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
2011 Oct 19 4:36 PM
I don't think you can do this without changing the first FORM.
You could write a new FORM that does the same thing but passes the table. Pretty inefficient though.
Why can't you change the FORM?
Rob
I don't think you can do this without changing the first FORM.
You could write a new FORM that does the same thing but passes the table. Pretty inefficient though.
Why can't you change the FORM?
Rob
2011 Oct 19 4:36 PM
I don't think you can do this without changing the first FORM.
You could write a new FORM that does the same thing but passes the table. Pretty inefficient though.
Why can't you change the FORM?
Rob
2011 Oct 19 4:50 PM
But if you do know the specific type why don't you just use a table type such as ME_EKBE or change the FORM structure using TABLES ?
form mwskz_from_rechnungsBeleg1 using ut_ekbe type ME_EKBE CHANGING fs TYPE mrer_item .
....
form mwskz_from_rechnungsBeleg1 tables ut_ekbe structure ekbe CHANGING fs TYPE mrer_item .
....
2011 Oct 19 4:50 PM
Hi Rob,
I meant I want to call "mwskz_from_rechnungsBeleg1" from Test.No other changes other than that in subroutine "Test":)
2011 Oct 19 4:56 PM
2011 Oct 23 2:27 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |