05-12-2006 12:57 PM
Hi all,
I tried to find this in the archives without luck, so hope some of you have an answer..
I'm simply trying to fill up a table and call a function module with it as a parameter like this:
Function module import parameter type is table type hap_t_hrsobid
DATA: lt_params TYPE hap_t_hrsobid WITH HEADER LINE
lt_params-field1 = val1.
lt_params-field2 = val2.
APPEND lt_params.
CALL FUNCTION <function name>
EXPORTING
table_param = lt_params
However, this crashes in a type conflict and I can't see what's wrong here even after trying multiple scenarios of data types.
Please note the fm import param is a table type and not a simple type.
Help anyone?
Best regards,
Mikko
05-12-2006 1:00 PM
Hi,
Can you give the FM name?
Regards,
Raj
Refer this FM call and see the FM in SE37, you will know where you went wrong...
form conv_otf_c2x changing p_otf type tsfotf.
if c_unicode = true.
call function 'SSFCOMP_CONVERT_OTF_C2X'
changing
otf = p_otf[].
endif.
endform.
Message was edited by: Rajasekhar Dinavahi
05-12-2006 1:00 PM
Hi,
Can you give the FM name?
Regards,
Raj
Refer this FM call and see the FM in SE37, you will know where you went wrong...
form conv_otf_c2x changing p_otf type tsfotf.
if c_unicode = true.
call function 'SSFCOMP_CONVERT_OTF_C2X'
changing
otf = p_otf[].
endif.
endform.
Message was edited by: Rajasekhar Dinavahi
05-12-2006 1:00 PM
05-12-2006 1:03 PM
Try this
CALL FUNCTION <function name>
EXPORTING
table_param = lt_params[]
put [] after lt_params
Message was edited by: Vijay
05-12-2006 1:04 PM
PL ignore my earlier post & try this..
DATA: lt_params TYPE hap_t_hrsobid,
rec_params like line of lt_params.
rec_params-field1 = val1.
rec_params-field2 = val2.
APPEND rec_params to lt_params.
regards,
Suresh Datti
05-12-2006 1:05 PM
05-12-2006 1:07 PM
05-12-2006 1:00 PM
try this
sorry deleted , pls give FM name
Message was edited by: Chandrasekhar Jagarlamudi
05-12-2006 1:02 PM
Nope, tried already. Syntax check error: When using "WITH HEADER LINE", the line type cannot be a table type.
05-12-2006 1:00 PM
Hi Mikko,
Instead of using the EXP/IMP Parameter, why don't you use the <b>Tables</b> option when creating the function module?
Regards,
Suresh Datti
05-12-2006 1:03 PM
Hi,
can't use it because this is a standard function module which has the parameter as an import param.
-Mikko
05-12-2006 1:06 PM
Hi,
Try this way.
call function 'HRHAP_SEL_ORG_UNIT_OF_POSITION'
exporting T_POSITIONS = <b>itab[]</b>
importing
.
.
.
NOte the [].
Regards,
Ravi
05-12-2006 1:03 PM
Hi mikko,
1. Just declare it like this.
2. DATA: lt_params TYPE hap_t_hrsobid .
DATA: wa TYPE LINE OF hap_t_hrsobid .
3. Use wa (work area)
to put data in the table lt_params.
regards,
amit m.
05-12-2006 1:05 PM
Hi Mikko,
Refer this FM call and see the FM in SE37, you will know where you went wrong...
form conv_otf_c2x changing <b>p_otf type tsfotf</b>.
if c_unicode = true.
call function 'SSFCOMP_CONVERT_OTF_C2X'
changing
otf = p_otf[].
endif.
endform.
Regards,
Raj
05-12-2006 1:09 PM
Hello Mikko,
U need to declare the it_params as follows..
lt_params type hap_t_hrsobid. then use it in FM
call function 'HRHAP_SEL_ORG_UNIT_OF_POSITION'
exporting
t_positions = lt_positions
.......