on 2024 Nov 22 9:07 AM
Hi,
Why is assigning the variable OK but passing as a parameter gives a "not type-compatible" error?
data: ls_sdata type edi_sdata.
data: ls_data TYPE e1edk01.
* this is fine:
ls_sdata = ls_data.
* this gives a not type-compatible error:
method definition: method record_sdata importing i_sdata type edi_sdata.
me->record_sdata( i_sdata = ls_data ). "error
Thanks.
Request clarification before answering.
There are stricter checks for method parameters.
If you really want this call, try this:
me->record_sdata( i_sdata = conv #( ls_data ) ).
Since edi_sdata is not a structure, I would suggest writing lv_sdata instead of ls_sdata.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
10 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.