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

Conversion exit

Former Member
0 Likes
780

I have written a BDC program.it is working fine.but for some units it is not working.when i checked the original table of units t006.the values stored are different internally.now how can i pass unit values in bdc.i know to write conversion exit module.but wwhere to call plz help me with some code and solution,imm points are awarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
717

You can convert these data to internally stored data like this...

DATA: m(7) TYPE c.
DESCRIBE FIELD field EDIT MASK m.
WRITE: field USING EDIT MASK m.
(or)
WRITE field TO field USING EDIT MASK m.

5 REPLIES 5
Read only

Former Member
0 Likes
718

You can convert these data to internally stored data like this...

DATA: m(7) TYPE c.
DESCRIBE FIELD field EDIT MASK m.
WRITE: field USING EDIT MASK m.
(or)
WRITE field TO field USING EDIT MASK m.

Read only

Former Member
0 Likes
717

hai,

for the units to convert you should use the conversion exit in the Following way.

data: unit(3) type c 'kg'.

write unit to unit using edit mask '==<name of conversion exit>.

cheers

Read only

Former Member
0 Likes
717

Call CONVERSION_EXIT_CUNIT_OUTPUT

and pass the unit and import a plain 4 character field. This will make sure that the 4 character field contains data in output format.

Then pass it to BDC.

Read only

Former Member
0 Likes
717

Hi babita,

1. We don't have to worry about the

internal format.

2. JUST AS IT IS ENTERED ON THE SCREEN,

IN THE SAME WAY (in the same format)

we need to pass the value

to the bdc field.

3. Rest the system will take care.

4. FOR EG.

DATES ARE STORED IN TABLE IN - YYYYMMDD FORMAT

BUT IN BDC WE GIVE. DD.MM.YYYY

regards,

amit m.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
717

just befor mapping, u call the conversion exit.

declare a char variable with the number of characters u want and in the converion_exit fn module, pass the unit which u want to convert as importing and the variable u declared with required length as exporting