‎2009 Apr 07 1:08 PM
Hi All,
I am using 'Z_SD_CHARACT_CHANGE' this FM for charectar change.
In my internal table there are four fields.
for Exa.
118260 PROMO_ACTIVITY Y 011.
when I call FM
CALL FUNCTION 'Z_SD_CHARACT_CHANGE'
EXPORTING
IV_KUNNR = 118620
IT_CHARACT =
but in IT_CHARACT what should I pass,means it is structure and in it I have to pass all remaining fileds.
Regards,
AMAR
‎2009 Apr 07 2:10 PM
data: begin of itab occurs 0,
Kunnr,
field1,
field2,
field3,
end of itab.
data: begin of itab1,
field1,
field2,
field3,
end of itab1.
Loop at itab.
Move : Itab-field1 to Itab1-field1 ,
Itab-field2 to Itab1-field2 ,
Itab-field3 to Itab1-field3 .
Call 'Z_SD_CHARACT_CHANGE'
Kunnr = itab-Kunnr
I_Structure = ITAB1.
Clear itab1.
Endloop.Regards,
Gurpreet
‎2009 Apr 07 1:14 PM
Hi Amar,
Your question is not so clear.
Please provide the code of the function module, and also please brief your problem.
Best Regards,
Suresh
‎2009 Apr 07 1:47 PM
In FM Z_SD_CHARACT_CHANGE,there are two import parameter
iv_kunnr and it_charact.
iv_kunnr is customer number which is in my internal table.
it_charact is structure and having three fields which is also in my internal table.
Could you please tell me how can I pass thosevalue in it?
‎2009 Apr 07 1:53 PM
Hi,
You need to pass all content of that internal table to the FM, but be sure that the structure with values is the same type as the one defined in the FM otherwise the system will dump.
If you need to transfer data from one itab to another, it' s generally done like:
Itab[ ] = Itab[ ].
Pay attention to the brackets, so headerlines will not be copied and make sure they have the same type.
Otherwise if not the same type, you can do something like
Move-corresponding struct1 to struct2.
Best regards,
Guido Koopmann
Edited by: G. Koopmann on Apr 7, 2009 2:56 PM
‎2009 Apr 07 1:20 PM
Hi,
this is not a standard Function module because it starts with a 'Z' so we can not have a look at it without you providing the code.
Best regards,
Guido Koopmann
‎2009 Apr 07 2:10 PM
data: begin of itab occurs 0,
Kunnr,
field1,
field2,
field3,
end of itab.
data: begin of itab1,
field1,
field2,
field3,
end of itab1.
Loop at itab.
Move : Itab-field1 to Itab1-field1 ,
Itab-field2 to Itab1-field2 ,
Itab-field3 to Itab1-field3 .
Call 'Z_SD_CHARACT_CHANGE'
Kunnr = itab-Kunnr
I_Structure = ITAB1.
Clear itab1.
Endloop.Regards,
Gurpreet