Using attributes from AdapterSpecificMessage in 'Variable Substution"

Hi all,
Is there any possibility of acceding to an atribute determined dynamically during mapping from Variable Substitution in a receiver FTP communication channel?
This is the scenario:
Inside mapping, we are determining a folder and storing it under header variable 'directory'. If I use 'Adapter Specific Message Attributes" directory, it works ok and writes the file into the appropiate folder.
The thing is we need for development to store that file under the same structure but under another extra folder:
If in QA it's /out/file, in DEV it should be /DEV/out/file .
I was trying to do this this way:
target directory = /DEV/%var1%
Variable Substitution
var1 = message:directory
And obviously, it's not working. Do anybody know any way to access to that value from Variable Substitution?
Thanks in advance, Iñaki.

java.util.Map map = container.getTransformationParameters();
String MSGID = (String)map.get(StreamTransformationConstants.MESSAGE_ID);
return MSGID;
Could not make it out what exactly you are asking for.....if you want ot access the Message Header variables then using the above code you can do so....just write which value you wan to access..check this link to know the message header fields:
http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm

Similar Messages

  • How to use attributes from different context nodes in one view?

    I am VERY new to the concept of CRM and currently working on creating an alternate version of the BP_HEAD_SEARCH. With help from SAPPRESSs book 'SAP CRM Web Client' i was ble to create my own simple Z-component.
    However after going back and forth the book and the forum (including this [article|https://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component]) i was not able to find a solution to my problem. My current search uses BuilHeaderAdvancedSearch as context node for searching. But the search should also be able to use attributes from BuilActivity, which is directly related to BuilHeader. I can't seem to find a way to get attributes from BuilActivity into the search window of my component without having to change SAP-Standard.
    Is this really the only way? Please advise on possible code and insertion point.

    Any suggestions?

  • Table look up using value from customer exit variable

    I have a customer exit variable, CURRMON, which the user enters in the format MM/YYYY. From this entry, I would like to do the following to calculate and display the number of business days in the selected month:
    Do the following to get Business Days in month.
    Use the KF "FBA Day"  (CTAFBAD) from the CTA_M01 infocube and write ABAP routine.
    1. Based on user entry cal month get the last calendar day .
    2. Do a master data look up (CTAFBAC is the master data object), using the last calendar day from step 1.
    3. CTAFBAD is the attribute of CTAFBAC so move the value of CTAFBAD to the result, and display this result
    Can anyone help me with this?

    Hello,
    You can use i step = 1 in SMOD transaction and write the code there.
    l_s_range-low = sy-uname.
    append ls_range to e_t_range.
    regds,
    Shashank

  • Naming an ArrayList using value from a String variable

    I am trying to name an ArrayList the value of a String variable in this code:
    public void addstudent(String name)
    ArrayList //i need a name here// = new ArrayList();
    I want to use the String //name// that will be used when the method is called. What do I do? I tried using:
    ArrayList (String.valueOf(name)) = new ArrayList();
    That didn't work.
    Thanks in advance for any help.

    Its suppossed to allow the user to input the student's name, grades for 4 specific subjects. Then take that and organize the students by name alphabetically. It is also suppossed to allow the user to search for users by grades, like find everybody with a GPA of 3.7 or higher or find everybody with a GPA of 3.5. This was a project asigned by my intro computer science teacher. I was suppossed to make it with 2D arrays but that was lousy because you were then limited to a specific number of students without editing the code. I'm not familiar with all the different ways of doing this. My computer science teacher said that I could do it with a HashSet.
    Okay. You have a String. Let's suppose it contains "fred" or something like that -- you didn't say what was in it so we have to speculate. Next, you want to create an ArrayList from that? What does that mean? You want to end up with an ArrayList that contains one entry, that string? Or what?
    In your example I would want to start by giving the method "fred" as the name parameter. So right now the String (name) has the value of "fred". I then wanted to make an ArrayList for that student named fred. This ArrayList would have 4 grades for that student fred. This ArrayList for fred would be part of a HashSet for the whole group of students. That way when I wanted to search alphabetically, I would just sort the HashSet. My computer science teacher said this would work.
    Thanks

  • Using attributes from another entry type

    Hey experts,
    use case: there are multiple departments within the company. Each department has it's own folder in Active Directory where users are stored for that department. When a new user is created in IdM and send to AD he should be created in the folder relevant for his/her department.
    I have created an entry type called Department and filled it with departments and their LDAP starting point for user creation. I have also created a reference attribute in MX_PERSON to the department name.
    problem: when the job CreateADSUser is fired it receives pending value date from MX_PERSON but I need to use the LDAP starting point which goes with the department from the department entry type.
    So my question is: how do I use the LDAP starting point value which is stored in my department entry type in a job which receives MX_PERSON data. I'm guessing a script or something but am unsure how to do this.
    Thanks in advance.

    HI Jonathan,
    We did exactly the same thing but without using a separate entry type for the department, it was just the department number. We then in the code that calculated the DN of the person, coded in to read the department number and based on that enter a text string into the DN. If you want to do it with another entry type for department, the can't you load the value on the mx_person of department, which will be the MSKEY of the department you want, and then use ISGetValue (Or something like that) to get the name of that department based on it's MSKEY?
    Hope that is helpful,
    Ian

  • Help in creating MDX Calculated Member using attributes from multiple Dimension

    Hi All,
    First of all my knowledge on MDX is basic. In one of our projects, there is a requirement to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member. Due to IP issues I cannot paste
    the actual queries but I will provide an SQL Query equivalent to what I am trying to achieve:
    Select P.Product, Case When ISNULL(FS.ArtistName,'') = '' Then P.ArtistName Else FS.ArtistName End Artist
     From
    dbo.FactMusicSales FS
    Join dbo.dimProduct P
    on P.DimProductKey =  FS.DimProductKey
    We are trying to replicate the logic for derving the "Artist" field using MDX script.
    We are running into issues while trying to build an MDX expression using the above logic. The main issue being that the new field/member "Artist" would not be calculated unless its elements are selected (FS.ArtistName, P.ArtistName). Besides this
    we are also unable to place this new member in a different folder other than a sub folder under the measures. Any pointers to solving this would be really helpful.
    Thanks in Advance,
    Venki

    Hi Venki,
    According to your description, you need to create calculated member (similar to derived fields in SQL) which is more of a dimension attribute and not really a calculated member, right?
    In your scenario, you needn't to achieve this requirement by using MDX. You can use a named query on your data source view. A named query is a SQL expression represented as a table. In a named query, you can specify an SQL expression to select rows and columns
    returned from one or more tables in one or more data sources. So in you scenario, you can use your query on the DSV, and then use the modified table to create a dimension.
    http://msdn.microsoft.com/en-IN/library/ms175683.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • List all of the used attributes

    Hello,
    Is there a way i can get the list all the used attributes from the LDAP server.
    Right now i am getting all of the used attributes with below code and going through each entry to get the attributes.
    NamingEnumeration answer = ctx.search("", "(objectClass=*)", searchControls);Is there any function that i can use to get the list of attributes at once.
    Or a simpler way.
    Thanks

    Hello there,
    I could limit the searchControls result count. But I have to guess a value. My guessed value may not return all the used attributes.
    searchControls.setCountLimit(5);Still I would like to implement it in different way.

  • How to remove ":"  in file name while using Variable substution

    Hi ALL
    I am using  file adapter and I what to create file name dynamically by acesssing PO number and time stamp from the payload using variable substution.
    But the problem is I am getting ":" in time stamp field value and it is not acceptable for file name .
    So could you please tell me a way that I can remove this ":" from that particular field value and create the file name dynamically.
    Note 1)Add Time stamp option will not help me as we require a time stamp of particular zone.
    2) Dynamic Configuration code is also not use full as I am using 1:n file creation

    >
    Prasanna Kumar wrote:
    > Hi ALL
    >
    > I am using  file adapter and I what to create file name dynamically by acesssing PO number and time stamp from the payload using variable substution.
    > But the problem is I am getting ":" in time stamp field value and it is not acceptable for file name .
    > So could you please tell me a way that I can remove this ":" from that particular field value and create the file name dynamically.
    >
    > Note 1)Add Time stamp option will not help me as we require a time stamp of particular zone.
    > 2) Dynamic Configuration code is also not use full as I am using 1:n file creation
    does the time stamp with the ":" a part of your output file?
    else use a replaceAll function in your mapping and replace the : with empty string then use the value in the variable substitution
    Another option is use the normal BPM for 1: N message flow. The use a simple java mapping that will introduce a dynamic configuration and you can create the file name as you want. the java mapping will be used in the flow of messages from BPM to target system.
    ref: /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

  • How to remove elements/attributes from XML using Xpath in XSLT ??

    Hello ,
    Is there anyway or method of Xpath from which I can delete the elements and attributes from XML at runtime ??
    Like I have such XML and I have to remove per attribute highlighted below
    <person per="and">
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    And want a result like this
    <person>
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    Thanks

    To achieve this you can use the bpelx:remove function: http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHJBJFD
    your assign will look like:
    <bpel:assign>
    <bpelx:remove>
    <target variable="person" query="/person/@per" />
    </bpelx:remove>
    </bpel:assign>
    Regards,
    Melvin

  • How to use attributes in variable substitution???:(

    Hi all,
    Could you please help me out in how to use attributes in variable substitution....
    Regards,
    Sundar

    Hi,
    Use Adapter Specific Identifiers , instead of Variable Name substitution.
    Sender File adapter --> Adapter Specific Attributes --> Select File Name
    Reciver File Adapter -->Adapter Specific Attributes --> Select File Name
    In the mapping , use this code in an UDF to change the filename to what you want,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String filename="YOURFILENAME";
    String rSourceFileName = conf.put(key,filename);
    Regards,
    Bhavesh

  • Variable substitution using attribute

    hi,
    i want to use an attribute of an elemnet in variable substitution.
    i know how to use element in variable substitution and i know that i can use message header attributes
    in variable substitution, but if i create an element with an attribute how do i use it
    (or is there a simple way to map a value in message mapping to  message header attributes)?
    Thanks
    Tomer

    Hi
    Attribute is not supported for variable substitution.
    You can try setting values for the Dynamic configuration and use it
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    Thanks
    Gaurav

  • Using attribute variables in the planning folders

    Hi all,
    Is there way to use attribute variables in the planning folders?
    There is a following situation. We have a number of cost centers (0COSTCENTER). Cost center has responsible person (0RESP_PERS) as attribute.
    We planning some costs for cost center.
    To select certain cost center to cost planning we created
    variable ZVAR1 as type CHAR and placed this variable in the header of planning folder.
    Now we have to restrict list of cost center for selection according to selected responsible person.
    Of course, I can add 0RESP_PERS to my cube, create variable ZVAR2 as type CHAR based on this character. Then place this variable to folder. For variable ZVAR1 use type of replacement as "User Exit" and ABAP routine will restrict list of available cost centers based on value of ZVAR2.
    But... Is there way to use variable with type of attribute and place this variable to header of folder?
    Thanks in advance!

    Hi Dmitry,
        Yes, you can use the attribute variable in your folder.
        Just create attribute variable with 0COSTCENTER as the basic char and 0RESP_PERS as attribute.then when you create your folder with UPSPM, make sure to choose notweb-enable type then under the variable category you will see the the attribute vairable you just created at BPS0, just drug it to you folder, you are done.

  • Measure using UseRelationship not working well when sliced with attributes from the same table

    Hi,
    I have Measure created using the 'UseRelationship' Function, which uses a different datekey to link to the DateDim than the one the table is directly related by. The measure works as expected except in one scenario.
    If I browse the measure using an attribute from the same fact table then the attribute is filtered using active relationship whereas the measure is filtered using the inactive relationship as shown below:
    FACT(2 rows)(Active Relationship to Date using DateKey1)
    SNo     DateKey1     DateKey2     Geo        Amt
    1         20100101     20120101    India      100
    2         20100101     20120101    US         200
    AmtMeasure:=CALCULATE(SUM([Amt]),USERELATIONSHIP(FACT[DateKey2],'Date'[DateKey]))
    If I browse the above measure in excel, with Year selected as 2012, I get 100+200=300. Now if I drag the Geo attribute against the measure I get 2 rows with 100 and 200.
    If I do the same in a power view report I don't get any results after dragging the Geo attribute, whereas I get the correct value of 300 without the geo attribute. I checked the DAX query which the power view generates and figured this is being caused because
    there are no rows in the table with DateKey1 having year 2012. I understand why this is happening this way in a DAX query and not in MDX, but shouldn't both behave in the same way and what is a work around.
    Thanks,
    Sachin Thomas

    Sac, is this still an issue?
    Thank you!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • [svn:fx-3.x] 11959: Removing rpc-encoded id attributes from the referent when used as a multiRef  (i.e.

    Revision: 11959
    Revision: 11959
    Author:   [email protected]
    Date:     2009-11-18 14:16:08 -0800 (Wed, 18 Nov 2009)
    Log Message:
    Removing rpc-encoded id attributes from the referent when used as a multiRef (i.e. referenced via an href attribute). These attributes should not be included in generic deserialization of types to ActionScript (e.g. when deserializing xsd:anyType).
    QE notes: Yes, this should fix the regression. We'll still need a further change to remove attributes in SOAP and XSI namespaces.
    Doc notes: N/A
    Bugs: SDK-23140
    Reviewer: Svetlin
    Tests run: Checkintests, bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23140
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as

    any chance you are using atheros wifi?

  • Assigning stroke attribute from one shape to fill attribute of another shape using eyedropper tool?

    Unalbe to use eyedropper tool to pick up stroke attribute from one shape to use in fill of another shape. I shift click with my eyedropper tool on stroke but does not transfer that color to my fill color of other shape. Fill color shows correctly in tools panel but not in shape or control panel.

    I have through trial and error discovered as a fifth step to JamArtz instructions, if I go to the color panel flyout menu and click on CMYK, my effect will take effect: I know this to be a band aide solution not a fix. Can’t see anything in my preferences to cause the issue.
    1.Select the destination object (the one for which you want to change the fill).
    2. Make the fill swatch in the Color Panel active (important step).
    3. Select the eyedropper.
    4. Shift-click on the stroke of the source object (the one whose stroke you want to apply to the fill of the destination object).
    5. From the Color Panel fly out menu, click on CMYK (which is already toggled on) the change will take effect.

Maybe you are looking for

  • PMON terminating the instance due to error 4031

    database went down following the below alert log message and came back on its own. ORA-04031: unable to allocate 3960 bytes of shared memory ("shared pool","unknown object","sga heap(3,0)","osp allo cation") PMON (ospid: 5170): terminating the instan

  • Maximum no. of columns allowed in SELECT clause - Urgent please

    Hi, I am constructing SQL query dynamically in a stored proc. based on user inputs. I am getting following error when I have around 400 columns in my SELECT clause. FROM, WHERE, GROUP BY clauses are same eventhough I have 30 columns and I don't have

  • Can't Delete First Page

    Have a 400-page document in Pages and need to delete the blank page at the beginning, but it won't let me!  I have "show invisibles" displayed but nothing is on that page.  I have tried deleting it by viewing the thumbnails but that is wanting to del

  • How can I add classpath in tomcat 4.0.3

    I am sorry to ask a newbie question but I am really dying to know the answer. I have tomcat4.0.3 installed and working. I have j2ee1.3.1 install and working. I have jboss3.0.0RC installed and working. now I want to use a EJB in tomcat application, th

  • Unable to update or download apps on ipod touch

    Unable to update or download apps on ipod touch 3g - just says waiting.  Have tried a restart.  Any advice would be appreciated.