Query in abap database tables
hello Experts,
Is there any System table to get the Year.For Example to get the Month we can use T247 database table like this any system table to get year.
thanks
regards,
Ashok.
Sorry can you explain what do you mean to get year ??
The below would give you the year.
Year = Sy-datum(4).
If you wish to convert it into words you can use SPELL_WORD and make sure to use currency with zero decimails..in that case it would return two thousand six in words.
Similar Messages
-
Download and upload ABAP database table to presentation server and R/3
Hi experts,
I want to download ABAP database table (Ztable) to presentation server and again want to upload this to another R/3 server but i dont want to use any transport request. is there any possible sollution for this.
Thanks in advanceHi,
Look at this code hope this will help you to solve your problem
REPORT y_test_559.
Program for
1. Downloading Data of any DB table to a tab delimited ASCII file
2. Checking if a tab delimited ASCII file has the structure of a
DB table and showing its contents
3. Uploading a tab delimited ASCII file to a DB table with the same
structure
4. Showing the data of any DB table
======================================================================
======================================================================
DATA DECLARATIONS
======================================================================
TYPES : data_object TYPE REF TO data.
DATA : itab TYPE REF TO data .
TYPE-POOLS : slis .
DATA : it_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv
WITH HEADER LINE .
DATA : it_fieldcatalog TYPE lvc_t_fcat .
DATA : wa_fieldcatalog TYPE lvc_s_fcat .
DATA : i_structure_name LIKE dd02l-tabname .
DATA : i_callback_program LIKE sy-repid .
DATA : dyn_line TYPE data_object .
FIELD-SYMBOLS : <fs_itab> TYPE STANDARD TABLE .
DATA : table_name_is_valid TYPE c .
DATA : dynamic_it_instantiated TYPE c .
CONSTANTS buttonselected TYPE c VALUE 'X' .
======================================================================
SELECTION SCREEN DEFAULT
======================================================================
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) t_tabl.
PARAMETERS : tabl_nam LIKE rsrd1-tbma_val
MATCHCODE OBJECT dd_dbtb_16 OBLIGATORY .
"Search for Database Tables is dd_dbtb_16
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) t_file.
PARAMETERS : file_nam LIKE rlgrap-filename .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) t_down.
PARAMETERS : p_downld RADIOBUTTON GROUP grp1
USER-COMMAND m_ucomm .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) t_chkf.
PARAMETERS : p_chkfil RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) t_upld.
PARAMETERS : p_upload RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(29) t_show.
PARAMETERS : p_show_t RADIOBUTTON GROUP grp1 ."show table data
SELECTION-SCREEN END OF LINE.
======================================================================
AT SELECTION SCREEN OUTPUT
======================================================================
AT SELECTION-SCREEN OUTPUT .
PERFORM check_filename .
======================================================================
AT SELECTION SCREEN ON VALUE REQUEST FOR FILENAME
======================================================================
AT SELECTION-SCREEN ON VALUE-REQUEST FOR file_nam .
PERFORM f4_for_filename .
======================================================================
Initialization .
======================================================================
INITIALIZATION .
t_tabl = 'Table Name' .
t_file = 'File Name' .
t_down = 'Download Table' .
t_chkf = 'Check File to Upload' .
t_upld = 'Upload File' .
t_show = 'Show Table Contents' .
======================================================================
START OF SELECTION
======================================================================
START-OF-SELECTION .
PERFORM check_table_name_is_valid .
======================================================================
END OF SELECTION
======================================================================
END-OF-SELECTION .
IF table_name_is_valid EQ ' ' .
MESSAGE i398(00) WITH 'INVALID TABLE NAME' .
ELSE .
PERFORM instantiate_dynamic_internal_t .
CHECK dynamic_it_instantiated = 'X' .
CASE buttonselected .
WHEN p_downld .
PERFORM select_and_download .
WHEN p_chkfil .
PERFORM check_file_to_upload .
WHEN p_upload .
PERFORM upload_from_file .
WHEN p_show_t .
PERFORM show_contents .
ENDCASE .
ENDIF .
*& Form CHECK_TABLE_NAME_IS_VALID
text
--> p1 text
<-- p2 text
FORM check_table_name_is_valid.
DATA l_count TYPE i .
TABLES dd02l .
CLEAR table_name_is_valid .
SELECT COUNT(*) INTO l_count FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'TABL'
AND obj_name = tabl_nam .
IF l_count EQ 1 .
CLEAR dd02l .
SELECT SINGLE * FROM dd02l WHERE tabname = tabl_nam .
IF sy-subrc EQ 0.
IF dd02l-tabclass = 'TRANSP' .
table_name_is_valid = 'X' .
ENDIF .
ENDIF.
ENDIF .
ENDFORM. " CHECK_TABLE_NAME_IS_VALID
*& Form SELECT_AND_DOWNLOAD
text
--> p1 text
<-- p2 text
FORM select_and_download.
CLEAR : <fs_itab> .
SELECT * FROM (tabl_nam)
INTO CORRESPONDING FIELDS OF TABLE <fs_itab> .
PERFORM check_filename.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = file_nam
filetype = 'DAT'
TABLES
data_tab = <fs_itab>
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
IF sy-subrc EQ 0.
MESSAGE i398(00) WITH 'Table' tabl_nam
'successfully downloaded to '
file_nam .
ENDIF.
ENDFORM. " SELECT_AND_DOWNLOAD
*& Form UPLOAD_FROM_FILE
text
--> p1 text
<-- p2 text
FORM upload_from_file.
DATA : ans TYPE c .
DATA : lines_of_itab TYPE i .
DATA : l_subrc TYPE i .
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
textline1 = 'Are you sure you wish to upload'
textline2 = 'data from ASCII File to DB table '
titel = 'Confirmation of Data Upload'
IMPORTING
answer = ans.
IF ans = 'J' .
PERFORM check_filename.
CLEAR l_subrc .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = file_nam
filetype = 'DAT'
TABLES
data_tab = <fs_itab>
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
l_subrc = l_subrc + sy-subrc .
IF sy-subrc EQ 0.
DESCRIBE TABLE <fs_itab> LINES lines_of_itab .
IF lines_of_itab GT 0 .
DELETE (tabl_nam) FROM TABLE <fs_itab> .
COMMIT WORK .
INSERT (tabl_nam) FROM TABLE <fs_itab> .
l_subrc = l_subrc + sy-subrc .
ENDIF .
ENDIF.
IF l_subrc EQ 0 .
MESSAGE i398(00) WITH lines_of_itab
'Record(s) inserted in table'
tabl_nam .
ELSE .
MESSAGE i398(00) WITH
'Errors occurred No Records inserted in table'
tabl_nam .
ENDIF .
ENDIF .
ENDFORM. " UPLOAD_FROM_FILE
*& Form F4_FOR_FILENAME
text
--> p1 text
<-- p2 text
FORM f4_for_filename.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = 'C:\'
mask = ',.,..'
mode = '0'
IMPORTING
filename = file_nam
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
ENDFORM. " F4_FOR_FILENAME
*& Form CHECK_FILENAME
text
--> p1 text
<-- p2 text
FORM check_filename.
IF file_nam IS INITIAL
AND NOT ( tabl_nam IS INITIAL )
AND p_show_t NE buttonselected.
CONCATENATE 'C:\' tabl_nam '.TXT' INTO file_nam.
ENDIF .
ENDFORM. " CHECK_FILENAME
*& Form INSTANTIATE_DYNAMIC_INTERNAL_T
text
--> p1 text
<-- p2 text
FORM instantiate_dynamic_internal_t.
CLEAR dynamic_it_instantiated .
-----> Step 1 - Finding Field Names and ALV GRID Fieldcatalog
i_structure_name = tabl_nam .
CLEAR it_fieldcat[] .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = i_structure_name
CHANGING
ct_fieldcat = it_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
-----> Step 2 - Creating Field Catalog of the Object
cl_alv_table_create
LOOP AT it_fieldcat .
CLEAR wa_fieldcatalog .
MOVE-CORRESPONDING it_fieldcat TO wa_fieldcatalog .
wa_fieldcatalog-ref_field = it_fieldcat-fieldname .
wa_fieldcatalog-ref_table = tabl_nam .
APPEND wa_fieldcatalog TO it_fieldcatalog .
ENDLOOP .
-----> Step 3 - Creating Internal Table Dynamicaly
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcatalog
IMPORTING
ep_table = itab.
ASSIGN itab->* TO <fs_itab> .
dynamic_it_instantiated = 'X' .
ENDIF.
ENDFORM. " INSTANTIATE_DYNAMIC_INTERNAL_T
*& Form SHOW_CONTENTS
text
--> p1 text
<-- p2 text
FORM show_contents.
CLEAR : <fs_itab> .
SELECT * FROM (tabl_nam)
INTO CORRESPONDING FIELDS OF TABLE <fs_itab> .
i_callback_program = sy-repid .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = i_callback_program
it_fieldcat = it_fieldcat[]
TABLES
t_outtab = <fs_itab>
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " SHOW_CONTENTS
*& Form CHECK_FILE_TO_UPLOAD
text
--> p1 text
<-- p2 text
FORM check_file_to_upload.
PERFORM check_filename.
CLEAR l_subrc .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = file_nam
filetype = 'DAT'
TABLES
data_tab = <fs_itab>
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
l_subrc = l_subrc + SY-SUBRC .
IF sy-subrc EQ 0.
i_callback_program = sy-repid .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = i_callback_program
it_fieldcat = it_fieldcat[]
TABLES
t_outtab = <fs_itab>
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDIF .
ENDFORM. " CHECK_FILE_TO_UPLOAD
Thanks,
Pramod -
How to adjust adhoc query when the database table changed.
DearFreinds,
I have created an adhoc Query , however after few days there was a requirement to remove some fields and change the length of some fields . Now the Adhoc query showing as to adjust , however when iam trying to adjust nothing is happening. Could any one let me know how to adjust with the table strucutre in the adhoc query.
Regards
madhu.Hi Sumit,
Yes i have adjusted the database from se11 itself by going into utlity > adjust database . However i can still see the
adhoc query -> infoset asking me when iam trying to go in change mode saying the database table has been changed do you want to adjust .
I have adjusted by going to more functions still there is no change. Please let me know what exactly i have to do.
regards
madhu -
MV Incremental Refresh on join query of remote database tables
Hi,
I am trying to create a MV with incremental refresh option on a join query with 2 tables of remote database.
Created MV logs on 2 tables in the remote database.
DROP MATERIALIZED VIEW LOG ON emp;
CREATE MATERIALIZED VIEW LOG ON emp WITH ROWID;
DROP MATERIALIZED VIEW LOG ON dept;
CREATE MATERIALIZED VIEW LOG ON dept WITH ROWID;
Now, trying to create the MV,
CREATE MATERIALIZED VIEW mv_emp_dept
BUILD IMMEDIATE
REFRESH FAST
START WITH SYSDATE
NEXT SYSDATE1/(24*15)+
WITH PRIMARY KEY
AS
SELECT e.ename, e.job, d.dname FROM emp@remote_db e,dept@remote_db d
WHERE e.deptno=d.deptno
AND e.sal>800;
Getting ORA-12052 error.
Can you please help me.
Thanks,
AnjanPrimary Key is on EMPNO for EMP table and DEPTNO for DEPT table.
Actually, I have been asked to do an feasibility test whether incremental refresh can be performed on MV with join query of 2 remote database tables.
I've tried with all combinations of ROWID and PRIMARY KEY, but getting different errors. From different links, I found that it's possible, but cannot create any successful testcase anyway.
It will be very much helpful if you can correct my example or tell me the restrictions in this case.
Thanks,
Anjan -
Help with SQL Query Involving Three Database Tables
Hi,
My SQL is very rusty since I have not touched it in over one year.
I was given an SQL question in a job interview and I am curious to know the right answer.
This was a pre-prepared written test and the interviewer did not know the answer.
There are three database tables: STUDENTS, COURSES and STUDENT_COURSES
Table STUDENTS has STUDENT_ID and STUDENT_NAME columns.
Table COURSES has COURSE_ID and COURSE_DESCRIPTION columns.
Table STUDENT_COURSES has columns STUDENT_ID and COURSE_ID.
Provide a query that returns all the students that are enrolled in all the courses.
Thanks,
Avi.It is probably good to say that this task may be solved such way, if database normalized and there are references
Basically here just is a variant of your solution
DROP TABLE student_course;
DROP TABLE student;
DROP TABLE course;
CREATE TABLE student
(student_id NUMBER(9) PRIMARY KEY,
student_name VARCHAR2(30));
CREATE TABLE course
(course_id NUMBER(9) PRIMARY KEY,
dscr VARCHAR2(100));
CREATE TABLE student_course
(student_id NUMBER(9),
course_id NUMBER(9));
ALTER TABLE student_course
ADD CONSTRAINT pk_st_crs PRIMARY KEY
(student_id, course_id);
ALTER TABLE student_course
ADD CONSTRAINT fk_student
FOREIGN KEY (student_id)
REFERENCES student(student_id);
ALTER TABLE student_course
ADD CONSTRAINT fk_course
FOREIGN KEY (course_id)
REFERENCES course(course_id);
INSERT INTO student
VALUES (1, 'NAME1');
INSERT INTO student
VALUES (2, 'NAME2');
INSERT INTO student
VALUES (3, 'NAME3');
INSERT INTO course
VALUES (101, 'Desc 1');
INSERT INTO course
VALUES (102, 'Desc 2');
INSERT INTO course
VALUES (103, 'Desc 3');
INSERT INTO student_course
VALUES (1, 101);
INSERT INTO student_course
VALUES (1, 102);
INSERT INTO student_course
VALUES (2, 101);
INSERT INTO student_course
VALUES (2, 103);
INSERT INTO student_course
VALUES (3, 101);
INSERT INTO student_course
VALUES (3, 102);
INSERT INTO student_course
VALUES (3, 103);
COMMIT ;
WITH st_crs_cnt AS
(SELECT student_id,
COUNT (*) tot
FROM student_course
GROUP BY student_id)
SELECT sc.student_id,
sc.tot
FROM st_crs_cnt sc
WHERE sc.tot = (SELECT COUNT (*) FROM course); -
Hi Gurus,
While creating the database table it giving the error that SAP System has status 'not modifiable'.
Pls help us.
Regards
Sachin Patil
Moderator message: please search for available information before asking.
Edited by: Thomas Zloch on Dec 1, 2010 5:23 PMHi,
When u creating the field for standard table u must use the APPEND STRUCTURE using that option we can create fields for that table.
STEP1:GOTA DB TABLE
STEP2:FIND THE APPENDSTURCTURE OPTION ON APPLICATION TOOLBAR.
STEP3:CREATE ONE STRUCTURE START WITH 'ZSTR'.
STEP4:ADD YOUR FIELDS INTO THAT STRUCTURE.
STEP5:ACTIVATE THAT STRUCTURE.
regards,
MURALII -
Query related to database tables
Hi,
Im having a requirement wherein i would like to create one ztable and the purpose is only to get the fields but not the values for the same. Bez, with the help of these fields in ztable and developing some logic and it shld be dynamic based on the no of fields appended into ztable.
To be clear, can i write a select query only to get the fields from the table but not the values ( in this no way i will get the values bez i won't insert any records for the same).
I thnk im clear from my end.
Thanks
rohithTo get the fields, you can write the query like this too :
tables: dd03l.
data: begin of itab occurs 0,
fieldname like dd03l-fieldname,
end of itab.
*parameters: p_tab like dd03l-tabname.
select fieldname from dd03l into table itab where tabname = 'VBAK'.
LOOP AT ITAB.
WRITE:/ itab-fieldname.
ENDLOOP. -
How to query a sql database table from webdynpro?
Hi All,
Can someone tell me the steps involved in accessing a sql server database table and retrieving the record set from a webdynpro application.
Thanks in advance.
Best regards,
DivyaHello Divya,
I would recommend you to read "Java Persistence" section in Development manual describing various options for database integration http://help.sap.com/saphelp_nw04/helpdata/en/61/fdbc3d16f39e33e10000000a11405a/frameset.htm
Tutorials
http://help.sap.com/saphelp_nw04/helpdata/en/46/ddc4705e911f43a611840d8decb5f6/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/91/9c2226df76f64fa7783dcaa4534395/frameset.htm
Web serices
http://help.sap.com/saphelp_nw04/helpdata/en/d6/f9bc3d52f39d33e10000000a11405a/frameset.htm
EJB
http://help.sap.com/saphelp_nw04/helpdata/en/19/f9bc3d8af79633e10000000a11405a/frameset.htm
Best regards, Maksim Rashchynski. -
How an INDEX of a Table got selected when a SELECT query hits the Database
Hi All,
How an Index got selected when a SELECT query hits the Database Table.
My SELECT query is as ahown below.
SELECT ebeln ebelp matnr FROM ekpo
APPENDING TABLE i_ebeln
FOR ALL ENTRIES IN i_mara_01
WHERE werks = p_werks AND
matnr = i_mara_01-matnr AND
bstyp EQ 'F' AND
loekz IN (' ' , 'S') AND
elikz = ' ' AND
ebeln IN s_ebeln AND
pstyp IN ('0' , '3') AND
knttp = ' ' AND
ko_prctr IN r_prctr AND
retpo = ''.
The fields in the INDEX of the Table EKPO should be in the same sequence as in the WHERE clasuse?
Regards,
VijiHi,
You minimize the size of the result set by using the WHERE and HAVING clauses. To increase the efficiency of these clauses, you should formulate them to fit with the database table indexes.
Database Indexes
Indexes speed up data selection from the database. They consist of selected fields of a table, of which a copy is then made in sorted order. If you specify the index fields correctly in a condition in the WHERE or HAVING clause, the system only searches part of the index (index range scan).
The primary index is always created automatically in the R/3 System. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE. If you cannot use the primary index to determine the result set because, for example, none of the primary index fields occur in the WHERE or HAVING clause, the system searches through the entire table (full table scan). For this case, you can create secondary indexes, which can restrict the number of table entries searched to form the result set.
reference : help.sap.com
thanx. -
How to print database table records in graphical format?
In ABAP Editor,I put select query on one database table and fetch few records .Now I want to show these records in BAR Graph / pie chart.Kindly let me know is it possible and how?
Thanks in advance.
Edited by: rushah on May 21, 2009 5:30 AMHi Hadiman,
Can you please elaborate more on it.
Like my code is......
SELECT * FROM trfcqout
INTO CORRESPONDING FIELDS OF itab
WHERE ( qstate = 'SYSFAIL' OR qstate = 'CPICERR' OR errmess <> '' )
and ( QRFCDATUM >= date-low and QRFCDATUM <= date-high ).
count = 0.
if itab is not initial.
SELECT * FROM trfcqout
INTO CORRESPONDING FIELDS OF itab1
WHERE qname = itab-qname AND errmess = ''.
count = count + 1.
ENDSELECT.
itab-retrydate = sysdate.
itab-retrytime = systime.
itab-qtype = 'OUTBOUND'.
itab-nentries = count - 1.
append itab.
MODIFY zqueue FROM itab.
endif.
ENDSELECT.
Print details on Report
write: / sy-vline no-gap,(7) 'QTYPE' COLOR 1, sy-vline no-gap,(23)
'QNAME' COLOR 1,sy-vline no-gap,(14) 'QSTATE' COLOR 1, sy-vline no-gap,
(54) 'Error' COLOR 1,sy-vline no-gap,(10) 'Number' COLOR 1.
uline.
LOOP AT itab.
write: / sy-vline no-gap, (8) itab-qtype no-gap,
sy-vline no-gap, (24) itab-qname no-gap,
sy-vline no-gap, (15) itab-qstate no-gap,
sy-vline no-gap, (55) itab-errmess no-gap,
sy-vline no-gap, (10) itab-nentries no-gap.
ENDLOOP.
uline.
refresh itab.
endform. "queuedata
Now I want to print data in graphical form. how to do that? -
Need to insert into NVARCHAR2 column in a database table
I need to insert into a table with column type NVARCHAR2(2000) in java.
Cant use normal setString on that column. How can I do this using PreparedStatement in Java?The scenario is:
I have to read a CSV file which contains a column in Urdu language, and show it on the JTable first.
Then I have to import the JTable contents into a database table.
Database Table structure is:
CREATE TABLE IMPORT_TMP (
ctype VARCHAR2(3),
urdu_name NVARCHAR2(2000)
);My java code which inserts into the database table is:
Vector dataVector = tableModel.getDataVector();
rowVector = (Vector) dataVector.get(row);
cType = "";
if (rowVector.get(INDEX_BANK) != null) {
cType = rowVector.get(INDEX_CTYPE).toString();
urduName = "";
if (rowVector.get(INDEX_URDU_NAME) != null) {
urduName = rowVector.get(INDEX_URDU_NAME).toString();
statementInsert.setString(1, cType);
statementInsert.setString(2, urduName);I also applied Renderer on the table column, my renderer class is:
public class LangFontRenderer extends JLabel implements TableCellRenderer {
private Font customFont;
public LangFontRenderer(Font font) {
super();
customFont = font;
System.out.println("font = " + font.getFontName());
this.setFont(font);
@Override
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row, int column) {
if (value != null) {
if (value instanceof String) {
setText((String) value);
return this;
return this;
@Override
public Font getFont() {
return customFont;
// overriding other methods for performance reasons only
@Override
public void invalidate() {
@Override
public boolean isOpaque() {
return true;
@Override
public void repaint() {
@Override
public void revalidate() {
@Override
public void validate() {
}I applied the renderer on the column as:
TableColumn col = IATable.getColumnModel().getColumn(INDEX_URDU_NAME);
LangFontRenderer langRenderer = new LangFontRenderer(new java.awt.Font("Urdu Naskh Asiatype", 0, 11));
col.setCellRenderer(langRenderer);It does not give any error but when i query on the database table it does not show the column data in Urdu language.
Also it does not show the correct value on JTable column, some un-identified symbols.
Furthermore when I open the CSV file in notepad, it shows the correct language in that column, as I have installed the Urdu language and font on my system. -
New ABAP Program to check Direct UPDATE in Database Table
Hi all,
As per customer requirement , I have to develop ONE Program which find out that in which ABAP Program , Programmer has used Open Sql command like UPDATE , DELETE , INSERT , MODIFY to direct update in Database Table.
Have a look on all Z-ABAPs, find out if there are statements with "update", "delete", "insert" or "modify" in the coding, then find out if updates to sap-Tables are done
How can I achived that ?
Please , If anybody is having idea , than please let me know..
Thanks You ,Hi
Kindly refer to the below link. This has step by step how you can achieve the checks.
[http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/12659a90-0201-0010-c18b-9d014f9bed0d]
But if you want to check if any program they have used 'UPDATE' then you can do like below.
Go to SE38
Utilities---> Find in Source Code-
Find --- UPDATE
In program - Z* or ZX* if you want to search only in Exits
Regards,
Vijay V . -
Delete restrict for ABAP Dictionary database table
Hi,
I defined two database tables in ABAP dictionary, one with master data, and one with records referencing the master data.
I also defined a foreign key relationship in the second table, so that new entries in the second table are checked against the master data table.
In addition to this behaviour, I also want the Dicitionary to perform a check the other way round. In other words, if I try to delete a record in the master data table, this should not be possible if there are records in the second table referencing this record. Thats how foreign key relationships work in Oracle databases.
Is there a way to force this behaviour for ABAP Dictionary tables, too? Or is it possible to make the table maintenance view perform this check?
Thanks for your help!
Kind regards,
TobiasHello Tobias,
I can delete records in the master table which have dependent entries in the second table without an error or a warning.
How are you deleting the entries, via SM30?
If yes, you can use the [Event 03: Before Deleting the Display Data|http://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f14a9d111d1a5690000e82deaaa/content.htm]. In this TMG event you can check if the entry can be deleted at all!
If you're using Open SQL statements to delete the records, i don't think DB layer implicitly checks the dependency. You can always put an explicit check though
Btw, out-of-curiosity, is this a custom or standard table?
BR,
Suhas -
Webdynpro abap-method for saving updated values in new database table
Hi Experts,
I am creating an ALV application in weddynpro abap where i have given update button to update fields & save button to save values in mastertable,but whenever i am updating & saving ,it will overwrit previous values. For this,I need to create a separate method to save the updated values of the fields in a new database table.
Looking forward for solutions.
Thank You!becuase of the below statement u r getting the error
insert into ZTAB_CS_ISSSAL values Item_Dates.
u declared the field Item_Dates as Stru_Issuesal-DATES
and u were trying to inesrting the record in the table ZTAB_CS_ISSSAL with the field Item_Dates
the error is related to the compatible.
so declare work area for updating the table should be of type ZTAB_CS_ISSSAL. -
Inner join query used with 7 Database tables
HI All,
In a report they used the Inner join Query with 6 Data base table..now there is a performance issue with at query.
its taking so much of time to trigger that query. Please help how to avoid that performance issue for that.
In that 2 database tables containing lakhs of records..
According to my knowledge it can be avoided by using secondary indexs for those 2 database tables..
and by replacing the Inner join Query with FOR ALL ENTRIES statement.
i want how to use the logic by using FORALL ENTRIES statement for this..
So, please give you proper suggestion to avoid this issue..
Thanking you.
Moderator message: Please Read before Posting in the Performance and Tuning Forum
Edited by: Thomas Zloch on Oct 16, 2011 10:27 PMHi,
And what do you mean with "they used"? If "SAP used" then yo will need to ask a SAP for note
FOR ALL ENTRIES is quite good described in help. Please search forum also.
Without query it won't be possible to tell how it can be optimized, however you can try to use SE30/SAT and ST05. Maybe it will help you.
BR
Marcin Cholewczuk
Maybe you are looking for
-
Error while activating any message mapping in IR: very strange
hi forum i m getting an error in IR while activating any messageMapping. the error is too long to be posted....i m posting a few lines of that: Internal error while checking object Message Mapping MM_sdptestFileToFile | http://sdzpoc.com.test/s
-
IPod mini new PC connection woes
Hi all, Please help me out! I'm a frustrated uncle being nagged by his niece re her 2nd gen ipod mini and connection to her pc. Long time mac-user, so l've never encountered this kind of problem. I've tried the search function but this seems to be a
-
When I try to save the Captivate 4 file I am working on I get the following error, "Unable to save the project. You do not have permission to save to this location or the file may be locked by another user. Please check your security privileges or tr
-
Row/column counter for tables
Hello, I know this is very basic, but so far examples I dug up don't really anything remotely to what I want. I have 3 databases. Well they are defined as "connections" in SQLDeveloper I hope that's the same I am still not used to Oracle abstractions
-
Help: Strict NAT 360 Xbox WRT54Gv2 Wired
Need help opening the NAT settings on the router. I have 2 xboxs wired to the router. I am able to get an open NAT on either 1 of the 2 xboxs, but never both at the same time. Seems like the port forwarding only works on the first static IP entered o