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 with SE11

Former Member
0 Likes
1,224

Hi Experts,

When I am going to table EKPO(SE11) for line items of PO,

It shows me value in MEINS field 'STD'. but when I double click on the same records the value which is displayed is 'HR'.

In this case I found that value 'HR' is correct one.

but in my program populates the values in internal table 'STD' which further yeilds wrong results..

What can be the problem??

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
1,141

There is no problem. There is an conversion exit on MEINS that converts the data as held in the database (STD = Stunde in German) to the (english) language equivalent - HR.

Look at domain MEINS. You'll see it has conversion exit CUNIT. Double click on it, and you'll see the function modules to use directly in your program to get the correct output.

matt

11 REPLIES 11
Read only

matt
Active Contributor
0 Likes
1,142

There is no problem. There is an conversion exit on MEINS that converts the data as held in the database (STD = Stunde in German) to the (english) language equivalent - HR.

Look at domain MEINS. You'll see it has conversion exit CUNIT. Double click on it, and you'll see the function modules to use directly in your program to get the correct output.

matt

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,141

hi,

the problem is that there is a conversion exit behind MEINS. The exits are:

CONVERSION_EXIT_CUNIT_INPUT

CONVERSION_EXIT_CUNIT_OUTPUT

The value in the table is stored in German, while is displayed in English (or your logon language).

You can also check the conversion settings when you display the data (in SE11).

hope this helps

ec

Read only

0 Likes
1,141

It´s because this field have a type with CUNIT conversion, so when you are going to select this values, the selection returns the conversion values, so you have to compare with the correct value HR. The function modules to convert de dates are CONVERSION_EXIT_CUNIT_INPUT

CONVERSION_EXIT_CUNIT_OUTPUT.

Read only

Former Member
0 Likes
1,141

Hi Dhananjay,

Conversion routines

CONVERSION_EXIT_CUNIT_INPUT Conversion exit for commercial (3-char) measurement unit INPUT

CONVERSION_EXIT_CUNIT_OUTPUT Conversion exit for commercial (3-char) measurement unit OUTPUT

are attached with this data element MEINS that convers that data.

Call this FM in your program and use it.

Regards,

Mukesh Kumar

Read only

Former Member
0 Likes
1,141

Hi Dhananjay,

The field MEINS has Convertion Routine so it display like that 'STD' is correct Value use that value.

Plz Reward if helpful,

Mahi.

Read only

0 Likes
1,141

Thanx all for ur replies...

I am writing following code for the same

data : var1(3).

CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT'

EXPORTING

INPUT = 'STD'

LANGUAGE = SY-LANGU

  • IMPORTING

  • LONG_TEXT =

OUTPUT = var1

  • SHORT_TEXT =

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

write var1.

But the VAR1 is not returning any value..?? Am I using correct FM with Correct parameters??

Read only

0 Likes
1,141

Execute

data : var1(3).

CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'

EXPORTING

input = 'STD'

  • LANGUAGE = SY-LANGU

IMPORTING

OUTPUT = var1.

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

write var1.

If you face any problem revert back

Read only

0 Likes
1,141

Hi MUkesh..

Thanx for ur code sample...

But now its giving error : Unit STD is not created in language EN

What can be the problem??

Read only

0 Likes
1,141

you have to use the other FM: CONVERSION_EXIT_CUNIT_OUTPUT:

CALL FUNCTION 'CONVERSION_EXIT_CUNIT_OUTPUT'

EXPORTING

input = 'STD'

LANGUAGE = 'EN'

IMPORTING

  • LONG_TEXT =

OUTPUT = here you'll get HR

  • SHORT_TEXT =

EXCEPTIONS

UNIT_NOT_FOUND = 1

OTHERS = 2.

ec

Read only

0 Likes
1,141

Hi All,

Thanx..the problem got resolved..

Read only

0 Likes
1,141

Thanx..