2014 Feb 06 7:05 AM
Hi Experts,
I have table maintenance generator and it has four columns like ‘A’,’B’,’C’,’D’ in the table. Now my requirement is, whenever I click on 'New
Entries' (in table maintenance Generator) automatically in column 'C' some default value should get filled(like XYZ), it should not happen when user
clicks ‘save’ or some other action it should happen only when I click on ‘New Entries’ in the table maintenance generator.
Thanks in advance.
Regards,
Chityala.
2014 Feb 06 7:15 AM
Hi Shailaja,
We have events in TMG, in those events I think you can use 05 - Creating a New Entry.
This will be triggered when creating a new entry. So, create a routine for this event and fill the required field with default value.
Otherwise create a MODULE in PBO of the screen in which we fill values and fill the required field with default value.
regards,
Vijay
Hi Experts,
I have table maintenance generator and it has four columns like ‘A’,’B’,’C’,’D’ in the table. Now my requirement is, whenever I click on 'New
Entries' (in table maintenance Generator) automatically in column 'C' some default value should get filled(like XYZ), it should not happen when user
clicks ‘save’ or some other action it should happen only when I click on ‘New Entries’ in the table maintenance generator.
Thanks in advance.
Regards,
Chityala.
2014 Feb 06 7:11 AM
Hi,
Check table maintenance generator Events. That should help.
Hope this link will help.
TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
Regards
Abhi
2014 Feb 06 7:15 AM
Hi Shailaja,
We have events in TMG, in those events I think you can use 05 - Creating a New Entry.
This will be triggered when creating a new entry. So, create a routine for this event and fill the required field with default value.
Otherwise create a MODULE in PBO of the screen in which we fill values and fill the required field with default value.
regards,
Vijay
2014 Feb 06 8:57 AM
Hi All,
Thank you every one for quick replies..
I have tried with events 05, 01, 18, 21, but i am unable to fill that column 'C' with default value.
When I clicked on 'New Entries' that value should be filled but no action should be performed.
Is this possible..???
Thanks in advance..
regards,
Chityala.
2014 Feb 06 9:01 AM
Hi Shailaja,
Write a Module in PBO of the entries screen. In that write a code like basing on SY-UCOM or OK_CODE.
IF OK_CODE = <ok_code_of_button>.
LOOP AT SCREEN.
IF SCREEN-NAME = <field_name>.
<field_name> = <def_value>.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Vijay
2014 Feb 06 9:06 AM
Hi Chityala
Can you please tell us whether do you have one step or two step TMG. If it is one step you will have to code it in PBO based on action of first screen else for two step you will have to assign value in PAI of detailed or PBO of second screen. I dont think using event you will be able to achieve it
Please be careful these screen code tends to get overwritten if you regenerate it
Nabheet
2014 Feb 06 7:17 AM
Hi,
I think you may have to write some piece of code for it.
You can write it either in environ ment -> modification->events( after selecting maintanance generator from se11) or
you may have to write the code in the PBO PAI events of the screen of your maint . view.
( environment->modification-> source code)
2014 Feb 06 7:22 AM
Hi shailaja,
Please refer the below link for more details on steps for creating Table Maintanence Generator,
http://musicodez.wordpress.com/2010/09/13/custom-validation-on-table-maintenance-generator-sm30/
Here in this link, for your requirement you can make below changes for the form,
DATA lwa_row TYPE <your table Name>.
LOOP AT total.
clear lwa_row.
if <vim_total_struc> is ASSIGNED.
MOVE-CORRESPONDING <vim_total_struc> to lwa_row. "current row in assigned
endif.
* Action is 'N' for new entries and this makes sure that is applicable only to new entries
if <action> EQ 'N'.
" you can place your code default entry here as lwa_row-row_c = <value>
endif.
ENDLOOP.
2014 Feb 06 7:22 AM
Hi,
In table maintanance generator click on Environment -> Modification -> Events . It will display the list of events after pressing F4 help on column ' T '.Then select the event then implement subroutine based on your requirement.
I think event 21 will satisfy u r requirement.
2014 Feb 06 9:03 AM
Hello Chityala,
Go to TMG, click on Environment --> Modification --> Events
In the events column select event 05 and create a routine (where you can make the column C= XYZ as default).
Regards,
Thanga
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |