2008 Oct 29 9:01 AM
Hello all,
I m trying to pass an internal table with CHANGING
Code
FORM X
it_zfichpai type table of zfichpai,
wa_zfichpai like line of it_zfichpai.
(...)
perform create_md5key changing wa_zfichpai-MD5KEY
it_zfichpai.
ENDFORM.
FORM create_MD5key changing hkey type zfichpai-md5key
-> p_zfichpai like zfichpai <-(dont work).
the "like" doesn't work,neither "like table of", "type", "type table of"
A way to do it is to make a global declaration of it_zfichpai and use "like" statement in my form declaration but I want my it_zfichpai declaration stay local.
Need help
2008 Oct 29 9:04 AM
define a table type like.
types: begin of ty_ltap,
lgnum like ltap-lgnum,
tanum like ltap-tanum,
tapos like ltap-tapos,
end of ty_ltap,
tt_ltap type table of ty_ltap.
data: i_ltap type tt_ltap.
You can use the table type in the definition of the subroutine :
FORM subroutine changing pi_ltap type tt_ltap.
...
ENDFORM.
And call it by :
perform subroutine changing i_ltap.
regards,
Hans
Hello all,
I m trying to pass an internal table with CHANGING
Code
FORM X
it_zfichpai type table of zfichpai,
wa_zfichpai like line of it_zfichpai.
(...)
perform create_md5key changing wa_zfichpai-MD5KEY
it_zfichpai.
ENDFORM.
FORM create_MD5key changing hkey type zfichpai-md5key
-> p_zfichpai like zfichpai <-(dont work).
the "like" doesn't work,neither "like table of", "type", "type table of"
A way to do it is to make a global declaration of it_zfichpai and use "like" statement in my form declaration but I want my it_zfichpai declaration stay local.
Need help
2008 Oct 29 9:03 AM
Hi,
Generally internal table are passed using "tables" addition and not "changing" addition.
Thanks & Regards,
Navneeth K.
2008 Oct 29 9:04 AM
define a table type like.
types: begin of ty_ltap,
lgnum like ltap-lgnum,
tanum like ltap-tanum,
tapos like ltap-tapos,
end of ty_ltap,
tt_ltap type table of ty_ltap.
data: i_ltap type tt_ltap.
You can use the table type in the definition of the subroutine :
FORM subroutine changing pi_ltap type tt_ltap.
...
ENDFORM.
And call it by :
perform subroutine changing i_ltap.
regards,
Hans
2008 Oct 29 9:09 AM
Thx for replies,
1reply -> I prefer to not use TABLE cause obsolete 😕
2reply -> The probelm is that I m in an include attached to an sap standard program than i prefer to dont add some declaration of type.
Maybe is it the only way but i wanted to be sure : )
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |