Identify the channel of current submission document
Hi all,
I have requirement in a BADI Status Management, that
the some part of BADI, will only work when document
edited/submitted from BSP (EP). And some validation
on BADI only work when user access from CRM Online.
Any idea on how to detect from which channel user has
submit/edit the document?
Cheers,
Gun.
Will see in new CRM transaction from EP.
Similar Messages
-
I have a FP-1600 and a FP-AO-200 module, 0-20 ma. When I use Field Point Explorer 3.0.1, I can not command any of the channel output current. The current remains in the lowest value 0.0035 A. What is the problem ? The communications with the module are OK, because it shows when the current are open or closed.
Jorg,
I noticed that you claimed to be using the module in 0-20mA mode, yet the reading you are seeing is 3.5mA. This is the minimum value (with overranging) when the module is set to 4-20mA mode. My guess is that your module is defaulting back to 4-20mA mode, but your IAK file still thinks the module is in 0-20mA mode. You can verify this by using the find devices button in FieldPoint Explorer and then trying to write to the channel.
To fix this problem, you should use the snapshot feature to change the default power-up mode for that channel.
Regards,
Michael Shasteen
Applications Engineering
National Instruments
www.ni.com/ask
1-866-ASK-MY-NI -
Identifying the orginal Doc for reset and reverse documents
hi,
When there is a cheque return from the customer, what is the practice is to reset and reverse the original receipt posted in the system. but the issue is once the original document is reset and reverse there is no way of identifying the invoice details of the receipt created (f-28). Please some one help to find out those details.
Thanks and Regards
GayaniHI,
Up to that point ok, say If i reverse the receipt and from the reversal document number I can see the "reversed with number" but the issue is I want to know the payment usage (original documents) of the "revered with number".
Say There is receipt document number 1800000000
and the bank return this cheque, so I want to reverse the receipt number 18000000, so I use the transaction FBRA to reset and reverse the document. but the customer want to know the original documents (invoice) of the receipt number 180000000?
I can not get those information from the system
Gayani -
Identifying the line items on a posted document
Hi guys!
I am doing a program Acounts Payable Voucher. On fb01, I made a transaction and posted it. After the document has been posted, Input Vat and Witholding Tax are included in the line item. The amount is already been calculated.
My problem is how will I separate <b>Input Vat and Witholding Tax</b> from the other line items? I have identified the other line item <i>Vendor</i> from the others using posting key. But the rest may have the same posting keys.
Thanks!yes it'll populate the received quantity (which you would have generally entered in the Quantity tab). There is a field for Recipient as well (which is what I think you refer to as receiver). You may need to scroll right for this, but as you are the receiver in all cases, just copy paste from Excel
You can enter all of this at one go. Try it out and let me know. -
How to identify the version of InDesign application used to produce an InDesign document
Is there a way to identify the version of the InDesign application(CS/CS2/CS3) where the Document was originally created?
Can we use InDesign CS3 server to open a CS2 document to do some relinking and save it again as a CS2 document without converting the document to CS3 version? If not, how to identify and not open the documents produced by previous versions of InDesign application?
Thanks in advance.Hi,
you can test the Creator. In addition however the document must be opened. If it is a CS2 document, closes document again without to save. I did not test it. Would have to function however.
JavaScript Example:
try {
var creator = app.documents.item(0).metadataPreferences.creator;
catch(e){}
alert( "The creator = " + creator );
Greeting Andreas -
Using PHP to identify the current page - by David Powers
Hi There,
I'm trying to write a script so I can identify the sub-pages under "Gallery" in my website
Under Gallery I have more than hundred pages describing the photos but I want to identify them as the "Gallery" page.
How do I achieve that?
It would be tedious to write the "PHP if" statement for each photo link.
I trust there is a simpler solution.
In PHP solutions by David Powers, Ch.4 "Using PHP to identify the current page"
The script is:
<?php $currentPage = basename($_SERVER['SCRIPT_NAME']); ?>
<ul id="nav">
<li><a href="index.php" <?php if ($currentPage == 'index02.php') {echo 'id="here"';} ?>>Home</a></li>
<li><a href="journal.php" <?php if ($currentPage == 'journal.php') {echo 'id="here"';} ?>>Journal</a></li>
<li><a href="gallery.php" <?php if ($currentPage == 'gallery.php') {echo 'id="here"';} ?>>Gallery</a></li>
<li><a href="contact.php" <?php if ($currentPage == 'contact.php') {echo 'id="here"';} ?>>Contact</a></li>
</ul>
Let's say that the gallery pages contains hundreds of links gallery like gallery/photos1.php, gallery/photos2.php, gallery/photos3.php, gallery/photos4.php, gallery/photos5.php, gallery/photos6.php, gallery/photos7.php etc...
How would I identify the sub-pages so when we are there Gallery is highlighted?
Thank you!
Best,Hello Siddhardha,
To get the details of a process you need to use Locator class from BPEL api. You can locate your process by listInstances method which accepts WhereCondition parameter used to build a query on process instances. Once you've found the process you were looking for you can use getAuditTrail method to retrieve audit trail of a given instance. You can also use setStatus() method from a BPELX java exec tag within your process and later retrieve it from instance handle by getStatus method.
A sample snippet to retrieve instance handles to all child processes of a given process:
StringBuffer sb = new StringBuffer();
Locator locator = new Locator(domain,domainpassword);
WhereCondition wc = new WhereCondition();
String query = sb.append(SQLDefs.AL_ci_root_id).append(" = ? ").toString();
wc.append(query);
wc.setLong(1,parentInstance);
IInstanceHandle[] ih = locator.listInstances(wc);
You can read more about querying processes on http://blogs.oracle.com/matt/2006/06/27?print-friendly=true
Radoslaw -
Javascript Question - How to Insert a Dynamic/Current Date into the Footer of a Scanned Document
Hi!
I am looking for help in finding a Javascript that would allow the insertion of a dynamic/current date into the footer of a scanned document at the time the document is printed.
I am currently using Adobe Acrobat Professional 8.0 at my work and there has arisen a need to have a dynamic/current date in the footer on scanned documents when they are printed out on different days by different people.
I am new to the Forum and I am also very new to Javascript and what this entails.
Thank you in advance for your help and input!
Tracythis.addWatermarkFromText({
cText: util.printd("mmmm dd, yyyy", new Date()),
nTextAlign: app.constants.align.right,
nHorizAlign: app.constants.align.right,
nVertAlign: app.constants.align.bottom,
nHorizValue: -72, nVertValue: 72
Will insert the current Monday/Day/Year as a text watermark at the bottom of every page of a document, 1 inch up and 1 inch in from the right corner. -
How i can see the Current Order documents
Hi Gurus,
can any body tell me how can i see the current order number documents? in T.Code - KONK i see that the number range status shows current order document number. but i cannt trace where it to see the document?
also i check the Order Actual Line Item & Plan Line Item at the time message arrise that Order doesnot exit.
but in KONK - the current number range status shows the order document number.
pls help me to overcome the problem.
Point will be rewarded
Than'x
DhananjayHi,
you are mistaking KONK with KANK. KONK ist the number range for internal order master data (i.e. order numbers). Please check this via AUFK. Line items have nothing to do with KONK.
Regards
Karl -
Revision: 3687
Author: [email protected]
Date: 2008-10-16 11:23:39 -0700 (Thu, 16 Oct 2008)
Log Message:
Add some messaging tests for scenarios that involve subscribing to a destination, disconnecting from the channel currently being used and resubscribing to the destination. There is an issue that is causing the streaming/multipleDisconnectsResubscribesTest.mxml test to fail that I will log a bug for.
Added Paths:
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/disconnectResubscribeJMSTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/disconnectResubscribeTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/multipleDisconnectsResubscribesTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/disconnectResubscribeJMSTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/disconnectResubscribeTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/multipleDisconnectsResubscribesTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/disconnectResubscribeJMSTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/disconnectResubscribeTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/multipleDisconnectsResubscribesTest.mxmlRevision: 3687
Author: [email protected]
Date: 2008-10-16 11:23:39 -0700 (Thu, 16 Oct 2008)
Log Message:
Add some messaging tests for scenarios that involve subscribing to a destination, disconnecting from the channel currently being used and resubscribing to the destination. There is an issue that is causing the streaming/multipleDisconnectsResubscribesTest.mxml test to fail that I will log a bug for.
Added Paths:
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/disconnectResubscribeJMSTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/disconnectResubscribeTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/longpolling/multipleDisconnectsResubscribesTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/disconnectResubscribeJMSTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/disconnectResubscribeTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/polling/multipleDisconnectsResubscribesTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/disconnectResubscribeJMSTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/disconnectResubscribeTest.mxml
blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/unsubscribeScen arios/streaming/multipleDisconnectsResubscribesTest.mxml -
How do I identify the current IMAQ vision version, including updates ?
I would like to identify the installed version of LabVIEW on an old machine, including the IMAQ vision updates. Where do I look ???
A quick way to find out versions of all National Instruments software/driver installed is to go to MAX (Measurement and Automation Explorer) and click on Help->About MAX->Tech Support then the System Tab.
If your system is from the pre-MAX days, then you can get the version numbers in Add/Remove Programs in the Control Panel.
Hope this helps.
Ken
Applications Engineering
National Instruments -
Identify the last data package in start routine
Hi Everyone
We have a start routine in transformations. We require to do some special processing in the start routine only when the last data package is executing. How can we determine in the start routine that current package is last one or not ? Any pointers in this direction are appreciated.Hi,
You can get packet Id from datapackid in start routine and end routine. But I'm not so sure how to identify the last packet ID, alternatively you can store this packet id in some where else and read the same value in End routine if your logic(processing) permits to do this in End routine instead of Start routine.
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
hope it helps...
regards.
Raju -
Please help me to get this done!....Thanks in Advance
This is current script I use to update AD record but its taking user id to pick the user in AD, which is some time give error not update properly..
# UpdateUsers.ps1
# PowerShell program to update Active Directory users from the information in a
# Microsoft Excel spreadsheet. Only single-valued string attributes supported.
# Author: Richard Mueller
# PowerShell Version 1.0
# September 12, 2011
Trap
If ("$_".StartsWith("Cannot load COM type Excel.Application"))
"Excel application not found, program aborted"
Add-Content -Path $LogFile -Value "## Excel application not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If (("$_".StartsWith("Exception has been thrown")) -and ($Step -eq "4"))
"Excel spreadsheet not found, program aborted"
Add-Content -Path $LogFile -Value "## Excel spreadsheet not found: $ExcelPath"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If ("$_".StartsWith("The server is not operational"))
"Domain Controller not found, program aborted"
Add-Content -Path $LogFile -Value "## Domain Controller not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If ("$_".StartsWith("The directory service is unavailable"))
"Active Directory not found, program aborted"
Add-Content -Path $LogFile -Value "## Active Directory not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
If ("$_".StartsWith("The specified domain"))
"Domain not found, program aborted"
Add-Content -Path $LogFile -Value "## Domain not found"
Add-Content -Path $LogFile -Value " $_"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
Break
"Unexpected error: $_"
Add-Content -Path $LogFile -Value "## Unexpected error: $_"
Add-Content -Path $LogFile -Value " Step: $Step"
Break
Function CleanUp
Trap
"Error during cleanup: $_"
Add-Content -Path $LogFile -Value "## Error during cleanup: $_"
$Script:Errors = $Script:Errors + 1
Continue
# Function to release Excel objects from memory.
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Columns)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Rows)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Range)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Sheet)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Worksheets)} While ($x -gt -1)
$Workbook.Close($False)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbook)} While ($x -gt -1)
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbooks)} While ($x -gt -1)
$Excel.Quit()
Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Excel)} While ($x -gt -1)
# Specify paths to spreadsheet and log file.
$Script:Errors = 0
$Step = "1"
$ExcelPath = "c:\scripts\UpdateUsers.xls"
$LogFile = "c:\scripts\UpdateUsers.log"
Write-Host "Please Standby..."
# Add to the log file.
$Step = "2"
Add-Content -Path $LogFile -Value "------------------------------------------------" -ErrorAction Stop
Add-Content -Path $LogFile -Value "UpdateUsers.ps1 Version 1.0 (September 12, 2011)"
Add-Content -Path $LogFile -Value $("Started: " + (Get-Date).ToString())
Add-Content -Path $LogFile -Value "Spreadsheet: $ExcelPath"
Add-Content -Path $LogFile -Value "Log file: $LogFile"
$Step = "3"
# Open specified Excel spreadsheet.
$Excel = New-Object -ComObject "Excel.Application"
$Workbooks = $Excel.Workbooks
$Step = "4"
$Workbook = $Workbooks.Open($ExcelPath)
$Worksheets = $Workbook.Worksheets
$Sheet = $Worksheets.Item(1)
$Range = $Sheet.UsedRange
$Rows = $Range.Rows
$Columns = $Range.Columns
$Step = "5"
# Hash table of attribute syntaxes.
# The LDAP display names will be read from the spreadsheet.
# The corresponding syntaxes will be read from the Schema container.
$Attributes = @{}
# Array of spreadsheet column headings.
$Cols = @()
$Step = "6"
# Read attribute LDAP Display Names from the first row of the spreadsheet.
$ID = 0
For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
# Retrieve column heading, the lDAPDisplayName of an attribute.
$Value = $Sheet.Cells.Item(1, $k).Text
# Keep track of all column headings.
$Cols += $Value
# Skip duplicates in hash table.
If ($Attributes.ContainsKey($Value) -eq $False)
# Default is "NotFound", until found in the AD Schema.
$Attributes.Add($Value, "NotFound")
# Keep track of which column uniquely identifies users.
If ($Value.ToLower() -eq "distinguishedname") {$ID = $k}
If (($Value.ToLower() -eq "samaccountname") -and ($ID -eq 0)) {$ID = $k}
# This script cannot be used to rename users.
If ($value.ToLower() -eq "cn")
Add-Content -Path $LogFile -Value "## This script cannot be used to rename users"
Add-Content -Path $LogFile -Value " Do not specify the cn attribute in the spreadsheet"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
CleanUp
Return "Program aborted: cn attribute found in spreadsheet" `
+ "`nSee log file: $LogFile"
$Step = "7"
If ($ID -eq 0)
Add-Content -Path $LogFile -Value "## No column found to identify users"
Add-Content -Path $LogFile -Value " One column must be distinguishedName or sAMAccountName"
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
CleanUp
Return "Program aborted: No column found in spreadsheet to identify users" `
+ "`nSee log file: $LogFile"
# Create filter to query for attributes in the schema.
$Attrs = $Attributes.Keys
$Filter = "(&(objectCategory=AttributeSchema)(|"
ForEach ($Attr In $Attrs)
$Filter = $Filter + "(lDAPDisplayName=$Attr)"
$Filter = $Filter + "))"
$Step = "8"
$RootDSE = [System.DirectoryServices.DirectoryEntry]([ADSI]"LDAP://RootDSE")
$Domain = $RootDSE.Get("defaultNamingContext")
$Schema = $RootDSE.Get("schemaNamingContext")
$Step = "9"
# Use the NameTranslate object.
$objTrans = New-Object -comObject "NameTranslate"
$objNT = $objTrans.GetType()
# Initialize NameTranslate by locating the Global Catalog.
$objNT.InvokeMember("Init", "InvokeMethod", $Null, $objTrans, (3, $Null))
$Step = "10"
# Retrieve NetBIOS name of the current domain.
$objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (1, "$Domain"))
$NetBIOSDomain = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 3)
Add-Content -Path $LogFile -Value "NetBIOS name of domain: $NetBIOSDomain"
$Step = "11"
$Searcher = New-Object System.DirectoryServices.DirectorySearcher
$Searcher.SearchRoot = [ADSI]"LDAP://$Schema"
$Searcher.PageSize = 200
$Searcher.SearchScope = "subtree"
$Searcher.PropertiesToLoad.Add("lDAPDisplayName") > $Null
$Searcher.PropertiesToLoad.Add("attributeSyntax") > $Null
$Searcher.PropertiesToLoad.Add("isSingleValued") > $Null
$Searcher.PropertiesToLoad.Add("systemFlags") > $Null
# Filter on specified attributes.
$Searcher.Filter = $Filter
$Step = "12"
# Query Active Directory.
$Results = $Searcher.FindAll()
# Enumerate recordset.
ForEach ($Result In $Results)
# Retrieve properties of attributes.
$Name = $Result.Properties.Item("lDAPDisplayName")[0]
$SysFlags = $Result.Properties.Item("systemFlags")[0]
$SyntaxNum = $Result.Properties.Item("attributeSyntax")[0]
$SingleValued = $Result.Properties.Item("isSingleValued")[0]
# Only single-valued string attributes supported by this version of the program.
Switch ($SyntaxNum)
"2.5.5.12" {$Syntax = "String"}
Default {$Syntax = "NotSupported"}
If ($Name.ToLower() -eq "distinguishedname") {$Syntax = "DN"}
If (($SysFlags -band 4) -ne 0)
$Attributes[$Name] = "Constructed"
Else
If ($SingleValued -eq $True)
$Attributes[$Name] = $Syntax
Else
$Attributes[$Name] = "NotSupported"
$Step = "13"
# Check if any attributes not found or have unsupported syntax.
$Found = $True
ForEach ($Attr In $Attrs)
$Syntax = $Attributes[$Attr]
If ($Syntax -eq "NotFound")
Add-Content -Path $LogFile -Value "## Attribute $Attr not found in schema"
"Attribute $Attr not found in schema"
$Found = $False
If ($Syntax -eq "NotSupported")
Add-Content -Path $LogFile -Value "## Attribute $Attr has a syntax that is not supported"
"Attribute $Attr has a syntax that is not supported"
$Found = $False
If ($Syntax -eq "Constructed")
Add-Content -Path $LogFile -Value "## Attribute $Attr is operational, so is not supported"
"Attribute $Attr is operational, so is not supported"
$Found = $False
$Step = "14"
If ($Found -eq $False)
Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
CleanUp
Return "Program aborted" `
+ "`nSee log file: $LogFile"
# Read remaining rows of the spreadsheet, until the first blank value is found
# in the column that identifies users.
$Step = "15"
$Script:Updated = 0
$Script:Unchanged = 0
$j = 2
Do {
# Retieve ID value for the user first.
$Value = $Sheet.Cells.Item($J, $ID).Text
$Found = $False
$Step = "16"
If ($Cols[$ID - 1] -eq "distinguishedname")
# Any forward slash characters must be escaped.
$DN = $Value.Replace("/", "\/")
# Bind to the user object.
# If user not found, $User.Name will be $Null.
$User = [ADSI]"LDAP://$DN"
If ($User.Name -ne $Null)
$Found = $True
$Step = "17"
If ($Cols[$ID - 1] -eq "samaccountname")
Trap
Write-Host ""
"Error translating name: $_"
Add-Content -Path $LogFile -Value "## Error translating name $Value"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
# Convert sAMAccountName to distinguishedName.
$DN = ""
$Step = "18"
$objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (3, "$NetBIOSDomain$Value"))
$DN = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 1)
$Step = "19"
If ($DN -ne "")
$Step = "20"
# Any forward slash characters must be escaped.
$DN = $DN.Replace("/", "\/")
# Bind to the user object.
$User = [ADSI]"LDAP://$DN"
$Found = $True
If ($Found -eq $True)
$Step = "21"
# Read remaining values for this user.
$Changed = $False
For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
# Skip the identifying column.
If ($k -ne $ID)
$Step = "22"
# Retrieve attribute name for this column from array.
$AttrName = $Cols[$k - 1]
# Retrieve attribute syntax from hash table.
$Syntax = $Attributes[$AttrName]
$Step = "23"
# Retrieve attribute value for this user.
$Value = $Sheet.Cells.Item($j, $k).Text
# Skip blank values.
If ($Value -ne "")
If ($Syntax -eq "String")
Trap
If ("$_".StartsWith("The directory property cannot be found"))
Continue
Else
Write-Host ""
"Error retrieving value from Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error retrieving $AttrName for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
$Step = "24"
# Single-valued string attribute.
# Retrieve existing value.
$OldValue = ""
$OldValue = $User.Get($AttrName)
# Check if existing value to be deleted.
If ($Value.ToLower() -eq ".delete")
If ($OldValue -ne "")
If ($AttrName.ToLower -eq "samaccountname")
Add-Content -Path $LogFile -Value `
"## Mandatory attribute sAMAccountName cannot be cleared for user: $DN"
$Script:Errors = $Script:Errors + 1
Else
Trap
Write-Host ""
"Error deleting value from Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error deleting $AttrName for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
$Step = "25"
# Make the attribute value "not set".
$User.PutEx(1, $AttrName, 0)
$Changed = $True
Else
$Step = "26"
# Check if new value from spreadsheet different.
If ($Value -ne $OldValue)
Trap
Write-Host ""
"Error assigning value from Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error assigning $AttrName for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
Continue
# Assign the new value to the attribute.
$User.Put($AttrName, $Value)
$Changed = $True
Else
# Unexpected error.
Add-Content -Path $LogFile -Value `
"## Unexpected syntax: $Syntax for attribute $AttrName for user $DN"
$Script:Errors = $Script:Errors + 1
If ($Changed -eq $True)
Trap
Write-Host ""
"Error saving to Active Directory: $_"
Add-Content -Path $LogFile -Value "## Error saving to AD for user $DN"
Add-Content -Path $LogFile -Value " Description: $_"
$Script:Errors = $Script:Errors + 1
$Script:Updated = $Script:Updated - 1
Continue
$User.SetInfo()
Add-Content -Path $LogFile -Value "Update user: $DN"
Write-Host "." -NoNewLine
$Script:Updated = $Script:Updated + 1
Else
Add-Content -Path $LogFile -Value "User unchanged: $DN"
Write-Host "." -NoNewLine
$Script:Unchanged = $Script:Unchanged + 1
Else
Add-Content -Path $LogFile -Value "## User not found: $Value"
Write-Host "." -NoNewLine
$Script:Errors = $Script:Errors + 1
$j = $J + 1
} Until ($Sheet.Cells.Item($j, $ID).Text -eq "")
$Step = "27"
CleanUp
Add-Content -Path $LogFile -Value $("Finished: " + (Get-Date).ToString())
Add-Content -Path $LogFile -Value "Number of users updated: $Script:Updated"
Add-Content -Path $LogFile -Value "Number of users unchanged: $Script:Unchanged"
Add-Content -Path $LogFile -Value "Number of errors: $Script:Errors"
Write-Host ""
"Done"
"Number of errors: $Script:Errors"
"See log file: $LogFile"Actually scripts run fine with excel file, currently we are using user-id to pick to update AD. Now we want to update AD use employee id. You can say to identify the record in AD through employee ID instead of user-id.
I do not think you will get anyone here to fix that for you. You need to find someone who knows PowerShell to help you or learn PowerShell your self.
I would fix it for you but not for free. It is too oddly designed and has too many dependencies. Any small change is likely to break it.
¯\_(ツ)_/¯ -
How to get the version no of a document created/updated in KM
Hi All,
We are currently working on SAP 7.0 SP16.
We have used the KM API to store our documents into the KM repositories.
The problem we are facing here is related to the version no of the documents created.
I will explain this with an example :
I have created a document "test.txt" --> default version no is 1
I updated the same twice now there are 3 version for this document 1, 2 & 3.
Now if I delete the version no 1 then there are only 2 document versions remaining in the system, but the Portal still displays them as 2 and 3.
Now when I want to read the version history of this document I get an IResource object for each version but I am not able to find any means through which I can retrieve the version no of the IResource object which is currently being read.
Can someone please help me the information regarding how to retrieve the version no from the IResource object returned whenever a document is read using KM API.
Thanks in advance!
Regards,
ManishHi,
try something like this:
String strRevisionID = null;
if (resource.isVersioned()) {
IVersionHistory versions = resource.getVersionHistory();
if (versions != null) {
IResource version = versions.get(i);
strRevisionID = actResource.getRevisionID();
hope this helps,
Romano -
How do I print the first page of numerous documents?
Computer setup:
Adobe Acrobat Pro 9.10 on Windows XP Professional x64 Edition.
User experience:
I consider myself proficient in office (Excel, Word) and software use in general (Windows XP). The extent of my Adobe Acrobat experience is creating custom dynamic stamps. I have little to no javascript programming knowledge.
Problem:
Numerous pdf files in multiple directory locations must have the first page of each document printed.
Current (and time-consuming) solution:
Copy the files to a single directory
Use Acrobat Pro to combine files and individually select the first page for each document
Combine and print.
Tools
Filename Extractor (can be used to extract the filename OR filename and path of documents)
Bonus Points
An index of all documents exists in Excel format. Documents are selected for printing by filtering this Excel index. The Excel index will have a column containing the path of each document. A solution that can utilise this path information to shortcut the time-consuming "copy and paste" method currently used will attract bonus points.
Thanks in advance,
SimonCreate a batch process the executes the following JavaScript code:
this.print({nStart:0, bUI: false, bSilent: true});
It will silently print the first page of any file you batch. Be careful not to overload your printer's queue by sending too many files in one go. -
How can I automatically control the channel selection on the data logger
I am an in-experienced use with a simple system which measures and displays temperature from 16 thermocouples. Not all 16 thermocouples are always connected at once and those that aren't are blanked off from view. I would also like to use the Advanced Data Logger VI to log the measurements but would like to have the logger only record or display the thermocouples that are connected. Un-connected channels give a signal of 1264 degrees so I can use a comparator to give a boolean output to switch them off. Can anyone please tell me how to do this.
Also, I need to expand the VI to read all 16 channels instead of the current 8. Any help would be appreciatedMike,
Unfortunately I couldn't get the reference of the example you mention, probably you may want to add it as an attachment so the person who decides to answer this question knows exactly which example you are describing. So for the part of making visible/invisible some of the channels I attached an example that I built for demonstrating this feature, simply open the VI and run it, if you want one of the channels or plots from the graph to be invisible just click in the push button that corresponds to it. Switch to the block diagram and review the use of property nodes, using the property of visible.
If you want to generate a support request please visit www.ni.com/ask to see the options of reaching us.
Good luck!
Nestor Sanchez
Applications Engine
er
National Instruments
Nestor
National Instruments
Attachments:
Visible_Plots.vi 46 KB
Maybe you are looking for
-
I downloaded some midi samples at http://www.prosonic-studios.com/ and I was able to drag and drop into GarageBand 3 that's in iLife 06. When I installed GarageBand 08, all of a sudden those sample midi files when dropped into GarageBand, can be drop
-
even though all photos look like they are the right way up, when the slideshow commences, some of them display sideways. I have tried re-rotating them - and still have same problem. Help please - need it for Saturday night !
-
How to connect PCMCIA Type II card to my Satellite A200?
I have Satellite A200-19L (NEW) laptop could you guide me how to connect a ( Type II PCMCIA Card ) to my laptop Because I think that this laptop dose not support this card. Your fast response is required ASEM
-
How can i delete Record when i click on Delete Link in a report
hi, i have to create report select S_NO,BILL_NO,LED_NAME,PUR_LED,VAT,BILL_DATE,ST_GRP_UND,GODOWN_NAME, ITEM_NAME,UNIT,QTY,RATE,PER,DIS,AMOUNT,'Delete' from DUMY_AC_LED_PURASEI want to delete corressponding record when i click on Delete Link. Here S_N
-
JScrollPane viewport size question
Hi all, I've a component that is very large (it has a dinamic height) but its width is always the same (fixed). I need to show this component in a JScrollPane container and only shows the vertical scrollbar. It works fine but when my applications run