PayloadZipBean - variable filename inside the archive

Hi,
I'm using the Adapter-Specific Message Properties in a sender fileadapter to determine the incoming filename, which has variable components (i.e. date and time). After changing the prefix and suffix in a Message-Mapping the new name is applied in a receiver fileadapter. The new name is now part of the payload in the tag <Filename>. The receiver fileadapter contains the PayloadZipBean to compress the output file, everything works fine.
Now I want the file inside my compressed archive always to have the same name as my archive has. In Stefan Grube's blog about the PayloadZipBean I only found the possibility to choose a fix name by using the MessageTransformBean (name="file.txt").
Example:
1. variable input filename:                       IN_RNK_20080227_1006.txt
2. filename after Message-Mapping:        OUT_RNK_20080227_1006.gz
3. archive filename after receiver adapter: OUT_RNK_20080227_1006.gz
    filename inside the archive:                 MainDocument (this is the default (payload-name))
I would like to name the file inside the archive OUT_RNK_20080227_1006, too.
Question 1: Is there any possibility to read out the mapped <Filename>-tag from the payload to use it for the element inside my archive (File Name Scheme and Variable Substitution don't work when using Adapter-Specific Message Properties).
Question 2: Is there a way to modify the name of the payload so that I can change "MainDocument" to "OUT_RNK_20080227_1006"?
I'm on XI 3.0 - SP19.
Many thanks,
Ralph

>
Stefan Grube wrote:
> In this thread there is a module for reading the content type and setting the dynamic configuration:
> sender mail adapter - attachment name
> It should be not be so difficult to derive the reverse way
Thanks for this info Stefan.
[Stefan Grube's webinar on custom adapter module development|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/64a6bdab-0c01-0010-079a-b3707717cecd?prtmode=navigate]
The code of the EJB module we had to write to get the filename from the Dynamic Configuration (ASMA) and then set the content type of the message is given below.
* Created on Apr 23, 2008
package zfilezipper;
* @author Krishneel Goundar
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import com.sap.aii.af.mp.module.*;
import com.sap.aii.af.ra.ms.api.*;
* @ejbHome<{com.sap.aii.af.mp.module.ModuleHome}>
* @ejbLocal<{com.sap.aii.af.mp.module.ModuleLocal}>
* @ejbLocalHome<{com.sap.aii.af.mp.module.ModuleLocalHome}>
* @ejbRemote<{com.sap.aii.af.mp.module.ModuleRemote}>
* @stateless
public class SetContentTypeEJB implements SessionBean, Module{
     private SessionContext myContext;
     public void ejbRemove() {}
     public void ejbActivate() {}
     public void ejbPassivate() {}
     public void setSessionContext(SessionContext context) {
     myContext = context;
     public void ejbCreate() throws CreateException{}
     public ModuleData process(ModuleContext moduleContext,ModuleData inputModuleData) throws ModuleException{
          try {               
               Message msg = (Message) inputModuleData.getPrincipalData();     //Used to read dynamic configuration data
               TextPayload payload = msg.getDocument();     //Used to set 'contentType' value
               //The name of the file to be zipped is read from the dynamic configuration.
               String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
               if(fileName == null)     //If no file name can be determined we set 'contentType' to "defaultbeanile.txt"
                    payload.setContentType("text/plain;charset = \"UTF-8\";filename=\"defaultbeanfile.txt\"");     
               else     //If a file name can be found we set 'contentType' to the name of the file.
                    payload.setContentType("text/plain;charset = \"UTF-8\";filename=\"" + fileName + "\"");     
               //After setting the value of 'contentType' we need to update the ModuleData object (inputModuleData).
               inputModuleData.setPrincipalData(msg);
          } catch (Exception e) {
               ModuleException me = new ModuleException(e);
               throw me;
          return inputModuleData;          //Return the updated ModuleData object.
Edited by: Charu Kulkarni on Apr 28, 2008 1:41 AM

Similar Messages

  • Retaining the fileName inside the zipped files

    Hi Experts,
    I am working on a file to file scenario, in which the files have to be picked up the files in pair(pdf) and zip them  and post in the particular folder.
    I have used PayloadZipBean for zipping the files, but not able to get the original file names inside the zip, but i am getting one Mail and one additional file.
    This thread seems to be similar to my problem:
    Re: ZIP FileName (Additional Files)
    Please suggest.
    Thanks,
    Sushama

    Hi,
    I have done developed an adapter module for retaining the file name, before PauloadZip Bean, in receiver file adapter:
    package sample;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    @ejbHome <{com.sap.aii.af.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.mp.module.ModuleRemote}>
    @stateless
    public class SetAttachmentName implements SessionBean, Module{
         private SessionContext myContext;
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
                          throws ModuleException{
         try {
            Message msg = (Message) inputModuleData.getPrincipalData();
            Payload payload = msg.getDocument();
            String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File",
                                                     "FileName");
            if(fileName == null) fileName="default.txt";
            payload.setContentType("text/plain;charset = \"UTF-8\";"
                                   + "name=\"" + fileName + "\"");
            inputModuleData.setPrincipalData(msg);
        } catch (Exception e) {
            throw new ModuleException(e);
        return inputModuleData;
    But, I am getting corrupted files .
    Please advise.
    Thanks,
    sushama
    Edited by: sushama pandey on Sep 28, 2011 4:52 AM

  • The variable $filename and the the *.fm extension

    When you need the title of the document importing into a document, you can use the variable <$filename>.
    This is useful as you can have a template that changes its name with the name of the file.
    However, the variable always writes the document name with the file extension (for example help.fm) making the variable useless.

    Gareth,
    Please also enter a feature request using the official request route via Bugbase & Wishlist and provide some use cases.

  • Can we set a variable used inside the template from the java code.

    Hi everybody,
    I am uploading template,sub template and data xml fle to generate the preview using XDO API's. My main template is calling a sub template so it needs to import the sub template in the main template.since i am uploading my files on a particular server,my subtemplates has been put on different path as specified in the main template.
    so i need to change the subtemplate path dynamically at run time.
    is there any way i can pass this information to my main template at run time.
    one solution could be,my rtf template has a variable 'i' inside it,which is setting the file path to include my subtemplate like this :
    <?xdoxslt:set_variable($_XDOCTX, i ,"import:file:///c:/Temp/htmlmarkup.xsl")?>
    <?xdoxslt:get_variable($_XDOCTX, i )?>
    now is there any way i can set this variable at run time from my external java code.?
    Thanks,
    Anuradha

    Thanks for the response.
    but i still am looking for the solution.
    if both my template and subtemplate are in the same directory then atleast
    <?import:file:../htmlmarkup.xsl?> should work.
    but its not working...i m getting following error:
    FOProcessor setData: C:\subtemplates\projects.xml
    FOProcessor setLocale: en-us
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:514)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:192)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:156)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:916)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:869)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:204)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1535)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:925)
         at RTF2PDF.runRTFto(RTF2PDF.java:590)
         at RTF2PDF.runXDO(RTF2PDF.java:443)
         at RTF2PDF.main(RTF2PDF.java:237)
    Caused by: java.io.FileNotFoundException: C:\Documents and Settings\fusion\htmlmarkup.xsl (The system cannot find the file specified)
         at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:782)
         at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:564)
         ... 15 more
    please suggest me what to do..

  • [SOLVED]How do I deal with non-unicode filenames inside archives?

    I often get archives from Japanese Windows users with file names encoded in one of the myriad of Japanese character sets. Windows is pretty good about converting the filename to unicode before passing it on to any program or computer that expects it. However, it won't touch the filenames of things inside the archive for obvious reasons. Any way to make, say, unzip or 7z convert the filenames to unicode as they're extracted? At the moment I run Windows in Virtualbox and connect back to a shared folder and let Windows do the unzipping.
    Last edited by DJQuiteFriendly (2011-09-22 22:13:26)

    I don't know if there's any advancement WRT this, but there's a work-around here (under "UnZip Locale Issues" ) using convmv.

  • Property file should be externalize and outside the archive (say ear) ?

    My team architect is suggesting me to externalize the property files like locale resources (e.g messages.en.properties ), log4j (e.g log.properties) etc .The reason is to avoid recompiling incase of changes to this resources.
    Example tomorrow if something goes wrong in production and we want to enable the debug log,then we can change the property file ,restart the server and we are good.If it was inside the archive file we have to create a brand new
    a brand new archive file ,redeploy it and restart the server again.
    In my entire work experience I never externalized this resources because they are inherent part of the archive file.Hence any changes then recreate the archive file and redeploy.
    The team architect might have some good reason.
    Please advice.
    Thanks
    m

    Manjit wrote:
    My team architect is suggesting me to externalize the property files like locale resources (e.g messages.en.properties ), log4j (e.g log.properties) etc .The reason is to avoid recompiling incase of changes to this resources.
    Example tomorrow if something goes wrong in production and we want to enable the debug log,then we can change the property file ,restart the server and we are good.If it was inside the archive file we have to create a brand new
    a brand new archive file ,redeploy it and restart the server again.
    In my entire work experience I never externalized this resources because they are inherent part of the archive file.Hence any changes then recreate the archive file and redeploy.
    The team architect might have some good reason.
    Please advice.
    Thanks
    mIf the major hurdle is changing log levels dynamically..you could look at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PropertyConfigurator.html#configureAndWatch%28java.lang.String%29

  • How  to trace() a variable nested inside another clip that is created at run time by the user ???

    Hi again Now i have another problem
    i explain :  on my stage i have 24 instance MC Page created at runtime (when cliked the button execute 24 instance MC Page from the library). Each of those MC Page create an xml  with infos (not important), this variable_XML created is nested inside each MC Page.. From my stage i want to call each XML from each MC Page  for make 1 unic  big xml, then send it to the server.
    So from the main stage i created a button that call each xml of each MC Page (there is a definit number of Page only 24, no more, no less). So
    when the 24 instances of the MC Page are created I push there instance name inside an Array "Page_Array". Now in my function exportxml
    i use get ChildByName(Page_array[number]) for find them then i can apply my method to the according MCPage.. Until here no problem, trace(dispObject.name) work. but when i try to get my variable inside the MC Page : trace(dispObject.my_variableXML), it doesnt work...Why ??
    here is my function (only 1 page for this example ):
    function exportxml(evt:MouseEvent):void {
        dispObject=getChildByName(Page_Array[0]);
        trace(dispObject.name); //trace  Page1
         trace(dispObject.my_variableXML);// here it dont trace the variableXML
    normally if i trace(Page1.my_variableXML); , it should trace "my_varableXML"  no ??

    when i export my movies Im so worried  to see if it work that  i clicked the button that trigger the function exportxml before the actual my_variableXML is created , so is normal that the code above didnt work... so all is normal and it work... sorry i will think 10 time before posting next time. promess .

  • XSL-How to get value of a variable from inside loop-- to the outside loop?

    Pls help
    hi im currently working on this xsl file..
    This works on generating a txt file,my problem right now is
    ' how can i get the value of a variable generated from the inside forloop,
    i have to get the total,sum value of this variables after performing the loop
    ***this is the for loop
    <xsl:for-each select="OutboundPayment">
    <xsl:variable name='id' select='generate-id(OutboundPayment)'/>
    <xsl:sort select="PaymentNumber/CheckNumber" data-type="text" />
    <xsl:variable name='PValue' select='format-number(100*PaymentAmount/Value,"0000000000000")'/>
    <xsl:value-of select='$id'/>
    <xsl:text>D</xsl:text>
    <xsl:value-of select='$DDate'/>
    <xsl:value-of select='$Batch'/>
    <xsl:text>3</xsl:text>
    <xsl:value-of select='format-number(PaymentNumber/PaymentReferenceNumber,"0000000000")'/>
    <xsl:value-of select='format-number(PayeeBankAccount/BankAccountNumber,"0000000000")'/>
    <xsl:value-of select='substring(Payee/Name,1,20)'/>
    <xsl:value-of select='$PValue'/>
    <xsl:variable name='Addend' select='concat($DDate,substring($DAcct,5,5),$Batch)'/>
    <xsl:variable name="LHash">
    <xsl:call-template name="GetHash">
    <xsl:with-param name="A1" select="$PValue" />
    <xsl:with-param name="A2" select="$Addend" />
    </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="concat('[',$LHash,']')" />
    <!--LHash*i have to get the total amount of this one from the outside loop /---->
    <xsl:call-template name='NewLine'/>
    </xsl:for-each>
    <!--I have to put in here the total value of that LHash/---->
    <!--This is the template on how to get the value of that variable in the inside loop/---->
    <xsl:template name="GetHash">
    <xsl:param name='A1'/>
    <xsl:param name='A2'/>
    <xsl:variable name='TwoSum' select='format-number($A1+$A2,"000000000000000")'/>
    <xsl:variable name='Weight' select='317191314191112'/>
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="15"/>
    <xsl:with-param name="Sum" select="$TwoSum"/>
    <xsl:with-param name="Wgt" select="$Weight"/>
    <xsl:with-param name="Tot" select="0"/>
    </xsl:call-template>
    </xsl:template>
    <xsl:template name='WDigit'>
    <xsl:param name='Cnt'/>
    <xsl:param name='Sum'/>
    <xsl:param name='Wgt'/>
    <xsl:param name='Tot'/>
    <xsl:choose>
    <xsl:when test="$Cnt > 0">
    <xsl:variable name='Multip' select='substring($Wgt,$Cnt,1)'/>
    <xsl:variable name='Factor' select='substring($Sum,$Cnt,1)'/>
    <xsl:variable name='Prduct' select='$Multip$Factor'/>
    <!--xsl:value-of select="concat($Tot,'[',$Cnt,']')"/-->
    <!--xsl:value-of select="concat($Multip,'x',$Factor,'=',$Prduct)"/-->
    <!--xsl:call-template name='NewLine'/-->
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="$Cnt - 1"/>
    <xsl:with-param name="Sum" select="$Sum"/>
    <xsl:with-param name="Wgt" select="$Wgt"/>
    <xsl:with-param name="Tot" select="$Tot+$Prduct"/>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="Rem" select="$Tot mod 11"/>
    <xsl:variable name="Chk" select="11 - $Rem"/>
    <xsl:value-of select="format-number(concat($Tot,$Chk),'00000')"/>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:template name='GetTotal'>
    </xsl:template>
    Thanks in advance for those who are willing to help.
    -Leighya

    It would have helped if you had posted your code as CODE but as it is, I could hardly read it. My guess about what you are asking is, if you want a template to return a value, just write that value to the result stream inside the template.
    If that wasn't what you were asking, then please post your code in a readable format.

  • Using a Variable to Substitute the path\filename of a Batch file in the Start_Process Command

    I am trying to write a script that will execute a batch file on a remote Windows server.
    This line below is basically what I'm trying to do and it works without error, however I would like to use a variable for the path\filename of the batch file.
    invoke-command -computername QSC-A-ICE01 -scriptblock {Start-Process "\\qsc-a-ice01\D$\Test\RunThis.bat" }
    If I try to use a variable as in this example below I receive the error below. The error seems to indicate it's it expecting a "FilePath" parameter. Is this true? How would I change this script to make it work when substituting a variable.
    $MyProcess =  "\\qsc-a-ice01\D$\Test\RunThis.bat"
    Write-Host $MyProcess
    invoke-command -computername QSC-A-ICE01 -scriptblock {Start-Process "$MyProcess"}
    This is the error text I receive when using a variable:
     PS C:\Windows\system32> D:\Test\ThisWorks.ps1
    \\qsc-a-ice01\D$\Test\RunThis.bat
    Cannot validate argument on parameter 'FilePath'. The argument is null or empty. Supply an argument that is not null or
    empty and then try the command again.
        + CategoryInfo          : InvalidData: (:) [Start-Process], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.StartProcessCommand
        + PSComputerName        : QSC-A-ICE01
    PS C:\Windows\system32>

    Mike,
    Thanks for providing the link, it was very informative. The link described how to use the args in a ScriptBlock and provided me with an explaination as to why it works the way it does on a remote server. This is my 1st post to the forum and I don't know
    how the points system works yet.
    I would like to split the points , but I don't see that this is possible.
    You're very welcome, I'm glad that the information was helpful.
    You can mark as many posts as answers as you'd like, there's not a restriction on only having a single answer per thread. You certainly don't have to though, David's answer is more than sufficient to help any future people who find this thread.
    Also, on a side note, you may want to post in the thread below. Posting there will get your account verified so you'll be able to post links and images.
    http://social.technet.microsoft.com/Forums/en-US/200c33c9-abe9-494a-953a-bf53fccb3c76/verify-your-account-11?forum=reportabug
    (Future people - don't use that link.
    Click here and look for the current thread as a sticky.)
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • Xslt graph in a rtf template. Can an external variable be used inside the graph definition?

    I'm working with BI Publisher 10g, building an rtf template that would display a table and a graph by iterating on one of the xml tags from the input file.
    I got the table working using am xslt variable set when the xml tag associated value changes (DATAGROUPID).
    <?for-each:(/DATA/SITE/SITE_DATA)?> <?sort:DATAGROUPID;'ascending';data-type='number'?>
    <?xdoxslt:set_variable($_XDOCTX,'SITE',DATAGROUPID)?>
    <?for-each:(/DATA//DIMS/LOCALES[LOCALE = 'en']/TEXT)?><?sort:DIMNAME;'ascending';data-type='text'?>
    <?xdoxslt:set_variable($_XDOCTX,'DIMID',DIMID)?>
    <?round(/DATA/SITE/SITE_DATA[DATAGROUPID = xdoxslt:get_variable($_XDOCTX,'SITE')]/YEAR[SURVEYYEAR = 2012]/DIM[DIMID = xdoxslt:get_variable($_XDOCTX,'DIMID')]/ITEM[ITEMID = 0]/PFAV)?>
    <?end for-each?>
    chart:
    <Graph seriesEffect="SE_AUTO_GRADIENT" graphType="BAR_VERT_PERCENT" autoLayout="AL_AS_NEEDED">
    <LegendArea visible="true" automaticPlacement="AP_NEVER" position="LAP_BOTTOM"/>
    <SeriesItems>
    <Series id="0" color="#FF0000"/>
    <Series id="1" color="#FFFF00"/>
    <Series id="2" color="#00FF00"/>
    </SeriesItems>
    <MarkerText visible="true" markerTextPlace="MTP_CENTER">
    <GraphFont name="Arial" size="20" bold="true" italic="false" underline="false"/>
    <Y1ViewFormat>
    <ViewFormat decimalDigit="0" decimalSeparatorUsed="true" decimalDigitUsed="true"/>
    </Y1ViewFormat>
    </MarkerText>
    <LegendText>
    <GraphFont name="Arial" size="20" bold="false" italic="false" underline="false"/>
    </LegendText>
    <Y1TickLabel>
    <GraphFont name="Arial" size="12" bold="false" italic="false" underline="false"/>
    </Y1TickLabel>
    <O1TickLabel wordWrapEnabled="false" tickLabelStaggered="false">
    <GraphFont name="Arial" size="20" bold="true" italic="false" underline="false"/>
    </O1TickLabel>
    <LocalGridData colCount="{count(xdoxslt:group(/DATA/SITE/SITE_DATA/YEAR[SURVEYYEAR = 2012]/DIM, 'DIMID'))}" rowCount="3">
    <RowLabels>
    <Label>Unfavorable        </Label>
    <Label>Neutral</Label>
    <Label>Favorable</Label>
    </RowLabels>
    <ColLabels>
    <xsl:for-each select="/DATA/DIMS/LOCALES[LOCALE = 'en']/TEXT">
    <xsl:sort select="DIMNAME"/>
    <Label>
    <xsl:value-of select="DIMNAME"/>
    </Label>
    </xsl:for-each>
    </ColLabels>
    <DataValues>
    <RowData>
    <xsl:for-each select="/DATA/DIMS/LOCALES[LOCALE = 'en']/TEXT">
    <xsl:sort select="DIMNAME"/>
    <Cell>
    <xsl:variable name="DIMID" select="DIMID"/>
    <xsl:value-of select="/DATA/SITE/SITE_DATA/YEAR[SURVEYYEAR = 2012]/DIM[DIMID = $DIMID]/ITEM[ITEMID = 0 and PUNFAV != 0]/PUNFAV"/>
    </Cell>
    </xsl:for-each>
    </RowData>
    <RowData>
    <xsl:for-each select="/DATA/DIMS/LOCALES[LOCALE = 'en']/TEXT">
    <xsl:sort select="DIMNAME"/>
    <Cell>
    <xsl:variable name="DIMID" select="DIMID"/>
    <xsl:value-of select="/DATA/SITE/SITE_DATA/YEAR[SURVEYYEAR = 2012]/DIM[DIMID = $DIMID]/ITEM[ITEMID = 0 and PNEU != 0]/PNEU"/>
    </Cell>
    </xsl:for-each>
    </RowData>
    <RowData>
    <xsl:for-each select="/DATA/DIMS/LOCALES[LOCALE = 'en']/TEXT">
    <xsl:sort select="DIMNAME"/>
    <Cell>
    <xsl:variable name="DIMID" select="DIMID"/>
    <xsl:value-of select="/DATA/SITE/SITE_DATA/YEAR[SURVEYYEAR = 2012]/DIM[DIMID = $DIMID]/ITEM[ITEMID = 0 and PFAV !=0]/PFAV"/>
    </Cell>
    </xsl:for-each>
    </RowData>
    </DataValues>
    </LocalGridData>
    </Graph>
    <?end for-each?>
    So, on the table this line gets the correct variable from the input file:
    <?round(/DATA/SITE/SITE_DATA[DATAGROUPID = xdoxslt:get_variable($_XDOCTX,'SITE')]/YEAR[SURVEYYEAR = 2012]/DIM[DIMID = xdoxslt:get_variable($_XDOCTX,'DIMID')]/ITEM[ITEMID = 0]/PFAV)?>
    How can I replicate that logic inside the table definition?
    <xsl:value-of select="/DATA/SITE/SITE_DATA/YEAR[SURVEYYEAR = 2012]/DIM[DIMID = $DIMID]/ITEM[ITEMID = 0 and PFAV !=0]/PFAV"/>
    Input data looks like this:
    <DATA>
    - <SITE>
    - <SITE_DATA> 
    <DATAGROUPID>1032817</DATAGROUPID>  
    <DATAGROUPNAME>My Sales</DATAGROUPNAME>  
    - <YEAR> 
    <SURVEYYEAR>2012</SURVEYYEAR>  
    - <DIM> 
    <DIMID>1</DIMID>  
    - <ITEM> 
    <ITEMID>0</ITEMID>  
    <PFAV>88</PFAV>  
    <PNEU>13</PNEU>  
    <PUNFAV>0</PUNFAV>
    - <ITEM> 
    <ITEMID>40</ITEMID>  
    <PFAV>100</PFAV>  
    <PNEU>0</PNEU>  
    <PUNFAV>0</PUNFAV>  
    </ITEM>
    </DIM>
    </YEAR>
    </SITE_DATA>
    - <SITE_DATA> 
    <DATAGROUPID>1032816</DATAGROUPID>  
    <DATAGROUPNAME>Your Sales</DATAGROUPNAME>  
    - <YEAR> 
    <SURVEYYEAR>2012</SURVEYYEAR>  
    - <DIM> 
    <DIMID>1</DIMID>  
    - <ITEM> 
    <ITEMID>0</ITEMID>  
    <PFAV>71</PFAV>  
    <PNEU>25</PNEU>  
    <PUNFAV>4</PUNFAV>  
    I can include a complete sample on request, I thought this would be enough to illustrate the issue.
    I'll appreciate any help you can provide.

    I kept researching, I found some possible solution in this blog:
    https://blogs.oracle.com/xmlpublisher/category/Oracle/Templates/RTF
    so, I created a local SITE variable inside every cell to get the external SITE info:
    <Cell>
    <xsl:variable name="DIMID" select="DIMID"/>
    <xsl:variable name="SITE" select="{xdoxslt:get_variable($_XDOCTX,'SITE')}"/>
    <xsl:value-of select="/DATA/SITE/SITE_DATA[DATAGROUPID = $SITE]/YEAR[SURVEYYEAR = 2012]/DIM[DIMID = $DIMID]/ITEM[ITEMID = 0 and PUNFAV != 0]/PFAV"/>
    </Cell>
    but I get this error at run time:
    oracle.xdo.parser.v2.XPathException: Error in expression: '{xdoxslt:get_variable($_XDOCTX,'SITE')}'.
        at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
        at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
        ... 14 more
    What am I doing wrong?

  • How to acess a value of variable(calling prg) inside the methods of a class

    Hi SapAll.
    i wrote a program where i need to acess a value of a variable inside the class method.
    for eg:
    CALL METHOD gcl_utl_app_log->display_log
        EXPORTING
          it_edidc = lt_edidc
          it_msg   = lt_msg.
    while debugging under the method 'DISPLAY_LOG' when i want to acess a value of a variable (calling program) i cont get that value but i can acess the value of the variable just before the CALL METHOD statement.
    so can any body help me in finding the solution for this.
    regards.
    Varma

    Hi jhings.
    i have delcared the variable in the main program like below
    main program
    PERFORM populate_z1edrmdseqnr01.
    FORM populate_z1edrmdseqnr01 .
    other code
    CALL FUNCTION 'NUMBER_GET_NEXT'
        EXPORTING
          nr_range_nr             = gv_number_nr
          object                  = lv_obj
        IMPORTING
          number                  = gv_nextno
    move gv_nextno to gv_seqno.
      EXPORT gv_seqno  to memory ID 'MEM1'.
    PERFORM FORM application_log.
    FORM application_log.
      CALL METHOD gcl_utl_app_log->display_log
        EXPORTING
          it_edidc = lt_edidc
          it_msg   = lt_msg.
    ENDFORM
    METHOD display_log.
    IMPORT gv_seqno from MEMORY ID 'MEM1'.
    *********when i save and check the above code iam getting the error as 'FiledGV_SEQNO is unknown,it is neither in one of specified tables not defined by 'DATA ' statement.**********
    regards.
    Varma

  • How to include partner number dynamically in the archive filename ?

    Hi,
    I am working on IDOC archiving. Since we have a lots of IDOCs with the same Master IDOC name but coming from different partners, it would make sense to generate as much archive files as there are different partners.
    I have seen that the archive filename is dynamically built with concatenation of parameters.
    I guess we could use the filename_exit function module to set a parameter to the value of the partner number, but how to get the partner number ?

    Welcome to SDN.
    check out this weblog.
    <a href="/people/sap.user72/blog/2005/06/02/dynamic-includes-for-bsp">Dynamic Includes for BSP</a>
    Regards
    Raja

  • A problem with accessing the public variable inside the function

    Hi,
    I have got this package and I get error 1120: 1120: Access of undefined property aa
    Could you explain why I get this error?
    package somepackage {
        import flash.display.DisplayObject;
        import mx.containers.Canvas;
        public class SoundPictureSigns extends Canvas {
            public var aa:int = 12;
            public function SoundPictureSigns():void {
            public static function setUpSignSizes():void {
                trace("aa="+aa); /// ERROR here: 1120: Access of undefined property aa
    Can you help?
    Regards

    When you write
    class C
        var v;
    you are defining a variable that lives inside each instance of C. In other words, you can write code like
    var c:C = new C();
    c.v = 1;
    If you don't have an instance, you can't access v.
    When you write
    class C
        static var v;
    you are defining a variable that lives inside the class itself, and you can access it without having an instance.
    Gordon Smith
    Adobe Flex SDK Team

  • Filenames within the Aperture container

    I have recently bought Aperture and, having transferred all my photographs into it (>200Gb), I am now trying to move the Aperture library to my file server where I have plenty of storage space. However, when I tried to copy the file to my server which is running RHEL4 I get the error message that the filename is either too long or contains illegal characters. I've lookind inside the Aperture container and have found folders with names like "2006-09-13 @ 07/27/44 pm -1importgroup" which is what is likely to be the problem. Can these filenames be changed or at least avoided in the future and if so how? The folders relate to imported folders of images from my archive drives.

    Though this is arguably a MacOS bug as it should replace the '/' character (valid in HFS+ but not in standard unix-a-like filesystems) with ':' when passing it out over the file sharing protocol in question (I'd guess the original poster is using SMB talking to Samba).

  • Using a variable not in the Export,Import, table Parameters in USER EXIT

    Hi all,
       During the Invoice Creation, I need to add an entry in the VBFS table, so that it will be displayed in the system log.  In the FM 'RV_INVOICE_CREATE', the structure corresponding to it is XVBFS.  There is a user-exit   CALL CUSTOMER-FUNCTION '002', in this FM 'RV_INVOICE_CREATE'.  But the import, export or Table Parameters does not have XVBFS.
      How can I use XVBFS inside the User exit?..
    Please help.
    Regards,
    Asha

    Hi,
    I dont know whether this will help u...
    write this in user exit...to access variables/tables of main program..
    FIELD-SYMBOLS: <komv>.
    ASSIGN ('(SAPLMEPO)TKOMV[]') TO <komv>.
    where.. SAPLMEPO is the main program...and TKOMV[] is a internal table in SAPLMEPO.
    regards
    Sukriti....

Maybe you are looking for

  • Shared photo streams no longer updating in iPhoto since Yosemite upgrade

    I just noticed that new photos are not being downloaded to the shared photo streams in iPhoto on my iMac.  I am getting all new photos in my iPhone and iPad... just not on the iMac. Anyone encountered this or have any solutions?

  • Inaccuracy problem in MT Phase Locked Loop VI

    Hello, I'm using MT Phase Locked Loop VI(PLL VI hereafter) in LabVIEW with NI USRP2920(Kind of IQ converter) to measure carrier frequency and phase of input signal. The PLL VI works fine when relatively low frequency signals like 500Hz are input, but

  • Iphone & itouch itunes help

    This may be a very simple thing to sort. I have a iphone 3gs, my wife has an itouch, we have one pc and as such one itunes account. There are songs / albums she wants on her itouch that I don't want on my iphone and vice versa. I can't be bothered ea

  • Scrollpane contents disappear

    I've got a AS3 scrollpane with a content source of an empty clip called holder. I've got a search function that returns an xmllist and then attaches a movieclip for each node in the list and adds some details from the xml node, then each movieclip ge

  • Error occurs when running zlogin zonename cmd

    Hi: We are trying to run pkgrm on a zone using the following command: # zlogin <zonename> pkgrm <pkgname> But the package is not removed completely. We get the following error messages instead: ## Updating system information. pkgrm: ERROR: bad read o