Function ROUND() in Macros with APO 4.0
Hi,
We are facing problems with using the Round Function in SNP Macros.
As per SAP Documentation, ROUND( X ; Y ) rounds X to Y decimal places. The arguments can be numbers that you enter in Operator/function dialog boxes, as well as cell(s), row(s) or column(s) from the planning table or the auxiliary table.
- Round Function is taking the constants as Argument X and giving the required output.
- However, it doesnot give any results when used with Auxillary KF/KF given as Argument X. During the macro design, no error is provided. In the Planning Book on execution, It gives a dump with message - Unable to interpret "KF Name" as a number.
In case anyone has worked with the function, inputs would be greatly appreciated and suitable awarded
Thanks and Regards,
regards,
Sudhir
In the first place, can you explain why you need the function through a macro when it can be done in dataview configuration. IN the transaction /SAPAPO/SDP8B, you can always enter the data view and click on edit and then right click on the auxilary KF to setup the decimal precision required. I am not sure if you are trying to achieve the same functionality through a macro.
Similar Messages
-
Some of my photos are opening and then immediately showing a big round white circle with a black exclaimation mark in the center. What the heck is this and how do I get rid of it? Help Joy
The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
What version of iphoto? Assuming 09 or later...
Option 1
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
Regards
TD -
Pattern Matching functions in DP Macro
Folks,
Can anyone tell me if there are any pattern matching functions in DP Macros? Here is the requirement:
If the time bucket is a quarter, then hide some rows. If the time bucket is a month or something finer, then show the same row. Assume that all the time buckets in the data view will be the same (no telescoping buckets profile)
So, suppose that I use BUCKET_DESCRIPTION and get the name of the bucket. If it is Q.* (using pattern matching lingo here), then I would like to set the row attributes accordingly. If it is M.* then set the row attributes to visible.
Can you please throw some light on this? Would you do it some other way?
Thanks,
SatishHi,
You may try with the macro function BUCKET_DAYS(). This will find number of days in a given bucket.
Then you can write condition, If bucket days is more than 1 and less than 7, then it is weekly.
If bucket days is more than 7, then it is monthly.
Please see if it is helpful for you.
Regards,
Manimaran M. -
Hi Everyone,
I have a question regarding APO and BI Integrated Planning. If we are using APO DP is it a good option to implement BI Integrated planning as well. because both of them have the same planning and forecasting strategies. Is BI Integrated Planning and alternate option for APO DP or can it be used along with APO DP for planning on certain reports. Thank you very much for your time.
Edited by: akshay27 on Oct 14, 2009 8:30 PM
Edited by: akshay27 on Oct 14, 2009 8:39 PMHi Akshay27,
I have personnally never use the BI integrating planning, but based on my knowledges; hopefully somebody with more experience in this area will be able to complete this answer!
Integrated planning indeed allow to realised more and more planning using BW infrastructure. The very big advantages is the user friendliness.
However this does not exclude the use a DP. Both can be use together, for example DP for your power user and integrated planning for collaboration. DP will be the "master system" enabling you to maintain CVC, run complex statistical forecast, validate foecast.
(I have seen a simialr implementation a couple of year ago using BPS).
Note for exaple that the new functionality "customer forecast management" in SCM 7 use both DP and IP.
You mentioned the possibilty to perform statistical calculation in IP... I haven't actually seen that, but I am not convince you will have the capacity of DP (seasonal planning, promotion, like profile... MLR, POS forecast...), If you know more, please let me know.
I hope this help a bit; now if somebody could provide more information about IP, that would be great!
Thanks and Regards
Julien -
I am experiencing this error with one of our cluster environment. Can anyone help me in this issue.
The Cluster Service function call 'ClusterResourceControl' failed with error code '1008(An attempt was made to reference a token that does not exist.)' while verifying the file path. Verify that your failover cluster is configured properly.
Thanks,
Venu S.
Venugopal S ----------------------------------------------------------- Please click the Mark as Answer button if a post solves your problem!Hi Venu S,
Based on my research, you might encounter a known issue, please try the hotfix in this KB:
http://support.microsoft.com/kb/928385
Meanwhile since there is less information about this issue, before further investigation, please provide us the following information:
The version of Windows Server you are using
The result of SELECT @@VERSION
The scenario when you get this error
If anything is unclear, please let me know.
Regards,
Tom Li -
AcroPDF ActiveX print functions are not working with Reader 9.2/9.3. Tried ActiveX print functions like printPages(), printAll(), printWithDialog(), none of them is working. Tried on platforms: XP 32 bit and Win7 32 bit. These print functions all work fine with Adobe Reader 9.1.0. or 8.2.0 or 8.1.0 on XP 32 bit or Win7 32 bit.
The way I have my setup: I have created a C/C++ project with AcroPDF MFC ActiveX classes. I have created an AcroPDF object in there, and then calling it's LoadFile() function passing a pdf file in the parameter. Then calling the printPages() or printAll() function. With Adobe Reader 9.1.0. or 8.2.0 or 8.1.0, printing is starting through the default printer without any problem. As soon as I update the reader version to 9.2 or more, the same code stops working.
Is anybody noticing any similar issue? Any info on this will be highly appreciated. Thank you!Unfortunately printWithDialog() is also not working. Actually none of the print functions like Print(), printWithDialog(), printPages(), printPagesFit(), printAll(), printAllFit() are working. All of them works fine though with older reader.
BTW, what security related changes are there for printPages() and printAll()? Can you please elaborate on that? Is there any workaround? -
MS-Word Macros with paramers via OLE
Hi,
This is probably more of an MS-Word question than a Forte question,
but somebody out there might have done this before...
I have some MS Word macros (Originally WordBasic, but recently they
underwent automatic conversion to become Visual Basic) which take
parameters.
I used to call these macros from Forte using DDE.
These days, it's a lot more fashionable to use OLE automation than
DDE so I thought I'd give that a go.
But I can't.
Word.Applicaiton has a Run() method to run macros, but not macros
with parameters. Is there a neat way of getting macro parameters
across to Word?
- Ed.
Eduard E Havelaar | For the foolishness of God is wiser
Information Services Section | than man's wisdom, and the weakness
University of Canterbury | of God stronger than man's strength
Christchurch, New Zealand | - I Cor 1:25have a look at this here article:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html -
How to use a macro with AAA Authorization set?
So!
We have ACS version 4.1, and one goal is to start working on authorization sets for groups. I am able to get basic commands to work, but was curious about making a macro work without having to allow all of the commands that are actually contained wihtin the macro itself.
I'm looking into this to promote standardization and minimize confiugration issues/inconsistencies on ports accross swtiches in our environment.
The macro I created is used for configuring a port on a swtich to change its VLAN. Basically as follows:
macro name T2
Description $DESC
switchport mode access
no cdp enable
switchport access vlan $STATIC
switchport port-security
switchport port-security aging time 2
switchport port-security violation restrict
switchport port-security aging type inactivity
storm-control broadcast level 25.00
storm-control action trap
switchport nonegotiate
no lldp transmit
no lldp receive
#macro keywords $DESC $STATIC
In ACS I've created a shell command authorization set, and allowed 'macro' with 'permit apply T2' and 'permit trace T2'. This works fine and allows me to use those macro commands. The problem I'm having is that every command in the macro is not allowed in the authorization set, so when I run the macro it fails for each command.
I don't want to allow each individual command in the authorization set as it would then allow jr. admins the ability to make config changes on ports that would be outside of our standard. For example they could get into a port and forget to disable CDP and LLDP, casuing inconsistencies accross the envrionment. Is there a way to run these macros without putting all of the commands in the authorization set?Hello Eric,
Please see the below link for configuring Macro and how you can use them with AAA
http://www.cisco.com/en/US/docs/switches/lan/auto_smartports/12.2_55_se/configuration/guide/configure.html -
Module Function Name Resolution - Issues with DefaultCommandPrefix
Just getting started on module development, running PS4, and I've run into an... inconsistency... that I'm trying to understand. I've got two test functions, Get-Something and Set-Something in a script module. In my manifest file I specify a DefaultCommandPrefix
of 'Test'.
My issue is the function name resolution doesn't result in an executable result if you leave PowerShell up to it's own process.
To begin with I closed all sessions and deleted all files in the CommandAnalysis directory. After starting a session I waited for the CommandAnalysis cache to populate. Then I ran a series of test commands to illustrate how, most of the time, the function
name PowerShell registers with tab completion can't be executed because it lacks the 'Test' prefix. Even worse, much of the time tab completion won't recognize the correct (i.e., with prefix) name of the function and honor tab completion for it.
Having just learned of the CommandAnalysis cache I assumed I would see it change as PowerShell 'learned' more about the module because the name resolves differently over time. I've included three files at the end of this post, the module code (ModuleTest.psm1),
the manifest (ModuleTest.psd1) and the capture of output to the PowerShell session (ModuleTest.txt). I've tried to include the times I used <tab> and <ret> for tab completion and execution as well as (comments in parenthesis for things I did like
starting a new session and checking the CommandAnalysis cache for changes).
An example is, when first starting a session typing 'get-som<tab>' will resolve to 'Get-Something' (prefix 'Test' missing) and typing 'get-test<tab>' won't resolve to 'Get-TestSomething'. Try to execute the 'Get-Something' from tab completion
and you'll get the 'name not recognized, blah, blah'.
Now if you type 'get-som<tab>' PowerShell will resolve to 'ModuleTest\Get-Something' - looks promising... but no. Try to execute the 'ModuleTest\Get-Something' from tab completion and you'll still get the 'name not recognized, blah, blah'.
Even though the same key strokes resolved differently there were no changes made to the CommandAnalysis cache so I'm lost on why it produces two different (though equally useless) results.
Manually importing the module and sometimes running Get-Command -Module ModuleTest will make tab completion of the function names behave correctly. Is this a known issue with using DefaultCommandPrefix in script modules or is there something I need to include
in the manifest to enforce strict name recognition (including the prefix)?
<ModuleTest.psm1>
function Get-Something
Write-Host "Get-Something Executed"
function Set-Something
Write-Host "Set-Something Executed"
<ModuleTest.psd1>
# Script module or binary module file associated with this manifest
ModuleToProcess = 'ModuleTest.psm1'
# Version number of this module.
ModuleVersion = '1.0.0.0'
# ID used to uniquely identify this module
GUID = '241877ff-64be-40c8-a603-8d5acf7a48d8'
# Author of this module
Author = 'wb3'
# Company or vendor of this module
CompanyName = ''
# Copyright statement for this module
Copyright = '(c) 2015. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Module description'
# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '2.0'
# Name of the Windows PowerShell host required by this module
PowerShellHostName = ''
# Minimum version of the Windows PowerShell host required by this module
PowerShellHostVersion = ''
# Minimum version of the .NET Framework required by this module
DotNetFrameworkVersion = '2.0'
# Minimum version of the common language runtime (CLR) required by this module
CLRVersion = '2.0.50727'
# Processor architecture (None, X86, Amd64, IA64) required by this module
ProcessorArchitecture = 'None'
# Modules that must be imported into the global environment prior to importing
# this module
RequiredModules = @()
# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
# Script files (.ps1) that are run in the caller's environment prior to
# importing this module
ScriptsToProcess = @()
# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = @()
# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = @()
# Modules to import as nested modules of the module specified in
# ModuleToProcess
NestedModules = @()
# Default command prefix
DefaultCommandPrefix = 'Test'
# Functions to export from this module
FunctionsToExport = '*'
# Cmdlets to export from this module
CmdletsToExport = '*'
# Variables to export from this module
VariablesToExport = '*'
# Aliases to export from this module
AliasesToExport = '*'
# List of all modules packaged with this module
ModuleList = @()
# List of all files packaged with this module
FileList = @()
# Private data to pass to the module specified in ModuleToProcess
PrivateData = ''
<ModuleTest.output>
PS C:\Scripts\PowerShell> Get-ChildItem -Path 'C:\Program Files\WindowsPowerShell\Modules' -Recurse<ret>
Directory: C:\Program Files\WindowsPowerShell\Modules
Mode LastWriteTime Length Name
d---- 3/5/2015 9:06 AM ModuleTest
Directory: C:\Program Files\WindowsPowerShell\Modules\ModuleTest
Mode LastWriteTime Length Name
-a--- 3/5/2015 8:50 AM 2907 ModuleTest.psd1
-a--- 3/5/2015 9:01 AM 140 ModuleTest.psm1
PS C:\Scripts\PowerShell> Get-Module -ListAvailable<ret>
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
Script 1.0.0.0 ModuleTest {Get-Something, Set-Something}
PS C:\Scripts\PowerShell> get-som<tab>
PS C:\Scripts\PowerShell> Get-Something<ret>
Get-Something : The term 'Get-Something' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-Something
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-Something:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(No change in CommandAnalysis cache)
PS C:\Scripts\PowerShell> get-som<tab>
PS C:\Scripts\PowerShell> ModuleTest\Get-Something<ret>
ModuleTest\Get-Something : The term 'ModuleTest\Get-Something' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ ModuleTest\Get-Something
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (ModuleTest\Get-Something:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(No change in CommandAnalysis cache)
PS C:\Scripts\PowerShell> get-tes<tab>
PS C:\Scripts\PowerShell> Get-TestSomething<ret>
Get-Something Executed
(New Session)
(No change in CommandAnalysis cache)
PS C:\Scripts\PowerShell> get-tes<tab><ret>
get-tes : The term 'get-tes' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ get-tes
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (get-tes:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Scripts\PowerShell> Import-Module ModuleTest<ret>
(No change in CommandAnalysis cache)
PS C:\Scripts\PowerShell> get-tes<tab><ret>
PS C:\Scripts\PowerShell> Get-TestSomething
Get-Something Executed
(New Session)
(No change in CommandAnalysis cache)
PS C:\Scripts\PowerShell> get-tes<tab><ret>
get-tes : The term 'get-tes' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ get-tes
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (get-tes:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Scripts\PowerShell> Get-Command -Module ModuleTest<ret>
CommandType Name
ModuleName
Function Get-TestSomething
ModuleTest
Function Set-TestSomething
ModuleTest
(No change in CommandAnalysis cache)
PS C:\Scripts\PowerShell> get-tes<tab>
PS C:\Scripts\PowerShell> Get-TestSomething<ret>
Get-Something Executed
PS C:\Scripts\PowerShell> moduletest\get<tab><ret>
PS C:\Scripts\PowerShell> Get-TestSomething<ret>
Get-Something Executed
William Busby, PMPHi William,
yes, that's something you'll either have to do the hard way or live with admin confusion.
If you're using Sapien's PowerShell Studio as an Editor (hint: Usually a great idea), you can very easily rename a function, even in a multi-file module project, by rightcklicking on the function-name and selecting "rename".
Alternatively you can do a bulk rename with Powershell:
Get all functions in your module (Load it and check exportedcommands)
loop over each function-name
calculate new name
search your entire project for all references and replace them.
Let me see ...
function Rename-ModulePrefix
[CmdletBinding()]
Param (
[Parameter(Position = 0, Mandatory = $true)]
[string]
$ModuleName,
[Parameter(Position = 1, Mandatory = $true)]
[string]
$OldPrefix,
[Parameter(Position = 2, Mandatory = $true)]
[string]
$NewPrefix,
[Parameter(Position = 3)]
[string]
$Path
# Catch all typos
Import-Module $ModuleName -ErrorAction 'Stop'
# Get root path if not manually passed
if (-not $PSBoundParameters["Path"])
$Path = (Get-Module $ModuleName).Path
# Get module files
$Files = Get-ChildItem -Path $path -Recurse -Include "*.ps1", "*.psm1", "*.psd1"
# Iterate over each file
foreach ($file in $Files)
# Null variable in case you get an empty file somewhere and run this from Win 7
$data = $null
# Get Content of file
$data = Get-Content $file
# Replace strings
foreach ($c in (Get-Module $ModuleName).ExportedCommands)
$newName = $c.Name -replace $OldPrefix, $NewPrefix
$data = $data | ForEach-Object { $_ -replace $c.Name, $newName }
# Write back to file
$data | Set-Content $file
While I didn't proof it, in theory this should do it (Make a backup before running it :) ).
Cheers,
Fred
There's no place like 127.0.0.1 -
Cannot perform rounding for invoices with a currency other than the documen
Hi all,
I need some one to help me
I want to process the incoming payment.
The AR Invoice is using USD
In Incoming Payment i want to pay using SGD,
I already set the BP in all currency
I also set the Bank account in Bank transfer payment mean in all currency.
But when i add the document i saw the message like this
"Cannot perform rounding for invoices with a currency other than the document currency. [Message 3524-31]"
What should i do ?
Thanks in advance
Regards
KKHi gordon,
Thanks for your respon.
I still do not understand, what you mean.
I test it in SBO DEMO Au which is the local currency is AUD and the system currency is also AUD.
Is the any special setting for this issue?
Or Do i miss the settings in SBO
My version is 8.81 pl 9
Thanks in advance -
Not able to use macro with LDB PNPCE
Hi,
I am trying to use macro 'rp-provide-from-last' as below with LDB PNPCE.But syntax error 'unable to interpret SPACE' has occurred.
rp-provide-from-last p0001 space pn-begda pn-endda.
Please let me know how to use this macro with LDB PNPCE.The reason you are getting this error is that you would have used the GET Pernr. in start of selection.For PNPCE u have to define
Nodes : person, peras.
and then use the
Get PERSON.
Get PERAS in start of selection
and then u can use the standard macros without any errors. -
How do i test split by value functionality in mesage mapping with multiple
how do i test split by value functionality in mesage mapping with multiple values ?
regards,
venkatrepeat your source node. in mapping editor you can view queues by right clicking to mapped element.. selecting Display Queues option.. this will show u your values .
You can also select this Display Queue option for splitByValue option
for example
source--->splitByValue>target
Try viewing your queues to each this step... for splitByValue in display Queue you will see context inserted(grey colour) accodingly -
Integration of Materials with APO (RIMODGEN)
Hi Friends,
Thanks in advance for all the great replies that you have been giving me. I have a question on Integrating materials with APO.
We are using the report RIMODGEN and RIMODAC2 to create and activate integration models.
The issue is when you need to include materials using criteria other than that given in CFM1 .
The filtering criteria for materials at present is
Material
Plnt
Matl Type
PlantSpec. Mtl Stat
MRP Ctrlr
MRP Type
ABC Indicator.
We need to set the filter criteria to include
Item category group
and
MRP group.
The options that I have come up with is to create a text file which will have all the materials that need to be included in the integration model. The problem here is can I make reading of this file an automated process which can be used as part of the program RIMODGEN. Otherwise , I cannot use RIMODGEN as a background process.
Is there any other way to include the materials that I will need other than to write a custom code for that ?
Regards,
Ranjini.Hi Ranjini,
I am having a similar requirement where I want to exclude materials from the integration model for which the deletion flag is set in R/3.
I was thinking if I could extend the selection fields to add additional filter of 'LVORM' , I can achieve this.
Can you please share with me how you achieved the same for your requirement.
Hi All,
Any other suggestion to meet the above requirement is also welcome.
Looking forward to your responses.
Regards,
SCMLearner -
Office control ms_word - runmacro, calling a macro with parameters
How can I call word macro with parameters?
I have ms word document with macro, for example:
Sub Makro1(ByVal bookmark As String, ByVal text As String)
' Makro1 Makro
Selection.GoTo What:=wdGoToBookmark, Name:=bookmark
Selection.TypeText text:=text
ActiveDocument.Bookmarks(bookmark).Delete
End Sub
I try call this macro from webdynpro:
TRY.
CALL METHOD
wd_this->document->IF_IOS_APPLICATIONPROPERTIES~RUNMACRO
EXPORTING
NAME = 'Makro1("z1","test")'
ERRORINFORMATION = co_error_getcontent_stru
IMPORTING
RESULT =
CATCH CX_IOS_APPLICATIONPROPERTIES .
CATCH CX_IOS_COMMUNICATIONWRAPPER .
CATCH CX_IOS_ENVIRONMENT .
ENDTRY.
This macro cannot call. )
Calling a macro without parameters is ok.
Sub Makro2()
Call Makro1("z1", "test")
End Sub
CALL METHOD
wd_this->document->IF_IOS_APPLICATIONPROPERTIES~RUNMACRO
EXPORTING
NAME = 'Makro2'
ERRORINFORMATION = co_error_getcontent_stru
IMPORTING
RESULT =
Greats Radek1. Yes. Download from some location as binary file.
2. Unzip by class CL_ABAP_ZIP. For filling bookmarks i need file 'word/document.xml'.
CL_ABAP_ZIP->GET
Unzipped files are only in memory.
3. For parsing and filling bookmarks i use classes and interfaces cl_ixml, if_ixml*
* create a DOM from the xstring
lr_ixml = cl_ixml=>create( ).
lr_stream_factory = lr_ixml->create_stream_factory( ).
lr_istream = lr_stream_factory->create_istream_xstring( iv_docx ).
lr_document = lr_ixml->create_document( ).
gr_document = lr_document.
lr_parser = lr_ixml->create_parser( document = lr_document
istream = lr_istream
stream_factory = lr_stream_factory ).
CALL METHOD LR_PARSER->ADD_PRESERVE_SPACE_ELEMENT
RECEIVING
RVAL = lv_rval.
IF lv_rval <> abap_true.
* Err in parser XML
ENDIF.
CALL METHOD LR_PARSER->SET_XML_SPACE_AWARE.
IF lv_rval <> abap_true.
* Err in parser XML
ENDIF.
* Finding and filling bookmarks
lr_root = gr_document->get_root_element( ).
* All elements "w:bookmarkStart"
lr_elements = LR_ROOT->GET_ELEMENTS_BY_TAG_NAME(
* DEPTH = 0
NAME = 'bookmarkStart'
NAMESPACE = 'w'
lr_itr_bookmarkStart = lr_elements->create_iterator( ).
DO.
lr_node = lr_itr_bookmarkStart->get_next( ).
IF lr_node IS INITIAL. EXIT. ENDIF.
lr_attributes = lr_node->get_attributes( ).
* Read attribute "w:name" of element "w:bookmarkStart"
lr_attribute = lr_attributes->get_named_item(
NAME = 'name'
NAMESPACE = 'w'
lv_name = lr_attribute->get_value( ).
if iv_name <> lv_name. continue. endif.
* Element "w:fldSimple" was found, iv_name = Name of bookmark to fill
lv_bookmark_found = abap_true.
lr_node_bookmarkStart = lr_node.
* Read attribute "w:id" of element "w:bookmarkStart"
lr_attribute = lr_attributes->get_named_item(
NAME = 'id'
NAMESPACE = 'w'
lv_id_start = lr_attribute->get_value( ).
clear lv_id_end.
* .... work with parser
* find element w:bookmarkEnd for relevant w:bookmarkStart, bookmarkEnd with the same id as bookmarkStart
lr_node_next = lr_node->get_next( ).
do.
IF lr_node_next IS INITIAL. EXIT. ENDIF.
lr_node = lr_node_next.
lv_name = lr_node->get_name( ).
if lv_name = 'bookmarkEnd'.
lr_attributes = lr_node->get_attributes( ).
* Read attribute "w:id" of element "w:bookmarkEnd"
lr_attribute = lr_attributes->get_named_item(
NAME = 'id'
NAMESPACE = 'w'
lv_id_end = lr_attribute->get_value( ).
endif.
if lv_id_start = lv_id_end.
lr_node_parent = lr_node->get_parent( ).
lr_node_bookmarkEnd = lr_node.
er_node_bookmarkEnd = lr_node.
exit.
else.
lr_node_next = lr_node->get_next( ).
* remove elements between bookmarkStart and bookmarkEnd
lr_node->remove_node( ).
endif.
enddo.
* insert new elements between boomarkStart and bookmarkEnd
CALL METHOD me->XML_RUN_TEXT_ADD
EXPORTING
IR_PARENT = lr_node_parent
IR_REF = lr_node_bookmarkEnd
IV_VALUE = iv_value
IMPORTING
EV_OK = lv_bookmark_ok.
EXIT.
ENDDO.
For example, XML with bookmark:
<w:bookmarkStart w:id="0" w:name="testing123"/>
<w:r>
<w:t>This is sentence two.</w:t>
</w:r>
</w:p>
<w:p>
<w:r>
<w:t xml:space="preserve">This </w:t>
</w:r>
<w:bookmarkEnd w:id="0"/>
4. replace file 'word/document.xml' in zip (.docx) with class CL_ABAP_ZIP.
CL_ABAP_ZIP->DELETE
CL_ABAP_ZIP->ADD
5. You can store result where you need.
6. You can use for editing by users classic dynpro with container with word. -
The Find function does not work with one of my pdf files
I uninstalled whatever version of the reader that had been my computer at installed 11.0.06. Same problem. Seems like the Find function has a problem with just one of my many pdf files.
For the problem file, the PDF Producer was IIPDFLib2.x, version 1.5. Fast Web View: Yes.
Windows 8.1
Rebel1I can not select any text, either individual letters or sequences of letters. If I left-click and drag while holding the left button down, I generate a rectangular selection. I can then Ctrl-C the selection and paste it in Word.
So it is a image, with a pdf filename ending rather than jpg or something similar. That probably also explains why the image quality is much worse than with genuine PDF files.
Thanks,
Rebel1
Maybe you are looking for
-
MacBook Pro Retina 15-inch battery life on Yosemite
Has anyone noticed impact on the battery after upgrading to Yosemite? I found only one article online that talks about the impact. I followed the instructions but still the battery life did not improve. I'm running MacBook Pro Retina Late 2013, 15-in
-
Need help - Catalyst 3550 on CCM4.1 Voip
Guys. We had a Catalyst 3550 switch fail last week, and the guy who really knows this system has left the company. The switch has a non-free molecules error, which i believe is terminal. I've sourced a replacement switch and need help configuring it.
-
Please Make A Validated Woman Out Of Me!
Hi, I am having a problem validating a html page that usses an embed tag, any easy fix for this? I would like to keep the page html. Or if anyone may know of a slideshow that I can use that does not require the embed tag, or how to insert this one wi
-
Question for die hard apple fans about sharing media
I've had my iMac for about 8 months. I also have 3 windows PC's. What I love about the iMac is it works...in other words, I don't have the crashes and hangs that I get in Windows. I now use iMovie and I have read the many discussions about quality...
-
Something changed in my Terminal!
Hello, I am not too bad with Macs, but really don't know much about what happens in the Terminal. I need a little help with something odd that happened since a few hours : When I open the terminal, instead of getting [name of my computer]:∼ I get vuz