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

Facing problem during use of Function module

Former Member
0 Likes
625

Hi All,

I have to use one function module I have to pass kunnr and one structure.

Following is the code.

LOOP AT I_FINAL.

I_CHARACT-ATINN = I_FINAL-ATINN.

I_CHARACT-KLART = '011' .

I_CHARACT-ATWRT = I_FINAL-ATWRT.

append i_charact.

CALL FUNCTION 'Z_SD_CHARACT_CHANGE'

EXPORTING

IV_KUNNR = I_FINAL-KUNNR

IT_CHARACT = I_CHARACT[]

ENDLOOP.

I have defined I_CHARACT like IT_CHARACT.

IT_CHARACT-ATINN IS NUMERIC TYPE AND no.of charectar is 10.But its output lenght is 30 and having conversion routine ATINN.

Now our requirmrnt is that we have to pass some text like AMAR_KUMAR in that ATINN field but it is not reading this value thr program but when I give this thr sm37 then it reads.

And I tried to change I_charact table type but it gives dump.

Please tell me solution.

1 ACCEPTED SOLUTION
Read only

dev_parbutteea
Active Contributor
0 Likes
601

Hi ,

try passing 'AMAR_KUMAR' via FM CONVERSION_EXIT_ATINN_INPUT first and then append the output to I_CHARACT.

e.g.

data : lv_atinn type atinn value 'AMAR_KUMAR' .

CONVERSION_EXIT_ATINN_INPUT

IMPORTING

VALUE = lv_atinn

EXPORTING

VALUE = lv_atinn

then use lv_atinn .

Regards.

4 REPLIES 4
Read only

Former Member
0 Likes
601

Hi Check the data type in the function module & in the program.

Read only

dev_parbutteea
Active Contributor
0 Likes
602

Hi ,

try passing 'AMAR_KUMAR' via FM CONVERSION_EXIT_ATINN_INPUT first and then append the output to I_CHARACT.

e.g.

data : lv_atinn type atinn value 'AMAR_KUMAR' .

CONVERSION_EXIT_ATINN_INPUT

IMPORTING

VALUE = lv_atinn

EXPORTING

VALUE = lv_atinn

then use lv_atinn .

Regards.

Read only

0 Likes
601

Thanks...Dev

I hope it will work.

Read only

Former Member
0 Likes
601

use the data element of I_CHARACT-ATINN same as required for IT_CHARACT-ATINN.

Regards,

Lalit Mohan Gupta.