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 maintanance generator problem

Former Member
0 Likes
811

Hi Experts,


I have created a Ztable with 5 fields like Field1,Field2,Field3,Field4,Field5. I have created Table maintenance generator  for that table. I want to disable Field4(created By), Field5(created Date). I have modified in se80 tcode througg screen properties. I want to update the field4,Field5 fileds by sy-datum,sy-uname , How to do without using TMG events? Even TMG events also fine. but my firts preference is without TMG Events....Please give me some sample code. How to Modify the Extract table ?


Moderator Message: There are lot of discussions,documents,wiki links related to this topic. Please do some research before posting.




Message was edited by: Kesavadas Thekkillath

6 REPLIES 6
Read only

former_member202771
Contributor
0 Likes
774

Hi Srinath,

For default value, use TMG event - 05.

A work around is to write a report and run it as periodic batch job

loop the table and

loop ztable into lwa_ztable

  lwa_ztable-field4 = sy-datum.

  lwa_ztable-field5 = sy-uname.

MODIFY ztable from lwa_ztable.

ENDLOOP.

Thanks,

Anil

Read only

Former Member
0 Likes
774

Hi,

Click on the screen number assigned in the TMG, this will let you to screen painter & there you can play with screen fields.

Thanks!

Let me know if this helps you.

Thanks & Regards,

Anil Kumar Sahni

Read only

AnoopMayamkote
Participant
0 Likes
774

Hi,

Go to the screen painter and hide the fields what u want and you can do what ever you want in the Screen fields

Read only

0 Likes
774

Hi Anoop,

Can you please help out with the below questions.

After reaching the screen painter how will you disable a particular field, is it possible to disable the primary key fields also?

regards,

Satish

Read only

0 Likes
774

Hi Satish,

in pbo write one module for that like

module modify screen.

inside the module write code like below.

LOOP AT SCREEN.

      IF screen-group EQ 'group name '.

        screen-input = 0.

        MODIFY SCREEN.

      ENDIF.

    ENDLOOP.

Read only

0 Likes
774

Hi ,

Try this also

go to Se11->Table maintenace generation. Double click on screen to edit and assign the field you want to display/hide to groups. In PBO , after the following lines..

LOOP AT EXTRACT WITH CONTROL

TCTRL_ZMARA                         CURSOR NEXTLINE.

   MODULE LISTE_SHOW_LISTE.

ENDLOOP.

Write a new module in PBO and edit the SCREEN as per the Tcode, you are calling,,'

Hope this helps you