Table maintenance generator : EVENTS : please help me
I need to use table maintenance generator to maintain a custom table through a custom transaction.
I am using event BEFORE SAVE (01). It is working fine but small issues.
1)After entering new entries for some fields(KEY FIELDS), when I press save button, remaining fields values to be populated. Seletion statements have written in FORM of the EVENT 01 (BEFORE SAVE).
But the values for remaining fieldsare not populating immediately and but populating when I press BACK (F3). My requirement is with out presssing BACK or F3 , fields to be populated.
(note: SAP internal code..values are coming into TOTAL structure..then I manipulated this internal table)
PLEASE GUIDE ME, WHICH EVENT TO BE USED. importantly, which internal table/structure (like TOTAL we used for this requirement ) to be used for the proposed new EVENT? (Because lot of R&D to be done to find SAP structure)
2) second requirement is: even after entering new entries, if we press ENTER, then also it should behave like SAVE like in the previous requirement. Please help me to find the EVENT and Internal SAP generated structure (like TOTAL we used for this requirement ).
Hi Glen Anthony,
Thanks for replay,
I used foreign key relationship between those 2 internal tables....
I used event 05: When creating a new entry. I want to know the custom logic by which my 2nd Internal table gets automatically updated when i update my 1st Internal table
Thanks Glen.
Similar Messages
-
Table maintenance generator events
Hi,
I have created a table maintenance generator and want to populate sy-uname and sy-datum into two fields during SAVE. So I went to Environment -> Modification -> Events and selected "01" event i.e. "Before saving the data in the database" and entered Form routine as "F_UPDATE_UNAME_UDATE". Then if I go to SM30 transaction it goes to dump.
Could you please tell whether I am missing any point?
Regards,
Balaji Viswanath.Hi,
Pasted it below.
Runtime Error PERFORM_NOT_FOUND
Except. CX_SY_DYN_CALL_ILLEGAL_FORM
Date and Time 01/31/2008 09:26:52
ShrtText
Call (PERFORM) to a non-existent routine.
What happened?
The current program attempted to call an externally defined routine
that does not exist.
Error in ABAP application program.
The current ABAP program "SAPLZTEST321" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
The current ABAP program had to be terminated because the
ABAP processor detected an internal system error.
The current ABAP program "SAPLZTEST321" had to be terminated because the ABAP
processor discovered an invalid system state.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_FORM',
was neither
caught nor passed along using a RAISING clause, in the procedure
"PREPARE_SAVING" "(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
The program "SAPLZTEST321" is meant to execute an external PERFORM,
namely the routine "F_UPDATE_UNAME_UDATE " of the program "SAPLZTEST321 ", but
this routine does not exist.
This may be due to any of the following reasons:
1. One of the programs "SAPLZTEST321" or "SAPLZTEST321 " is currently being
developed.
The name "F_UPDATE_UNAME_UDATE " of the called routine may be incorrect, or
the routine "F_UPDATE_UNAME_UDATE " is not yet implemented in the program
"SAPLZTEST321 ".
2. If the program SAPMSSY1 is involved in the runtime error, one of
the function modules called via RFC is not flagged as remote-capable.
(see Transaction SE37 Goto->Administration->RFC flag)
3. There is an inconsistency in the system. The versions of the
programs "SAPLZTEST321" and "SAPLZTEST321 " do not match.
How to correct the error
- Check that transports to the system are complete.
- Conclude any developments already begun ("SAPLZTEST321" and/or "SAPLZTEST321
- Check routine names
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"PERFORM_NOT_FOUND" CX_SY_DYN_CALL_ILLEGAL_FORMC
"SAPLZTEST321" or "LSVIMF14"
"PREPARE_SAVING"
If you cannot solve the problem yourself and you wish to send
an error message to SAP, include the following documents:
1. A printout of the problem description (short dump)
To obtain this, select in the current display "System->List->
Save->Local File (unconverted)".
2. A suitable printout of the system log
To obtain this, call the system log through transaction SM21.
Limit the time interval to 10 minutes before and 5 minutes
after the short dump. In the display, then select the function
"System->List->Save->Local File (unconverted)". -
Table maintenance generator event
Hi experts,
I have a req. in which I need to create events in the TMG.
I implemented the event in case the user entres some specific values, and the fields user name, time and date are automatically populated.
Now there is another requirement in which once the user changes any already existing enty, then the changed by user name, change date and change time should be updated automatically.
How can I achieve this functionality?
Thanks,
Mohit.The following event can fulfil your requirement :
- [Event 01: Before Saving the Data in the Database|http://help.sap.com/saphelp_470/helpdata/en/91/ca9f0ba9d111d1a5690000e82deaaa/frameset.htm]
- [Event 21: Fill Hidden Fields|http://help.sap.com/saphelp_470/helpdata/en/91/ca9f4aa9d111d1a5690000e82deaaa/frameset.htm]
FORM event01.
DATA: f_index LIKE sy-tabix.
FIELD-SYMBOLS <fs> TYPE ANY.
LOOP AT total.
READ TABLE extract WITH KEY <vim_xtotal_key>.
IF sy-subrc EQ 0.
f_index = sy-tabix.
ELSE.
CLEAR f_index.
ENDIF.
CASE <action>.
WHEN neuer_eintrag.
ASSIGN COMPONENT 'CREATEDBY' OF STRUCTURE total TO <fs>.
WHEN aendern.
ASSIGN COMPONENT 'CHANGEDBY' OF STRUCTURE total TO <fs>.
WHEN OTHERS.
CONTINUE.
ENDCASE.
CHECK <fs> IS ASSIGNED.
<fs> = sy-uname.
MODIFY total.
CHECK f_index GT 0.
extract = total.
MODIFY extract INDEX f_index.
ENDLOOP.
sy-subrc = 0.
ENDFORM.
Regards,
Raymond -
Validating non key fields in table maintenance generator
Hi,
I ma using events for table maintenance generator event 05 ,there i want to validate non key fields ......i am throwing error message ....all the non key fields are getting in display mode ...i need them to enable to enter values ....
please suggest
Thanks,
Shailaja Ainala.Hi Shailaja,
Its property of error message, which makes it as non-editable.
You can display either status or info message after validation check.
And finally before saving (before save event) display error message, so that it invalid entries doesnt get saved.
Thanks,
Nisha Vengal. -
Include a field in the table maintenance generator
Hi All,
There is a Z table with MATNR and another numeric field and the table maintenance generator exists for the table. The requirement is to include another field for MAKTX ( Material description) in the table maintenance generator with input disabled. Is it possible to do the same in the table maintenance generator else please suggest me the best solution.
Thanks in Advance.Hi Srinivasa,
This is quite simple, first add the field MAKTX into the Table and activate it .
Now again generate the Table maintainence for the table.
from Table maintainence generator go to the main program
there click the screen maintained for Table maintainence generator .
in the Pbo of the screen write the following code.
assume table name is table1.
Loop at screen.
if screen-name = table1-maktx.
screen-input = '0'.
modify screen.
endif.
endloop.
this will automatically disable the material description field in the Table Maintainence Generator.
This is will solve your problem
Regards,
Madhavi -
New field not reflecting in Table maintenance generator
Hi Experts,
I have added a new field in a ztable.I regenerated the table maintenance generator,so that the new field is reflecting in devlopment system , also a TR got created.When i moved this TR to pre-production system new fields are reflecting in the structure of table but not in table maintenance generator.
Please suggest solutions.
Regards,
NiranjanHi Experts ,
I have gone through the steps which is mentioned.But still issue is pending,the changes in TR are not reflecting in pre prod.
Error after moving the TR with "Definition of a Maintenance and Transport Object".
The current ABAP program "SAPLSVIM" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "SAPLZFGL " in include "LZFGL$03
" in
line 13:
"Field "ZCHAR_FIXED_WIDTH" is unknown. It is neither in one of the spec"
"ified tables nor defined by a "DATA" statement. ." -
Can you please help me with validation logic for Events in Table maintenance generator
Can you please help me with validation logic for Events in Table maintenance generator,i.e if i enter record in 1st internal table then automatically 2nd internal table should be updated.
Hi Glen Anthony,
Thanks for replay,
I used foreign key relationship between those 2 internal tables....
I used event 05: When creating a new entry. I want to know the custom logic by which my 2nd Internal table gets automatically updated when i update my 1st Internal table
Thanks Glen. -
Events in table maintenance generator 01
Hi all,
I have an urgent requirement regarding the events in table maintenance generator.The requirement is i have a qty field in table i want to change the existing value it should allow only a lesser value.How to use TOTAL and EXTRACT structures.
it is urgent.please help me out.
Thanks & regards,
KranthiFollow the example below:
form get_vendor_name.
data w_extract type z_table.
data begin of w_total.
include structure z_table.
data: action,
mark,
end of w_total.
loop at extract into w_extract.
check not w_extract-z_vend_no is initial.
select single name1 from lfa1
into w_extract-z_vend_name
where lifnr = w_extract-z_vend_no.
modify extract from w_extract.
endloop.
loop at total into w_total.
check not w_total-z_vend_no is initial.
select single name1 from lfa1
into w_total-z_vend_name
where lifnr eq w_total-z_vend_no.
modify total from w_total.
endloop.
endform.
Reward points if useful.
Regards. -
Event code in table maintenance generator
Hi All, Need to call event in Table maintenance generator of the z table. I have to use 1st event (Select ’01’ – Before saving data in the database). Need to do fallowing job: Table cleaning : Delete all records with value year =< 2011 -New rule : No save can be done with value (Pst Var, PA,PSA, Cost = ‘ *,*,*,*’). I am attaching table entry with this mail, I have written the code for this but not sure please suggest me modification if required for this.Because i have never done this before. Thanks and Regards Sankil
hi Sankil
Some variable is not available in your code and you did not modify EXTRACT table.
Try to modify your code as blow:
This event has no standard routine. The following global data is available for the realization of the user routine:
•internal table TOTAL
•field symbols
•field symbols <ACTION> and <ACTION_TEXT>
•<STATUS>-UPD_FLAG
If internal table data are to be changed before saving, t he changes should be made in both the internal table
TOTAL and in the internal table EXTRACT.
FORM abc.
DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
LOOP AT TOTAL.
IF <ACTION> = desired constant.
READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
ELSE.
CLEAR F_INDX.
ENDIF.
(make desired changes to the line TOTAL)
MODIFY TOTAL.
CHECK F_INDX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDX.
ENDIF.
ENDLOOP.
SY-SUBRC = 0.
ENDFORM
refer event 01: http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
regards,
Archer -
EVENTS in table maintenance Generator
Hi, can u people help me while using EVENTS in Table Maintenance Generator. Means how can I perform different task using events.
Hi,
Using events in table maintenace generator, you can validate the fields, update the fields etc..There are events(01-New Entry), (02-Before Save); (03-After Save) etc... The respective events trigger on the action performed.
To create events : Goto table maintenace generator screen->Enviorement->Modifications->Events.
Select the from the list of events and peform based on ur requirement
Regards
Shiva -
EVENT problem in Table maintenance generator
Hello all
I m working on 4.6C sytem. I m facing 2 problems in events in table maintenance generator
(1) I am using 04 event (After deleting records from table) I have written BREAK-POINT in the Form .....ENDFORM... But the control doesnt stop there , when i select an existing record and press delete record button? not able to understand this
(2) When i implement even t 03( Before deleting records from table) , and select an existing record and press delete record button . Control successfully Go to corresponding FORM ... BREAK-POINT ENDFORM .
But now the problem is.. in debuggin i can see the contents in TOTAL table but when i try to code LOOP at TOTAL ..ENDLOOP...it gives me syntax error saying " table TOTAL doesnot exists or not defined..but similar field TOTAL_S , TOTAL_M , TOTAL_L exists.. ???
how come i can see the same during debugging but cannot code it ?
Plese help
NileshHi Nilesh,
(1) I think the control will stop there after you delete AND save. Not sure about that but give it a try.
(2) I believe you are trying to access fields inside table TOTAL, is that right?
Actually you have to declare a work area with your Z table type.
DATA: w_workarea type ztable.
LOOP at total.
w_workarea = total.
endoop.
Then you can work with w_workarea.
Best regards. -
Help required on table maintenance generator
Hi all,
Would any one tell me what is the difference between one step and two step while creating a table maintenace generator for a table.
one more question is i would like to know which search the following code follows while it is executed.
select single vbeln
from vbak into l_vbeln
where vbeln in s_vbeln.
and
select vbeln
from vbak
into l_vbeln
up to 1 rows
where vbeln in s_vbeln.
please do reply soon for the questions.Hi
table maintanance Generator is used to manually
input values using transaction sm30
follow below steps
1) go to se11 check table maintanance check box under
attributes tab
2) utilities-table maintanance Generator->
create function group and assign it under
function group input box.
also assign authorization group default &NC& .
3)
select standard recording routine radio in table
table mainitainence generator to move table
contents to quality and production by assigning
it to request.
4) select maintaience type as single step.
5) maintainence screen as system generated numbers
this dialog box appears when you click on create
button
6) save and activate table
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
/message/2831202#2831202 [original link is broken]
One step, two step in Table Maintenance Generator
Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
Difference Between Select Single and Select UpTo One Rows
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
The best way to find out is through sql trace or runtime analysis.
Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
Mainly: to check if entries exist.
Reward points for useful Answers
Regards
Anji -
Need help !- Table maintenance generator
Dear Experts,
I have created a custom table and all created a table maintenance generator for that. How do I make sure I am able to maintain the table using SM30 in the other clients of the system?
I created the table in client 125 and now need to insert records in110 for testing. But when I click on maintain button in SM30, I get a pop up which says "Client 110 has status 'not modifiable'"
Weird thing is all the other custom tables can be modifed and I also tried comparing the properties of my table with those and they are all exactly the same. Kindly help!!
Regards
VeenaHi Veena,
While generating the table maintenance generator, Please check what radio button you choose for recording routine. I think you have selected 'Standard recording routine'. Change it to 'no, or user, recording routine' . Then this error will go away.
Hope this helps
Thanks
Romit -
Event 03 in table maintenance generator
Hello All,
I have created a event 03 in table maintenance generator. Because I need to check if the deleted key is still referenced in an other table.
I tried the following code, but only if I use the message the entry will not be deleted.
MOVE uebergehen TO <mark>.
MODIFY total INDEX sy-tabix.
<xmark> = <mark>.
MODIFY extract INDEX nextline.
IGNORED_ENTRIES_EXIST = abap_true.
* MESSAGE e000 WITH 'Entry not allowed to delete'.
Thanks in advance.
Marcushad to put it in a generic form, hope it still works:
FORM event_03.
TYPES: BEGIN OF typ_extract,
zview TYPE zview, "or ztable, the one with the maintenance dialog!
flags TYPE vimtbflags,
END OF typ_extract.
DATA: ls_extract TYPE typ_extract.
* loop at marked lines
LOOP AT extract INTO ls_extract.
CHECK ls_extract-flags-vim_mark EQ 'M'.
* place existence check here!
* using the values in ls_extract-zview-...
* if value still being used, send message
IF sy-dbcnt > 0.
MESSAGE i...
ls_extract-flags-vim_mark = '*'.
MODIFY extract FROM ls_extract.
ENDIF.
ENDLOOP.
ENDFORM. -
Event for input validation in custom table (table maintenance generator)
Hello all,
I look for a solution to execute an event after the modification of a table field of a custom table to validate the user's input.
I already tried event 07 (Execution : Before correcting the contents of a selected field) of the table maintenance generator but it will be executed after some modification made by the Edit -> Change field action.
I could use the event 01 but in my opinion this event happens to late and errors are very uncomfortable for the user at that time.
Editing the dynpro events is not a solution for me because it should be easy to maintain the table structure at any time.
Thank you in advance
RobertThank you!
Event 08 just starts after the saving process after Event 07.
Event 18 gets executed when I click on the save button.
I want to check the data after the enter button was pressed as you can see it in several transactions.
Maybe you are looking for
-
Statement vs PreparedStatements which is better in which situation
Hi i read in a few forums and a few articles that PreparedStatement object performs better than the Statement object in situations where a high number of the same sqls are used because it precompiles the sql statement. such as inserting a 1000 employ
-
Calendar attachments will not "preview"
Since upgrading to Mavericks, my attachments to the calendar come up "You do not have permission..." when I try to preview a picture that was alredy attached to an entry before upgrading. Deleting the attachment and re-adding it only results in "Pre
-
I am running Windows 7 Ultimate and whenever I try to view a PDF either online or downloaded I get a more or less "blank" document with some random formatting lines in it. I have tried Reader's 11, 10 and finally 9 to the same result. I don't have an
-
[BO XI 3.0] - Strange behavior regarding language settings
Hello, I found strange behavior BOE in infoview portal. We have Desktop intelligence documents published in repository and when we open report (first time) in infoview we have right format for date and numbers e.g. dd.mm.yyyy, 123.123,00. When we cl
-
Running IE but with a html page of mine instead of default
HI - I would like to know a better way to load up my html page using java. So far my execute statement is: Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\IExplorer.exe" + "My Page.html"); If I don't include My Page.html IE will load