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

Former Member
0 Likes
2,891

the user is entering a 40 length material number in the selection screen and on display after fetching the data it is displaying an 18 charcter length matnr.

eg.

s_matnr = f001234567891234rtyu5678deftrgtyumewqdfte

in the output.

it displays :  f001234567891234r!

any solution for this.

10 REPLIES 10
Read only

Former Member
0 Likes
2,233

Explain what you are trying to do.

MATNR is CHAR 18, It will accept only 18 characters.

Thanks,

Shambu

Read only

0 Likes
2,233

i hav declared the matnr datatype as 40 characters only. but then also it is showing only 18 characters in the output.

Read only

laurent_fournier2
Contributor
0 Likes
2,233

Standard report or customer one ?

Maybe conversion_exit_matn2_output ?

Regards.

Read only

0 Likes
2,233

should we call this conversion exit in the loop?

Read only

0 Likes
2,233

Material should be declared like mara-matnr.

Use the function mentioned above just before output the material in order to get the desired result.

Read only

Former Member
0 Likes
2,233

Is it ALV Report? Check the output length declared.

Read only

0 Likes
2,233

yeah its is an alv report.and i am taking matnr from plaf table.

Read only

0 Likes
2,233

If you declare correctly the material, probably it will displayed correctly since during fieldcatalog merge it will get the correct conversion routine.

Read only

Former Member
0 Likes
2,233

HI,

If you want to display Material with 40 Char in your report then change MATNR type from MARA-MATNR to Your New defined MATNR type of 40 Char  in Internal Tables where you mentioned MATNR TYPE MARA-MATNR.

Regards,

RAvi Singh

Read only

Former Member
0 Likes
2,233

Hi 

    

                  If it is a ALV Report pls give the tablename and ref.fieldname for the field catalog    

                 prepared.

               Then it will be displayed according to the field you take it in the fieldcatalog.

            Ex: While preparing the field Catalog use this code..

                    WA_FIELDCAT-TABNAME =  <IT_TAB>

                    WA_FIELDCAT-FIELDNAME = <FIELDNAME>

                 And also Use

                WA_FIELDCAT-REF_FIELDNAME = <FIELDNAME>

                WA_FIELDCAT-REF_TABNAME = 'TABLE NAME>.

    Regards,

    Srik.