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

A problem reading t006b

former_member1161170
Participant
0 Likes
1,587

I suppose itu2019s a stupid problem, but I canu2019t guess the solution.

Iu2019m debugging this four instructions:

SELECT SINGLE msehi FROM t006b INTO f_msehi

WHERE spras = 'DE' AND mseh3 = t_stb-mmein.

IF sy-subrc <> 0.

f_msehi = t_stb-mmein.

ENDIF.

If I set the breakpoint on the u201CIFu201D instruction (or over there, however by select excuted) I can see the following values:

Sy-subrc = 0

t_stb-mmein = u2018STu2019

f_msehi = u2018STu2019

But if I look at the table t006b I can find the following record:

MANDT 900

SPRAS DE

MSEH3 ST

MSEHI PZ

Why do I find f_msehi set to u2018STu2019 instead of u2018PZu2019?

I tried to declare f_msehi both u201Cf_msehi LIKE t006b-msehiu201D and u201Cf_msehi(3)u201D, they give the same effect.

Thanks for any helps.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,317

I think it's problem with conversion exit as told by srini.

Use FM CONVERSION_EXIT_CUNIT_OUTPUT, pass input as ST and language as DE. Check if it returns PZ.

7 REPLIES 7
Read only

Former Member
0 Likes
1,317
SELECT SINGLE msehi FROM t006b INTO f_msehi
WHERE spras = 'DE' AND mseh3 = t_stb-mmein.
IF sy-subrc 0.
f_msehi = t_stb-mmein.
ENDIF.

If I set the breakpoint on the u201CIFu201D instruction (or over there, however by select excuted) I can see the following values:

Sy-subrc = 0
t_stb-mmein = u2018STu2019
f_msehi = u2018STu2019

f_msehi = t_stb-mmein.

t_stb-mmein = ST. As per in table.

So f_msehi = ST . As per code f_msehi = t_stb-mmein. (A = 5. B = A i.e, B = 5)

Read only

0 Likes
1,317

> f_msehi = t_stb-mmein.

> t_stb-mmein = ST. As per in table.

> So f_msehi = ST . As per code f_msehi = t_stb-mmein. (A = 5. B = A i.e, B = 5)

Perhaps it's a misunderstanding.

I test f_msehi before the code "f_msehi = t_stb-mmein" and after the select.

My question lost the different symbol: "IF sy-subrc not is zero, then f_msehi = t_stb-mmein".

Sorry for the misunderstanding

Read only

0 Likes
1,317

I too find that strange!!! Check f_msehi is cleared before used.

Read only

Former Member
0 Likes
1,317

Hi,

This field has conversion exit ... (MSEHI)

Regards,

Srini.

Read only

0 Likes
1,317

> This field has conversion exit ... (MSEHI)

I believe you're right.

By chance, could you know how can I get the correct value (i.e."PZ") passing through t006b?

Thanks.

Read only

Former Member
0 Likes
1,318

I think it's problem with conversion exit as told by srini.

Use FM CONVERSION_EXIT_CUNIT_OUTPUT, pass input as ST and language as DE. Check if it returns PZ.

Read only

0 Likes
1,317

> Use FM CONVERSION_EXIT_CUNIT_OUTPUT, pass input as ST and language as DE. Check if it returns PZ.

Yes it does.

But if use it passing input my language, it returns the correct value.

Thank you.

I've solved my problem.