Sample Scripts Needed to implement Counter API in R12
Hi all,
Could some please help me with some kind sample implimentation of the following API.
Im trying to use the following API, and not able to find any example. This is in R12
CSI_COUNTER_PUB.create_reading_lock
following are the parameters.
(p_api_version IN NUMBER,
p_init_msg_list IN varchar2,
p_commit IN varchar2
p_validation_level IN NUMBER
p_ctr_reading_lock_rec IN/OUT csi_ctr_datastructures_pub.ctr_reading_lock_rec,
x_return_status out varchar2,
x_msg_count out number,
x_msg_data out varchar2,
c_ctr_id out number
CSI_COUNTER_PUB.create_counter
following are the parameters.
(p_api_version IN NUMBER,
p_init_msg_list IN varchar2,
p_commit IN varchar2
p_validation_level IN NUMBER
p_counter_instance_rec IN/OUT csi_ctr_datastructures_pub.counter_instance_rec,
p_ctr_properties_tbl IN/OUT csi_ctr_datastructures_pub.ctr_properties_tbl,
p_counter_relationship_tbl IN/OUT csi_ctr_datastructures_pub.counter_relationship_tbl,
p_ctr_derived_filters_tbl IN/out csi_ctr_datastructures_pub.ctr_derived_filters_tbl,
p_counter_association_tbl IN/OUT csi_ctr_datastructures_pub.counter_associations_tbl,
x_return_status out varchar2,
x_msg_count out number,
x_msg_data out varchar2,
c_ctr_id out number
Thanks for your time.
Regards
Satyajeet
Hi all,
Could some please help me with some kind sample implimentation of the following API.
Im trying to use the following API, and not able to find any example. This is in R12
CSI_COUNTER_PUB.create_reading_lock
following are the parameters.
(p_api_version IN NUMBER,
p_init_msg_list IN varchar2,
p_commit IN varchar2
p_validation_level IN NUMBER
p_ctr_reading_lock_rec IN/OUT csi_ctr_datastructures_pub.ctr_reading_lock_rec,
x_return_status out varchar2,
x_msg_count out number,
x_msg_data out varchar2,
c_ctr_id out number
CSI_COUNTER_PUB.create_counter
following are the parameters.
(p_api_version IN NUMBER,
p_init_msg_list IN varchar2,
p_commit IN varchar2
p_validation_level IN NUMBER
p_counter_instance_rec IN/OUT csi_ctr_datastructures_pub.counter_instance_rec,
p_ctr_properties_tbl IN/OUT csi_ctr_datastructures_pub.ctr_properties_tbl,
p_counter_relationship_tbl IN/OUT csi_ctr_datastructures_pub.counter_relationship_tbl,
p_ctr_derived_filters_tbl IN/out csi_ctr_datastructures_pub.ctr_derived_filters_tbl,
p_counter_association_tbl IN/OUT csi_ctr_datastructures_pub.counter_associations_tbl,
x_return_status out varchar2,
x_msg_count out number,
x_msg_data out varchar2,
c_ctr_id out number
Thanks for your time.
Regards
Satyajeet
Similar Messages
-
Implementing an API in ColdFusion
I need to implement an API that would allow a membership
website
written in CF to share data with a CRM database I use.
The company makes available some API Sample implementations
in asp, java, javascript, perl, php, & python - along
with documentation.
The company that wrote the CF membership site is not
interested in
doing any programming/support for this project.
Not knowing anything about CF personally, can anyone tell me
if
this it possible, and if it is difficult?
If it is possible, is there a place I can contact a CF
programmer who
would know how to do this?
Thanks so much,
DaveIf the API is already written in ASP, then I am sure it is
possible in ColdFusion.
You may want to look into Rent a Coder to find a programmer (
http://www.rentacoder.com) -
Need script or Program to count lines of source code
Hello, I need a script or a program that can count how many lines are there in a directory contains source code as well as other directories(contain code as well), there are .java files in these directories, the script or program should count number of lines with/without comments(starts with // or surrounded by /**/)
Thanks a lot!!!I wrote a quick python program to count the lines in a file, you could just adapt it to your needs, or use the second program I have in this post that condenses all the .java files in a directory into a single text file, which you can then use a line-count on (useful if you need to print it as well - I wrote it for my IB dossier java project), if you'd like a proper script for your needs, otherwise check the other suggestions.
Run it by copying the code into a text file and saying it as script.py (change script to whatever you want) and running it with python /path/to/script.py
#!/usr/bin/env python
#Program to tally the lines in a file
#Author: lswest
import os
home=os.path.expanduser("~")
endPath=raw_input("Path to file relative to your home directory (include file name and extension): ")
count=0
ff=open(os.path.join(home, endPath))
for x in ff:
count+=1
values={'name': os.path.join(home,endPath), 'count' : count}
print "The file %(name)s contains %(count)s lines." % values
#!/usr/bin/env python
#Script to condense the multiple files of a project into one for easy printing/copying
#Author: lswest
import os
home=os.path.expanduser("~")
endPath=raw_input("Path relative to your home directory to the project folder: ")
extension=raw_input("Extension of files you want to condense: ")
outPath=raw_input("Path to output file relative to home directory: ")
outFile=raw_input("Output file name (including extension): ")
ff=open(os.path.join(home+outPath,outFile), "wt")
for root, dirs, files in os.walk(os.path.join(home,endPath), "true", "none", "true"):
for infile in [f for f in files if f.endswith(extension)]:
fh=open(os.path.abspath(os.path.join(root,infile)))
for line in fh:
ff.write(line,)
fh.close()
ff.close()
Last edited by lswest (2009-03-10 16:23:52) -
Reg : Need sample scripts -
Hi Experts,
I'm going through this wonderful white paper on XML DB. http://www.oracle.com/technetwork/database-features/xmldb/xmlqueryoptimize11gr2-168036.pdf
There are numerous code samples present in it but the problem is I don't have the sample scripts to practically test them out.
SELECT li.description ,li.lineitem
FROM purchaseorder T,
XMLTable('$p/PurchaseOrder/LineItems/LineItem'
PASSING T.X AS “p”
COLUMNS
lineitem NUMBER PATH '@ItemNumber',
description VARCHAR2(30) PATH 'Description',
partid NUMBER PATH 'Part/@Id',
unitprice NUMBER PATH 'Part/@UnitPrice',
quantity NUMBER PATH 'Part/@Quantity'
) li
WHERE li.unitprice > 30 and li.quantity < 20);Can anybody please tell me where to get these scripts?
Help much appreciated.
Thanks,
RanitHi,
Check out "INTRODUCTION_11.2.0.3.0.zip" in the XML DB Sample code page. -
Sample scripts for streams setting source 9i-- destination10g
I need to set up streams across 9i to 10g (both in windows OS)
tried out sucessfully setting up across 9i-->9i(using OEM - using sample by oracle ) and
10g-->10g(http://www.oracle.com/technology/obe/obe10gdb/integrate/streams/streams.htm#t6 which uses scripts)
I need to implement streams from 9i to 10g. the problem is:
packages used in 10g demo are not available in 9i.
Do we have a sample script to implement streams across 9i-->10g?thanks Arvind, that would be really great.Me trying to have a demo so trying the demo scripts on dept table.Me trying since a month.I have moved my 9.2.0.1.0 source to 9.2.0.7 then applied the patchset 3 for 9.2.0.7 to fix the bug as i got to know there was a bug with streams across 9i,10g
bug no:4285404 - PROPROGATION FROM 9.2 AND 10.1 TO 10.2
Note: Executed the same script, with 4.2.2 and not 4.2.1(it is optional) ,as when i tried to export then import and then when i tried to delete supplimental log group from target it said "trying to drop non existant group"
also when i query capture process it is showing LCRs getting queued,propogation also showing data is propagated from source, apply doesnt have errors but showing 0 for transactions assigned as well as applied.
looks like destination queue not getting populated though at source propagation is sucessful
Please find
1.scripts
2.init parameters of 9i (source)
3. init parameters of 10g (target)
SCRIPT:
2.1 Create Streams Administrator :
connect SYS/password as SYSDBA
create user STRMADMIN identified by STRMADMIN;
2.2 Grant the necessary privileges to the Streams Administrator :
GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE to STRMADMIN;
GRANT SELECT ANY DICTIONARY TO STRMADMIN;
GRANT EXECUTE ON DBMS_AQ TO STRMADMIN;
GRANT EXECUTE ON DBMS_AQADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_FLASHBACK TO STRMADMIN;
GRANT EXECUTE ON DBMS_STREAMS_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_CAPTURE_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_APPLY_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_RULE_ADM TO STRMADMIN;
GRANT EXECUTE ON DBMS_PROPAGATION_ADM TO STRMADMIN;
BEGIN
DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
privilege => 'ENQUEUE_ANY',
grantee => 'STRMADMIN',
admin_option => FALSE);
END;
BEGIN
DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
privilege => 'DEQUEUE_ANY',
grantee => 'STRMADMIN',
admin_option => FALSE);
END;
BEGIN
DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
privilege => 'MANAGE_ANY',
grantee => 'STRMADMIN',
admin_option => TRUE);
END;
BEGIN
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_EVALUATION_CONTEXT_OBJ,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_RULE_SET_OBJ,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_RULE_OBJ,
grantee => 'STRMADMIN',
grant_option => TRUE);
END;
BEGIN
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_ANY_RULE_SET,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.ALTER_ANY_RULE_SET,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.EXECUTE_ANY_RULE_SET,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.CREATE_ANY_RULE,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.ALTER_ANY_RULE,
grantee => 'STRMADMIN',
grant_option => TRUE);
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.EXECUTE_ANY_RULE,
grantee => 'STRMADMIN',
grant_option => TRUE);
END;
BEGIN
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE(
privilege => DBMS_RULE_ADM.EXECUTE_ANY_EVALUATION_CONTEXT,
grantee => 'STRMADMIN',
grant_option => TRUE);
END;
2.3 Create streams queue :
connect STRMADMIN/STRMADMIN
BEGIN
DBMS_STREAMS_ADM.SET_UP_QUEUE(
queue_table => 'STREAMS_QUEUE_TABLE',
queue_name => 'STREAMS_QUEUE',
queue_user => 'STRMADMIN');
END;
2.4 Add apply rules for the table at the destination database :
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'SCOTT.DEPT',
streams_type => 'APPLY',
streams_name => 'STRMADMIN_APPLY',
queue_name => 'STRMADMIN.STREAMS_QUEUE',
include_dml => true,
include_ddl => true,
source_database => 'str1');
END;
2.5 Specify an 'APPLY USER' at the destination database:
This is the user who would apply all DML statements and DDL statements.
The user specified in the APPLY_USER parameter must have the necessary
privileges to perform DML and DDL changes on the apply objects.
BEGIN
DBMS_APPLY_ADM.ALTER_APPLY(
apply_name => 'STRMADMIN_APPLY',
apply_user => 'SCOTT');
END;
2.6 If you do not wish the apply process to abort for every error that it
encounters, you can set the below paramter.
The default value is 'Y' which means that apply process would abort due to
any error.
When set to 'N', the apply process will not abort for any error that it
encounters, but the error details would be logged in DBA_APPLY_ERROR.
BEGIN
DBMS_APPLY_ADM.SET_PARAMETER(
apply_name => 'STRMADMIN_APPLY',
parameter => 'DISABLE_ON_ERROR',
value => 'N' );
END;
2.7 Start the Apply process :
BEGIN
DBMS_APPLY_ADM.START_APPLY(apply_name => 'STRMADMIN_APPLY');
END;
Section 3
Steps to be carried out at the Source Database (V920.IDC.ORACLE.COM)
3.1 Move LogMiner tables from SYSTEM tablespace:
By default, all LogMiner tables are created in the SYSTEM tablespace.
It is a good practice to create an alternate tablespace for the LogMiner
tables.
CREATE TABLESPACE LOGMNRTS DATAFILE 'logmnrts.dbf' SIZE 25M AUTOEXTEND ON
MAXSIZE UNLIMITED;
BEGIN
DBMS_LOGMNR_D.SET_TABLESPACE('LOGMNRTS');
END;
3.2 Turn on supplemental logging for DEPT table :
connect SYS/password as SYSDBA
ALTER TABLE scott.dept ADD SUPPLEMENTAL LOG GROUP dept_pk
(deptno) ALWAYS;
3.3 Create Streams Administrator and Grant the necessary privileges :
Repeat steps 2.1 and 2.2 for creating the user and granting the required
privileges.
3.4 Create a database link to the destination database :
connect STRMADMIN/STRMADMIN
CREATE DATABASE LINK str2 connect to
STRMADMIN identified by STRMADMIN using 'str2' ;
//db link working fine.I tested it
3.5 Create streams queue:
BEGIN
DBMS_STREAMS_ADM.SET_UP_QUEUE(
queue_name => 'STREAMS_QUEUE',
queue_table =>'STREAMS_QUEUE_TABLE',
queue_user => 'STRMADMIN');
END;
3.6 Add capture rules for the table at the source database:
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'SCOTT.DEPT',
streams_type => 'CAPTURE',
streams_name => 'STRMADMIN_CAPTURE',
queue_name => 'STRMADMIN.STREAMS_QUEUE',
include_dml => true,
include_ddl => true,
source_database => 'str1');
END;
3.7 Add propagation rules for the table at the source database.
This step will also create a propagation job to the destination database.
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(
table_name => 'SCOTT.DEPT',
streams_name => 'STRMADMIN_PROPAGATE',
source_queue_name => 'STRMADMIN.STREAMS_QUEUE',
destination_queue_name => 'STRMADMIN.STREAMS_QUEUE@str2,
include_dml => true,
include_ddl => true,
source_database => 'str1');
END;
Section 4
Export, import and instantiation of tables from Source to Destination Database
4.1 If the objects are not present in the destination database, perform an
export of the objects from the source database and import them into the
destination database
Export from the Source Database:
Specify the OBJECT_CONSISTENT=Y clause on the export command.
By doing this, an export is performed that is consistent for each
individual object at a particular system change number (SCN).
exp [email protected] TABLES=SCOTT.DEPT FILE=tables.dmp
GRANTS=Y ROWS=Y LOG=exportTables.log OBJECT_CONSISTENT=Y
INDEXES=Y STATISTICS = NONE
Import into the Destination Database:
Specify STREAMS_INSTANTIATION=Y clause in the import command.
By doing this, the streams metadata is updated with the appropriate
information in the destination database corresponding to the SCN that
is recorded in the export file.
imp [email protected] FULL=Y CONSTRAINTS=Y
FILE=tables.dmp IGNORE=Y GRANTS=Y ROWS=Y COMMIT=Y LOG=importTables.log
STREAMS_INSTANTIATION=Y
4.2 If the objects are already present in the desination database, there are
2 ways of instanitating the objects at the destination site.
1. By means of Metadata-only export/import :
Export from the Source Database by specifying ROWS=N
exp USERID=SYSTEM@str1TABLES=SCOTT.DEPT FILE=tables.dmp
ROWS=N LOG=exportTables.log OBJECT_CONSISTENT=Y
Import into the destination database using IGNORE=Y
imp USERID=SYSTEM@str2FULL=Y FILE=tables.dmp IGNORE=Y
LOG=importTables.log STREAMS_INSTANTIATION=Y
2. By Manaually instantiating the objects
Get the Instantiation SCN at the source database:
connect STRMADMIN/STRMADMIN@source
set serveroutput on
DECLARE
iscn NUMBER; -- Variable to hold instantiation SCN value
BEGIN
iscn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();
DBMS_OUTPUT.PUT_LINE ('Instantiation SCN is: ' || iscn);
END;
Instantiate the objects at the destination database with this SCN value.
The SET_TABLE_INSTANTIATION_SCN procedure controls which LCRs for a table
are to be applied by the apply process.
If the commit SCN of an LCR from the source database is less than or
equal to this instantiation SCN , then the apply process discards the LCR.
Else, the apply process applies the LCR.
connect STRMADMIN/STRMADMIN@destination
BEGIN
DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(
source_object_name => 'SCOTT.DEPT',
source_database_name => 'str1',
instantiation_scn => &iscn);
END;
Enter value for iscn:
<Provide the value of SCN that you got from the source database>
Finally start the Capture Process:
connect STRMADMIN/STRMADMIN@source
BEGIN
DBMS_CAPTURE_ADM.START_CAPTURE(capture_name => 'STRMADMIN_CAPTURE');
END;
INIT.ora at 9i
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Archive
log_archive_dest_1='LOCATION=D:\oracle\oradata\str1\archive'
log_archive_format=%t_%s.dbf
log_archive_start=true
# Cache and I/O
db_block_size=8192
db_cache_size=25165824
db_file_multiblock_read_count=16
# Cursors and Library Cache
open_cursors=300
# Database Identification
db_domain=""
db_name=str1
# Diagnostics and Statistics
background_dump_dest=D:\oracle\admin\str1\bdump
core_dump_dest=D:\oracle\admin\str1\cdump
timed_statistics=TRUE
user_dump_dest=D:\oracle\admin\str1\udump
# File Configuration
control_files=("D:\oracle\oradata\str1\CONTROL01.CTL", "D:\oracle\oradata\str1\CONTROL02.CTL", "D:\oracle\oradata\str1\CONTROL03.CTL")
# Instance Identification
instance_name=str1
# Job Queues
job_queue_processes=10
# MTS
dispatchers="(PROTOCOL=TCP) (SERVICE=str1XDB)"
# Miscellaneous
aq_tm_processes=1
compatible=9.2.0.0.0
# Optimizer
hash_join_enabled=TRUE
query_rewrite_enabled=FALSE
star_transformation_enabled=FALSE
# Pools
java_pool_size=33554432
large_pool_size=8388608
shared_pool_size=100663296
# Processes and Sessions
processes=150
# Redo Log and Recovery
fast_start_mttr_target=300
# Security and Auditing
remote_login_passwordfile=EXCLUSIVE
# Sort, Hash Joins, Bitmap Indexes
pga_aggregate_target=25165824
sort_area_size=524288
# System Managed Undo and Rollback Segments
undo_management=AUTO
undo_retention=10800
undo_tablespace=UNDOTBS1
firstspare_parameter=50
jobqueue_interval=1
aq_tm_processes=1
transaction_auditing=TRUE
global_names=TRUE
logmnr_max_persistent_sessions=5
log_parallelism=1
parallel_max_servers=2
open_links=5
INIT>ora at 10g (target)
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Archive
log_archive_format=ARC%S_%R.%T
# Cache and I/O
db_block_size=8192
db_cache_size=25165824
db_file_multiblock_read_count=16
# Cursors and Library Cache
open_cursors=300
# Database Identification
db_domain=""
db_name=str2
# Diagnostics and Statistics
background_dump_dest=D:\oracle\product\10.1.0\admin\str2\bdump
core_dump_dest=D:\oracle\product\10.1.0\admin\str2\cdump
user_dump_dest=D:\oracle\product\10.1.0\admin\str2\udump
# File Configuration
control_files=("D:\oracle\product\10.1.0\oradata\str2\control01.ctl", "D:\oracle\product\10.1.0\oradata\str2\control02.ctl", "D:\oracle\product\10.1.0\oradata\str2\control03.ctl")
db_recovery_file_dest=D:\oracle\product\10.1.0\flash_recovery_area
db_recovery_file_dest_size=2147483648
# Job Queues
job_queue_processes=10
# Miscellaneous
compatible=10.1.0.2.0
# Pools
java_pool_size=50331648
large_pool_size=8388608
shared_pool_size=83886080
# Processes and Sessions
processes=150
sessions=4
# Security and Auditing
remote_login_passwordfile=EXCLUSIVE
# Shared Server
dispatchers="(PROTOCOL=TCP) (SERVICE=str2XDB)"
# Sort, Hash Joins, Bitmap Indexes
pga_aggregate_target=25165824
sort_area_size=65536
# System Managed Undo and Rollback Segments
undo_management=AUTO
undo_tablespace=UNDOTBS1
sga_target=600000000
parallel_max_servers=2
global_names=TRUE
open_links=4
logmnr_max_persistent_sessions=4
REMOTE_ARCHIVE_ENABLE=TRUE
streams_pool_size=300000000
undo_retention=1000
tahnks a lot... -
I need to install servlet-api.jar in the libext folder.
Hi I am doing a tutorial on struts 2.0.11.
i need to install servlet-api.jar in the libext folder which I have created inside WEB-INF
Now I have downloaded servlet.api which is in the zip form.
When I extract the files. Its giving me two folders
1. javax
2. META-INF
Inside javax there is a folder called servlet. Inside servlet folder there are
a) bunch of call files
b) http folder
c) resources folder
Inside http folder there are
a) class files
b) properties files
Inside the resources folder there are
a) dtd files
b) xsd files
Inside the META-INF folder there is the manifest.mf file
I just need servlet-api.jar
I think that I have extracted the contents of servlet-api.jar by using the extract feature of winzip.
Do you think that by just changing the extension of the file from servlet-api.zip to servlet-api.jar it will do the trick or do i need to do something else.
Please guidepksingh79 wrote:
Hi ^^,
your replies were very helpful. I did try to check the lib folder of the webserver and there was not servlet-api.jar. However I downloaded a dummy project and it did have servlet-api.jar in it, so I am ok for now.
thanks and regards,
PrashantYou should not be doing that. Always use the one from the application server which you're going to use. Otherwise you will possibly get in runtime trouble due to version differences.
The actual location and filename of the servlet API might differ per application server implementation. If it was for example Tomcat 6, it is the servlet-api.jar in the /lib directory. If it was for example Glassfish (the current release), then it is the javaee.jar in the /lib directory. -
I would like SAP to make sure the sample scripts still work
I'm very grateful to Sybase and now SAP for including sample scripts within the documentation, and as separate *.vbs files (see c:\program files\Sybase\PowerDesigner nn\VB Scripts). They really help me to understand the potential of PowerDesigner, adding more meat to the bones described in the documentation; they also help me with VBscript, which is not my natural environment. Unfortunately they do sometimes need debugging before they work. For example, there's a sample script within the 'ComparisonHelper' topic in the metamodel objects help that includes illegal calls to subroutines.
Of course, some of these scripts will have been in the documentation a long time, and have been overtaken by events such as metamodel changes, or changes to VBscript itself. Is SAP planning to go through them and bring them up to date?I looked into the Comparison helper a bit more, and discovered a second script on the same page. I've created a composite script that creates two LDMs, compares them with the comparison helper, and then runs the Compare() method three times with different output formats. If you'd like a copy, please contact me via metadatajunkie.wordpress.com
-
Indesign CS5.5 Relink Script needs help
Hi, I'm trying to relink images in an InDesign CS5.5 file to a different server using a script. This is what I have so far, but when I run the script I get errors and can't relink because "Either the file does not exist, you do not have permission, or the file may be in use by another application". Does anyone know how to make this script work? I'm fairly new to scripting.
Here is the script I have:
tell application "Adobe InDesign CS5.5"
tell document 1
set linkList to links
set errInfo to "" -- We'll display error if we can't relink an item
repeat with x in linkList
if (x's status) is not normal then -- I usually check for any link that has an error
-- This should only return an AppleScript path with ":" separators
set linkPath to (x's file path) as string
if "Volumes/Calendars_2013 FPO" is in linkPath then
set AppleScript's text item delimiters to "Volumes/Calendars_2013 FPO"
set linkPath to (linkPath's text items) -- Create a list of text items
set AppleScript's text item delimiters to "Volumes/Calendars_2013"
set linkPath to (linkPath as string) -- Concatenate with new path
set AppleScript's text item delimiters to "" -- Reset TIDs
try
-- Need to make our string (path) into an alias path
relink x to alias linkPath
try
update x -- This can be helpful
end try
on error err
-- We'll store link name if error occurs
set errInfo to (errInfo & return & x's name)
end try
end if
end if
end repeat
-- If an error occurs while trying to relink, we'll display it
if (count errInfo) > 0 then display dialog ("Can't relink:" & errInfo)
end tell
end tell
--HectorI just tried adding collens to the end of the folder path. For some reason the script skipped the relink line. Below is the code with your update. I'm thinking its not finding the images because the script needs to make a list of all the images and choose the one that matches the missing image.
tell application "Adobe InDesign CS5.5"
tell document 1
set linkList to links
set errInfo to "" -- We'll display error if we can't relink an item
repeat with x in linkList
if (x's status) is not normal then -- I usually check for any link that has an error
-- This should only return an AppleScript path with ":" separators
set linkPath to (x's file path) as string
if "Calendars_2013 FPO:" is in linkPath then
set AppleScript's text item delimiters to "Calendars_2013 FPO:"
set linkPath to (linkPath's text items) -- Create a list of text items
set AppleScript's text item delimiters to "Calendars_2013:"
set linkPath to (linkPath as string) -- Concatenate with new path
set AppleScript's text item delimiters to "" -- Reset TIDs
try
-- Need to make our string (path) into an alias path
relink x to alias linkPath
try
update x -- This can be helpful
end try
on error err
-- We'll store link name if error occurs
set errInfo to (errInfo & return & x's name)
end try
end if
end if
end repeat
-- If an error occurs while trying to relink, we'll display it
if (count errInfo) > 0 then display dialog ("Can't relink:" & errInfo)
end tell
end tell
--Thanks for you help -
hi to all experts,
i need to implement sap predefined badi plz send me with screen shots how to implement predefined sap badisHi
Business Add-Ins
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
DEFINING THE BADI
1) execute Tcode SE18.
2) Specify a definition Name : ZBADI_SPFLI
3) Press create
4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
multiple use.
5) Choose the interface tab
6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
7) Dbl clk on interface name to start class builder . specify a method name (name,
level, desc).
Method level desc
Linese;ection instance methos some desc
8) place the cursor on the method name desc its parameters to define the interface.
Parameter type refe field desc
I_carrid import spfli-carrid some
I_connid import spefi-connid some
9) save , check and activate adapter class proposed by system is
ZCL_IM_IM_LINESEL is genereated.
IMPLEMENTATION OF BADI DEFINITION
1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
2) Specify aname for implementation ZIM_LINESEL
3) Specify short desc.
4) Choose interface tab. System proposes a name fo the implementation class.
ZCL_IM_IMLINESEL which is already generarted.
5) Specify short desc for method
6) Dbl clk on method to insert code..(check the code in AAA).
7) Save , check and activate the code.
Some useful URL
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for BBB sample program.
AAA
data : wa_flights type sflight,
it_flights type table of sflight.
format color col_heading.
write:/ 'Flight info of:', i_carrid, i_connid.
format color col_normal.
select * from sflight
into corresponding fields of table it_flights
where carrid = i_carrid
and connid = i_connid.
loop at it_flights into wa_flights.
write:/ wa_flights-fldate,
wa_flights-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
BBB
*& Report ZBADI_TEST *
REPORT ZBADI_TEST .
tables: spfli.
data: wa_spfli type spfli,
it_spfli type table of spfli with key carrid connid.
*Initialise the object of the interface.
data: exit_ref type ref to ZCL_IM_IM_LINESEL,
exit_ref1 type ref to ZIF_EX_BADISPFLI1.
selection-screen begin of block b1.
select-options: s_carr for spfli-carrid.
selection-screen end of block b1.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli.
u can find BADI's in different ways...
1>First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..
2>Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..
There are multiple ways of searching for BADI.
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Finding BADI Using SQL Trace (TCODE-ST05).
Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
2. Start transaction ST05 (Performance Analysis).
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
Push the button "Deactivate Trace".
Push the button "Display Trace".
The popup screen "Set Restrictions for Displaying Trace" appears.
Now, filter the trace on Objects:
V_EXT_IMP
V_EXT_ACT
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
3. Go to Maintain Transaction (TCODE- SE93).
Enter the Transaction VD02 for which you want to find BADI.
Click on the Display push buttons.
Get the Package Name. (Package VS in this case)
Go to TCode: SE84->Enhancements->Business Add-inns->Definition
Enter the Package Name and Execute.
Here you get a list of all the Enhancement BADIs for the given package MB.
The simplese way for finding BADI is
1. chooes Tcode Program & package for that Tcode.
2. Go to Tcode se18
3. Press F4
4. search by package or by program.
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
and
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
<b>Reward points for useful Answers</b>
Regards
Anji -
Alert & Audit Log Purging sample script
Hi Experts,
Can somebody point to sample scripts for
1. alert & audit log purging?
2. Listener log rotation?
I am sorry if questions look too naive, I am new to DBA activities; pls let me know if more details are required.
As of now the script is required to be independent of versions/platforms
Regards,34MCA2K2 wrote:
Thank a lot for your reply!
If auditing is enabled in Oracle, does it generate Audit log or it inserts into a SYS. table?
Well, what do your "audit" initialization parameters show?
For the listener log "rotation", just rename listener.log to something else (there is an OS command for that), then bounce the listener.
You don't want to purge the alert log, you want to "rotate" it as well. Just rename the existing file to something else. (there is an OS command for that)
So this has to be handled at operating system level instead of having a utility. Also if that is the case, all this has to be done when database is shut down right?
No, the database does not have to be shut down to rotate the listener log. The database doesn't give a flying fig about the listener log.
No, the database does not have to be shut down to rotate the alert log. If the alert log isn't there when it needs to write to it, it will just start a new one. BTW, beginning with 11g, there are two alert logs .. the old familiar one, now located at $ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace, and the xml file used by adrci. There are adrci commands and configurations to manage the latter.
Again, I leave the details as an exercise for the student to practice his research skills.
Please confirm my understanding.
Thanks in advance! -
Hi Duncan,
I have configured the java sample script example using the credentials sent to me by apple as an administrator. However, i do not have the cgi-bin directory on my server, so i created a folder on our web server and called it media. In the instructions in the Admin itunes guide indicate using the url http://example.com/cgi-bin/iTunesU to call the script from my browser. But since the directory name is different, can't i just substitute cgi-bin in the url for media and run the http://example.com/media/iTunesU instead? The media folder containing the java scripts is placed placed on our web server which can be called using the following url from my browser: http://www.college.edu/department/media/. Any suggestion how to call the file since the directory is called different. I have tried replacing cgi-bin with media and did not work. Thanks.It's necessary to tell your web server about the change in CGI location. Simply changing the URL to reflect a local path change will not work.
Consider Apache as an example. On an Apache server, there is an association between "cgi-bin" in a URL and an actual directory on your webserver. The "real" directory doesn't have to be called "cgi-bin". In fact, if your Apache server happens to be Mac OS X Server, "cgi-bin" will actually map to /Library/WebServer/CGI-Executables. In other words, if you're running Mac OS X Server, you will need to place the compiled Java code in /Library/WebServer/CGI-Executables. If you do that, then you can use http://myu.edu/cgi-bin/iTunesU style URLs. The WebServer will map "cgi-bin" to "/Library/WebServer/CGI-Executables". Note that this is ONLY for Mac OS X Server. Different web servers map "cgi-bin" differently. For example, this page:
http://www.parkansky.com/tutorials/bdlognt.htm
gives a rough idea of how one might think about setting up a cgi-bin look-alike on an Microsoft IIS server. -
OPM Physical and Cycle Count API
We are developing a custom MCSA form that calls the OPM Physical and Cycle Count API to enter Physical and Cycle Counts. How does the API create new Tag or Count Sheet Numbers and which table stores this values. I see three input parameters for this API but not sure how they work - P_page_no, P_line_no & P_count_no.
Thanks, Tony W.You need to pass one serial at a time.
Hope this answers your question. -
Hi everyone!
I am trying to create a script to create a sales order (t-code VA01) with multiple line items.
My script code is using counter i to go down each row in excel to pull in the data (for each sales order),
but to create each line item within each sales order, i need it to read across a few columns so that i can make multiple line items.
Any ideas?Hello Christina,
as far as I understand your problem correct, I think you need a loop in a loop.
Look at these example:
For i = 1 To RowCount
'First code here to fill your fields
For j = 1 To ColumnCount
'Second code here to make your multiple line items
Next j
Next i
Cheers
Stefan -
FDM import script need to reformat in fdmee
Hi Guru's
i am in the process of migrating from fdm classic to fdmee and require your help to come up on this as i am new to Python scripting.
I am pulling the data from Oracle database through a view and want to change the below script in Jython FDMEE format to pull the data.
Can someone help or guide me on how to proceed.
Dim objSS
'ADODB.Connection
Dim strSQL
'SQL string
Dim rs
'Recordset
Dim rsAppend
'tTB table append rs object
Dim Prd
Dim Yr
Dim Sp
Dim Ct
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
Prd = FormatDateTime(CDate(dblPerKey),1)
Yr = Right(Prd, 4)
Prd = UCase(CStr(Mid(Prd, InStr(Prd, ",")+2, 3)))
'Connect to Oracle database
cnss.open "Provider=OraOLEDB.Oracle.1;Password=" & DecryptPassword(3, "ojwo`f") & ";Persist Security Info=True;User ID=test;Data Source=test"
'Create query string
strSQL = "Select * FROM "
Select Case lngCatKey
Case 13: strSql = strSql & "KDDBI_BUDG_STATIC_VW"
End Select
strSQL = strSQL & " where PERIOD_YEAR = '" & YR & "' and PERIOD ='" & Prd & "' And CURRENCY_CODE <> 'STAT'"
'Get data
CnSS.commandTimeout = 240
rs.Open strSQL, cnSS
'Check for data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!" & "SQL:" & StrSQL
Exit Function
End If
'Loop through records and append to FDM Worktable table in location's DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
For Ct = 1 To 2
If Ct = 1 Then
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = lngCatKey
rsAppend.Fields("PeriodKey") = dblPerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("Account") =UCase (rs.fields("ACCT_CODE").Value)
rsAppend.Fields("Entity") = UCase (rs.fields("CO").Value)
rsAppend.Fields("UD1") = UCase("APPROVED")
rsAppend.Fields("UD4") = UCase("CLBALANCE")
rsAppend.Fields("UD3") = UCase (rs.fields("DEPT").Value)
rsAppend.Fields("UD6") = UCase("LOCAL")
rsAppend.Fields("UD7") =UCase (rs.fields("LOC").Value)
rsAppend.Fields("UD9") = UCase (rs.fields("PRODUCT").Value)
rsAppend.Fields("UD5") = UCase("HSP_INPUTVALUE")
If Left(rs.fields("ACCT_CODE").Value, 1) = "3" Or Left(rs.fields("ACCT_CODE").Value, 1) = "2" Then
rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_LC").Value)) * -1
Else
rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_LC").Value))
End If
rsAppend.Update
Else
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = lngCatKey
rsAppend.Fields("PeriodKey") = dblPerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("Account") =UCase (rs.fields("ACCT_CODE").Value)
rsAppend.Fields("Entity") = UCase (rs.fields("CO").Value)
rsAppend.Fields("UD1") = UCase("APPROVED")
rsAppend.Fields("UD4") = UCase("CLBALANCE")
rsAppend.Fields("UD3") = UCase (rs.fields("DEPT").Value)
rsAppend.Fields("UD6") = UCase("KWD")
rsAppend.Fields("UD7") =UCase (rs.fields("LOC").Value)
rsAppend.Fields("UD9") = UCase (rs.fields("PRODUCT").Value)
rsAppend.Fields("UD5") = UCase("HSP_INPUTVALUE")
If Left(rs.fields("ACCT_CODE").Value, 1) = "3" Or Left(rs.fields("ACCT_CODE").Value, 1) = "2" Then
rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_KD").Value)) * -1
Else
rsAppend.Fields("Amount") = CDbl(Nz(rs.fields("BUDGET_KD").Value))
End If
rsAppend.Update
End If
Next
rs.movenext
Loop
End If
'Close Record Sets
rs.close
rsAppend.close
'Assign Return value
Budget_Approved = TrueHow is one supposed to modify VB functions in FDM such as farsTableAppend so that it is supported in FDMEE scripts?
I generated an API documentation from FDMEE AIF-APIs.jar (which is supposed to have all the FDMEE APIs in it I guess) but I dont see replacement for VB functions such as farsTableAppend, fExpTRx, PstrClientType, though I can see other methods in the documentation for eg. getEPMOracleHome() etc.. (All these functions that we can view using eclipse as an editor for FDMEE Dev).
Is there any other method in the FDMEE API that I should be using to replace these functions for FDMEE Support?
I have one more question regarding AIF-CUSTOM.jar file, what is the purpose of this jar, do we get any additional methods in this file
Please advise..
Thanks in Advance -
Sample SOAP request for Data Loader API
Hi
Can anyone please help me out in giving a sample SOAP request for Data Loader API .This is to say import 1K records from my system to the CRM instance I have .Log into the application and then click on Training and Support there is a WS Library of Information within the application
Maybe you are looking for
-
How do I transfer ratings from one library to another library?
My home iTunes Library has 37,000+ songs, with 3/4 of them rated. I have a much smaller library at work, which is mostly a subset of my home library. As I rate my home library, I have been transfering my ratings by making a .pdf of newly rated tunes
-
N level-Approval for contract workflow (WS14000148) in SRM
Hi SDN'rs I want to activate N level-Approval for contract workflow (WS14000148) in SRM When I am creating the contract in SRM I can see the approvers in the approval preview. But when I release the contract and look at the approval p
-
Messages are forwarding to my sisters iPhone from my iPad not intended for her.
So my sister an I share a iTunes account, because it seemed easier for her to use mine. Well recently I purchased an iPad and registered it with my apple ID I began messaging a friend. And everything we were saying was being forwarded to her iPhone (
-
Never mind. The answer to my question is easily available. blame the newbie.
Yep. Sorry folks. I'll do a better search next time.
-
I had the same problems with the contol panel iCloud 1.0.1 update Outlook en IiTunes freezes. What can i do?