How can I insert, modify and delete entries on my table control?
Hi,
I already have build a table control. Now I want to make manipulations on it. Therefore I have created 3 buttons, insert, modify and delete. But how can I get actions on table control.
This is my code for the internal table:
BEGIN OF its OCCURS 0,
mark TYPE C VALUE ' ',
artikel_nr TYPE ZARTIKEL-ARTIKEL_NR,
artikel_typ TYPE ZARTIKEL-TYPE,
bezeichnung TYPE ZARTIKEL-BEZEICHNUNG,
preis TYPE ZARTIKEL-PREIS,
mwst TYPE ZARTIKEL-MWST,
END OF its.
and this is the code which i wanted to delete a row in my table control:
WHEN 'DELETE'.
LOOP AT its WHERE mark EQ 'X'.
DELETE its WHERE mark = 'X'.
MOVE its TO ZARTIKEL.
ENDLOOP.
ENDCASE.
ENDMODULE:
and my PBO and PAI:
PROCESS BEFORE OUTPUT.
LOOP AT its INTO ZARTIKEL WITH CONTROL ARTIKEL.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE EXIT.
LOOP AT its.
MODULE V1.
ENDLOOP.
MODULE user_command_1060.
But if I now open my table control and mark the line that I wanted to delete, nothing happens, not on my internal table and the data even not deleted on my table ZARTIKEL. Have you an idea what I did wrong??
Hi,
In the attributes of table control take the SELCOL as wa_zekpo-flag
And in the internal table and work area add a field as flag(1) TYPE c
Refer:
At screen logic:-
PROCESS BEFORE OUTPUT.
MODULE status_8002.
LOOP WITH CONTROL po_tab.
MODULE pass_data.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE user_command_8002.
LOOP WITH CONTROL po_tab.
MODULE modify_data.
ENDLOOP.
MODULE function.
In PBO,
MODULE status_8002 OUTPUT.
SET PF-STATUS 'ZTG_SELTB'.
DATA : line_count TYPE i.
DESCRIBE TABLE it_ekpo
LINES line_count.
po_tab-lines = line_count + 5.
ENDMODULE. " STATUS_8002 OUTPUT
*& Module PASS_DATA OUTPUT
MODULE pass_data OUTPUT.
READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
ENDMODULE. " PASS_DATA OUTPUT
In PAI,
*& Module USER_COMMAND_8002 INPUT
MODULE USER_COMMAND_8002 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE TO SCREEN 8001.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_8002 INPUT
*& Module MODIFY_DATA INPUT
MODULE DISPLAY_DATA INPUT.
MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
ENDMODULE. " MODIFY_DATA INPUT
*& Module FUNCTION INPUT
MODULE FUNCTION INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'SELECT'. "<--select all records
LOOP AT IT_EKPO INTO WA_EKPO.
WA_EKPO-FLAG = 'X'.
MODIFY IT_EKPO FROM WA_EKPO.
ENDLOOP.
WHEN 'DESEL'. "<--deselect all records
LOOP AT IT_EKPO INTO WA_EKPO.
WA_EKPO-FLAG = ' '.
MODIFY IT_EKPO FROM WA_EKPO.
ENDLOOP.
WHEN 'DELETE'.
DELETE FROM it_ekpo WHERE flag = 'X'.
ENDCASE.
ENDMODULE. " FUNCTION INPUT
Regards,
Tarun
Similar Messages
-
Insert row and delete row in a table control
Hi Experts,
I am using a table control in module pool programming, How can I Insert row and delete row in a table control?
Thanks in Advance....Santhosh,
Iam using this code..
FORM fcode_delete_row
USING p_tc_name TYPE dynfnam
p_table_name
p_mark_name .
-BEGIN OF LOCAL DATA----
DATA l_table_name LIKE feld-name.
data: p_mark_name type c.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
FIELD-SYMBOLS <table> TYPE STANDARD TABLE.
FIELD-SYMBOLS <wa>.
FIELD-SYMBOLS <mark_field>.
-END OF LOCAL DATA----
ASSIGN (p_tc_name) TO <tc>.
get the table, which belongs to the tc *
CONCATENATE p_table_name '[]' INTO l_table_name. "table body
ASSIGN (l_table_name) TO <table>. "not headerline
delete marked lines *
DESCRIBE TABLE <table> LINES <tc>-lines.
LOOP AT <table> ASSIGNING <wa>.
access to the component 'FLAG' of the table header *
ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
if <MARK_FIELD> = 'X'.
PERFORM f_save_confirmation_9101.
IF gv_answer EQ '1'.
DELETE <table> INDEX syst-tabix.
IF sy-subrc = 0.
<tc>-lines = <tc>-lines - 1.
ENDIF.
ELSE.
ENDIF.
ENDIF.
ENDLOOP.
in this code ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
if <MARK_FIELD> = 'X'.
this code is not working... -
Spry with DW insert, modify and delete behaviors
I posted this question before and didn't get a response. I'm
wondering if there is any documentation available for using Spry
with DW insert, modify and delete behaviors? I'd like to be able to
perform these functions without having to go from list to master to
detail page as in traditional ASP etc. According to Alex July at
Linecraft this is one of "many hidden features" in Spry.
http://www.linecraft.com/b2/index.php?p=28&c=1"LAGooner10" <[email protected]> wrote in
message
news:fk71ad$5c7$[email protected]..
>I posted this question before and didn't get a response.
I'm wondering if
> there is any documentation available for using Spry with
DW insert, modify
> and
> delete behaviors? I'd like to be able to perform these
functions without
> having to go from list to master to detail page as in
traditional ASP etc.
Here you can find an article that covers data update:
http://www.adobe.com/devnet/dreamweaver/articles/edit_data_in_ajax.html
The server-side code is CFML, but the concept is the same.
A more complete demo, with search, insert, update and delete
is available
here (code only, no article):
http://www.massimocorner.com/spry/dynamic_spry.zip
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com -
a phantom folder with the name of a folder that held photos has appeared in my finders>places list. I can't choose it to delete it. it won't move. It can't be found in a search. How can I choose it and delete it?
Can you drag it off holding down the CMD key?
Do a search for it with EasyFind (try different settings in "Operator")
http://www.devontechnologies.com/products/freeware/ -
How to perform insert, update and delete in a table component
hi all,
i am using a table component in my page. I want to retreive data from multiple tables as well as perform insertion, updation and deletion operation.The changes should be affected in the corresponding tables. can anyone provide a solution for my problem.
Thanks in advance
regards,
prasantThere is a great tutorial for insert, update and delete records in a table.
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/inserts_updates_deletes.html
Hope it helps.
Thanks,
Moumita -
hi when i click on mozilla firefox it keeps coming up saying restore session why is this every time i go on firefox how can i stop this and delete it all together
When you quit firefox with tabs and windows open it "remembers". When you start Firefox it tries to restore the tabs and windows you had open.
You may also want to check the preferences for Firefox: -
Insert,update and delete data in a table using webdynpro for abap
Dear All,
I have a requirement to create a table allowing the user to add rows in it and update a row as well as delete a row from that table.To do this I guess I have to make use of ALV.But using ALV I am not able to enter data to a table where as I can make a column editable delete a row etc. please guide me to perform these operations(insert,update and delete) on table.
Thanks,
Reddy.Hi Sridhar,
By using ALV you can do all insert delete etc things. if you want to edit i mean you can yenter data in ALV.
Check this...
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
Editing alv in web dynpro
editing rows in alv reports
Re: editing rows and columns in alv reports in webdynpro abap
Cheers,
Kris. -
How can I inserting file's line into a oracle table in physycal order
How can I insert the file's line into a oracle table in the same physycal order that they exists in the file ?
I am using "SQL to FILE" km to performing file load into Oracle table, but the order which the records are insered into the oracle table doesn't match with the order of file's lines
How can I guarantee the same file's physycal order in the oracle table( target ) and file( source ) ?
Is it possible throught ODI ?
Thanks,
LucianaHi,
although I understand why use "File to Oracle( SQLLDR )" KM, I haven't the guarantee that in the agent's machine the Oracle Client installed and because when I openned the others projects I saw that anyone in my company use this KM( "File to Oracle( SQLLDR )" )
Tha's why I ask for anyone lead me whith the modification of the previous post in the "uLKM File to SQL", specifing the km step e where put the RECNUM pseudo column
This is fundamental for my ODI project
When I try to alter the "Create Work Table" and "Load Data" step of my "uLKM File to SQL" km, the execution returned me the error below:
=====================> Create Work Table Step
create table <@= vWorkTable @>
C1_LINHA_ARQ VARCHAR2(500) NULL, RECNUM NUMBER(10)
=====================> Load Data Step
select LINHA_ARQ C1_LINHA_ARQ
from TABLE
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=ARQ_INSS2SNP$CRLOAD_FILE=/arquivos_odi/ccrs/in/#CCRS_CAD_INSS.vpNOME_ARQUIVOSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=09SNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LINHA_ARQSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=500SNP$CRPRECISION=500SNP$CR$$SNPS_END_KEY*/
insert into ODI_RUN_CONV.C$_0TMP_ODI_INSS_DADOS_ARQ
C1_LINHA_ARQ, RECNUM
values
:C1_LINHA_ARQ, RECNUM
=====================
984 : 42000 : java.sql.BatchUpdateException: ORA-00984: column not allowed here
984 : 42000 : java.sql.SQLSyntaxErrorException: ORA-00984: column not allowed here
java.sql.BatchUpdateException: ORA-00984: column not allowed here
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9409)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
at com.sunopsis.sql.SnpsQuery.executeBatch(Unknown Source)
...Thanks again gyus,
Luciana
Edited by: 933810 on 31/05/2012 06:04
Edited by: 933810 on 31/05/2012 06:07
Edited by: 933810 on 31/05/2012 06:14 -
Hello everyone,
This is Karie Garnier in British Columbia, Canada.
I'm new to FCPX.
I've created a 20 minute movie, but at the end of the movie, there is an invisible audio clip that keeps playing.
How can a video clip be playing and making sounds, when it doesn't appear in the timeline? and ...
How can I select this invisible audio clip and delete it?I think you could be right, that it's an old render file that's got stuck.
By the time I finished this movie my 500 GB hard drive was 99.9% full and
FCP started acting wierd, so I suspect you are right.
I have since upgraded my hard drive to one 1000 GBs but when I play the movie the
glitch remains.
Can you please tell me:
a) How can I fix the old render file so that it is no longer stuck? ... and
b) How do I take a screen shot of the timeline? -
How do you handle update and delete rules for fact tables?
I have a fact table with a composite key of 5 columns. Two of the columns are FKs to the date dimension. I was setting the delete/update rules for the FK relationship in SSMS and it had a problem with me creating cascade action on the FKs that connected
to the date dimension.
What is the proper way to set up FK relationships in fact tables with SSMS when you have composite keys as most fact tables do?Yeah I understand all that. What I'm trying to do is to protect my database from RI violations that occur by production support people blowing away stuff in a dimension table but forgetting to blow away related records in the fact table. I want those fact
records deleted automatically so we don't have orphan records which was a real issue at a previous engagement. Production support is usually just people that know SQL and some relational modeling. It's not too likely they will understand the details of dimensional
modeling enough such that they would know that they had to blow away the fact record first.
My problem is I have a FK to a role playing dimension (the date dimension in this case). So basically I have to columns in the fact table that have a FK relationship to the PK of the date dimension. When I create both relationships SSMS and try to have both
of them cascade delete SSMS has an issue with it.
The error I get is:
Unable to create relationship '[relationship name]'
Introducing Foreign Key constraint '[constraint name]' on table '[table name]' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other foreign key constraints.
I can go ahead and put no action and the table will save fine. The question now becomes how does the cascade delete actually work. Can I just set one part of the key to cascade delete?
Actually I just realized that this is an even bigger design issue. What DOES happen to a fact record when one of it's dimensions gets deleted and I've got full RI set up on the table?
Or am I totally thinking about this wrong. Do you set up cascade deletes in a dimensional model? Is there a way to prevent deletes from the dimension table if there are related fact records? -
How can I work offline and then re-synch with version control in SharePoint?
I am using RoboHelp 11 with SharePoint 2010 for version control. How can I work off-line and then re-synch my files with SharePoint when reconnected?
If I allow the connection to SharePoint to remain while working remotely through VPN, I am constantly annoyed by notices that "the underlying connection is lost."
Thanks!
CarolUntil/unless a solution is available here's my proposed work-around:
1.Check in all files from my primary project to SharePoint. (I have only one project.)
2. Duplicate the project that is linked to SharePoint. Name it "Off-Line Project" so that I am always aware of the project I'm working on. Don't link Off-Line Project to source control/SharePoint.
3. Before working off-line, import or overlay the latest version of all content (html) files from the SharePoint-linked project into Off-Line Project.
4. Work off-line using only Off-Line Project.
5. Returning to the office, get the latest version of all files from SharePoint. (eventually, I won't be the only person working on the project) import (or maybe just overlay using Windows Explorer?) the files I've worked on from Off-Line Project to the primary project.
Feedback? Suggestions? -
How can i remove moved and deleted old libraries?
I've moved a bunch of my libraries around, removed some, and have installed iphoto9 on a new mac. I love that in iphoto9 I can now create new libraries or decide which library to open. But, all of my older libraries are showing up in the list when I open with "option". Plus there are duplicates of the older libraries. I'm assuming there is a db or data text file somewhere that is populating this list. Does anyone know how I can remove old defunct libraries from showing up in the list?
Thanks,
BobThanks Terrence. I didn't even realize all these old files still had album xml files. I appreciate your help.
Thanks,
Bob -
How can I scan for and delete duplicates in my library?
Please tell me how to remove duplicate photos from my entire library!!
For dealing with duplicates in iPhoto check out Duplicate Annihilator
-
How can I Insert a Text field in a DATABASE TABLE???
Hello at all,
i have a database Table ZTEST with 2 columns.
MANDT TYPE CLNT
TEXT TYPE char (255)
In my internal table tab, i have a text content. I want insert this content in my database table ZTEST.
DATA: tab TYPE TABLE OF ZTEST,
lin TYPE ZTEST.
lin-text = 'HELLO WORLD'
APPEND lin TO tab.
INSERT INTO ZTEST VALUES tab.
Commit Work.
Is this correct???? BECAUSE it doesnt work.
Edited by: ETN_58 on Mar 31, 2010 10:27 AMHi All,
Here table ZTEST has two fields kunnr and text where kunnr is the key field.
REPORT ZATEST .
tables ztest.
DATA: itab TYPE TABLE OF ZTEST with header line.
itab-kunnr = '67890'.
itab-text = 'HELLO WORLD'.
APPEND itab.
if sy-subrc eq 0.
INSERT ZTEST from table itab.
Commit Work.
endif.
Check with this, its working fine.
Regards,
Md Ziauddin. -
How can I maintain start_time and end_time in my audit table for mydbms_job
Hi Guys,
Need some help on runing this job, I need to maintain start_time and end_time. However we are getting job details from the user_jobs table.
DECLARE
l_job BINARY_INTEGER;
BEGIN
DBMS_JOB.SUBMIT(l_job, '<your job code>', sysdate, 'sysdate + 1/24');
COMMIT;
END;
Here I am planing to use audit log table which I have created with job_name,start time,end_time. Once I execute this job, I need to audit the job with start and end times. Is it possible.
can any one help me on this.
Thanks in advance!
-KLR.If you switch from dbms_job to using dbms_scheduler (as recommended by oracle) then this auditing information would be delivered out of the box. For scheduler jobs there are much better dictionary information then for the older dbms_jobs solutions.
Views like this
select * from user_SCHEDULER_JOBS;
select * from USER_SCHEDULER_JOB_LOG;
select * from USER_SCHEDULER_JOB_RUN_DETAILS;
Maybe you are looking for
-
Why does my track volume on selected track suddenly spike?
Why does my track volume, on the SELECTED TRACK, suddenly spike to max as if I had volume automation set. It never did this before a few weeks ago. Very frustrating. It happens during playback and loop recording. It started around the same time I sta
-
OS X Yosemite 10.10.2, Macbook Air, Finder batch file rename function. I have multiple files I want to rename, that have a date in their name in the mm/dd/yy format. The slashes seem to freak out the batch rename function and it won't work. I took o
-
Dear All, I booked customer invoice in FB70 in currency PKR. but payment received in us Dollars. now i want to clear the customer account in f-32 but it doesnt allow me to do so......... while the dr and cr amount is equal and balance is zero but it
-
Transfer Orders visible in LRF1 -Why , can they be removed from there
HI SAP Experts , A Couple of Transfer Orders are Vsible in LRF1, some of them are in Open State . Some of them are in Comfirmed State Can we remove them in such a way that they won't be visible in any Queue couple of users have generated them Visible
-
I have Soundtrack Pro 1.1 It opens OK but the everything takes 4 or so seconds to work. It's very slow and unusable in its present state. Is this a well known problem?