2007 Apr 18 2:51 PM
Hi all, brand new ABAPer here. When using tcode CO03 and going to Production Order Display -> User Fields tab there is a field that we input Length. For example a user will input 194.10 for the length of material. In this case the user entered 194..10 and when we ran a batch job the job caused a short dump. Can someone give me a starting point in validating that field to prevent invalid decimal numbers? There are 3 fields on that tab that are decimal numbers so it would be great to validate them all.
Thanks,
Mike
2007 Apr 18 2:57 PM
Hi..
declare the length field as type P.
<b>data: length type p decimals 2.</b>
Validation will be taken care by the data type u r specifying...
Hi all, brand new ABAPer here. When using tcode CO03 and going to Production Order Display -> User Fields tab there is a field that we input Length. For example a user will input 194.10 for the length of material. In this case the user entered 194..10 and when we ran a batch job the job caused a short dump. Can someone give me a starting point in validating that field to prevent invalid decimal numbers? There are 3 fields on that tab that are decimal numbers so it would be great to validate them all.
Thanks,
Mike
2007 Apr 18 2:57 PM
Hi..
declare the length field as type P.
<b>data: length type p decimals 2.</b>
Validation will be taken care by the data type u r specifying...
2007 Apr 18 4:44 PM
after digging further, is there a way to add the above code to the PAI module for screen 201 and apply it to the appropriate text boxes? I believe the text fields are AFVGD-USR02, 04, 05. Sorry for the newbie questions, I'm just getting started with ABAP.
Thanks
2007 Apr 18 5:02 PM
HI Micheal,
You cannot change the program for which you are doing the BDC.
Instead you can validate the data that is uploaded from the file(Before you do the bdc).
Regards,
Ravi
2007 Apr 18 5:19 PM
Hi Michael
You can create Field Exits for that screen for the selected fields which will validate the data...
Program for creating field exits:
RSMODPRF
Revert back in case you need help with Field Exits.
I hope creating field exits will meet your requirement of validating data.
Reward if helpful.
Aabhas.
2007 Apr 18 5:07 PM
u need to declare the text boxes types as P... goto text box attributes and u can specify the length and characteristics to the field.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |