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

table maintanence

Former Member
0 Likes
635

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
612

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.

4 REPLIES 4
Read only

Former Member
0 Likes
612

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

Read only

Former Member
0 Likes
612

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

Read only

Former Member
0 Likes
613

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

Read only

Former Member
0 Likes
612

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