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

Problem in converting data

Former Member
0 Likes
1,354

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
Read only

Former Member
0 Likes
1,122
shows 'ST' but in display it shows 'PC'.

I didnt get it.. Please explain in detail

Sumit

Read only

Former Member
0 Likes
1,122

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.

Read only

Former Member
0 Likes
1,122

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

CONVERSION_EXIT_CUNIT_INPUT

CONVERSION_EXIT_CUNIT_OUTPUT

Read only

Former Member
0 Likes
1,122

That is because of convertion exit...

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

Read only

Former Member
0 Likes
1,122

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

Read only

Former Member
0 Likes
1,122

Bosses thanks for your reply.

But how to use the function?

Regards,

Zubaer.

Read only

0 Likes
1,122

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

Read only

0 Likes
1,122

>

> 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.