cancel
Showing results for 
Search instead for 
Did you mean: 

Table/view maintenance

Former Member
0 Kudos

Hi all i had created a table and im doing some work in sm30.i had two fields in the table for which i can enter vaues in sm30.now my requirement is when i select filed1 i.e company id the next field should get the coresponding value.PLZ HELP ME OUT.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In sm30 this can't be achieved. U have write some code for this to fetch data for second field via first field.

This is possible when u write a transaction(ABAP-Pool Program) wherein u can have these 2 fields in table control and when u enter the first field, u can write code in PAI of program to fetch the data for the first field.

If this helps U Pl. award points.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Danny,

You can do it in SE54, table maintenance event 05 (creating a new entry) and event 21 (Fill_HIDDEN_ENTRY).

I think you will end up using both because the control does not go to event 21 when you create new record by copying existing record and in some case it does not go to 05.

In event 21, the data is available in variable <table1> and in event 05, the data is available in variable with sama name as your table/view name. The data you modify here is reflected on the screen and saved with other data.

I hope it helps.

Former Member
0 Kudos

This is very much possible. You can modify the generated screen created by SE54 & add your own logic there to do some processing. Bear in mind that when you regenerate the Table Maintenance again, you will lose your changes !!

If you need more help, mention your specifics & I'll be happy to provide suggestions...

Former Member
0 Kudos

Can you please give more details?

Let us say you have company code and company code description as your table fields.

So you want to fill the company code description field, when the user enters a certain company code in the first field. You will determine how to pull this description based on some logic. Am I correct?

So are you going to prevent the user from entering anything in the second field?

Are you going to display the value immediately after user enters something in the first field or will you wait until the user saves the data?

Will you allow the user to change this second field value?

Table Maintenance Events(SE54) will help you but we need to know more details before making a statement that you can do it with custom program.

Srinivas

Former Member
0 Kudos

Hello,

You can use events in table maintenance to do the same. Go to SE11. <b>In table maintenance go to environment Modification and then in events.</b> Select the event on key entry and write a routine name. Enter the code that you want. Or even from se54 you can do the same thing. The other criteria has to be considered as srinivas said.

Regards,

Shekhar Kulkarni

VijayasekarK
Active Participant
0 Kudos

Hi ,

If you are creating maintenance view for a customer created table ..then you can very well play around with your code.

You should "Define maintenance dialog" for your table .

And inthe function group you can modify the code.

See the below SAP HELP Link...

http://help.sap.com/saphelp_47x200/helpdata/en/a1/e4521aa2f511d1a5630000e82deaaa/frameset.htm