2007 Feb 22 11:21 PM
Hi guys,
I have a problem in ALV. There is character field which is company code , whenever the value is '000'or 010' it is displaying as '0' or '10'. can you please help me on this. here is the field catelog for this... it is really urgent.
CLEAR e_fieldcat.
ADD 1 TO w_col_pos.
e_fieldcat-fieldname = 'AUFNR'.
e_fieldcat-seltext_m = 'Company Code'.
e_fieldcat-col_pos = w_col_pos.
e_fieldcat-no_zero = space.
e_fieldcat-lzero = 'X'.
e_fieldcat-edit_mask = '==ALPHA'.
APPEND e_fieldcat TO t_fieldcat.
thanks.
2007 Feb 22 11:24 PM
If its a character field why are you pasing followng values -
<b>
e_fieldcat-no_zero = space.
e_fieldcat-lzero = 'X'.
e_fieldcat-edit_mask = '==ALPHA'.
</b>
add this one.
<b>e_fieldcat-datatype = 'CHAR'.</b>
try the display by removing them.
also AUFNR is the order number of CHAR 12 not the company code as far as I remember.
Regards,
Amit
Reward all helpful replies.
Please close the thread.
Thanks,
Amit
Message was edited by:
Amit Khare
If its a character field why are you pasing followng values -
<b>
e_fieldcat-no_zero = space.
e_fieldcat-lzero = 'X'.
e_fieldcat-edit_mask = '==ALPHA'.
</b>
add this one.
<b>e_fieldcat-datatype = 'CHAR'.</b>
try the display by removing them.
also AUFNR is the order number of CHAR 12 not the company code as far as I remember.
Regards,
Amit
Reward all helpful replies.
Please close the thread.
Thanks,
Amit
Message was edited by:
Amit Khare
2007 Feb 22 11:24 PM
If its a character field why are you pasing followng values -
<b>
e_fieldcat-no_zero = space.
e_fieldcat-lzero = 'X'.
e_fieldcat-edit_mask = '==ALPHA'.
</b>
add this one.
<b>e_fieldcat-datatype = 'CHAR'.</b>
try the display by removing them.
also AUFNR is the order number of CHAR 12 not the company code as far as I remember.
Regards,
Amit
Reward all helpful replies.
Please close the thread.
Thanks,
Amit
Message was edited by:
Amit Khare
2007 Feb 22 11:38 PM
Yes you are right. but here I am displaying the company code from order number. Well it is a different req,. I have tried all the options but no use...Thanks for the quick reply...
lakshmi
2007 Feb 22 11:43 PM
2007 Feb 22 11:46 PM
2007 Feb 23 4:40 PM
I have declared another field which is also charecter and moved the contents of order number to that field and displayed it in ALV
Thanks.
2007 Feb 22 11:54 PM
Hi Lakshmi ,
wa_fieldcat-edit_mask = '==ALPHA'.
wa_fieldcat-edit_lzero = 'X'.
If this doesnt work.
<b>
Declare the field as type MARA-MATNR.</b>
BCOZ conv routine for MATNR IS MATN1.
Usually, if all is well, this will be handled automatically, for example, if on a dynpro, all you need to do is set the conversion routine value to ALPHA, then the conversion will be automatic, nothing to code. If in a list display, the field should be TYPE MARA-MATNR, then the conversion will be automatic on the list display, as well as the ALV grid.
Reward points if helpful
Regards
Naresh
2007 Feb 23 4:39 PM
2007 Feb 23 4:43 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |