12-14-2009 11:29 AM
Hi All,
Is there any event which trigger with the hit of ENTER key in table maintenance generator.
I know the before_save and after_save events. But with these events I am not able to put check on wrong entry.
Input will be highly appreciated.
Regards,
Seema Naharia
12-14-2009 11:36 AM
You can give a try using "After checking whether the data has changed" Event 18 (I have never tried )
Nag
12-14-2022 10:20 AM
12-14-2009 12:09 PM
hello,
You please try to use 01 event which is Before saving the data in databse, I have also used For updating material value when pressed Enter.
Regards
Shelly Malik
12-14-2009 12:18 PM
Hi Shelly,
I have used this event but it is getting trigeered on pressing any button. eg. after giving view/cluster name in se54 when we press test, then this event is getting triggered.
Can you pls explain your point.
And also there are different evenst in se54 and events of maintenance generator in se11.
Regards,
Seema Naharia
12-14-2009 12:40 PM
Hi seema,
originally you asked for table maintenance generator; SE54 is view-cluster maintenance whichcan be used to maintain more than one table.
If you identified an event that is triggered on pressing any button, you could check SY-UCOMM to know if it was ENTER.
What about events 05,08 or 18 for table maintenance (SE11) or event CL for view cluster maintenace (SE54)?
Regards,
Clemens
12-14-2009 1:43 PM
Try going thru the below written note and code:
GOTO SM30 - enter the Table/View : __________________.
Press Display.
Then GOTO:
1: system Status -- Double Click on Program (screen): __Double click_____
2: Goto - Display Object List . the hirarchy why displays the tree stucture e.g. screen, subroutines, etc.
3: Click on Screen in the Hierarchy and select the screen to which your table belongs.
And double click on it.
THERE U WILL FIND THE FOLLOWING CODE:
Check line no.:7(in THE BELOW GIVEN CODE)
MODULE CHECK_VKORG. (double click on it after writing)
IN THIS U WILL HAVE TO WRITE YOUR CODE:
FOR EX:
MODULE check_vkorg INPUT.
CLEAR w_vkorg.
SELECT vkorg UP TO 1 ROWS
INTO w_vkorg FROM tvko
WHERE vkorg EQ ztable-vkorg.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e044(zmsd).
ENDIF.
ENDMODULE. " CHECK_VKORG INPUT
So at the ENTER event it will execute the following code, you check the validity of the entry in this code.
LINE NO : 1. process after input.
LINE NO : 2. module liste_exit_command at exit-command.
LINE NO : 3. module liste_before_loop.
LINE NO : 4. loop at extract.
LINE NO : 5. module liste_init_workarea.
LINE NO : 6. chain.
LINE NO : 7. field ztable -vkorg module check_vkorg.
LINE NO : 8. field ztable -matnr module check_matnr.
LINE NO : 9. field ztable -kunnr module check_kunnr.
LINE NO : 10. field ztable -kdgrp module check_kdgrp.
LINE NO : 11. field ztable -l_date.
LINE NO : 12. field ztable -ex_date module check_ex_date.
LINE NO : 13. module set_update_flag on chain-request.
endchain.
field vim_marked module liste_mark_checkbox.
chain.
field ztable -vkorg .
field ztable -matnr .
field ztable -kunnr .
field ztable -kdgrp .
module liste_update_liste.
endchain.
endloop.
12-14-2009 2:04 PM
Thanks Abhijit, but can i change the code in standard program. Its standard one.
Regards,
Seema Naharia
12-15-2009 5:33 AM
you can do it by getting an access key for the table..
or
check the event 01 which triggers before saving the Data, So here you check and do the Validations.
regards,
Abhi