Determining canvas type using PLSQL
Is it possible to determine the canvas type at runtime ?
I have a canvas name or canvas id.
I want to find out if the canvas is a content, stacked or tab canvas
Somre more info ....
Tab canvas is my biggest problem right now.
I tried detecting it by using GET_CANVAS_PROPERTY (..., TOPMOST_TAB_PAGE) thinking that if it returned NULL or raised an error I could use that to determine that it was not a tab canvas. However, this raises an error that I can only suppress using an ON-ERROR trigger which is not a good solution (I am hoping to imlement a solution within a single function)
Any ideas ?
thanks
thanks everyone - I managed to resolve this by simplifying my requirements
Francois tip lead my to the resolution.
I only needed to detect if a canvas is one of the following
1) a tab canvas
2) a non-tab canvas
I wrote a function to detect if a canvas is a tab canvas. The function loops through all items in the form and return TRUE if it finds an item on the canvas that also has GET_ITEM_PROPERTY (... ITEM_TAB_PAGE ) IS NOT NULL
P.S I cant rely on the canvas naming standard as this is an existing app with inconsistent canvas names.
thanks for ideas.
Similar Messages
-
Determining image types used in pdf
Hi,
I was sent a pdf by a client and was wondering if there was a way to determine what types of images he used in the file.
For example, did he use .jpg, .tif,, .eps etc.
Thanks,
Andrew Hutton
[signature deleted by host]In the Object palette make sure Embed Image Data is ticked.
-
Get the tab page that the mouse clicked on using PLSQL
Another canvas related question ...
Is it possible to detect the tab page that the mouse clicked on
from within a WHEN-MOUSE-DOUBLECLICKED trigger,
SYSTEM.MOUSE_CANVAS returns the name of the tab canvas.
However, I need the name of the tab page within the tab canvas
thanks
Scottresolved - thanks
resolution notes follow:
========================
I forgot to mention that I dont know the type of canvas at runtime,
so the code needs to work for tab and non-tab canvases
Unfortunately, calling TOPMOST_TAB_PAGE for a non-tab canvas results in an
error that can only be suppressed using an ON-ERROR trigger
(SYSTEM.MESSAGE_LEVEL wont supress it, nor will EXCEPTION)
anyway, I resolved this via another related post that I raised today.
"Determining canvas type using PLSQL"
thanks anyway. -
SQL types over PLSQL types while using Oracle Applications adapter in BPEL
Use SQL types over PL/SQL types while using Oracle Applications adapter
in BPEL/ ESB
This document will be focusing on Oracle Applications adapter. However Database adapter is much like OA adapter (even OA adapter uses DB Adapter), so the readers who are interested to explore DB adapters, can relate things with this document and go further as well.
Some Guidelines for writing PL/SQL APIs for OA Adapter
As we know when we create a partner link from the OA adapter wizard it sometimes writes some wrapper script supportive to the OA Adapter WSDL which contains below
* Object type for PL/SQL RECORD
* Nested table of the given type for PL/SQL TABLE. For example, the nested table of NUMBER.
* INTEGER substituted for PL/SQL BOOLEAN
* Wrapper Script for converting above three set of data types . (PLSQL to SQL and SQL to PLSQL conversion functions)
In runtime this wrapper script for converting PL/SQL to SQL and SQL to PL/SQL is an extra overhead.
So the first advice would be to avoid the use of the below as parameters of PLSQL API being called by OA Adapter.
* PL/SQL RECORD
* PL/SQL TABLE. For example, the nested table of NUMBER.
* PL/SQL BOOLEAN
In other way we can say we should try to use only SQL data types in arguments if we are planning to call any PL/SQL API from the OA Adapter.
If the requirement is to use a table or record uses the Object type. In place of BOOLEAN better to use VARCHAR or INTEGER what ever fulfills your requirement. Following this guideline we can reduce a huge number of Line of codes to be run each time the adapter being called.
Generally, Oracle E-Biz standard APIs use PL/SQL record types and table types so when there is a requirement to call these API’s from OA Adapter (this is a common requirement in development), and if we directly browse the API in OA Adapter Configuration Wizard and create the partner link, again a huge number of code is written by the wizard in the wrapper script (a number of extra mapping of fields which are not being used in the interface).
In this case better would be to create an Object type with only the required fields which are being used in that call and use them as parameters for the PLSQL API.Find the complete document
http://www.4shared.com/file/167171882/29525116/Use_SQL_types_over_PLSQL_types.html -
How can i determine if a directory exist using plsql
i want to determine if a directory exist
e.g
directory in variable dir_source:= 'xc/folderName/SubFolder'
i want find how to determine if the above exist on my server using plsql
Edited by: kama021 on Jun 24, 2009 2:21 AM
i don't want to create a direcotry if it exist already so how do i do this
if the below directory exist then don't create how do this
'xc/folderName/SubFolder'
Edited by: kama021 on Jun 24, 2009 3:26 AMWhat OS? The trick is to use a known special file that always exists in every folder. On Windows an example of this is NUL. It's the equivalent of /dev/null but exists in every directory automagically. That means you can do this:
SQL> create directory temp as 'C:\TEMP';
Directory created.
SQL> select dbms_lob.fileexists(bfilename('TEMP', 'NUL')) from dual;
DBMS_LOB.FILEEXISTS(BFILENAME('TEMP','NUL'))
1
1 row selected.
SQL> create directory test as 'C:\NOTREAL';
Directory created.
SQL> select dbms_lob.fileexists(bfilename('TEST', 'NUL')) from dual;
DBMS_LOB.FILEEXISTS(BFILENAME('TEST','NUL'))
0
1 row selected. -
How can I determine the type of video out connector I need?
Howdy,
I have a white macbook purchased Jun/2008. I want to connect to a TV but don't know what adapter I need. How can I determine the type of video out jack my macbook has?
System Profiler says the model identifier is "MacBook 4,1". Under Graphics/Displays the only thing it says about the "Display Connector" is that no display is connected. Too bad it doesn't tell me what type of connector it is. If I knew the name of the connector I'd probably be home free. But it seems like every macbook model has a different video connector (since the state of the art has advanced over the years) and I haven't been able to keep up with the names.
Now, I have a 6" long adapter that will convert this connector to VGA. And searching the Apple store for VGA adapters, the existence of mine says my connector is might be one of "Mini DisplayPort", "Apple Mini DVI", "Apple DVI", or "Apple Micro-DVI". But then there is also the connector at
http://store.apple.com/us/product/M8639G/A?mco=MTY3ODQ5OTY
and that looks like the one I have. But unlike the other adapters, this one is just called a "VGA Display Adapter". Does the connector have a name? How can I find adapters that have that same connector?
I know I could use the adapter I have, plus a VGA to VGA cable, to hook up to a TV. But the quality of the VGA signal is poor in the digital world. My goal is to hook up to the TV via HDMI. Is this even possible? By which I mean, will my macbook generate the signals necessary to be able to be converted to HDMI?
Thanks for any help,
Zebulon TThanks, Ded,
You're right, the cable that I have won't work. I't from my previous, 2004 iBook. This is pretty embarrassing... I looked at the cable but didn't bother to try plugging it in.
Looking at the close-up picture of the Mini-DVI to VGA adapter, that does look like the right connector. So I have Mini-DVI, and the other apter you pointed to can convert this to DVI. I'll take a look to see what makes the most sense, connector wise, downstream from that.
Thanks very much.
Zeb T -
Determine the type of the caught exception
Hi!
Here is my problem :
I'm using a web service and the method I call throws different types of Exception (RemoteException, ServiceException, etc...)
And, the reaction to the caught exception depends on its type, that's why I need to determine what type of exception i've caught. I know that with C# I use the boolean function is :
if (exception is TypeOfException1)
// associated reaction
else if(exception is TypeOfException2)
// associated reaction
}Is there any method or any other way in Java to do that?
Thanks a lot,
Gan�che.>
Here is my problem :
I'm using a web service and the method I call throws different types of Exception (RemoteException, ServiceException, etc...)
And, the reaction to the caught exception depends on its type, that's why I need to determine what type of exception i've caught. >
try {
// stuff that may cause exceptions..
} catch(RemoteException re) {
// deal with this re
} catch(ServiceException se) {
// deal with this se
} catch (Throwable didNotExpectThis) {
// exceptional!
didNotExpectThis.printStackTrace();
} -
How to determine IE type(32 bit or 64 bit) in a task sequence while updating Java
How to determine IE type(32 bit or 64 bit) in a task sequence
Hi,
Currently i have to update new version of Java after removing all the previous existing version of Java by using TS in SCCM 2007.
we have both 32 bit and 64 bit browser in the environment. I am stucked in determining whether the browser is of 32 bit or 64 bit.
How to determine IE type(32 bit or 64 bit) in a task sequence so that respective java can be installed for that IE browser.
will highly appreciate quick response.
Thanks in advance.
DayaBut you also need to install JRE x86 on x64 systems, since most people actually use the 32bit browsers on x64 systems.
The detection logic is actually pretty simple -- just check the right registry hive to find the installation location of the BIN\JAVA.DLL. Both pathnames are stored in HKLM\Software\JavaSoft\Java Runtime Environment\1.7 in the registry value "JavaHome",
but the x86 path is stored in the 32-bit hive and the x64 path is stored in the 64-bit hive.
Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
SolarWinds Head Geek
Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
http://www.solarwinds.com/gotmicrosoft
The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds. -
How to determine itab type at run time
I need to write a subroutine that organizes data in internal tables for presentation by a smartform. There are a few similarly structured internal tables all with the same field name ("recipe_type") by which the data is sorted. My problem is that how I can determine the type of the itab inside my subroutine at run time? Is it ever possible in ABAP?
The subroutine code is attached below. Thanks for any help.
FORM beautify_itab TABLES itab_in TYPE table
USING v_type TYPE any
CHANGING itab_out TYPE table.
Data declaration
DATA: v_data_row LIKE LINE OF itab_in, " THIS WON'T COMPILE!
v_blank_row LIKE LINE OF itab_in. " blank row
Organize the display of the table data
LOOP AT itab_in INTO v_data_row.
IF v_type <> itab_in-recipe_type. " 'recipe_type' is the sort key for the incoming itabs
v_type = itab_in-recipe_type.
IF sy-tabix > 1.
APPEND v_blank_row TO itab_out.
ENDIF.
APPEND v_data_row TO itab_out.
ELSE.
CLEAR v_data_row-recipe_type.
APPEND v_data_row TO itab_out.
ENDIF.
ENDLOOP.
ENDFORM. "beautify_itabThe following code does what I want, but only if the input itab structure is declared first in the program. It won't work if the itab is declared as itab_in TYPE TABLE OF sflight. This is because the function 'GET_COMPONENTS_LIST' only can load the structure of a field declared explicitly in the program. Does anybody know of any method to load the structure of an itab based off a dtab?
Thanks you guys for answers. Points have been rewarded.
*& Report Z_GET_ITAB_TYPE_AT_RUN_TIME
REPORT z_get_itab_type_at_run_time.
DATA: BEGIN OF itab_in OCCURS 0,
seatsocc_b LIKE sflight-seatsocc,
fldate LIKE sflight-fldate,
END OF itab_in,
itab_out TYPE TABLE OF string,
wa_itab_out TYPE string.
SELECT seatsocc_b fldate
INTO TABLE itab_in
FROM sflight
WHERE carrid = 'AA' AND
connid = '0017'
ORDER BY seatsocc_b.
PERFORM beautify_itab
TABLES
itab_in
USING
sy-repid
'itab_in'
'SEATSOCC_B'
CHANGING
itab_out.
LOOP AT itab_out INTO wa_itab_out.
WRITE: / wa_itab_out.
ENDLOOP.
*& Form beautify_itab
text
-->ITAB_IN text
-->V_KET_FIELD text
-->ITAB_OUT text
FORM beautify_itab TABLES itab_in TYPE table
USING v_prog_name LIKE sy-repid
v_itab_in_name TYPE any
v_key_field_name TYPE rstrucinfo-compname
CHANGING itab_out TYPE table.
DATA: itab_fields TYPE TABLE OF rstrucinfo,
v_field_name LIKE rstrucinfo-compname,
v_old_key TYPE string,
v_field_value TYPE string,
v_data_line TYPE string,
v_tabix LIKE sy-tabix,
c_blank_row TYPE string VALUE ''.
FIELD-SYMBOLS: <fs_field>,
<fs_data_line>,
<fs_field_list> TYPE rstrucinfo.
gets all of the components of a structure
CALL FUNCTION 'GET_COMPONENT_LIST'
EXPORTING
program = v_prog_name
fieldname = v_itab_in_name
TABLES
components = itab_fields.
LOOP AT itab_in ASSIGNING <fs_data_line>.
v_tabix = sy-tabix.
LOOP AT itab_fields ASSIGNING <fs_field_list>.
v_field_name = <fs_field_list>-compname.
ASSIGN COMPONENT v_field_name OF STRUCTURE
<fs_data_line> TO <fs_field>.
v_field_value = <fs_field>.
IF v_key_field_name = v_field_name.
IF v_old_key <> v_field_value.
v_old_key = v_field_value.
IF v_tabix > 1.
APPEND c_blank_row TO itab_out.
ENDIF.
ELSE.
CLEAR v_field_value.
ENDIF.
ENDIF.
CONCATENATE v_data_line v_field_value INTO v_data_line
SEPARATED BY space.
ENDLOOP.
APPEND v_data_line TO itab_out.
CLEAR v_data_line.
ENDLOOP.
ENDFORM. "beautify_itab -
Canvas of canvas type "tab" doesn't get displayed
I have one canvas which displays fields from two database blocks.
Next I have a second canvas of canvas type "tab".
I have already added the fields in the tab pages but the problem is that when I compile and run the form, only the first canvas is displayed.
I don't see the canvas with the two tab pages.
What code to I need to display the second canvas please?
Thanks.The tab canvas should appear without using any code.
make sure both of your canvases are assigned to the same window; they have the same value for the "Window" property. Also make sure you don't have any items on your content canvas (main canvas or first canvas) overlaying the tabbed canvas.
If there are any overlaying items this will cause the tab canvas to hide to show the item, a tab canvas acts the same as a stacked canvas, the only difference is that it has tab pages.
Tony -
How to determine the type of an existing iView
Hi,
While creating an iView using wizard there is a big list of type of iViews. But after creation of iView, how do I determine the type of iView. Which attribute or property of iView holds this information?
-Lave KulshreshthaYou can copy and paste the existing Iview changing the name and ID if u want to replicate the same.
Also, when you create a new iView from a template, you get a list of them e.g SAP BSP iView etc.
Now what you see in the code link is much similar to what you see as a list of templates when u create iViews. So its pretty simple.
I hope this helped you. -
How to define object type in plsql
I create a type...
CREATE OR REPLACE TYPE t_Archive_Data_Obj AS OBJECT
(Archive_Name VARCHAR2(40), Archive_Data CLOB);
I create a type in plsql.....
TYPE tt_Archive_Data IS TABLE OF t_Archive_Data_Obj;
Can I, instead of creating the object type as a database object, some how define the same in plsql and then create a table type and use.
Thanks & Regards.coz I'm using it as an out parameter in plsql procedure and this procedure is called by a java application.
Now to access this type in java to get the returned value I used Jpublisher to generate a class, this class is being used in java application.
I'm sorry I have not check one thing that now if I instead used record in plsql and try to access the returned value using the same class will it work or not. I should have tested then asked questions on forum.
Regards. -
Problem with RGB Values for Canvas Type ‚Horizontal Toolbar' in Webforms 10
Hello,
I have a problem with the canvas type ‘Horizontal Toolbar’ in Webforms 10g.
When I try to set or change the RGB value of a ‘Horizontal Toolbar’ with the forms function
Set_Canvas_Property(‘my_horizontal_toolbar’, BACKGROUND_COLOR, rgb-value)
(at runtime) it has no effect in Webforms 10g for the canvas type ‘Horizontal Toolbar’ (the background color of the horizontal toolbar doesn’t change).
But it works fine for other canvas types like ‘Stacked’ or ‘Content’.
In Oracle 6i (Client / Server) this function works quiet well (even for the ‘Horizontal Toolbar’ canvas type).
The reason why we are using rgb values instead of visual attributes in this case is, that the color of the ‘Horizontal Toolbar’ should be customizeable (via a RGB Field) for our customers (at runtime).
Further more we are using the same technique for Text-Field-Items, Content- and Stacked-Canvases (and all works fine).
Maybe it has something to do with the pre-configured IAS color-schema (blaf).
But changing the color schema (e.g.: from 'blaf' to 'red') has no effect also.
Thanks for your help.This is probably bug 777312. Call Support for the latest info on this bug and for help getting it fixed.
-
Determining the "type" of a SQL statement
I'm using the Oracle thin driver with my JDBC program.
I want to be able to accept a String containing a SQL statement from the user and execute it. If it's a select statement then present the rows returned in a JTable, otherwise retrieve the return value for the command (eg INSERT, DELETE, etc).
Is there any "readymade" method in JDBC or Oracle driver to determine the type of a SQL statement in this sense. Or do I have to parse it myself? (Imagine having to write code to strip comments out etc!)There is no "readymade" method. But an easy way to check will be to check the first 6 charchters of the string.
You could use
newString = SQL.substring(0, 5); to obtain the first 6 characters.
if the characters are "select"
//do select things
else
// do insert/delete whatever things -
Determining the type of a field-symbol
Hi!
I want to create a logical expression that determines the type of field-symbol that was passed in to a function.
i want to do something like this:
IF imported_fieldsymbol IS OF TYPE some_type
ENDIF
how do you create such an expression in ABAP?
regardsHi,
You can use the RTTS - Run Time Type Service.
Try the sample code
TYPES my_type TYPE i.
DATA: my_data TYPE my_type,
descr_ref TYPE ref to cl_abap_typedescr.
START-OF-SELECTION.
descr_ref = cl_abap_typedescr=>describe_by_data( my_data ).
The hierarchy of RTTS classes are as follows,
CL_ABAP_TYPEDESCR
|
|--CL_ABAP_DATADESCR
| |
| |-- CL_ABAP_ELEMDESCR
| |--CL_ABAP_REFDESCR
| |--CL_ABAP_COMPLEXDESCR
| |
| |--CL_ABAP_STRUCTDESCR
| |--CL_ABAP_TABLEDESCR
|
|--CL_ABAP_OBJECTDESCR
|
|--CL_ABAP_CLASSDESCR
|--CL_ABAP_INTFDESCR
Regards,
Mustajab
Maybe you are looking for
-
I have an old iCloud account on my phone. This account was set up using an old Apple ID and password. Since then I've changed both id and password. In order to delete the existing (old) iCloud account from my phone I need to provide the old password
-
Cut video clips from Apple Imac
Hoping somebody might be able to help me out..I'm not very techie when if comes to video editing etc on my Apple Imac. I have a number of large video files that are far too long in playing length to post to you tube so I am looking for the easiest wa
-
How to keep videos from pixelating in browser
Hi, How do I keep my flash videos from pixelating badly when viewed in a browser using the zoom feature (as in Opera, Explorer, and Firefox)? So far, I've been embedding my videos using the Dreamweaver CS3 "insert: media: flash video" routine. The vi
-
Query on delivery document number
Hi All, I have requirement i have to catch the delivery document number dynamically from the txn VL02 i am writing a report in that report i have to catch that delivery document number. the delivery is created by some other person and after creating
-
Hi, I'm building an app that relies heavily on reading plist files. I've got the basics down using System Events, for example: tell application "System Events" set plistFile to "/Library/Preferences/com.domain.prefs.plist" set returnVal to (value of