2014 Mar 14 1:27 PM
Hi All,
I am facing the problem with leading zeros.I am getting the value for the field ZZMATNR is '00000000000000000000000000000000000000000000000000358934'.But user is expecting the value '0358934'.
I used the function module 'CONVERSION_EXIT_ALPHA_OUTPUT'.
I am getting the value is '358934'.But user expecting the value is '0358934'.
In the table itself the value is '0358934'.
Please help me how to code this.
Regards,
sujan
Hi All,
I am facing the problem with leading zeros.I am getting the value for the field ZZMATNR is '00000000000000000000000000000000000000000000000000358934'.But user is expecting the value '0358934'.
I used the function module 'CONVERSION_EXIT_ALPHA_OUTPUT'.
I am getting the value is '358934'.But user expecting the value is '0358934'.
In the table itself the value is '0358934'.
Please help me how to code this.
Regards,
sujan
2014 Mar 14 1:37 PM
Hi sujan,
where is you problem, code a conversation_exit.
Here is the docu to it. If you face some problems, use the search.
If it is a specific problem and not suitable for the whole system, you also can use the write_statement explained here
SAP Library - ABAP Programming (BC-ABA)
In case it is in a Form, Sapscript or Smartforms, you use the wrong space and there, you got other options to solve the problem.
Regards
Florian
2014 Mar 14 2:53 PM
Check the actual conversion exit, if any, associated to your customer field ZZMATNR (thru its domain definition) is this actually ALPHA ?
I doubt it, an ALPHA conversion-exit would not allow an internal value of '0358934' except if length of domain is 7 or if "someone" updated the database with OPEN-SQL statement forgetting the conversion-exit (CONVERSION_EXIT_XXXX_INPUT) and generating records that can no longer be selected on this field value when executed in correct program
Regards,
Raymond
2014 Mar 14 3:36 PM
Hi
Can't we use
SHIFT MATNR DELETING ADJACANT DELETING ZERO.
Try this out.
Thanks,
Sreeram
2014 Mar 14 3:48 PM
as Raymond said, you will have to use a different conversion exit (once there is one). I suppose your ZZMATNR is the same type as MATNR (but for a different purpose). The conversion exit there is MATN1, which will decide on how many leading zeros are to be set.
so use CONVERSION_EXIT_MATN1_OUTPUT instead (if this is your case)
2014 Mar 14 3:49 PM
Hello Sujan,
What is the data element associated to field ZZMATNR and check the domain of the data element, does it has a conversion routine assigned.
* Create a data element say Type : CHAR and ;length 7 and assign this data element to ZZMATNR.
Regards,
TP
2014 Mar 14 4:07 PM
Hi Sujan T,
Does the user always expects a leading zero even if the value has 7 digits?
If so, then after you use the FM 'CONVERSION_EXIT_ALPHA_OUTPUT',
use the following:
CONCATENATE '0' '358934' into new_value.
2014 Mar 14 4:16 PM
2014 Mar 14 4:41 PM
Hi Sujan T,
check the domain output characteristics for MATNR it is having conversion routine "MATN1"
so u can use "CONVERSION_EXIT_MATN1_OUTPUT" .
here you can avoid all leading zeros..
but if u want 'ONE' leading zero then u need to concatenate it after conversion .. as john suggested .
Regards,
Nitin
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |