Problem while selecting a table after creating the dblink
Hi,
We have created the dblink for oracle to sql server and it created successfully,
But while selecting the table from oracle we are getting the below issue,
select * from "sysdiagrams"@omniyat;
ERROR at line 1:
ORA-00942: table or view does not exist
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
'sysdiagrams'. {42S02,NativeErr = 208}[Microsoft][ODBC SQL Server Driver][SQL
Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
ORA-02063: preceding 2 lines from OMNIYAT
Kindly provide us the solution to resolve this issue.
Regards
Sham
Please see:
Odbc Connection From Oracle To SQL*Server Fails With Errors Ora-28546 and Ora-2063 When Using Connection via Database Link. (Doc ID 1389492.1)
To BottomTo Bottom
Error 08001,NativeErr = 11 Instance Invalid or Not Running Connecting to SQL*Server Using Dg4MSQL (Doc ID 1349023.1)
How to Resolve Common Errors Encountered while using Database Gateways (DG4IFMX, Dg4MSQL, DG4SYBS), DG4ODBC or Generic Connectivity (Doc ID 234517.1)
Thanks,
Hussein
Similar Messages
-
Problem entering values in table after creating it in Word using OLE2
Hi,
I want to create a Word document from a Oracle Forms 6i application. The document will have standard text followed by a table. The cells of this table are to be populated from fields in the Forms application.
I have created a sample code below. When executed from within the Forms application, it creates a document fine. It writes the text "Hello World". It then creates a table as expected. But when I try to enter a value "Cell Value" in the table, the value does not get written to the cell of the table. Instead it writes the value outside the table.
Can someone please tell me what I am doing wrong here and what I need to do so that after writing the text on the document I can write values into the table also.
Any help will be much appreciated.
Here is the code(it works but then it doesn't ):
PROCEDURE TEST_PROC IS
hApplication OLE2.OBJ_TYPE;
hDocuments OLE2.OBJ_TYPE;
hDocument OLE2.OBJ_TYPE;
hSelection OLE2.OBJ_TYPE;
hParagraphFormat OLE2.OBJ_TYPE;
hRange OLE2.OBJ_TYPE;
hFont OLE2.OBJ_TYPE;
hTables OLE2.OBJ_TYPE;
hTable OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
wdAlignParagraphLeft CONSTANT number(3) := 0; --Default
wdword9tablebehavior CONSTANT NUMBER (5) := 1;
wdautofitfixed CONSTANT NUMBER (5) := 0;
---- wdUnits Class members
wdcharacter CONSTANT NUMBER (5) := 1;
wdmove CONSTANT NUMBER (5) := 0; --Default
--wdBorderType Class members
wdborderleft CONSTANT NUMBER := -2;
wdborderright CONSTANT NUMBER := -4;
wdbordertop CONSTANT NUMBER := -1;
wdborderbottom CONSTANT NUMBER := -3;
--WdLineStyle Class member
wdlinestylenone CONSTANT NUMBER := 0;
BEGIN
hApplication:=OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY(hApplication, 'Visible', 1);
hDocuments := OLE2.GET_OBJ_PROPERTY(hApplication, 'Documents');
hDocument := OLE2.INVOKE_OBJ(hDocuments, 'Add');
hSelection := OLE2.GET_OBJ_PROPERTY(hApplication, 'Selection');
hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
OLE2.SET_PROPERTY(hFont, 'Size', 11);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE );
OLE2.INVOKE(hSelection, 'TypeParagraph');
hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphLeft);
OLE2.RELEASE_OBJ(hParagraphFormat);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'Hello World');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.INVOKE(hSelection, 'TypeParagraph');
htables := ole2.get_obj_property (hdocument, 'Tables');
hrange := ole2.get_obj_property (hselection, 'Range');
args := ole2.create_arglist;
ole2.add_arg_obj (args, hrange); --Range
ole2.add_arg (args, 1); --NumRows
ole2.add_arg (args, 6); --NumColumns
ole2.add_arg (args, wdword9tablebehavior); --DefaultTableBehavior
ole2.add_arg (args, wdautofitfixed); --FitBehavior
htable := ole2.invoke_obj (htables
,'Add'
,args
args := ole2.create_arglist;
ole2.add_arg (args, wdcharacter);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveLeft'
,args
ole2.destroy_arglist (args);
args := ole2.create_arglist;
ole2.add_arg (args, 'CellValue');
ole2.invoke (hselection
,'TypeText'
,args
ole2.destroy_arglist (args);
ole2.RELEASE_OBJ (happlication);
ole2.RELEASE_OBJ (hdocuments);
ole2.RELEASE_OBJ (hdocument);
ole2.RELEASE_OBJ (hfont);
ole2.RELEASE_OBJ (hparagraphformat);
ole2.RELEASE_OBJ (htables);
ole2.RELEASE_OBJ (hrange);
END;Once again thanks for the help John. Unfortunately I cannot use only bookmarks, because the text to be entered from the application is of undetermined length and therefore since the possibility of wrapping exists, it would not be able to give me the same formatting abilty as using a table.
However, the good news is that I have been able to find the solution. I am posting my code here so that it is available to anyone else who might have the same issue. Thanks again.
Here is my code and my comments in it explain what it does.
PROCEDURE extract_to_word
IS
/* First of all I would like to acknowledge the help I have got from experts who have posted a lot of this code on the web which I have used here. Special thanks go to someone by the name of sfvb
found here http://www.tek-tips.com/userinfo.cfm?member=sfvbsfvb
This procedure does the following:
1. Opens a word document.
2. Creates a header and pastes a picture in the header e.g your company logo with address. Please note that the image should have both the address and the logo in it. It can be created using paint where you can write your address at one end and paste a bmp or jpg picture of your logo at the other end.
3. Writes text with specified font and size. It calls a separate procedure PRINT_LINE to do this.
4. Creates a table on the document with specified number of columns with fixed width.
5. Populates the cells of the table-
first with headers written by calls to WRITE_HEADINGS procedure.
next with data from a block of the Forms application by calls to WRITE_DATA procedure
6. Comes out of the table and continues to write text.
The three procedures that are repeatedly called are described after the end of this procedure.
Note: While I have made every attempt to ensure that the code does not generate error on account of my writing the explanatory notes, I cannot be sure of having made some typos. If the code does not compile, it is most probably be on account of something I have missed in entering the comments and explanation.
Disclaimer:
I am not the sole author of this code. I have taken help from other open sources and copyright infringement if any is entirely unintentional.
happlication ole2.obj_type;
hwindow ole2.obj_type;
hpane ole2.obj_type;
hview ole2.obj_type;
hdocuments ole2.obj_type;
hdocument ole2.obj_type;
hselection ole2.obj_type;
hparagraphformat ole2.obj_type;
hrange ole2.obj_type;
hfields ole2.obj_type;
hfont ole2.obj_type;
hinlineshapes ole2.obj_type;
hpars ole2.obj_type;
hpar ole2.obj_type;
htabstops ole2.obj_type;
hactivedocument ole2.obj_type;
htables ole2.obj_type;
htable ole2.obj_type;
hcolumns ole2.obj_type;
hcells ole2.obj_type;
hrows ole2.obj_type;
hshading ole2.obj_type;
hinsertrow ole2.obj_type;
hborders ole2.obj_type;
hshading ole2.obj_type;
args ole2.list_type;
wdalignparagraphleft CONSTANT NUMBER (3) := 0;
wdalignparagraphcenter CONSTANT NUMBER (3) := 1;
wdalignparagraphright CONSTANT NUMBER (3) := 2;
wdseekcurrentpageheader CONSTANT NUMBER (3) := 9;
wdseekcurrentpagefooter CONSTANT NUMBER (3) := 10;
wdseekmaindocument CONSTANT NUMBER (3) := 0;
wdfieldpage CONSTANT NUMBER (3) := 33;
wdfieldnumpages CONSTANT NUMBER (3) := 26;
wdpagebreak CONSTANT NUMBER (3) := 7;
wdstory CONSTANT NUMBER (3) := 6;
wdword CONSTANT NUMBER (5) := 2;
wdsentence CONSTANT NUMBER (5) := 3;
wdword8tablebehavior CONSTANT NUMBER (5) := 0;
wdword9tablebehavior CONSTANT NUMBER (5) := 1;
wdautofitcontent CONSTANT NUMBER (5) := 1;
wdautofitfixed CONSTANT NUMBER (5) := 0;
wdautofitwindow CONSTANT NUMBER (5) := 2;
wdunderlinesingle CONSTANT NUMBER (5) := 1;
---- wdUnits Class members
wdcell CONSTANT NUMBER (5) := 12;
wdcharacter CONSTANT NUMBER (5) := 1;
wdword CONSTANT NUMBER (5) := 2;
wdsentence CONSTANT NUMBER (5) := 3;
wdline CONSTANT NUMBER (5) := 5;
---- wdMovementType Class members
wdextend CONSTANT NUMBER (5) := 1;
wdmove CONSTANT NUMBER (5) := 0;
--wdBorderType Class members
wdborderleft CONSTANT NUMBER := -2;
wdborderright CONSTANT NUMBER := -4;
wdbordertop CONSTANT NUMBER := -1;
wdborderbottom CONSTANT NUMBER := -3;
--WdLineStyle Class member
wdlinestylenone CONSTANT NUMBER := 0;
mytab CONSTANT VARCHAR2 (1) := CHR (9);
myblue CONSTANT NUMBER (8) := 16711680; --FF0000
mygreen CONSTANT NUMBER (8) := 65280; --00FF00
myred CONSTANT NUMBER (8) := 255; --0000FF
mydkgreen CONSTANT NUMBER (8) := 32768; --008000
myblack CONSTANT NUMBER (8) := 0; --000000
mytext VARCHAR2 (2000);
BEGIN
happlication := ole2.create_obj ('Word.Application');
ole2.set_property (happlication
,'Visible'
,1
hdocuments :=
ole2.get_obj_property (happlication, 'Documents');
hdocument := ole2.invoke_obj (hdocuments, 'Add');
-------- Create Header and Footer --------
hwindow :=
ole2.get_obj_property (happlication, 'ActiveWindow');
hpane := ole2.get_obj_property (hwindow, 'ActivePane');
hview := ole2.get_obj_property (hpane, 'View');
---- Header Section ---
ole2.set_property (hview
,'SeekView'
,wdseekcurrentpageheader
hselection :=
ole2.get_obj_property (happlication, 'Selection');
hfont := ole2.get_obj_property (hselection, 'Font');
ole2.set_property (hfont
,'Name'
,'Calibri'
ole2.set_property (hfont
,'Size'
,10
ole2.set_property (hfont
,'Bold'
,FALSE
ole2.set_property (hfont
,'Color'
,myblack
ole2.RELEASE_OBJ (hfont);
args := ole2.create_arglist;
--Below is the location of your jpg file that contains the logo and address
ole2.add_arg (args, 'C:\temp\AMHeader2.jpg');
hinlineshapes :=
ole2.get_obj_property (hselection, 'InlineShapes');
ole2.invoke (hinlineshapes
,'AddPicture'
,args
ole2.destroy_arglist (args);
ole2.RELEASE_OBJ (hinlineshapes);
ole2.set_property (hview
,'SeekView'
,wdseekmaindocument
ole2.RELEASE_OBJ (hview);
ole2.RELEASE_OBJ (hpane);
ole2.RELEASE_OBJ (hwindow);
-------- Insert Text --------
hfont := ole2.get_obj_property (hselection, 'Font');
ole2.set_property (hfont
,'Name'
,'Calibri'
ole2.set_property (hfont
,'Size'
,9
ole2.set_property (hfont
,'Bold'
,FALSE
ole2.set_property (hfont
,'Color'
,myblack
ole2.invoke (hselection, 'TypeParagraph');
hparagraphformat :=
ole2.get_obj_property (hselection, 'ParagraphFormat');
ole2.set_property (hparagraphformat
,'Alignment'
,wdalignparagraphleft
ole2.RELEASE_OBJ (hparagraphformat);
print_line (hselection
, 'Date ' || TO_CHAR (TRUNC (SYSDATE), 'MM/DD/YYYY')
,NULL
print_line (hselection
,NULL
--The following prints the address of the recipient of the letter.
print_line (hselection
,addr_line1
,NULL
print_line (hselection
,addr_line2
,NULL
print_line (hselection
,addr_line3
,NULL
print_line (hselection
,addr_line4
,NULL
print_line (hselection
,addr_line5
,NULL
--Call like the one below are to insert blank lines
hselection :=
ole2.get_obj_property (happlication, 'Selection');
print_line (hselection
,NULL
,NULL
print_line (hselection
,'Your salutation'
,NULL
print_line (hselection
,NULL
,'NULL
print_line (hselection
,'Ref: '
,NULL
print_line (hselection
,NULL
,NULL
print_line
(hselection
,'Whatever text you want to appear on this line.'
,NULL
print_line (hselection
,NULL
,NULL
-------- Create Table --------
htables := ole2.get_obj_property (hdocument, 'Tables');
hrange := ole2.get_obj_property (hselection, 'Range');
args := ole2.create_arglist;
ole2.add_arg_obj (args, hrange); --Range
ole2.add_arg (args, 1); --NumRows The rest of the rows are created later as and when required
ole2.add_arg (args, 6); --NumColumns This creates a table of 6 columns.
ole2.add_arg (args, wdword9tablebehavior); --DefaultTableBehavior
ole2.add_arg (args, wdautofitfixed); --FitBehavior
htable := ole2.invoke_obj (htables
,'Add'
,args
ole2.destroy_arglist (args);
-- [Borders removal start]The following piece of code removes all the borders. Use of this is optional.
hborders := ole2.get_obj_property (htable, 'Borders');
ole2.set_property (hborders
,'OutsideLineStyle'
,wdlinestylenone
ole2.set_property (hborders
,'InsideLineStyle'
,wdlinestylenone
ole2.RELEASE_OBJ (hborders);
--[Borders removal end]
--The following code makes the cursor enter the table. I took quite some time
--figuring this out.
hselection := ole2.get_obj_property (hdocument, 'Tables');
hselection := ole2.get_obj_property (happlication, 'Selection');
--WRITE_HEADINGS is the procedure called each time only to write headings.
write_headings (hselection
,'Heading 1 on cell at row 1 column 1'
,8
--The following moves the cursor to the next cell on the right.
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_headings (hselection
,'Heading 1 on cell at row 1 column 2'
,7
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_headings (hselection
,'Heading 1 on cell at row 1 column 3'
,7
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_headings (hselection
,'Heading 1 on cell at row 1 column 4'
,8
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_headings (hselection
,'Heading 1 on cell at row 1 column 5'
,5
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_headings (hselection
,'Heading 1 on cell at row 1 column 6'
,8
--The following moves the cursor back to the first cell on row 1 column 1
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 6);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveLeft'
,args
ole2.destroy_arglist (args);
--Now we need to write data sourced from a multi record block in Oracle Forms
GO_BLOCK ('your_block');
FIRST_RECORD;
record_cnt := 0;
LOOP
record_cnt := record_cnt + 1;
---In my application I gave the choice to the user to put a check mark on those records that he would want to print ------on the document and so the following.
IF :your_block.cb_print = 'Y'
THEN
--This creates a new row below the first row that contains the column headers.
args := ole2.create_arglist; ole2.add_arg (args, 1);
ole2.invoke (hselection
,'InsertRowsBelow'
,args
ole2.destroy_arglist (args);
--WRITE_DATA is called each time to write the data in the cells.
write_data (hselection
, :your_block.item);
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_data (hselection
, :your_block.item);
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_data (hselection
,:your_block.item);
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_data (hselection
,:your_block.item);
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_data (hselection
,:your_block.item);
args := ole2.create_arglist;
ole2.add_arg (args, wdcell);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveRight'
,args
ole2.destroy_arglist (args);
write_data (hselection
,:your_block.item);
END IF;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
END LOOP;
--The following makes the cursor exit the table and back on document for any further
--writing of text.
args := ole2.create_arglist;
ole2.add_arg (args, wdline);
ole2.add_arg (args, 1);
ole2.add_arg (args, wdmove);
ole2.invoke (hselection
,'MoveDown'
,args
print_line (hselection --As mentioned earlier, this enters a blank line.
,NULL
,NULL
print_line (hselection
,'Boilerplate text: '
,your_variable
print_line (hselection
,'Boilerplate text: '
,your_variable
--You can print as many lines as required by making call to the PRINT_LINE procedure.
ole2.RELEASE_OBJ (htables);
ole2.RELEASE_OBJ (hfont);
ole2.RELEASE_OBJ (hselection);
ole2.RELEASE_OBJ (hdocument);
ole2.RELEASE_OBJ (hdocuments);
ole2.RELEASE_OBJ (happlication);
END;
PROCEDURE PRINT_LINE
( v_sel OLE2.OBJ_TYPE
, v_text VARCHAR2
, v_field varchar2)
IS
/* This procedure takes in three arguments.
The first v_sel is the VB selection object.
v_text is the static or boilerplate text that needs to be printed on the document.
v_field is the value of the item or variable from the program.
v_args OLE2.LIST_TYPE;
hTab CONSTANT varchar2(1) := chr(9); --This is the vb constant for tabstop
BEGIN
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, v_text);
OLE2.INVOKE(v_sel, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
--The following replicates tabbing. This was used so that the field values are aligned at a tabstop.
--When printing a blank line NULL is passed in as the argument
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, hTab);
OLE2.INVOKE(v_sel, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
--The following writes the value of the variable at the tabstop.
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, v_field);
OLE2.INVOKE(v_sel, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
OLE2.INVOKE(v_sel, 'TypeParagraph');
END;
PROCEDURE WRITE_HEADINGS (SELIN OLE2.OBJ_TYPE, TEXTIN VARCHAR2, COUNTIN NUMBER)
IS
/* This procedure is used to write headings in the first row of the table.
SELIN is the Selection object
TEXTIN is the boilerplate text to be written as the header of a column.
COUNTIN is the number of characters in the header text. This is required
to replicate the action bolding the font of the header.
hFont OLE2.OBJ_TYPE;
v_args OLE2.LIST_TYPE;
wdCharacter CONSTANT number(5) := 1; --Default
--wdUnderline Class members
wdUnderlineSingle CONSTANT NUMBER(5) := 1;
---- wdMovementType Class members
wdExtend CONSTANT number(5) := 1;
wdMove CONSTANT number(5) := 0; --Default
---- WdParagraphAlignment Class members
wdAlignParagraphCenter CONSTANT number(5) := 1;
wdAlignParagraphLeft CONSTANT number(5) := 0;
wdAlignParagraphRight CONSTANT number(5) := 2;
---- HexColor = BBGGRR
myLightBlue CONSTANT number(8) := 16755370; --FFAAAA
BEGIN
hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
OLE2.SET_PROPERTY(hFont, 'Size', 10);
OLE2.SET_PROPERTY(hFont, 'Bold', True);
OLE2.RELEASE_OBJ(hFont);
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, textin);
OLE2.INVOKE(selin, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, wdCharacter);
OLE2.ADD_ARG(v_args, countin);
OLE2.ADD_ARG(v_args, wdMove);
OLE2.INVOKE(selin, 'MoveLeft', v_args);
OLE2.DESTROY_ARGLIST(v_args);
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, wdCharacter); --Unit
OLE2.ADD_ARG(v_args, countin); --Count
OLE2.ADD_ARG(v_args, wdExtend); --Extend
OLE2.INVOKE(selin, 'MoveRight', v_args);
OLE2.DESTROY_ARGLIST(v_args);
hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
OLE2.SET_PROPERTY(hFont, 'Underline', wdUnderlineSingle);
OLE2.RELEASE_OBJ(hFont);
END;
PROCEDURE WRITE_DATA (SELIN OLE2.OBJ_TYPE, TEXTIN VARCHAR2)
IS
/*This procedure writes data in the cells of the table
hFont OLE2.OBJ_TYPE;
v_args OLE2.LIST_TYPE;
wdCharacter CONSTANT number(5) := 1; --Default
--wdUnderline Class members
wdUnderlineSingle CONSTANT NUMBER(5) := 0;
---- wdMovementType Class members
wdExtend CONSTANT number(5) := 1;
wdMove CONSTANT number(5) := 0; --Default
---- WdParagraphAlignment Class members
wdAlignParagraphCenter CONSTANT number(5) := 1;
wdAlignParagraphLeft CONSTANT number(5) := 0;
wdAlignParagraphRight CONSTANT number(5) := 2;
---- HexColor = BBGGRR
myLightBlue CONSTANT number(8) := 16755370; --FFAAAA
BEGIN
hFont := OLE2.GET_OBJ_PROPERTY(selin, 'Font');
OLE2.SET_PROPERTY(hFont, 'Name', 'Calibri');
OLE2.SET_PROPERTY(hFont, 'Size', 10);
OLE2.SET_PROPERTY(hFont, 'Bold', False);
OLE2.SET_PROPERTY(hFont, 'Underline', wdUnderlineSingle);
OLE2.RELEASE_OBJ(hFont);
v_args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(v_args, textin);
OLE2.INVOKE(selin, 'TypeText', v_args);
OLE2.DESTROY_ARGLIST(v_args);
END;
Edited by: smilingbandit on 31-Mar-2010 7:05 PM
Edited by: smilingbandit on 31-Mar-2010 8:23 PM
Edited by: smilingbandit on Apr 1, 2010 6:14 AM: Reason - Fixed formatting of comments. -
How to select a new table in logical database after creating the Infoset
I have created a abap query report ,i have used logical data base ADA in the infoset in SQ02.In the logical database i had selected only two tables then ANALV and ANLB.Now my client wants one more field to be added and thats is from table ANEK.Now i need to select this table in logical database ADA.
Please assist on how to select another table available in the Logicaldata base now which i didnt select when i created the queryMarkus,
I have now selected the additional field Posting date in Document ANEK -BUDAT .Earlier the report had the fields from ANLCV - Current acquisition value ,ordinary dep posted selected for the output.
When i run the query after adding this new field ANEK-BUDAT the below warning is generated by system :
The query specifications cannot be used to generate a list,
i.e. the query will probably not return the list you desire.
If you still want to execute the query, please use the
"Generate" function
-> 'Generate'
Fields from parallel tables within a line*
Line: 01
Field: Posting Date in the Document
(ANEK-BUDAT, table ANEK)
Field: Ordinary depreciation posted
(ANLCV-NAFA GEB, table ANLCV)
Fields from parallel tables within a line*
Line: 01
Field: Posting Date in the Document
(ANEK-BUDAT, table ANEK)
Field: Current asset acquisition value
(ANLCV-LFD KANSW, table ANLCV)
2 warnings for query QUERY ***
Please advice .How get this new field added. -
DSO activation problem after creating the secondary indexes
Hi,
I am facing the problem with DSO activation after creating the secondary indexes.
Compared with Info Cubes there is no functionality available which allows dropping and recreating a secondary index before/after the data activation.
As a workaround I can write a simple report which drops and creates the indexes on database level.
By using a process chain, we can simply insert the drop index report before data activation and the create index report after the data activation process.
Can any body help me step by step procedure or Material to write the programs for delete index and create index reports on DSO object?..
Thanks in advance for your help.
Thanks & Regards,
Balahi,
in BI if you are using the dso for reporting then you can simply chk the settings of dso for SID generation.
no need to create the indexes or delete it.
if the dso is not used for report then no need to use indexes.
Ramesh -
Problem while dropping a table
Dear All,
I am facing a problem while dropping a table in Oracle 10g.
I am able to find the number of records in the table but unble to delete it.
SQL> select count(*) from merchant_audit;
COUNT(*)
30028278
SQL> drop table merchant_audit;
drop table merchant_audit
ERROR at line 1:
ORA-00942: table or view does not exist
I have to drop this table from the database. Please help.
regards,
SanthoshHi,
IS it a table ? Is it your table ?
Read this example :
sqlplus scott/*****
SQL> create table merchant_audit(col1 number);
Table created.
SQL> create public synonym merchant_audit for merchant_audit;
Synonym created.
SQL> grant select on merchant_audit to merchant;
Grant succeeded.
SQL> conn merchant/merchant
Connected.
SQL> select count(*) from merchant_audit;
COUNT(*)
0
SQL> drop table merchant_audit;
drop table merchant_audit
ERROR at line 1:
ORA-00942: table or view does not exist
SQL>
See owner into the dba_tables, and if synonym into dba_synonyms.
Nicolas.
Message was edited by:
Nicolas Gasparotto -
Refresh the table after closing the Popup iView
Hi all,
I have list of survey in my table. In that table i have toolbar button(DELETE) for deleting the survey. While deleting the survey it asks the confirmation. If we click Ok it delete the selected survey and close the popup also. what I want is I should refresh the table after closing the Popup.How can i achieve this?
Help me in this regard.
Thanks & Regards,
Hemalatha JHi Hema,
Check this link.
Visual Composer - You can do anything....
In this blog, they are used 'Refresh' Button and a Hidden 'Plain text' message to solve this problem. If you are satisfy with this you can take this solution.
Or you can try to trigger the 'Submit' action of 'Input form' once again from the 'Popup window' when the 'Delete' button is clicked.
Hope it helps...
Regards
Basheer
Edited by: Basheer on Dec 23, 2008 8:03 PM -
Problem while saveing in Table Control.
Hi
I am geting error while saving data in table control.
This table contol is pop up window at end of screen .
user enter qty & uom in TC..
Error i am getting is...
Field symbol has not been assigned.
Error analysis
The system tried to access an anasigned field symbol (data segment
number 32772).
The field symbol is no longer assigned, because a Unicode program
previously tried to set the field symbol using an ASSIGN statement with
an offset/length declaration. The memory addressed in this offset/length
declaration, however, no longer lay within the valid range.
Information on where terminated
The termination occurred in the ABAP program "SAPLOMCV" in
"CONVERSION_EXIT_MATN1_INPUT".
i Have coded like this..
MODULE USER_COMMAND_0112 INPUT.
CASE OKCODE.
WHEN 'BACK' or 'CANCEL'.
SET SCREEN 0.
This iti is contain data which diplay in TC
when 'DISPLAY'.
LOOP AT ITI.
read table iti with key ingr_code = iti-ingr_code
ingr_desc = iti-ingr_desc.
wka1-ingr_code = iti-ingr_code.
wka1-ingr_desc = iti-ingr_desc.
wka1-conc = iti-conc.
wka1-quantity = iti-quantity.
wka1-uom = iti-uom.
append wka1 to itf.
ENDLOOP.
WHEN 'SAV'.
loop at itf where check = 'x' .
update zacg_ns
set ingr_code = itf-ingr_code
col_name = itf-ingr_desc
conc = itf-conc
quantity = itf-quantity
UOM = itf-UOM
ru = itf-ru
where ingr_code = itf-ingr_code
and col_name = itf-ingr_desc.
zacg_ns-ingr_code = itf-ingr_code.
zacg_ns-col_name = itf-ingr_desc.
zacg_ns-conc = itf-conc.
zacg_ns-quantity = itf-quantity.
zacg_ns-UOM = itf-UOM.
update zacg_ns.
endloop.
leave program.
ENDCASE.
ENDMODULE. " USER_COMMAND_0112 INPUT
MODULE read_table_control INPUT
MODULE read_table_control INPUT.
MODIFY itf INDEX tc-current_line.
ENDMODULE. "read_table_control INPUT
*& Include ZACG_NS_2 *
*& Module STATUS_0111 OUTPUT
text
MODULE STATUS_0111 OUTPUT.
SET PF-STATUS 'ZNEWSHADE'.
SET TITLEBAR 'ZNS'.
ENDMODULE. " STATUS_0111 OUTPUT
*& Module STATUS_0112 OUTPUT
text
MODULE STATUS_0112 OUTPUT.
SET PF-STATUS 'ZTC'.
SET TITLEBAR 'xxx'.
DESCRIBE TABLE itf LINES lines.
tc-lines = lines.
ENDMODULE. " STATUS_0112 OUTPUt
PROCESS BEFORE OUTPUT.
MODULE STATUS_0112.
LOOP at itf WITH CONTROL TC CURSOR tc-current_line.
MODULE TC_PBO .
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP at itf .
module read_table_control.
ENDLOOP.
MODULE USER_COMMAND_0112.
Can any one help me..Hi,
Did you enter that filed later after creating the table control?
You check in the element list whether for that element u have an entry or not..
Regards,
Nishant -
IMovie is crashing after creating the large movie for YouTube.
Hey Guys!
So, I have been uploading to YouTube from iMovie for several years now and today I uploaded again as I usually do. The problem was that about 30 seconds before the end of my video it went black on YouTube! I deleted it off YouTube and reuploaded but it happened again! So, thinking that it was something on YouTube's end I deleted it but the next time I tried to upload, iMovie gave me this error message: "The project could not be prepared for publishing because an error occurred. (Not enough room in heap zone / )"
Now when I try to upload, iMovie crashes after creating the large movie to upload to YouTube!
I have restarted my computer, deleted items to create extra space on my disk, and ejected my iPhone so nothing else happens while I'm trying to create the large movie.
Does anyone have an idea of what is happening and how to fix it?
Thank you!I'm having a similar problem with Imovie 11. I wonder if the problem is in the new Mountain Lion update. Fortunatly, I cloned the drive befor installing the update. I've cloned this drive back to the original startup drive and gotten back to IMovie.
-
Item availability for selected items and directly create the delivery
Hi All,
For a very big sales order ..lets say having 700 line items ...is there any convenient way to create the delivery for selected items ..e.g. 30-40 line items rather going and selecting the line items then doing the item availability.
do you have any LSMW format by which we can do the item availability for selected items and directly create the delivery.
kindly Guide me..
With Regards
Azeez.MohdHi ,
There is no stand way of doing it . You need to take help of abaper to do this :
1. Create a t code where if you give sale order number , it displays a report with all the items with a check box near to it as we see in SE16 .
2. This report could be best in ALV form where users can do "ctr+f" and search only the required materials then select those lines and press a button on the top of report .
3. Once the button is pressed , program will run vL01n ( create delv in backgrnd) in a BDC form . At time of delev creating , the bdc program in backgrnd uses only those items which were selected by user and not the other items .
4. Program will create a delv using a BDC in background and return the delv number for user to view tht.
U can also try using FM : RV_DELIVERY_CREATE to create delv in backgrnd after user selection if BDC is getting tricky.
Hopefully ,this shuld work and will be a easy process for the customers.
Let us know the outcome .. .
B O L ..
Hope this Helps !!! -
TS1398 I have problems with my wifi connection after update the ios6 any advice
I have problems with my wifi connection after update the ios6 any advice
iOS 6 Wifi Problems/Fixes
Fix For iOS 6 WiFi Problems?
http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
iOS 6 iPad 3 wi-fi "connection fix" for netgear router
http://www.youtube.com/watch?v=XsWS4ha-dn0
Apple's iOS 6 Wi-Fi problems
http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
~~~~~~~~~~~~~~~~~~~~~~~
Look at iOS Troubleshooting Wi-Fi networks and connections http://support.apple.com/kb/TS1398
iPad: Issues connecting to Wi-Fi networks http://support.apple.com/kb/ts3304
WiFi Connecting/Troubleshooting
http://www.apple.com/support/ipad/wifi/
iOS: Recommended settings for Wi-Fi routers and access points http://support.apple.com/kb/HT4199
Additional things to try.
Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
How to Quickly Fix iPad 3 Wi-Fi Reception Problems
http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
If none of the above suggestions work, look at this link.
iPad Wi-Fi Problems: Comprehensive List of Fixes
http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
Fix iPad Wifi Connection and Signal Issues http://www.youtube.com/watch?v=uwWtIG5jUxE
Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
Unable to Connect After iOS Update - saw this solution on another post.
https://discussions.apple.com/thread/4010130
Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
~~~~~~~~~~~~~~~
If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
Cheers, Tom -
SUBMIT an ABAP report after creating the WI but before completion of WI.
Dear All,
I am having an activity which sends the approval work item.
Now my requirement is to SUBMIT an ABAP report after creating the WI but before completion of WI.
I can not call this report before approval activity because i need to pass this WI ID to this report.
Please suggest some way to solve this.
Regards,
AmarHello,
You could create a 2-from-2 fork and put the workitem in one branch and the report in the other. Have the report branch wait 1 minute and then read the workitem id from the other branch.
What is the purpose of this report? Why does it need the workitem id?
regards
Rick Bakker
hanabi technology -
Feedback after the error in SWEL after creating the PO
Hi!
After creating the PO, it says in SWEL.. "Feedback after error" . When I double clicked it, it said that the EVENT releasestepcreated, Import container contains errors (are any obligatory elements missing?)
What could be the possible error in this?
Thanks so much,
PaulaHi Paula,
Please check your binding from event to workflow.
You might have missed to export the event parameters to WF.
Please check the same in SWDD-> start events.
Thanks and Regards,
Swaminathan -
There is a problem in my iPhone device after updating the new version needed to ActiveX wants amyl, bus and my Lord and unfortunately forgot this data, what work Please reply my machine data is
Imei: 013055008069758
SerialNumber:DN*******TC0
mlbserialNumber: DQ************42D
plz hlep me
<Personal Information Edited by Host>There is a problem in my iPhone device after updating the new version needed to Active iPhone 4s
and
I upgraded to 7.0.3 yesterday and now my battery only lasts about 4 hours with very little active use.
iOS 7.0.3 -
There is a problem in my iPhone device after updating the new version needed to ActiveX wants amyl, bus and my Lord and unfortunately forgot this data, what work Please reply my machine data is
Imei: 013055008069758
SerialNumber:DN*******TC0
mlbserialNumber: DQ************42D
plz plz plz hlep me
<Edited by Host>There is a problem in my iPhone device after updating the new version needed to Active iPhone 4s
and
I upgraded to 7.0.3 yesterday and now my battery only lasts about 4 hours with very little active use.
iOS 7.0.3 -
What is the difference between these two URLS after creating the desktop
Hi
I am accessing one portlet (Portlet is Remote portlet), after created the desktop,
this URL is : http://localhost:7001/DemoPortalWeb/page/Demo/desktop/ServiceDelivery
It successfully rendering to login portlet now, when i am trying to hit the valid URL
http://localhost:7001/DemoPortalWeb/appmanager/Demo/desktop/servicedelivery
it is giving the Error code 404
only difference is that 'appmanager' is replaced with 'page', How to access my portlet with
this URL http://localhost:7001/DemoPortalWeb/page/Demo/desktop/ServiceDeliveryHello,
To change the "appmanager" portion of the URL, all you need to do is add another servlet-mapping to your (consumer) webapp's WEB-INF/web.xml file. For example, if you wanted "page" to work as a replacement for "appmanager", you could add this to web.xml:
<servlet-mapping>
<servlet-name>AppManagerServlet</servlet-name>
<url-pattern>/page/*</url-pattern>
</servlet-mapping> Kevin
Maybe you are looking for
-
Displaying Custom Error Message in ALV
Hello Experts, Usually, when an error occurs in editable ALV, the standard WD ALV functionality marks the particular error cell in red and displays the error message. I want the same functionality for custom error messages in event ON_DATA_CHECK. I'm
-
Javascript con forms. NotAllowedError.
Buenas, tengo hecho un formulario que va creando dinamicamente unos txtbox con un botón. El tema es que quiero insertar este pdf, dentro de otro pdf. Cunado lo hago, no me funciona la funcionalidad de generar dinamicamente los txtbox... me dá el erro
-
No Music On Apple TV's AirPlay
My music will not play with AirPlay from my Apple TV when using my iPhone but my videos will, to get the music to play I have to reset the Apple TV and then it will play for a day or two... All my software is up to date on all devices.
-
HT4623 How many email addresses can I add to my Apple account for iMessage?
I have an iPod, an iPod mini, an iPod touch and an iPod Touch. I would like to use four unique email addresses for each device, mainly to not get duplicate messages. I also became sober recently. And the frustration of not being able to uniquely iden
-
Index Synopsis Rollovers ? Can it be done
Hi everyone, Was wondering if their was a way in RH7 to simulate something like a Google Search results synopsis in a RH generated index. In other words, rolling over an index entry brings up a little text window in which can be a summary of that ind