Output of a script
Hi,
I am trying to get the output from a script read into a parameter. This is part of my workflow. I added a parameter as OUT for this user external process. And my script echoes the value I want. But it is not being picked up in the workflow. I also tried exporting a variable with the same name as the parameter but that didn't help either.
Any ideas in this direction would be appreciated.
Thanks
You can get the exit status easily of the user defined activity if that helps? If the script returns a numeric number then this would be OK (such as wc), you would have to wrap the wc in a small script to set the exit status with the result you are after from the wc std output.
Cheers
David
Similar Messages
-
How to save the output of sap script to pdf document in sap
hi abapers
how to save the output of sap script in sap so that can retrieve the saved document later.
i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
how to use dmsHi deepika,
This thread will solve ur problem OTF -> PDF
Regards,
Pravin -
How to save the output of sap script in sap so that can be retrieved later
hi abapers
how to save the output of sap script in sap so that can retrieve the saved document later.
i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
how to use dms
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Dec 26, 2008 11:01 AMHi Deepika,
Look into this link https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/401cca81-b861-2910-ada2-f416dfb3b3fe
Regards,
Pravin -
If i got incorrect characters in the output of sap script? HOW TO CORRECT I
If i got incorrect characters in the output of sap script? HOW TO CORRECT IT?
Hi Sunil,
Debug the script and check where exactly those are getting populated. Definately you will get it. Check the conversion parts means character to numeric conversion.
If your version is 4.7E then select unicode check box in the reports attributes. It will display the error message so that we can solve very easily.Hope this helps you, reply for queries, Shall post you the updates.
Regards.
Kumar. . -
Hi All
pls tell output types and script name and driver program for
1.packing llist for export customer
2.addtional dunning lever (level3)
pls geve reply fot that
Regards
M.SrinvasHi
Goto NACE tcode or TNAPR table and see the Output type and Program, script for Packing List
Script = RVDELNOTE
Program = RVADDN01
For dunning
form = F150_DUNN01
Program = SAPF150D2
Regards
Anji -
SQLPlus output within bash script
Hey everyone, I wasn't sure if this should go here or in the SQL forum or the Linux forum, but here goes:
Using Oracle10g on Linux, I'm using a bash script to run an sql script, but when I try to echo the results, it shows the output in a single line.
Here's the script
USERLIST=`sqlplus -s / AS SYSDBA <<EOF
set head off
set verify off
set feedback off
SELECT username from dba_users;
exit;
EOF
`
echo $USERLIST;And here's the output:
oracle@apps scripts]$ ./userl.sh
PAYROLL HR2 CORE DEMO TIMEKEEPING SYS EXPENSE Is there anyway so that the output can be shown with line breaks, where all the output is not on one line? I understand I can spool to a file using the spool command, however I'd like to try and get it working this way first.
Any help would be much appreciated, thanks.
Edited by: oscrub on Sep 22, 2010 6:46 PMHandle: oscrub
Status Level: Newbie
Registered: Oct 5, 2008
Total Posts: 7
Total Questions: 4 (3 unresolved)
so many questions & so few answers.
sh t.sh
SYSTEM
SYS
MGMT_VIEW
DBSNMP
SYSMAN
USER1
DBADMIN
HR
OE
SH
BONGO
SCOTT
OUTLN
OLAPSYS
SI_INFORMTN_SCHEMA
OWBSYS
ORDPLUGINS
XDB
ANONYMOUS
CTXSYS
ORDDATA
OWBSYS_AUDIT
APEX_030200
APPQOSSYS
WMSYS
EXFSYS
ORDSYS
MDSYS
FLOWS_FILES
SPATIAL_WFS_ADMIN_USR
SPATIAL_CSW_ADMIN_USR
APEX_PUBLIC_USER
DIP
IX
MDDATA
PM
BI
XS$NULL
ORACLE_OCMHow do you spell S-Q-L? -
Pass output of one script to other
Hy friends, I have created some 4 test scripts as below-
Script-1:-PR Creation
Script-2:-PR release
Script-3:-PO creation wrt PR
Script-4:-PO release
Now I want to pass output of first script (PR No which is created) to third test script to create PO wrt PR No. so how can I do this? Pl guide.
Regards,
YagneshHello Yagnesh
Below you see a simple example of how to link two scripts:
- First script multiplies input with factor 10
- Second script add 8 to input
ID_VALUE => type I(input)
ED_RESULT => type E(export)
LD_FIRST_CALCULATION => type V(local variable)
REF ( ZUS_LINK_TESTSCRIPT_A , ZUS_LINK_TESTSCRIPT_A_1 ).
REF ( ZUS_LINK_TESTSCRIPT_B , ZUS_LINK_TESTSCRIPT_B_1 ).
That's the XML version of the first test script. As you can see the output is stored in the local variable.
<?xml version="1.0" encoding="utf-8" ?>
- <ecatt:ZUS_LINK_TESTSCRIPT_A xmlns:ecatt="http://xml.sap.com/2003/05/eCATT/ref_ecatt">
<TESTCONFIG />
<VARIANT />
- <IMPORTING>
- <ID_INPUT default="5">
<valueRefName>ID_VALUE</valueRefName>
</ID_INPUT>
</IMPORTING>
- <EXPORTING>
- <ED_OUTPUT>
<valueRefName>LD_FIRST_CALCULATION</valueRefName>
</ED_OUTPUT>
</EXPORTING>
</ecatt:ZUS_LINK_TESTSCRIPT_A>
The local variable is now used as input for the second script:
<?xml version="1.0" encoding="utf-8" ?>
- <ecatt:ZUS_LINK_TESTSCRIPT_B xmlns:ecatt="http://xml.sap.com/2003/05/eCATT/ref_ecatt">
<TESTCONFIG />
<VARIANT />
- <IMPORTING>
- <ID_INPUT default="5">
<valueRefName>LD_FIRST_CALCULATION</valueRefName>
</ID_INPUT>
</IMPORTING>
- <EXPORTING>
- <ED_OUTPUT>
<valueRefName>ED_RESULT</valueRefName>
</ED_OUTPUT>
</EXPORTING>
</ecatt:ZUS_LINK_TESTSCRIPT_B>
Regards
Uwe -
How to send the output of a script to a txt or rpt file using T-sql?
Hi!
I have some code which we use to record info about a database when we decommission it. I normally click Query > Results to File and then run it to produce a file. I need to do this via t-sql so I can automate it. Any idea what code I need to make
this script output to file?
Thanks,
Zoe
SET NOCOUNT ON
DECLARE @Databasename varchar(50)
DECLARE @date as char(10)
DECLARE @session_usr nchar(30);
SET @Databasename = db_name()
SET @date = convert(char(10), getdate(), 121)
SET @session_usr = SYSTEM_USER;
DECLARE @sqlCommand varchar(1000)
select current_user
Print '================================================================================'
Print '========== SQL Decommission Report for '+ @@SERVERNAME +' ========='
Print '========== Executed on ' + @date +' by '+ rtrim(@session_usr) +' ========='
Print '================================================================================'
Print ' '
Print 'Database properties'
Print '----------------------------------'
select substring(name,1,25) as Name,substring(filename,1,40) as File_Name,cmptlevel as Compatibility_level from master.dbo.sysdatabases
where name = @databasename
Print 'Full Text Catalogs'
Print '----------------------------------'
select substring(name,1,20)as Name,status,substring(path,1,52) as Path FROM [master].[dbo].[sysfulltextcatalogs]
Print 'SSIS Packages'
Print '----------------------------------'
IF (select cast(@@version as varchar)) like '%2012%' begin
print 'sql 2012 instance'
select substring(name,1,20) as Name,substring(description,1,40) as Description,ownersid as Owner from msdb.dbo.sysssispackages
end else if (select cast(@@version as varchar)) like '%2008%' begin
print 'sql 2008 instance'
select substring(name,1,20) as Name,substring(description,1,40) as Description,ownersid as Owner from msdb.dbo.sysssispackages
select substring(name,1,20) as Name,substring(description,1,40) as Description,substring(owner,1, 18) as Owner from msdb.dbo.sysdtspackages
end else if (select cast(@@version as varchar)) like '%2005%' begin
print 'sql 2005 instance'
select substring(name,1,20) as Name,substring(description,1,40) as Description,suser_sname(ownersid) as Owner from msdb.dbo.sysdtspackages90
select substring(name,1,20) as Name,substring(description,1,40) as Description,substring(owner,1, 18) as Owner from msdb.dbo.sysdtspackages
end
Print 'Linked Servers'
Print '----------------------------------'
SELECT substring(srvname,1,35) as LinkedServer_Name,substring(datasource,1,35) as Data_Source FROM master.dbo.sysservers WHERE isremote = 0
Print 'Replication'
Print '----------------------------------'
IF (select count(*) from master.dbo.sysdatabases where name = 'Distribution') > 0
select substring(publisher_db,1,20) as Published_DB,substring(Description,1,40) as Description from distribution.dbo.MSpublications
ELSE print 'No replication'
Print ' '
Print 'Database Mail'
Print '----------------------------------'
SELECT substring(name,1,20) as Name,enabled,substring(email_address,1,35) as Email_address,last_email_date FROM msdb.dbo.sysoperators
where last_email_date > dateadd(day,-30,getdate())-- detect whether any of the systems have sent an email in the last 30 days
Print 'CLR Assemblies'
Print '----------------------------------'
select substring(Name,1,20) as Name,substring(Type_desc,1,35) as Description,Create_date from sys.objects where object_id in (select object_id from sys.assembly_modules)
Print 'Logins'
Print '----------------------------------'
SET @sqlCommand = 'select substring(name,1,40) as Name,substring(dbname,1,30) as Default_Database from master.dbo.syslogins where sid in (select sid from '+ @databasename +'.dbo.sysusers where issqlrole <> 1 and hasdbaccess <> 0 and name <> ''dbo'')'
EXEC (@sqlCommand)You can use bcp to export from database to flat file.
It requires xp_cmdshell to work from a stored procedure.
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to Parse this XML File and require below mentioned value as output using powershell script
Need values for below as an output for below xml file so help me with the script:
Under Criteria Tag-
TimeStamp Display Value
OID corresponding to display value for nodes "Criterion"
Under Report Body Tag--
name in Report Section and OID value
<?xml version="1.0" encoding="UTF-8"?>
<ReportOutput>
<ReportHead>
<Report name="Execution Action" type="detailedchanges_rpt">
<Description></Description>
</Report>
<Criteria>
<TimestampCriterion name="date" displayvalue="08/10/14 23:08">
<Timestamp displayvalue="08/10/14 23:08">1412780929000</Timestamp>
</TimestampCriterion>
<MatchCriterion name="approvalId" displayvalue="Not applied" operator="contains" />
<MatchCriterion name="promotionComment" displayvalue="Not applied" operator="contains" />
<SelectCriterion name="changeWindow" displayvalue="Not applied" />
<SelectCriterion name="auditEvents" displayvalue="(Any)">
<String>auditEventAny</String>
</SelectCriterion>
<SelectCriterion name="attributeDisplay" displayvalue="Changed attributes">
<String>changed</String>
</SelectCriterion>
<SelectCriterion name="versionCompare" displayvalue="Version with current baseline">
<String>disabled</String>
</SelectCriterion>
<BooleanCriterion name="showContentDiff" displayvalue="No">
<Boolean value="false" />
</BooleanCriterion>
<BooleanCriterion name="displayUsers" displayvalue="No">
<Boolean value="false" />
</BooleanCriterion>
<BooleanCriterion name="displayPackages" displayvalue="No">
<Boolean value="false" />
</BooleanCriterion>
<BooleanCriterion name="displayCustomProperties" displayvalue="No">
<Boolean value="false" />
</BooleanCriterion>
<BooleanCriterion name="strictPackageMatch" displayvalue="No">
<Boolean value="false" />
</BooleanCriterion>
<BooleanCriterion name="displayCriteriaAtEnd" displayvalue="No">
<Boolean value="false" />
</BooleanCriterion>
<SelectCriterion name="elementExists" displayvalue="Not applied" />
<IntegerCriterion name="maxLinesPerBlock" displayvalue="10">
<Integer>10</Integer>
</IntegerCriterion>
<NodesCriterion name="nodes" displayvalue="TripwireENT.demo.net">
<OID>-1y2p0ij32e8bw:-1y2p0ij32e7cu</OID>
</NodesCriterion>
<MatchCriterion name="nodeName" displayvalue="Not applied" operator="contains" />
<CustomPropertiesCriterion name="nodeProps" displayvalue="Not applied" />
<RulesCriterion name="rules" displayvalue="Critical System Files">
<OID>-1y2p0ij32e7q2:-1y2p0ij31snh6</OID>
</RulesCriterion>
<MatchCriterion name="ruleName" displayvalue="Not applied" operator="contains" />
<MatchCriterion name="elementName" displayvalue="Not applied" operator="contains" />
<CustomPropertiesCriterion name="elementProps" displayvalue="Not applied" />
<CustomPropertiesCriterion name="versionProps" displayvalue="Not applied" />
<AttributesCriterion name="attributes" displayvalue="Not applied">
<Integer name=".missingImpliesFailure">1</Integer>
</AttributesCriterion>
<ContentCriterion name="content" displayvalue="Not applied" />
<MatchCriterion name="auditEventUserName" displayvalue="Not applied" operator="contains" />
<IntegerCriterion name="changeType" displayvalue="Added, Modified, Removed">
<Integer>7</Integer>
</IntegerCriterion>
<SeverityRangeCriterion name="severity" displayvalue="1 - 10000">
<Integer name="min">1</Integer>
<Integer name="max">10000</Integer>
</SeverityRangeCriterion>
<BooleanCriterion name="currentVersionsOnly" displayvalue="Yes">
<Boolean value="true" />
</BooleanCriterion>
<TimeRangeCriterion name="timeRange" displayvalue="All time" />
<PackagesCriterion name="packages" displayvalue="Not applied" />
<SortCriterion name="sortNodes" displayvalue="Name, ascending" isascending="true">
<String>name</String>
</SortCriterion>
<SortCriterion name="sortRules" displayvalue="Name, ascending" isascending="true">
<String>name</String>
</SortCriterion>
<SortCriterion name="sortElements" displayvalue="Name, ascending" isascending="true">
<String>name</String>
</SortCriterion>
<SortCriterion name="sortVersions" displayvalue="Date, descending" isascending="false">
<String>date</String>
</SortCriterion>
</Criteria>
</ReportHead>
<ReportBody>
<ReportSection name="TripwireENT.demo.net" category="node">
<OID>-1y2p0ij32e8bw:-1y2p0ij32e7cu</OID>
<String name="typeName">Windows Server</String>
<ReportSection name="Critical System Files" category="rule">
<OID>-1y2p0ij32e7q2:-1y2p0ij31snh6</OID>
<String name="typeName">Windows File System Rule</String>
<ReportSection name="C:\Temp" category="element">
<OID>-1y2p0ij32e8dr:-1y2p0ij32e586</OID>
<ReportSection name="08/10/14 22:48" category="version">
<OID>-1y2p0ij32e8du:-1y2p0ij32e3ho</OID>
<Integer name="changeType">1</Integer>
<String name="changeTypeName">Added</String>
<Integer name="severity">10000</Integer>
<String name="severityName">High</String>
<Timestamp name="changeTime" displayvalue="08/10/14 22:48">1412779682000</Timestamp>
<String name="approvalId"></String>
<ReportSection name="attributes" category="attributes">
<ReportSection name="DACL" category="added">
<String name="observed">Inherits Entries: true
NT AUTHORITY\SYSTEM, Access Allowed:
Standard rights:
Full Control
Modify
Read & Execute
List Folder Contents
Read
Write
Delete
Read Control
Write DAC
Write Owner
Synchronize
Specific rights:
Full Control
Traverse Folder / Execute File
List Folder / Read Data
Read Attributes
Read Extended Attributes
Create Files / Write Data
Create Folders / Append Data
Write Attributes
Write Extended Attributes
Directory Delete Child
Read Permissions
Change Permissions
Take Ownership
Header flags:
Object Inherit
Container Inherit
Inherited
BUILTIN\Administrators, Access Allowed:
Standard rights:
Full Control
Modify
Read & Execute
List Folder Contents
Read
Write
Delete
Read Control
Write DAC
Write Owner
Synchronize
Specific rights:
Full Control
Traverse Folder / Execute File
List Folder / Read Data
Read Attributes
Read Extended Attributes
Create Files / Write Data
Create Folders / Append Data
Write Attributes
Write Extended Attributes
Directory Delete Child
Read Permissions
Change Permissions
Take Ownership
Header flags:
Object Inherit
Container Inherit
Inherited
BUILTIN\Users, Access Allowed:
Standard rights:
Read & Execute
List Folder Contents
Read
Read Control
Synchronize
Specific rights:
Traverse Folder / Execute File
List Folder / Read Data
Read Attributes
Read Extended Attributes
Read Permissions
Header flags:
Object Inherit
Container Inherit
Inherited
BUILTIN\Users, Access Allowed:
Specific rights:
Create Folders / Append Data
Header flags:
Container Inherit
Inherited
BUILTIN\Users, Access Allowed:
Specific rights:
Create Files / Write Data
Header flags:
Container Inherit
Inherited
CREATOR OWNER, Access Allowed:
Generic rights:
Generic All
Specific rights:
Full Control
Traverse Folder / Execute File
List Folder / Read Data
Read Attributes
Read Extended Attributes
Create Files / Write Data
Create Folders / Append Data
Write Attributes
Write Extended Attributes
Directory Delete Child
Read Permissions
Change Permissions
Take Ownership
Header flags:
Object Inherit
Container Inherit
Inherit Only
Inherited
</String>
</ReportSection>
<ReportSection name="Group" category="added">
<String name="observed">TRIPWIREENT\None</String>
</ReportSection>
<ReportSection name="Owner" category="added">
<String name="observed">BUILTIN\Administrators</String>
</ReportSection>
<ReportSection name="Read-Only" category="added">
<String name="observed">false</String>
</ReportSection>
<ReportSection name="SACL" category="added">
<String name="observed">(null)</String>
</ReportSection>
<ReportSection name="Type" category="added">
<String name="observed">Directory</String>
</ReportSection>
</ReportSection>
</ReportSection>
</ReportSection>
<ReportSection name="C:\Windows\System32\drivers\etc\hosts" category="element">
<OID>-1y2p0ij32e8dr:-1y2p0ij32e4kp</OID>
<ReportSection name="08/10/14 23:08" category="version">
<OID>-1y2p0ij32e8du:-1y2p0ij32e3hk</OID>
<Integer name="changeType">2</Integer>
<String name="changeTypeName">Modified</String>
<Integer name="severity">10000</Integer>
<String name="severityName">High</String>
<Timestamp name="changeTime" displayvalue="08/10/14 23:08">1412780929000</Timestamp>
<String name="approvalId"></String>
<ReportSection name="attributes" category="attributes">
<ReportSection name="SHA-1" category="modified">
<String name="expected">de375d8a456a7345323babee88975ca567a2d5c4</String>
<String name="observed">3c5520382f91cb1cd898fee2da4eba3fa338d982</String>
</ReportSection>
<ReportSection name="Size" category="modified">
<String name="expected">829</String>
<String name="observed">854</String>
</ReportSection>
</ReportSection>
</ReportSection>
</ReportSection>
</ReportSection>
</ReportSection>
<ReportSection name="reportTotals" category="reportTotals">
<Integer name="summary.nodeCount">1</Integer>
<Integer name="summary.ruleCount">1</Integer>
<Integer name="summary.elementCount">2</Integer>
</ReportSection>
</ReportBody>
</ReportOutput>Hi Ritehere,
I know this is simple but am beginner in Powershell Script so I was looking for logic to go through however the output you provided is not what i am looking for and your script is too complicated, as under timestamp i wanted display value and correspoding
to display value the OID name and then name value correspoding to that OID. May be u got it wrong.
Thanks anyways. -
Save output of powershell script to a SharePoint document library?
Hi
I've got the PS script below which scripts out our SQL replication so disaster recovery. Is there a way to output this to a SharePoint document library so that way we can version control the file to keep multiple copies and it also avoids outputting
this to a file share. We would still need to have the files with the .sql extension format which is an allowed file type in our farm.
Thanks
#Load command-line parameters - if they exist
param ([string]$sqlserver, [string]$filename)
#Reference RMO Assembly
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Replication") | out-null
[reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Rmo") | out-null
function errorhandler([string]$errormsg)
writetofile ("-- Replication Script Generator run at: " + (date)) $filename 1
writetofile ("-- [Replication Script ERROR] " + $errormsg) $filename 0
function writetofile([string]$text, [string]$myfilename, [int]$cr_prefix)
if ($cr_prefix -eq 1) { "" >> $myfilename }
$text >> $myfilename
function initializefile([string]$myfilename)
"" > $myfilename
trap {errorhandler($_); Break}
#Deal with absent parameters
[string] $hostname=hostname
if ($sqlserver -eq "") {$sqlserver = read-host -prompt "Please enter the server name or leave blank for Hostname"}
#if ($filename -eq "") {$filename = read-host -prompt "Please enter the file name (eg 'c:\ReplicationBackupScript.sql')..."}
if ($sqlserver -eq "") {$sqlserver = $hostname}
if ($filename -eq "") {$filename = "d:\Rep\CreateReplication-$(get-date -format ddMMyyyy).sql"}
# Clear file contents
if (Test-Path ($filename)) {Clear-Content $filename}
$repsvr=New-Object "Microsoft.SqlServer.Replication.ReplicationServer" $sqlserver
initializefile $filename
# if we don't have any replicated databases then there's no point in carrying on
if ($repsvr.ReplicationDatabases.Count -eq 0)
writetofile ("-- Replication Script Generator run at: " + (date)) $filename 0
writetofile "-- ZERO replicated databases on $sqlserver!!!" $filename 1
EXIT
# similarly, if we don't have any publications then there's no point in carrying on
[int] $Count_Tran_Pub = 0
[int] $Count_Merge_Pub = 0
foreach($replicateddatabase in $repsvr.ReplicationDatabases)
$Count_Tran_Pub = $Count_Tran_Pub + $replicateddatabase.TransPublications.Count
$Count_Merge_Pub = $Count_Merge_Pub + $replicateddatabase.MergePublications.Count
if (($Count_Tran_Pub + $Count_Merge_Pub) -eq 0)
writetofile ("-- Replication Script Generator run at: " + (date)) $filename 0
writetofile "-- ZERO Publications on $sqlserver!!!" $filename 1
EXIT
# if we got this far we know that there are some publications so we'll script them out
# the $scriptargs controls exactly what the script contains
# for a full list of the $scriptargs see the end of this script
$scriptargs = [Microsoft.SqlServer.Replication.scriptoptions]::Creation `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludeEnableReplicationDB `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludeCreateLogreaderAgent `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludePublicationAccesses `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludeArticles `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludePublisherSideSubscriptions `
-bor [Microsoft.SqlServer.Replication.scriptoptions]::IncludeSubscriberSideSubscriptions
writetofile ("-- Replication Script Generator run at: " + (date)) $filename 0
writetofile "-- PUBLICATIONS ON $sqlserver" $filename 1
writetofile "-- TRANSACTIONAL PUBLICATIONS ($Count_Tran_Pub)" $filename 1
foreach($replicateddatabase in $repsvr.ReplicationDatabases)
if ($replicateddatabase.TransPublications.Count -gt 0)
foreach($tranpub in $replicateddatabase.TransPublications)
writetofile "/********************************************************************************" $filename 0
writetofile ("***** Writing to file script for publication: " + $tranpub.Name) $filename 0
writetofile "********************************************************************************/" $filename 0
[string] $myscript=$tranpub.script($scriptargs)
writetofile $myscript $filename 0
writetofile "-- MERGE PUBLICATIONS ($Count_Merge_Pub)" $filename 1
foreach($replicateddatabase in $repsvr.ReplicationDatabases)
if ($replicateddatabase.MergePublications.Count -gt 0)
foreach($mergepub in $replicateddatabase.MergePublications)
writetofile "/********************************************************************************" $filename 0
writetofile ("***** Writing to file script for publication: " + $mergepub.Name) $filename 0
writetofile "********************************************************************************/" $filename 0
[string] $myscript=$mergepub.script($scriptargs)
writetofile $myscript $filename 0Check out Using PowerShell to upload a scripts output to SharePoint
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights -
Problem in printing the output of a script.
dear friends,
I have a script program which is running fine and the it has generated the desired output in one page on the screen. But when i am transfering the output to the printer the same output is splitting into 3 pages and special character is printing in begining and ending of every line. In the first page It is printing the special character, in the second it is printing the first line output and in the third page rest of the output.
In my script i have only the main window. i want the script output to be printed only in one page on the printer . Please help me with your suggestions.Sravan,
Check ur printer as sometimes it so happens that the printers act up and spoil output... -
Problem in sending Fax from the Output type - SAP Script
Hi Team,
I am facng a problem with SAP Script while sending the Fax from the output type. I am able to see the entire output in my outbox. But in the fax machine it is only printing the Main window. I checked with some other outputs which are using the Fax option, they are printing fine. Driver program is the Z program. Can anyone give me some Idea?
Regards,
SasidharHi Sasidhar,
Have you tried with different fax machine.
Regards,
Atish -
'#' unexpectedly inserted into output fields in script print preview
Hello Experts,
I came across a problem that confused me so much that when i try to see the print preview of a script form, the output fields in Main window were all printed with '#' inserted, as below:
the output is like 7#8#0#0#0#....but it should be 7800017167
and also, for other fields like date and amount, the same problem occurs.
But the most weird thing is that, the issue only occurs in the Main Window of the second page of the form, but not in the first page although they share the same Main Window. And what's more, it only happened in the Testing System, I can not replicate them in develop system...
I know it may be a very isolate problem, but i just want to try my luck to see if any of you could shed me some light~
Thanks!Hi Siva,
Can you tell me please, wheather its a "Z" driver program or Standard driver program.
After execution of the program/transaction code go for <b>systems</b>> then for <b>Status></b> then you can find the <b>program name.</b> You can go into that and search for the <b>Open_form</b>. Before Open form set the <b>BreakPoint</b> there you can find the form name which will pass during run time through variable.
other option is that go for <b>NACE</b> transaction and see for <b>routine,</b> <b>for example</b> If it is invoice then it will be Billing. select your that<b> area</b> and click on <b>Output type button.</b> there you can see the output types You can go in that and see for program and form name, then you can confirm the output type.
reward point if it is helpful.
Regards
Sagun Desai. -
Dear
Could you please help me, how should i spool the output of an sql script to a file; please reply me back with the scripts.
Thanks n Regards,SQl>set head off term off feedback off echo off
SQl> set colsep ','
SQl SET TRIM ON
SQl>set buffersize 1000000
SQl> spool c:\filenme.txt
SQl>select * from emp;
SQl>spool off
SQl>
you can turn on what ever is off and trim offHTH -
Output from same script on two different platforms produce different outputs.
I'm running a command prompt script on two different platforms (Windows 7 desktop and a Microsoft Server 2008 R2 Enterprise platform) and the output the script produces is different on each platform.
Specifically; the script is
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
echo %mydate%>> log.txt
echo %mytime%>> log.txt
and the output from the Windows 7 desktop is:
2014-07-31
0249 PM
While the output from the 2008 server is:
ECHO is on.
0249 PMHi Dave,
There's some very good learning resources here:
http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
Also, there's a script repository full of examples you can learn from and tweak to meet your needs here:
http://gallery.technet.microsoft.com/scriptcenter
As an additional suggestion, I'd highly recommend upgrading PowerShell on Win7 and WS2008R2 to v4. v2 was okay, but v4 makes life much easier (make sure you read the system requirements first though, there's still a few incompatibilities):
http://www.microsoft.com/en-us/download/details.aspx?id=40855
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing)
Maybe you are looking for
-
Moving iPhoto library to Ext Hard Drive please help
Hi, I am moving from a Imac to Mac Book air. I copied the pictures folder on Imac to the External Hard drive. Plugged EHD into mac book air. Opened Iphoto and held down option key and then selected the libary on the EHD. Lots of activity on ext
-
Flash Player 10.3 will not work in Safari on Mac OS X 10.5.8
Mac OS X 10.5.8 Safari 5.0.6 Flash Player 10.3 I'm not sure what the problem is. I could play youtube videos etc fine last time I was on the computer and now they just wont work and say 'plug-in missing'. But when I try to download the latest compati
-
IBooks not displaying all PDFs
Hi all On my iTunes I have 92 PDF's that are sync's to my iPad iBooks, but on the device I only see 66? I have deleted and re-sync'd and no luck? Daz
-
Weird SSRS Format Date Output in Matrix report Header
For one of my Matrix reports, the column headers are Dates which I am trying to format in the form of 'Mon 07' i.e. short date name followed by date value. For this I am using the expression - =Format(CDate(Fields!WorkedOnDate.Value),"ddd") I then wa
-
IDVD quiting, stopping, crashing.
One month into a project and I was on the last day, ready to add music files and poof, program crashes. I spent 9 hours yesterday reading and no answers. It is a large project (reflections black) with only 2 menu buttons on the main page...slideshows