Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module-Z_SD_CHARACT_CHANGE

Former Member
0 Likes
721

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698
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

5 REPLIES 5
Read only

Former Member
0 Likes
698

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

Read only

0 Likes
698

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?

Read only

0 Likes
698

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

Read only

Former Member
0 Likes
698

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

Read only

Former Member
0 Likes
699
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