2007 Feb 12 10:48 AM
Hi,
1.i have to fetch the values in the db table based on the values in the user exit.
the value is the sold-to party. i have to build a table with sold-to party along with other values. the problem is that sold-to is a char and in the table maintanence if i declare it as a char , while inserting values there is a difference between '002345' and '2345' which is going to be an extra burden on the user.
is NUMC a good candidate instead of char? please propose a solution
2. i want to make the entry of a field mandatory while inserting values thru table maintanence , what are the steps i need to follow. this field is not part of the key.
please propose necessary solutions for this problem.
Regards,
kranthi.
2007 Feb 12 3:57 PM
Hi,
I checked few of the standard SAP master tables, they all have the main primary key field as CHAR only.
Probably you can declare the field as char itself, and use some conversion exit routine to insert zeroes before updating the table.
Go to table maintenace (SM30) in change mode, and open the screen (system -> status ->screen number dbl click).
Now in the layout select the properties of the field which you want as display only. update the properties, save and activate.
Regards
Subramanian
Hi,
1.i have to fetch the values in the db table based on the values in the user exit.
the value is the sold-to party. i have to build a table with sold-to party along with other values. the problem is that sold-to is a char and in the table maintanence if i declare it as a char , while inserting values there is a difference between '002345' and '2345' which is going to be an extra burden on the user.
is NUMC a good candidate instead of char? please propose a solution
2. i want to make the entry of a field mandatory while inserting values thru table maintanence , what are the steps i need to follow. this field is not part of the key.
please propose necessary solutions for this problem.
Regards,
kranthi.
2007 Feb 12 10:56 AM
Hi Kranthi,
You can uuse the function module:CONVERSION_EXIT_MATN1_INPUT which will pad the zeroes in front.
or use CONVERSION_EXIT_MATN1_OUTPUT which would strip the leading zeroes if any. In either case, you can maintain a uniformity.
Regards,
Ravi
2007 Feb 12 3:32 PM
Hi Kranthi,
As for the second question - you can check whether the material number (which is NOT a key field) has been entered programatically by coding within the table maintenance events available.
Go to the table maintenance generator through SE11 for the table and check the
Environments -> Modifications -> Events section, where you have a lot fo events. One you can use is event number 01 (Before saving the data in the database).
Hope this helps.
Regards,
Aditya
2007 Feb 12 3:57 PM
Hi,
I checked few of the standard SAP master tables, they all have the main primary key field as CHAR only.
Probably you can declare the field as char itself, and use some conversion exit routine to insert zeroes before updating the table.
Go to table maintenace (SM30) in change mode, and open the screen (system -> status ->screen number dbl click).
Now in the layout select the properties of the field which you want as display only. update the properties, save and activate.
Regards
Subramanian
2007 Feb 12 6:53 PM
Hi,
1st question : Check if the sold-to-party in any standard table has any conversion exit. If yes then you can use the same in your custom Z table. Else you can do as has been mentioned to you by other fellows.
2nd question : as has been mentioned by someone above you can use events.
Do as mentioned by the other fellow and a sample code I am writing here :
( Please close this thread if problem is solved. I am going to delete this code in 2 days )
" Code deleted
This will help you
Regards
Nishant
Message was edited by:
Nishant Rustagi
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |