Application Development 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: 

Problem in converting data

Former Member
0 Kudos

Hello Friends,

While creating a program I have to use mara and makt tables.

In mara 'MEINS' field shows 'ST' but in display it shows 'PC'.

What is the function module to convert the data.

Regards,

Zubaer

8 REPLIES 8

Former Member
0 Kudos
shows 'ST' but in display it shows 'PC'.

I didnt get it.. Please explain in detail

Sumit

Former Member
0 Kudos

Good day Zubaer,

There is conversion routien 'CUNIT'.

CONVERSION_EXIT_CUNIT_INPUT

CONVERSION_EXIT_CUNIT_OUTPUT

It will solve your problem.

Regards and Best wishes.

Former Member
0 Kudos

se11->Domain>Defiition>Conversion Routine Double Click>Conversion Function module will displayed

CONVERSION_EXIT_CUNIT_INPUT

CONVERSION_EXIT_CUNIT_OUTPUT

Former Member
0 Kudos

That is because of convertion exit...

please see its data element for MEINS then -> domain and use the conversion exit mentioned in domain

Former Member
0 Kudos

That is because of convertion exit...

please see its data element for MEINS then -> domain and use the conversion exit mentioned in domain

like

CONVERSION_EXIT_CUNIT_INPUT

CONVERSION_EXIT_CUNIT_OUTPUT

Former Member
0 Kudos

Bosses thanks for your reply.

But how to use the function?

Regards,

Zubaer.

0 Kudos

so when you want to display

CONVERSION_EXIT_CUNIT_OUTPUT

when you want to save it in the data base use

CONVERSION_EXIT_CUNIT_INPUT

0 Kudos

>

> Bosses thanks for your reply.

> But how to use the function?

> Regards,

> Zubaer.

hi

In se38>Pattern>Enter Function Module-->CONVERSION_EXIT_CUNIT_INPUT/ and pass the value...

CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
  EXPORTING
    input                        = wa_meins
   LANGUAGE             = SY-LANGU
 IMPORTING
   OUTPUT                  = wa_meins
* EXCEPTIONS
*   UNIT_NOT_FOUND       = 1
*   OTHERS               = 2
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.