Changing data in events in Table Maintenance generator
Hi,
My requirement is to default two fields while changing a row..
I tried using event 01, 02 and 03...
I used the below code..
ZYREN-userid = sy-uname.
zyren-lupdate = 0.
Please help me in solving this..
Thanks
I have done this recently using event 01. Code is as follows, but I don't think that is the ideal way of doing things, but it works in my case. You have to figure out how to define the structure in your case. You can do that by placing a break-point in the subroutine and checking how the internal table TOTAL looks. Then define your structure just like that.
form populate_created_date.
data: begin of rec_data,
sfa_id type /bic/oizucsiebel,
date type erdat,
dummy(2),
end of rec_data.
loop at total into rec_data.
rec_data-date = sy-datum.
modify total from rec_data.
endloop.
endform. "POPULATE_CREATED_DATE
Similar Messages
-
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. -
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 -
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. -
How to create event in table maintenance generator
Hi guys,
I need to create an event for my table maintenace generator such that when the field land1 is filled, the landx field should take its data from t005t table. and the ladnx field should be display only, it can not be modified in table maintenance.
How can i create an event in table maint. gen? How am i going to do it?
thanks always,
markHi,
As mentioned in the last post go to the event screen by
Environment --> Modifications --> Events.
There you click on new entries and try writing your logic for event 21 i.e. after selecting 21 give some name of your event and write down the logic how you want to do this.
If event number 21 does not work then try 1. One of these two should work.
Hope this helps!!!
Regards,
Lalit -
Event in Table maintenance generator
Hi,
We are using the event in the table maintainenace to validate the data entred by the user.
In one of the scenarios when user does enter anything and press enter , an error message should come.
I have created a form on event 01-before saving the data into database.
But this form is not getting called .in which event should io code this.
Regards
SohitHi Sohit,
It must work. you keep a break point and check. I had used the same same thing in one of my object.
the logic would be to
LOOP AT TOTAL.
Now check the record of TOTAL which you want to check by using offset like TOTAL+0(4) i.e. the first four characters of the total which is for the first field and by taking it do the validation by checking teh database or whatever if fails raise the error message.
ENDLOOP.
If you have any doubt write back i'll help you.
<b>Kindly reward points if it helps.</b>
Thanks and Regards
Tanweer zaki -
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 -
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. -
Field validation in table maintenance generator and input value grey out.
i have created ztable with 3 fields as em_no,em_no and addrnumber.
first two fields are custom fields but the third custom field need to validate the standard table adrc contains the value of the field addrnumber.
i need the query of field validation query which we write in create entry events in table maintenance generator and also if we give wrong value for addrnumber in sm30 maintain table, the input field need not to be grey out for next entry...
please help.Hi,
create method -
>before saving data.....write the logic between the method
go to utilities->table maintanance ,,,after creating generator ---go to envirnment->modification->events.
create event -.>.as zsave select event type 1(before saving data to table) write code in include....
consider data for field3 is 10 .
lv_new = ztbr(table name)-field3.
select field3 from ADRC(ZTABLE) into wa_new (TYPE ZTABLE) where field3 = lv_new.
if sy-subrc = 0.
working fine
else.
message i888(sabapdocu) with 'data invalid'.
endform.
This will help u...
Thank u......... -
Get value of Table data in Event of Table maintaince generaor
Hi Expert,
I want content of table in event of table maintenance generator (Event 01 - Before Saving Data in Database).
can you please tell me that how can i achieve this value of whole table in this event.
Regards,
Chintan ShahHi ,
Try this..
In event 01
MESSAGE 'Dulicate Record Exist' TYPE 'S' display like 'E'.
*--->It will stop save functionality
vim_abort_saving = 'X' . -
Regarding table maintenance generator
hi
i have one scenario . supppose there are 4 fields in a table. user enters data into it using table maintenance generator. he enters data only for 2 fields remaining 2 fields should get populated automatically.
is it possible?Go to SE11->Table Maintenance generator -> Environment->Modification-> Events
Here you can define events and the form routines that will be invoked on that particular event.
Say for example you want to populate details for the user who created the records, define the form FRM_CR_DATE (any form routine name) for populating the Create Details using event 05.
Event 05 is fired for "Creating a new entry".
Click on the EDITOR Button and write the following code for saving the user details while creating a new record.
* FORM FRM_CR_DATE *
form frm_cr_date .
ztablename-created_by = sy-uname .
ztablename-created_on = sy-datum .
ztablename-create_time = sy-uzeit.
endform .
The current username, system date and time will be moved to the table work area for each record created. -
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. -
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. -
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. -
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)".
Maybe you are looking for
-
Restoring Files from TIme Machine
Hi all, I've been a MAC user for the last 3 years. Few months ago I got my 15" i5 Macbook Pro. Recently, I experienced Kernel Panics on a daily basis. I made an appointment with a Genius and they guy concluded that I had some software problem. So, he
-
Down payment (B/S account) assign to IO
Dear Experts, We've created an IO, and assign budget $ 1,445,000 to the IO. In F-43, we created the following entry. Dr. down payment (vendor)--- $ 1,440,000 (B/S account) assign to IO Cr. AP (vendor)*--- $ 1,440,000 For system instruction, if we wa
-
How to design a dvd label in illustrator and export as interactive
hello! I need to design a dvd label for a client and they want to be able to make edits to it after I design it. Is there a way I can design it in illustrator.. save as an interactive pdf and then they can edit it with acrobat? I know with acrobat y
-
Question mark when mac turns on7
I am getting the flashing question mark box when switching my mac on. Pressing C no longer seems to work but Ican press cmnd and R but not sure of what to do from here.
-
How can i order more copies of a iPhoto book using only the order number
how can i order more copies of an iPhoto book I made by using only the order number as I deleted by mistake a copy of it on my iphoto