Problem in updating entries in Table Maintenance of custom table
Hi Gurus,
Need help. When I update existing entries in the table maintenance generator, they do not get updated after save. Is there a setting in data dictionary that causes this?
Just noticed that the field that I'm trying to update is a KEY FIELD.
Usually, when a table maintenance is generated, key field columns are set to uneditable. But for apparent reason, previous programers set it as editable. Is there a way to edit the Key fields?
Similar Messages
-
Table type not defined for table control "T_CONTROL" (Custom table)
Hi All,
I m facing a problem in ITS mobile service.
The Table control designed by me in R/3 (Module pool program) is
not getting displayed in ITS mobile page.
It is giving me an error "Table type not defined for table control "T_CONTROL" (Custom table) ".
Can you please let me how this issue can be resolved.
With Regards,
MaheshCONTROLS: table_ctr TYPE TABLEVIEW USING SCREEN '0010'.
try using this....
Regards
Vasu -
Lock Objects Problem while updating entries in custom table
Hi Friends,
Iam updating a custom table ztable from internal table entries.
ie : Modify ZTABLE from table ITAB.
Now the entries are updating and inserting perfectly..
But my problem is i need to use lock objects before doing this..
I have created a lock obect EZTABLE with all th ekey fields of the table.. ie : it has 2 key fields
item & matnr .
Now how to use lock objects here.. do i need to loop the internal table and use enque & deque function module each and every time in loop or use it out side the loop..
Can any one explain me this..
Regards,
Kumarhi kumar,
**check if the equipment is already locked by user, if yes, trigger a mail
CALL FUNCTION 'ENQUEUE_EIEQUI'
EXPORTING
MODE_EQUI = 'E'
MANDT = SY-MANDT
equnr = lv_equi_temp
X_EQUNR = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
lv_subrc1 = sy-subrc.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CALL FUNCTION 'DEQUEUE_EIEQUI'
EXPORTING
MODE_EQUI = 'E'
MANDT = SY-MANDT
equnr = lv_equi_temp
X_EQUNR = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
ENDIF.
try like this to check if the object is locked....
u can also use
call function 'ENQUEUE,.
do the needful changes update the database then commit work
then call function 'DEQUEUE'
hope this helps,
tanmaya -
Problem on "This entry already exists in the following table (OCFT)"?
I add an Journal Entry with DI API in an addon solution, and insert the cash flow table OCFT with the sql automatically if the Journal Entry need the cash flow information. But when I add a new Journal Entry manually, the system show an error mesage "This entry already exists in the following table (OCFT)".
I think it should be the serial number conflict.However, the serial number relate the OCFT can not be found in the table ONNM?
Could you help to resolve the problem?Unfortunately in Business one it is not always just the obvious tables are affected, there are history tables and numbering to consider - my concern is this line
insert the cash flow table OCFT with the sql automatically if the Journal Entry need the cash flow information.
Looks like you might have already done some inserts and this has messed up your numbering. Try running the restore numbering - Help -> Support Desk -> Restore -> Restore Numbering File.
Manual database updates on system tables are not supported as they lead to database corruption! -
How to validate data entered in table maintenance for Z table?
Hi,
I created a Z-table with table maintenance. I'd like to perform some validation on the entered data.
I know there are events for these : "If this pre-defined time is reached in extended table maintenance, the FORM routine specified for the current view and for this time is processed. This is useful, for example, for performing consistency checks before saving or specific actions when creating new entries."
I also found some info in the Online help:
http://help.sap.com/saphelp_47x200/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
However it's not clear which event I can use for validation.
I tried event 01, however when I added a message, in the SM30 in case of message, I got the SM30 initial screen.
Do you have any example about validation?
Thanks in advance,
PeterHi,
Once you are on the table maintenance generator screen.
GOTO --> Enviornment --> Modification --> Events.
Here specify Event as '01' and the Subroutine name that will hold the data for the validation.
As you know we need to specify a function group.
GOTO SE80 and Open your function group.
Now in the PBO of the screen write a subroutine for the validation before saving an entry in the table.
Refer the code below for validation.
*& Form F9000_CHECK_BEFORE_SAVE
Subroutine called dynamically to check values before saving
FORM f9000_check_before_save.
TYPES : BEGIN OF ty_flmt,
zz_flmt_type TYPE zz_flmt_type,
zz_gsm_flmt_code TYPE zz_flmt_code,
END OF ty_flmt.
Internal Table
DATA : lit_flmt_code TYPE TABLE OF ty_flmt,
wa_flmt_code LIKE LINE OF lit_flmt_code.
DATA: lv_subrc TYPE sy-subrc VALUE '0',
lv_tabix TYPE sy-tabix,
lv_total_rec TYPE i,
lv_rec TYPE i,
flg_upd TYPE flag.
DESCRIBE TABLE total LINES lv_total_rec.
LOOP AT total.
lv_tabix = sy-tabix.
READ TABLE extract WITH KEY total.
IF sy-subrc EQ 0.
IF extract+3(10) IS INITIAL.
DELETE total.
DELETE extract INDEX sy-tabix.
DELETE extract INDEX lv_tabix.
lv_subrc = '4'.
flg_upd = 'X'.
MESSAGE s119(zcrm_appl) DISPLAY LIKE 'S'.
SET SCREEN 0.
ENDIF.
ENDIF.
wa_flmt_code-zz_flmt_type = total+13(3).
wa_flmt_code-zz_gsm_flmt_code = total+16(10).
APPEND wa_flmt_code TO lit_flmt_code.
ENDLOOP.
IF flg_upd IS INITIAL.
SORT lit_flmt_code BY zz_flmt_type zz_gsm_flmt_code.
DELETE ADJACENT DUPLICATES FROM lit_flmt_code.
DESCRIBE TABLE lit_flmt_code LINES lv_rec.
IF lv_total_rec <> lv_rec.
LOOP AT extract.
READ TABLE total WITH KEY extract.
IF sy-subrc EQ 0.
DELETE total INDEX sy-tabix.
DELETE extract INDEX 1.
lv_subrc = '4'.
MESSAGE s289(zcrm_appl) DISPLAY LIKE 'S'.
SET SCREEN 0.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
sy-subrc = lv_subrc.
ENDFORM.
<b>Please reward points and close the thread.</b>
Regards,
Amit Mishra -
Assign Table Maintenance to custom tran
Hi Experts,
I created table maintenance and assigned to ztransaction using se93.
in which selected parameter transaction.
but when i am execting ztransaction giving error.
could you explain how to assign table maiantenace to ztran.
Thanks,Hi,
GOTO SE93. Enter the transaction code and press create button. Choose the button "Transaction with parameters".
In the transaction give SM30, check skip the initial screen button.
Then in the screen fields enter the following values.
Name of the screen field value
VIEWNAME ZTABLE
UPDATE X
Thanks,
Naren -
I\
Moderator message : Search for available information, discussion locked.
Message was edited by: Vinod KumarHi,
You need to create table events to do so.
Refer blog
http://wiki.sdn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS -
Need a table which all custom tables used in the program
HI to all experts.
I need a table which contains all the custom table used in the program . Or any other method which can accomplish this.hi max,
thanks for u r reply . if we use the statement tables in the report and write some tables
for example: tables: zf020
zf023
is there any table which stores this . -
Problem to update VBAP-ERLRE field in a standard table----Its urgent
Hi friends,
ERLRE: Completion Rule
I need to create custom utility program to update ERLRE field(already it was set with B for thos specific orders,i need to upadte with null value for those) in production for specific orders.I checked FM: sd_salesdocument_change, but ITEM_IN STRUCTURE BAPISDITM ,ITEM_INX STRUCTURE BAPISDITMX OPTIONAL
those two structures not contain ERLRE field. Only ITEMS_EX STRUCTURE BAPISDIT OPTIONAL contain ERLRE field.
It does not have any x structure corresponding it.
Please help me how to update that field? Is there any other solution for that?
Thanks,
MonicaHi Rob,
I am doing the same way what you told, but its not updation data in table. Can you please check my code what i had done.
DATA: header_in LIKE bapisdhd1,
header_in_x LIKE bapisdhd1x,
item_in LIKE bapisditm OCCURS 0 WITH HEADER LINE,
item_in_x LIKE bapisditmx OCCURS 0 WITH HEADER LINE,
return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
ITEMS_EX LIKE BAPISDIT OCCURS 0 with header line.
DATA: rec_ok TYPE char1.
DATA: t_vbak LIKE vbak OCCURS 0 WITH HEADER LINE.
DATA: t_vbap LIKE vbap OCCURS 0 WITH HEADER LINE.
DATA: icnt TYPE i,
gcnt(1) TYPE c,
g_ordertype LIKE vbak-auart,
c_zso(3) TYPE c VALUE 'ZSO'. " sales order type
SELECT vbeln FROM vbak INTO corresponding fields of TABLE t_vbak
WHERE vbeln = '0090000141'.
CHECK sy-subrc = 0.
LOOP AT t_vbak.
Ini structures
CLEAR header_in.
CLEAR header_in_x.
Ini tables
CLEAR item_in.
REFRESH item_in.
CLEAR item_in_x.
REFRESH item_in_x.
CLEAR items_ex.
REFRESH items_ex.
CLEAR return.
REFRESH return.
SELECT vbeln posnr INTO CORRESPONDING FIELDS OF TABLE t_vbap
FROM vbap
WHERE vbeln = t_vbak-vbeln AND posnr = '000100'.
CHECK sy-subrc = 0.
Set header data
header_in_x-updateflag = 'U'.
Set line item data
LOOP AT t_vbap WHERE vbeln = t_vbak-vbeln.
items_ex-operation = '005'.
items_ex-doc_number = t_vbap-vbeln.
items_ex-itm_number = t_vbap-posnr.
items_ex-updat_flag = 'X'.
items_ex-end_rule = 'C'.
APPEND items_ex.
CLEAR items_ex.
ENDLOOP.
Disable dialog
CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
Run BAPI
CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE'
EXPORTING
salesdocument = t_vbak-vbeln
order_header_in = header_in
order_header_inx = header_in_x
behave_when_error = 'P'
call_from_bapi = 'X'
TABLES
return = return
item_in = item_in
item_inx = item_in_x
items_ex = items_ex.
Check for errors
IF sy-subrc = 0.
LOOP AT return.
IF return-type = 'E'.
rec_ok = 'N'.
EXIT.
ENDIF.
IF return-type = 'S'.
write:/ 'success'.
ENDIF.
ENDLOOP.
IF rec_ok = 'N'.
ROLLBACK WORK.
ELSE.
COMMIT WORK AND WAIT.
WRITE:/ 'Success_flag?'.
ENDIF.
ENDIF.
ENDLOOP. -
CM25: Sort standard table based on custom table.
Hi Experts,
I need to sort the CM25 capacity table based on a ZTABLE where we will define the sequence number of each material. So when CM25 is executed the material should get sorted based on sequence number maintained in Ztable. Now the challenge is how to achieve this sorting before we display the capacity table.
anybody has faced such scenerio please help us.
There are few user exits available but not able to find out how to achieve the required functionality.
Regards,
Raghav
Edited by: Julius Bussche on Jul 30, 2009 9:29 AM
In future threads with meaningless subject titles will simply be deleted as you appear to be doing this intentionallyFirst, let me say that I have no experience with this CM25 table and where/how it is used or displayed, but here's how I look at it:
But what is the real problem?
1. Don't know the user exit / BAdI to be used?
2. Don't know how to do the sorting?
3. .....?
Answer:
1. This will be a matter of trying I would say and reading the documentation of the exit/BAdI.
2. You can do dynamic sorting of an internal table (if it is an internal table that is used before displaying it).
DATA: lv_sort1 TYPE CHAR10 VALUE 'NAME_OF_COLUMN_FROM_ZTABLE',
lv_sort2 TYPE CHAR10 VALUE 'NAME_OF_OTHER_COLUMN_FROM_ZTABLE'.
SORT itab BY (lv_sort1) ASCENDING (lv_sort2) DESCENDING.
Edited by: Micky Oestreich on Jul 30, 2009 7:34 AM -
Table maintenance generator is not saving entries.
Hi All,
I am facing problem in table maintenance generator.
I created a table maintenance for Z-Table.
In my table last 2 fields are a checkbox.
When we go to Sm30 and check/uncheck the boxes then save , message comes tht data saved , but when we come out and go back to maintenance generator , it's not saved.
while table maintenance in 2 step , then on detail screen it is working perfectly but on primary screen it's not.
when TM is single step , it's show entries saved but not saving in data.
I tried to delete and regenerate table maintenance but still not working .
Please guide me to ractify this.
Thanks in advance,
Ashish GautamHello Friend,
Check with th etechnical settings of the ztable:
see if your buffereing is allowed, and log data chnages is checked.
If so :
Then select buffereing is not allowed and uncheck the Log Data Changes:
Also go to TMG:
Check if standard recording routine is selected, then select the no, or user recording routine.
After making these changes, delete the TMG and create a new one once again. You can check it will work fine now.
Thanks and regards,
Uttam Agrawal
[http://uttambpt.blogspot.com|http://uttambpt.blogspot.com]
Edited by: uttamagrawal on Jan 31, 2011 12:42 PM -
Hi,
There are two ways to maintain Data records in a table :
1. By program : using insert/delete/modify or update statement.
2. By table maintenance
What is the advantage or disadvantage of one process to another.
Thanks & Regards,
Abhishek SarkarHi,
Table maintenance is used to maintain data in the tables created (ZTABLE)
Generally for inserting new records into custom table thru transaction SM30, we need to enter all the values manually and save the record.
When certain data for the key fields needs to be populated automatically while creating entries, the steps involved are:
Maintaining the subroutine in view V_TVIMF for a particular custom table.
Logic for extracting relevant data for the fields entered, when user press enter button.
Check this blog for more information on extracting data in table maintenance.
/people/sudheer.cheedella/blog/2006/02/20/extracting-data-in-table-maintenance
With the help of the table maintenance generator, you are able to maintain the ENTRIES of the table in SM30 transaction.
It can be set in transaction SE11 - Tools - Table maintenance generator.
Table maintenance Generator is used to manually input values using transaction sm30
follow below steps
1) go to se11 check table maintenance check box under attributes tab
2) utilities-table maintenance 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 maintenance generator to move table
contents to quality and production by assigning it to request.
4) Select maintenance type as single step.
5) maintenance screen as system generated numbers this dialog box appears when you click on create button
6) save and activate table
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.
SM30 is used for table maintenance(addition or deletion of records),
For all the tables in SE11 for which Table maintenance is selected , they can be maintained in SM30
Sm30 is used to maintain the table ,i.e. to delete ,insert or modify the field values and all..
It creates the maintenance screen for u for the particular table as the maintenance is not allowed for the table..
In the SE11 delivery and maintenance tab, keep the maintenance allowed..
Then come to the SM30 and then enter the table name and press maintain..,
Give the authorization group if necessary and give the function group and then select maintenance type as one step and give the screen numbers as system specified..
Then create,,,
Then u will able to see the maintenance view for the table in which u can able to insert and delete the table values...
We use SM30 transaction for entering values into any DB table.
First we create a table in SE11 and create the table maintenance generator for that Table using (utilities-> table maintenance generator) and create it.
Then it will create a View.
After that from SM30, enter the table name and Maintain, create new entries, change the existing entries for that table.
check these links --
http://help.sap.com//saphelp_470/helpdata/EN/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
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]
Re: Regarding Table Mainantance Generator
Re: table maintenance
table maintenance generator
Re: Table maintenance generator
Regards
Sudheer -
hi friends...
i am posting fico document using bapi BAPI_ACC_GL_POSTING_POST.
after that i am updating the document number to my custom table.
but in some cases while updating the document in my custom table i am getting the fallowing dump..
in ST22
How to correct the error:
Database error text........: "[1205] Transaction (Process ID 66) was deadlocked
on lock resources with another process and has been chosen as the deadlock
victim. Rerun the transaction."
Internal call code.........: "[RSQL/UPDT/ZIF004_PKT ]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
"ZFI_01_MONTHLY_RESULT_FRM_PKT" or "ZFI_01_MONTHLY_RESULT_FRM_PKT"
"UPLOAD_SAP"
Source Code Extract
LOOP AT i_zif004_pkt_sum .
UPDATE zif004_pkt SET xblnr = i_zif004_pkt_sum-xblnr ---> i am getting DUMP here
gjahr = i_zif004_pkt_sum-gjahr
sap_flag_posting = i_zif004_pkt_sum-sap_flag_posting
WHERE compcode = i_zif004_pkt_sum-compcode
AND ccode = i_zif004_pkt_sum-ccode
AND wbselement = i_zif004_pkt_sum-wbselement
AND kostl = i_zif004_pkt_sum-kostl
AND code = i_zif004_pkt_sum-code
AND month1 = l_ltx
AND year1 = p_year.
IF sy-subrc = 0.
WRITE :/ 'Document ', i_zif004_pkt_sum-xblnr, 'is posted for ', i_zif004_pkt_sum-code.
ENDIF.
ENDLOOP.
kindly give some inputs..
regards
SelvaHi,
You will face this issue if your oracle data base is lack of work processes. try to check the work processes and increase them if possible with the helps basis guys.
check the below thread.
DI job failed ORA-12537: TNS:connection closed.
Regards,
Venkatesh -
Dynamic Column Names - Table Maintenance - SM31
Hey Everyone - I hope you are all having a good day )
Basically I have a custom Z table containing a number of different fields. I have created table maintenance for this table so it can be updated via SM31. This table is a generic mapping table that will be used for all mappings.
What I want to do is change the name of the columns based on x criteria when maintained in SM31. So for example.
The user chooses to edit line one, through SM31- for Company Code 123 - at this point I want to change the name of Columns 1 through 5 to relevant names for that Company Code. e.g A, B, C, D, E respectively. If the User chooses Company Code 567 then the names of Columns 1 through 5 will be something else. e.g. F, G, H, I, J respectively.
In the PBO of the overview screen I have implemented code to process this behaviour. From here I can hide fields etc etc. However I dont know where to change the actual Columns names to what I want them to be - i.e overwrite the Field Name coming in from the data element.
I would be very appreciative if anyone could help out on this. As always, thanks for taking the time to read this and I look forward to hearing from you.
Kind Regards
DamienWhen system generates the Table Maintenance, it creates LABEL (text fields) for the column heading in the table control and we can't control this labels from our program. These Label names are as like
*tablename-fieldname E.g. *ZTEST_TAB-FIELD1
So, you can replace these labels with Input Output Text field.
Make sure you give the same name as respective label's name.
Make these fields as "Output Only".
Now, you would be able to change the value of these fields from the PBO.
Word of caution: These of changes would go away if try to recreate the table maintenance.
Regards,
Naimesh Patel -
Disabling fields in table Maintenance generator
Hi Experts,
I would like to restrict some fields in table maintenance generator dynamically/ statically.
Here is the situation.
I have generated table maintenance for the table ZMARA and I have created three transactions for the above single table maintenance generator.
i.e .. Transaction --- Table
ZT1 --- ZMARA
ZT2 --- ZMARA
ZT3 --- ZMARA
I am using above three transactions in my module pool program. Based on the certain conditions I am calling different transactions i.e ZT1, ZT2, etc
Here is my requirement:
Suppose if I call ZT1 transaction, I need to display only few fields. i.e ZMATNR, ZMTART, ZPRODH.
or remaining fields should disable. User should not allow to change the content, even if it is new entries/existing entries. only ZMATNR, ZMTART, ZPRODH.
Suppose if I call ZT2 transaction, I need to display only few fields. i.e ZMATNR, ZMTART, ZHTSCODE
How can we restrict dynamically when you call table maintenance generator table through transaction
or
How can we generate table maintenance for few fields?
Edited by: r badveli on Mar 16, 2009 4:27 PM
Edited by: r badveli on Mar 16, 2009 4:27 PM
Edited by: r badveli on Mar 16, 2009 4:28 PMHi ,
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
Rj
Maybe you are looking for
-
Compatibility between Oracle 8.1.7 and HP UX 11iV2 (11.23)
Dear, We need to know if Oracle version 8i (8.1.7.4) is compatible with the version of HP UX 11iV2 (11.23) installed on a HP superdome. This is quite urgent because we replace the server where the DB runs by another. Is there a document with the comp
-
Hello, I am attempting to code a form to allow the user to select a file on their client machine to upload to the application server. I would like to provide a browsing mechanism for the user along the lines of that available with the WIN_API package
-
Script to insert an existing Rich symbol throws error
I have an existing Rich Symbol called RSymbol. Now I write a script to place RSymbol into a certain layer which create. The problem is, that everytime i import a symbol like this with fw.getDocumentDOM().importFile(fw.appSymbolLibrariesDir+"RSymbol.g
-
What is the typical structure of an ABAP program?
-
I am trying to modify the display method in a custom window super class. Within my application, the user should be able to hit the F3 key to exit. I have coded it in a display method on a particular window and it works. However, when I attempt to mov