SAPscript SQL within form possible?
Hi All
Is it possible for me to do a SELECT statement within the SAPscript form in SE71? I don't want to change the print program just to add one long text from T003T.
Thanks,
Adrian
Hi,
It is not possible to perform a select query within the SAP SCRIPT.
I think you can go for an external subroutine. Check the below link for more details.
http://wiki.sdn.sap.com/wiki/display/profile/ExternalSubroutinesinSAPScript
Regards,
Vijaymadhur.
Similar Messages
-
Spry multiple -OR logic- validation in one form possible?
Dear readers, i'd like to ask for help.
I have a single form with two user-input field:
1: text input
2: select
The user must fill one of them, but only one! Each input must
be validated because of syntax, the validation works well, but each
input must be filled before the submit is possible. I'd like to
know, is there any method to check if one of the inputs is filled,
and validation will be succeed?
(each input must be in same form, with separated forms the
problem is not exist)
Thank you in advance!Check out the EXEC_SQL command under help in Forms
The EXEC_SQL package allows you to access multiple Oracle database servers on several different connections at the same time. Connections can also be made to ODBC data sources via the Open Client Adapter (OCA), which is supplied with Developer. To access non-Oracle data sources, you must install OCA and an appropriate ODBC driver.
The EXEC_SQL package contains procedures and functions you can use to execute dynamic SQL within PL/SQL procedures. Like the DBMS_SQL package, the SQL statements are stored in character strings that are only passed to or built by your source program at runtime. You can issue any data manipulation language (DML) or data definition language (DDL) statement using the EXEC_SQL package. -
Dynamic SQL within a SQL Query ?
is there any possibility to do like this ?
SELECT table_name, XXXXXXXX('SELECT Count(*) FROM '||table_name) tot_rows
FROM dba_tables
WHERE owner = 'SCOTT';or any other trick to run dynamic SQL within the SQL Query?
Hoping....that it should be.
Regards,
OrapdevOne small disadvantage: it is executing 202 SQL statements: 3 "user SQL statements" (the one above and the 2 "select count(*)..."), and 199 internal ones ...How did you get to those numbers?
I just traced this statement and found completely different results:
TKPROF: Release 10.2.0.3.0 - Production on Tue Jul 10 12:12:10 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Trace file: diesl10r2_ora_5440.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
declare cursor NlsParamsCursor is SELECT * FROM
nls_session_parameters;begin SELECT Nvl(Lengthb(Chr(65536)),
Nvl(Lengthb(Chr(256)), 1)) INTO :CharLength FROM dual; for NlsRecord in
NlsParamsCursor loop if NlsRecord.parameter = 'NLS_DATE_LANGUAGE' then
:NlsDateLanguage := NlsRecord.value; elsif NlsRecord.parameter =
'NLS_DATE_FORMAT' then :NlsDateFormat := NlsRecord.value; elsif
NlsRecord.parameter = 'NLS_NUMERIC_CHARACTERS' then
:NlsNumericCharacters := NlsRecord.value; elsif NlsRecord.parameter =
'NLS_TIMESTAMP_FORMAT' then :NlsTimeStampFormat := NlsRecord.value;
elsif NlsRecord.parameter = 'NLS_TIMESTAMP_TZ_FORMAT' then
:NlsTimeStampTZFormat := NlsRecord.value; end if; end loop;end;
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50
SELECT NVL(LENGTHB(CHR(65536)), NVL(LENGTHB(CHR(256)), 1))
FROM
DUAL
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.01 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 0 0 1
total 3 0.01 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50 (recursive depth: 1)
Rows Row Source Operation
1 FAST DUAL (cr=0 pr=0 pw=0 time=7 us)
SELECT *
FROM
NLS_SESSION_PARAMETERS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 0 0 17
total 3 0.00 0.00 0 0 0 17
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50 (recursive depth: 1)
Rows Row Source Operation
17 FIXED TABLE FULL X$NLS_PARAMETERS (cr=0 pr=0 pw=0 time=124 us)
select PARAMETER,VALUE
from
nls_session_parameters where PARAMETER in('NLS_NUMERIC_CHARACTERS',
'NLS_DATE_FORMAT','NLS_CURRENCY')
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 0 0 3
total 3 0.00 0.00 0 0 0 3
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50
Rows Row Source Operation
3 FIXED TABLE FULL X$NLS_PARAMETERS (cr=0 pr=0 pw=0 time=57 us)
select to_char(9,'9C')
from
dual
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 0 0 1
total 3 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50
Rows Row Source Operation
1 FAST DUAL (cr=0 pr=0 pw=0 time=2 us)
SELECT table_name,
DBMS_XMLGEN.getxmltype ('select count(*) c from ' || table_name).EXTRACT
('//text').getstringval
() tot
FROM dba_tables
WHERE table_name IN ('EMP', 'DEPT') AND owner = 'SCOTT'
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.01 0.02 0 48 0 2
total 3 0.01 0.02 0 48 0 2
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50
Rows Row Source Operation
2 HASH JOIN (cr=42 pr=0 pw=0 time=2952 us)
2 MERGE JOIN CARTESIAN (cr=42 pr=0 pw=0 time=1206 us)
2 NESTED LOOPS OUTER (cr=42 pr=0 pw=0 time=478 us)
2 NESTED LOOPS OUTER (cr=36 pr=0 pw=0 time=421 us)
2 NESTED LOOPS OUTER (cr=30 pr=0 pw=0 time=379 us)
2 NESTED LOOPS OUTER (cr=30 pr=0 pw=0 time=365 us)
2 NESTED LOOPS (cr=22 pr=0 pw=0 time=312 us)
2 NESTED LOOPS (cr=16 pr=0 pw=0 time=272 us)
2 NESTED LOOPS (cr=8 pr=0 pw=0 time=172 us)
1 TABLE ACCESS BY INDEX ROWID USER$ (cr=2 pr=0 pw=0 time=56 us)
1 INDEX UNIQUE SCAN I_USER1 (cr=1 pr=0 pw=0 time=30 us)(object id 44)
2 INLIST ITERATOR (cr=6 pr=0 pw=0 time=111 us)
2 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=6 pr=0 pw=0 time=87 us)
2 INDEX RANGE SCAN I_OBJ2 (cr=4 pr=0 pw=0 time=54 us)(object id 37)
2 TABLE ACCESS CLUSTER TAB$ (cr=8 pr=0 pw=0 time=98 us)
2 INDEX UNIQUE SCAN I_OBJ# (cr=4 pr=0 pw=0 time=26 us)(object id 3)
2 TABLE ACCESS CLUSTER TS$ (cr=6 pr=0 pw=0 time=39 us)
2 INDEX UNIQUE SCAN I_TS# (cr=2 pr=0 pw=0 time=13 us)(object id 7)
2 TABLE ACCESS CLUSTER SEG$ (cr=8 pr=0 pw=0 time=37 us)
2 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=4 pr=0 pw=0 time=21 us)(object id 9)
0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=4 us)(object id 36)
2 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=6 pr=0 pw=0 time=33 us)
2 INDEX UNIQUE SCAN I_OBJ1 (cr=4 pr=0 pw=0 time=23 us)(object id 36)
2 TABLE ACCESS CLUSTER USER$ (cr=6 pr=0 pw=0 time=28 us)
2 INDEX UNIQUE SCAN I_USER# (cr=2 pr=0 pw=0 time=12 us)(object id 11)
2 BUFFER SORT (cr=0 pr=0 pw=0 time=716 us)
1 FIXED TABLE FULL X$KSPPI (cr=0 pr=0 pw=0 time=661 us)
1436 FIXED TABLE FULL X$KSPPCV (cr=0 pr=0 pw=0 time=1449 us)
select count(*) c
from
EMP
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 1 0 1
total 4 0.00 0.00 0 1 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50 (recursive depth: 1)
Rows Row Source Operation
1 SORT AGGREGATE (cr=1 pr=0 pw=0 time=96 us)
14 INDEX FULL SCAN EMP_IDX (cr=1 pr=0 pw=0 time=46 us)(object id 61191)
select metadata
from
kopm$ where name='DB_FDO'
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 2 0 1
total 3 0.00 0.00 0 2 0 1
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID KOPM$ (cr=2 pr=0 pw=0 time=42 us)
1 INDEX UNIQUE SCAN I_KOPM1 (cr=1 pr=0 pw=0 time=22 us)(object id 365)
select count(*) c
from
DEPT
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 1 0 1
total 4 0.00 0.00 0 1 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 50 (recursive depth: 1)
ALTER SESSION SET sql_trace=FALSE
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
Parsing user id: 50
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 5 0.00 0.00 0 0 0 0
Execute 5 0.00 0.00 0 0 0 1
Fetch 3 0.01 0.02 0 48 0 6
total 13 0.01 0.03 0 48 0 7
Misses in library cache during parse: 0
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 5 0.00 0.00 0 0 0 0
Execute 5 0.01 0.00 0 0 0 0
Fetch 7 0.00 0.00 0 4 0 21
total 17 0.01 0.00 0 4 0 21
Misses in library cache during parse: 0
9 user SQL statements in session.
1 internal SQL statements in session.
10 SQL statements in session.
Trace file: diesl10r2_ora_5440.trc
Trace file compatibility: 10.01.00
Sort options: default
1 session in tracefile.
9 user SQL statements in trace file.
1 internal SQL statements in trace file.
10 SQL statements in trace file.
10 unique SQL statements in trace file.
132 lines in trace file.
0 elapsed seconds in trace file.I only see a ratio of 1:9 for user- to internal SQL statements?
michaels> select * from v$version
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production -
Create a jdbc connection within forms
I have created a little piece of java code that connects to my database via a jdbc connection, inserts a value into a table, commits, then closes the jdbc connection.
This works perfectly in JDeveloper.
Now, I need to use it within forms, but forms is throwing an exception in the java console: [I have signed the file]
and I also get an alert that says "FRM-92100: Your connection to the Server was interrupted. This may be the result of a network error or a failure on the Server. You will need to reestablish your session."
I'm assuming when my java code tries to do a jdbc connection, it conflicts with the already established forms connection. Does anyone have any suggestions on how to overcome this?
-----------------java console exception-----------------
java.lang.IllegalAccessException: myconnection
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at oracle.forms.handler.UICommon.instantiate Unknown Source)
at oracle.forms.handler.UICommon.onCreate(Unknown Source)
at oracle.forms.handler.ButtonItem.onCreate(Unknown Source)
at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
at oracle.forms.engine.Runform.processMessage(Unknown Source)
at oracle.forms.engine.Runform.processSet(Unknown Source)
at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
at oracle.forms.engine.Runform.onMessage(Unknown Source)
at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
at oracle.forms.engine.Runform.startRunform(Unknown Source)
at oracle.forms.engine.Main.createRunform(Unknown Source)
at oracle.forms.engine.Main.start(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
------------------java code-------------------------
NOTES: of course I have taken out the real ip
address, the db name, and the login and password.
import java.sql.*;
import java.io.*;
import oracle.jdbc.driver.*;
import oracle.forms.ui.VButton;
class connection extends VButton
public static void main (String[] args) {
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url = "jdbc:oracle:thin:@<ip>:1521:<databasename>";
Connection conn = DriverManager.getConnection(url,"<login>","<password>");
Statement stmt = conn.createStatement();
ResultSet rs;
rs = stmt.executeQuery("insert into lh_test (my_name) values ('this')");
rs = stmt.executeQuery("commit");
conn.close();
} catch (Exception e) {
System.err.println("Got an exception! ");
System.err.println(e.getMessage());Hi 348874,Frank
Frank,do you thinck that if this java class would extend VBean,instead of VButton will it make any diffence?(I mean,it do has a main method,wich isn't executed when the VButton initialises).
Ín fact,when having a closer look into the java class(wich ,obvioulsly I didn't last time) I'm quite confused...why is this exception raising?
This Component should do nothing in fact,when inserted into a form.
As far as I know,from Forms Applet point of view,this class should be exactly a VButton,because the constructor and init() method are exactly the ones inherited from VButton(This class isn't adding anything to VButton)...Am I wrong?? -
Querying data from External Source from within FORMS
I have a form that is built based on Oracle tables.
I need to execute a Select statement via ODBC from within Forms procedures. This is going to a SQL Server DB to get some information for validation purpose.
I do not need to bring this in to a Forms Block.
Any thoughts?
ThanksHi
What version of forms do you use? If you use forms 6i, take a look at the EXEC_SQL package. You can access oracle databases and ODBC databases (using OCA) independently of the main database connection -- well, I never tried but that is what the documentation says.
I am not sure about version 9i... the package is there, but I could not find anything in the help about it (what is not a good sign...)
hth
Luis Cabral -
Grant privileges, roles within Forms
Hello,
i have a forms application where each year can appear new users (e.g. employees), and i when a new employee appears i wanna grant him privileges, roles, etc within Forms. so is it possible having a form(accesible just for dba user) from where he can assign roles to another users ? (in employee table i have a column 'username'). also, when i insert a new employee, in post-insert query (i think) is it possible to have something like
create user .... identified by ....... but here is a problem.. where can i write the password?
Please clarify :)
Regards,Roger22 wrote:
but when i run the script how can i specify the password?what do you mean by specify the password? What's exactly your problem/requirement with specifying the pw?
You can do this in forms using forms_ddl, but I'd use a database procedure for this which creates the user, does the granting stuff etc.
e.g.:
create or replace procedure createUser(ivUsername in varchar2) is
cursor cGrants(cvUsername varchar2) is
select 'grant '||decode(object_type, 'TABLE', 'select, insert, update, delete ', 'PROCEDURE', 'execute ', [...])|| ' to '||cvUserName as grant_stmt,
'create synonym '||object_name||' for '||cvUserName||'.'||object_name as syn
from user_objects
where object_name != 'CREATEUSER'
and object_name not in (select synonym_name from all_synonyms where owner = upper(cvUserName);
begin
execute immediate 'create user '||ivUserName||'identified by '||ivUserName||' default tablespace my_tbs temporary tablespace my_temptbs quota unlimited on my_tbs';
execute immediate 'grant connect, resource to '||ivUserName;
for rGrants in cGrants(ivUsername) loop
execute immediate rGrants.grant_stmt;
execute immediate rGrants.syn;
end loop;
end;
/A user with pw = username get's created (maybe you should provide your users a pw change functionality to change their passwords afterwards), he gets granted all the privilages to objects from the current user, and also synonyms get's created (if you want to use this the calling user should have the create any synonym privilage). Beware: If you want to do this you MUST NOT grant this procedure to the other users (so object_name != 'CREATEUSER') or use any other database procedures in it, as you'll get a lock when executing the grant statement and the procedure hangs.
If you want to manage more schemas, you could create this procedure with the system user, modify the cursor to do a query on all_objects and restrict it to the schema from where you want to grant the privilages to (grant execute on schema.object to user), and pass the schema and the user to create to it. -
LC10 - Monitoring: I get a message that SQL Access Not Possible
In our SCM 2007 system, when going to transaction LC10 -> Monitoring, I get a message in the top left box that says SQL Access Not Possible. Also, when I go to LCA03, I get a short dump with: Exception condition "LC_CONNECT_FAILED" raised.
This started happening after I changed the password for users: control and lcuser within the livecache database. I updated these passwords withing SCM -> LC10 -> integration and restarted the SCM system, but I still get this failure. I can run commands against the livecache database directly with dbmcli using the same username / password I put into LC10 and I don't get any errors.
This error shows up in the work process trace:
C *** ERROR => Connect to database failed, rc = -4008 (POS(1) Unknown user name/password combination)
If anyone has experienced this before, I appreciate any input. Thank you.
~TJHello,
Please update with additional information :
-> Did you follow the SAP note 616555 to change the passwords in the liveCache.
-> Please logon to the liveCache server, run the following commands & update
with the outputs:
xinstinfo <SID>
dbmcli -d <SID> -u control,<new_password>
<enter>
dbmcli on <SID>>db_state
dbmcli on <SID>>sql_execute select * from users
u2026.
dbmcli on <SID>>sql_connect lcuser,<new_pwd>
u2026
dbmcli on <SID>>sql_release
u2026
dbmcli on <SID>>sql_execute user-type=SAP select user from dual
u2026
dbmcli on <SID>>exit
-> Run the test connection on your system in /ndb59 for the LCA connection & update the thread with the log.
Thank you and best regards, Natalia Khlopina -
Hi Gurus,
Is it possible to directly convert sapscript to adobe form[PDF] .
Right answer will be awarded with pointsHi
See this sample code
which converts the script to PDF format
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
If you r using this function module check it once....
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
Fehlerhandling
if sy-subrc <> 0.
endif.
or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
follow this link for sample program.
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
Reward if useful
Anji -
Oracle Forms 11gR2 - Cannot deploy locally from within Forms
I cannot deploy locally from within forms. The server is up and running and I can deploy the form by putting the correct URL in the address line of the browser window. When I try to deploy from within forms it comes up with some crazy URL that differs everytime.
This is what the URL should be and this works from the browser:
http://machinename:7002/forms/frmservlet?form=WRD608ADMIN_11g.fmx&userid=&otherparams=useSDI=yes
Here is one of the URLs it came up with when I try to run it from within Forms:
http://localhost:60231/lysVL2VjqT33znjfvLwanktVRxTIc6dEwVeRNXXRmhYU2qjf
Localhost is always there, but the rest varies.
In Forms, I have the Preferences, Runtime set to:
http://machinename:7002/forms/frmservlet
Where machine name is my PC, it is the same for this address as the URL above that works directly from the browser.
So what am I missing?
Thank you in advance.Generally speaking, it is discouraged to manually edit any of the configuration files if they are managed by WLS Console or EM. In this case, default.env is managed by EM. Therefore, changes to the file should be done through EM. If however, you want to alter the file manually, the following is likely the best way to accomplish this:
1. Stop the WLS Admin Server and Node Manager
2. Locate the proper file you wish to edit. By proper I mean, there are several copies of most config files. Most of the config files found in the Oracle Home are actually template files and are not used at runtime. Altering these will not give you the change you want. The default.env you want would be here (assuming Windows)
C:\Oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.2\config
If you are using a "Development" installation type, the above path will reflect AdminServer instead of WLS_FORMS. Remember that Development installations are not for multi-user purposes. Production deployments require the "Deployment" installation type, which can also include the Builders.
Do NOT make any changes yet.
3. Once you find the correct file, create a backup copy. Then open the file for edit (not the backup).
4. Make the desired changes and save.
5. Restart Node Manager and Admin Server if you plan to use them.
For more information about using EM to manage your configuration, refer to the product documentation:
http://docs.oracle.com/cd/E38115_01/doc.111210/e24477/configure.htm#CHDCCGHI -
Creating a Folder Within Form or Document Library & Display the name not in the name column.
I have created a form library that will used to create folders within that. The folder creation is done using an InfoPath Form that has been uploaded to the Form Library. When the new folder was created the name will be displayed at the Name column within
the Form Library. I want to change that to another column like documents or suchlike.
Can it be done using InfoPath 2010 VSTA C# or not? If their are other options available please could you try to inform me!
Thank You,
ChiranthakaHi,
If you want to show the name of folder in another column, a workaround is that you can create an extra column, then create a SharePoint Designer workflow to set the value of
this column with the name of folder.
Here is a link about Create Workflow using SharePoint Designer and set field value for your reference:
http://www.codeproject.com/Tips/419037/Create-Workflow-using-SharePoint-Designer
I have seen a similar post from you in the link below:
http://social.technet.microsoft.com/Forums/en-US/c3ff3f17-dbe2-40f9-86c5-ff7d4b663f09/creating-a-folder-within-form-or-document-library-display-the-name-not-in-the-name-column?forum=sharepointcustomizationprevious
It's recommended that you post a single question in a single thread which will make it easier to be discussed by others.
Best regards
Patrick Liang
TechNet Community Support -
Dynamic SQL in Form Builder 6.0
Hai,
I would like to know how to create Dynamic SQL in Form Builder 6.0. I'am using oracle 9i database...Please help me.....I studied the EXEC_SQL and i wrote these syntax(below), but it gives me error...Could you help me please......:
PROCEDURE Dynamic_sql IS
connection_id EXEC_SQL.CONNTYPE;
cursorID EXEC_SQL.CURSTYPE;
sql_string VARCHAR2(1000);
v_pc varchar2 (4);
v_pd varchar2 (30);
v_poc varchar2(4);
v_pvd DATE;
v_pid DATE;
exec_id PLS_INTEGER;
out_file TEXT_IO.FILE_TYPE;
linebuf varchar2(7000);
vchFileName VARCHAR2(100);
Vchfolder VARCHAR2(100);
AppID PLS_INTEGER;
nmbAlert varchar2(50);
BEGIN
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
vchFileName := 'dynamic_sql_'||sysdate||'.txt';
Vchfolder := 'D:\KONS\Damar\';
host('mkdir '||Vchfolder,NO_SCREEN);
out_file := text_io.fopen(vchfolder||vchFileName,'w');
TEXT_IO.PUT_LINE (out_file,'PRODUCT CODE PRODUCT DESC PRODUCT OBJECT CODE PRODUCT VALID DATE PRODUCT INVALID DATE ');
connection_id := EXEC_SQL.OPEN_CONNECTION('FIFDBA/F1FDBA@REPL_DAILY');
cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
sql_string := 'SELECT PROD_CODE, PROD_DESC, PROD_OBJT_CODE, PROD_VALID_DATE, PROD_INVALID_DATE
FROM HOUS_PRODUCT_TYPE ';
EXEC_SQL.PARSE(connection_id, cursorID, sql_string, exec_sql.V7);
--EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, '', input_empno);
EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 1,v_pc, 4);
EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 2, v_pd, 30);
EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 3, v_poc, 4);
EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 4, v_pvd);
EXEC_SQL.DEFINE_COLUMN(connection_id, cursorID, 5, v_pid);
exec_id := EXEC_SQL.EXECUTE(connection_id, cursorID);
WHILE (EXEC_SQL.FETCH_ROWS(connection_id, cursorID) > 0 ) LOOP
EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 1, v_pc, 4);
EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 2, v_pd);
EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 3, v_poc);
EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 4, v_pvd);
EXEC_SQL.COLUMN_VALUE(connection_id, cursorID, 5, v_pid);
TEXT_IO.PUT_LINE(out_file,v_pc || v_pd ||v_poc||v_pvd||v_pid);
--Forms_DDL('INSERT INTO TEMP VALUES('||''''||nRows||' '||v_state_id||''''||')');
--COMMIT_FORM();
END LOOP;
EXEC_SQL.CLOSE_CURSOR(connection_id, cursorID);
EXEC_SQL.CLOSE_CONNECTION(connection_id);
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
TEXT_IO.FCLOSE(out_FILE); -
Copying from Sapscript to Smart form with d same windows
I hav created my sapsccript till now i want to copy my sapscript windows n text elements n other attributes of that sapscript to smart forms.So please help me to copy sapscript to smart form,Please help me out.
Thanks & regards
santhosh kumar.check the link below it provides steps to convert sap scripts to smartforms
http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
Check these threads.
Smartforms -> sapscript
Re: Convert SapScript to Smartforms ?
Regards,
Sooness -
SapScript - print a form x-times
Hi,
I need to get a number in the print program, how many copies I have to print of that form. How can I tell SapScript, that this form has to be printed a specific number of times?
For example I get the number 5 in the print program. Now exactly that form should be printed in 5 times...
Thank You very much!Check the parameter itcpo-tdcopies in the print program
Pass itcpo structure to OPTIONS parameter in OPEN_FORM
Message was edited by: Yogesh Joshi -
What are the best books for PL/SQL and Forms for BEGINNERS?
I asked about learning Oracle Forms in an earlier thread. Some suggested Oracle training at official Oracle Training centers like Koenig. I just went to the Koenig site. The OCA & OCP Forms Developer Training Boot Camp is a whopping 2,610 USD. That’s like 1/4 Million LKR. It’s more that the yearly salary of both the 2 new developers we got and want to train. That’s out of the question.
Some have suggested shadowing experiences programmers and team coding. Both options are out, since those things don't work here.
Learning from sites such as Francois Degrelle's blog is no good for new people since they will get confused.
I have come to the conclusion that the only way to do is to buy 2 books, one for PL/SQL and another for Oracle Forms, give it to them and ask them to follow the book and learn it and also give a time period like 2 or 3 months.
What are the good books out there for BEGINNERS to learn PL/SQL and Forms?
Edited by: Channa on Aug 8, 2010 10:08 PM
Edited by: Channa on Aug 8, 2010 10:12 PMIn addition to the books the chapter Application Developer's Guide - Fundamentals in the documentation is also worth giving a shot:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/toc.htm
Just for the record: I believe leaving them alone with the books won't do it. I'd at least define objectives (e.g. $chapters of the books in a week) and after they achieved them I'd test their knowledge of the individual objectives (like it was back in school :p ). By that you have control over how they are proceeding, you can focus on the things they didn't understand and you are able to eradicate some bad habits they might adopt during their studies.
If you don't take your time to train them proper you won't get good developers anyway and you will loose much more time and money...
cheers -
Oracle Database 11g Administrator or Oracle PL/SQL and Forms Developer?
Hi,
I am thinking about doing an Oracle certification course- Oracle Database 11g Administrator or Oracle PL/SQL and Forms Developer.
Oracle Database 11g OCP and OCM certification requires 3 mandatory training courses to be completed that costs between $1900 and $3250/each. Oracle PL/SQL certication doesn't require any mandatory training course.
Which one of these would be a good choice? Please advise.
Thank you,
TracyRegardless of which path you want to take, in order to get the OCP certification in either the DBA or PL/SQL developer track, you must first obtain the respective OCA certification for that track. I'm assuming that since you are still undecided in which path to take that you haven't started working on either yet. If you look at the pages for the OCA DBA and OCA PL/SQL Developer certs and what is required for each, you'll see that the first block of tests for either certification (the SQL based exams) has the same options (1Z0-007, 1Z0-047, 1Z0-051) and passing one of those SQL based exams gives credit towards obtaining both OCA certifications. That might be a good place to start.
Doing one of these tests first might give you some extra time to decide which track you want to pursue. But as Justin said, it really depends on what you do (or plan on doing) in your career as to which path might be more beneficial for you.
As for the OCM level stuff, I wouldn't even think about it until you get the OCP. One step at a time... Same with OCP before OCA. That being said, my suggestions are just that, suggestions. You're free to take any exams/courses in any order, but you won't be able to obtain the certs until you have completed the requirements for each.
Maybe you are looking for
-
CS2 Premium not working after re installing on Windows Vista
I reformatted my computer and re installed CS2 Premium in a new laptop with Windows Vista; however, when trying to open one of the applications such as Photoshop it says "user name, organization, or serial number is missing or invalid." Adobe does no
-
hello all, i am learning xml file with sap help sample. I have a FM, that change xml-file into if_ixml_parser, but when i wrote the xml " <person status="retired">Walt Whitman</person>" and debug it. event_sub was 312, <b>event was always initial</b>
-
How to remove a row from a rowset
HI, I am trying to do a very simple thing, but I got stuck. The problem: I want to remove a row from a rowset, without removing the row itself. Especially I do not want to remove any entities. I need this functionality in several situations, for exam
-
Hi Guys, I am passing the value through fnction is 'Animation' But in the database column of that value is metadata value like : |Animation|Family|Horror|Action| So from this I need to trim and pickhe value from metadata field which I have passed thr
-
hi friends, may i get a extractor for Standard cost with material no and variance information plz help me.