‎2009 Apr 09 11:40 AM
Hi All,
I am using one function module 'Z_SD_CHARACT_CHANGE'.
LOOP AT I_FINAL.
I_CHARACT-ATINN = I_FINAL-ATINN.
I_CHARACT-KLART = '011' .
I_CHARACT-ATWRT = I_FINAL-ATWRT.
CALL FUNCTION 'Z_SD_CHARACT_CHANGE'
EXPORTING
IV_KUNNR = I_FINAL-KUNNR
IT_CHARACT = I_CHARACT
.
CLEAR I_CHARACT.
ENDLOOP.
here IT_CHARACT is structure defined like ZSD_CHAR_TAB and I defined I_CHARACT type structure like ZSD_CHAR_TAB.
But is giving following dump.
The function module interface allows you to specify only fields of a particular type under "IT_CHARACT".
The field "I_CHARACT" specified here is a different field type .
Could you please tell me what should I do for that?
‎2009 Apr 09 11:52 AM
Hi Amar,
The Function module is expecting a table as input not a work area.
Try to change your code.
LOOP AT I_FINAL.
I_CHARACT-ATINN = I_FINAL-ATINN.
I_CHARACT-KLART = '011' .
I_CHARACT-ATWRT = I_FINAL-ATWRT.
append the above lines to an internal table and pass to FM.*
CALL FUNCTION 'Z_SD_CHARACT_CHANGE'
EXPORTING
IV_KUNNR = I_FINAL-KUNNR
IT_CHARACT = I_CHARACT
.
CLEAR I_CHARACT.
ENDLOOP.
Regards
Kumar M
‎2009 Apr 09 11:48 AM
‎2009 Apr 09 11:49 AM
Hi Amar,
You need to pass the table and not the work area.
Try passing: I_CHARACT[]
Regards,
Aditya
Edited by: Aditya Laud on Apr 9, 2009 6:49 AM
‎2009 Apr 09 11:52 AM
Hi Amar,
The Function module is expecting a table as input not a work area.
Try to change your code.
LOOP AT I_FINAL.
I_CHARACT-ATINN = I_FINAL-ATINN.
I_CHARACT-KLART = '011' .
I_CHARACT-ATWRT = I_FINAL-ATWRT.
append the above lines to an internal table and pass to FM.*
CALL FUNCTION 'Z_SD_CHARACT_CHANGE'
EXPORTING
IV_KUNNR = I_FINAL-KUNNR
IT_CHARACT = I_CHARACT
.
CLEAR I_CHARACT.
ENDLOOP.
Regards
Kumar M
‎2009 Apr 09 11:54 AM
Hi Amar,
Declare the structure IT_CHARACT in the table tab of the FM with associated type ZSD_CHAR_TAB.
This will resolve your problem.
Regards..
‎2009 Apr 09 11:54 AM
Hi,
Check the ZSD_CHAR_TAB is Table Type or Structure..If it is Table Type then it behaves like internal table.Then you need to declate the I_CHARACT as
DATA : I_CHARACT LIKE LINE OF ZSD_CHAR_TAB.
‎2009 Apr 09 12:15 PM
Hi u define this under tab table .
like
table name structure
T_MWDAT LIKE RTAX1U15.
this will help u.
‎2009 Apr 09 12:15 PM