Application Development 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: 

Default the values on click on 'NEW ENTRIES' IN the Table maintenance generator( TMG )

Former Member
0 Kudos

Hi ,


I have table and created tmg and maintenance view also.

table have filed1 , filed2 and 


my query is when I press 'NEW ENTRY ; in the TMG( sm30)  filed1 values should be fill with some initial value.

ex


 filed1     


after click on  'NEW ENTRY 


filed1      filed2     

SAP


i tried with event create new entry(05) but it is not fulfilling my requirement.


Please suggest me.


Thank you.


Regards,

Shivaji.

12 REPLIES 12

pranay570708
Active Contributor
0 Kudos

Have you activated your Function group of TMG. Go to SE80, enter you function group, activate that and check.

0 Kudos

Hi Pranay,

Thank you for your prompt reply.

I did the  same.

Thank you.

Regards,

Shivaji.

0 Kudos

Have you made any changes to the the table, If so, delete and create new TMG. AFter that add events in that.

Former Member
0 Kudos

hi,

  can you paste your coding for new entry in event.

0 Kudos

FORM f_initial_data.


viewname-field1 = 'SAP'.

endform

jogeswararao_kavala
Active Contributor

You need to use Event 05 (Environment > Modification > Events) in TMG.

See this Event 05 line in the picture.

And then I put this code to have Default values for my fields during the New entries



Please note that the default values will not be seen. They will be stored at the time when you Save the record.

0 Kudos

Hi Jogeswara rao,

Thank you for your replay.

I did the same but still it is not fulfill the requirement.

Thank you.

Regards,

Shivaji.

0 Kudos

Please note that the default values will not be seen during New Entries. They will be updated at the time when you Save the record.

0 Kudos

Hi Jogeswara Rao Kavala,

I understood,

But how can user will come to know that about default value of particular field.

If the will come to know at save time then there is no use of default value.

please suggest me to achieve this.

Thank you.

0 Kudos

  • There is no other alternative. Whether it is of use or not it depends upon your use if not perception. In most of the cases it simplifies the feeding of repetitive punching. In my case lot of coding is there through IF and ELSEIF for the values to be defaulted during Save of certain fields of ztable as a function of the values of other fields of the same table.
  • Many times user is not supposed to know about the values to be filled into other fields.
  • Demand for default values to be in front of you before Save serves only purpose of editing them. But at the same time it will lose the meaning of defaulting them.
  • If you must have it so, then you should explore the PBO module of the Ztable TMG layout.

Former Member
0 Kudos

Make those fields as grayed out and populate values for that fields by using event 21 -Fill hidden fields.

It will get trigger when user press enter or save.I hope this will fulfill.

sriram_korlepara
Participant
0 Kudos

Did you got any solution.

Event I have same kind of requirement. Thanks... Ram