Filename based on a payload-field condition?

Hi there,
I'm wondering if it's possible to condition the fieldname based on a payload "flag", like a simple "if flag = 1 then filename it's 'flat.txt', else filename it's 'nested.txt'." where flag is part of the payload and can be mapped to the target message...
I was looking for some adapter-specific attributes but it seems that this only applies for the SOAP message, not over the payload.
So i was thinking about java stack, like using global containers or something but i don't know how to access them using the ASMA bean or something like that, but i don't have any documentation how to do it, so if you can advise which will be the best way to achieve that, it will be great...
Points rewarded if useful...
Thanks folks.

You can do it by using adapter specific attributes as mentioned in blog
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
You can write a UDF as mentioned by this blog, passing the flag to this UDF
Inside UDF you can check flag value and accordingly set the filename in dynamic configuration

Similar Messages

  • Splitting a file based on the payload field - multimapping

    HI Everyone,
    I have a requirement of splitting a file based on the field .
    e.g When I am a file as :
    row1  David    US
    row2  Cindra   US
    row3   Peeru   CA
    row4   Jay       CA
    Then, I have to split the file into two files, one file with the US rows and  another file with the CA rows.
    There can be many countries in the input file, so number of target files need to be generated is not fixed.
    I have gone through the below links :
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible   ( in the blog we know that there are two receivers but in my case I dont know that )
    https://bond.newellco.com/irj/scn/,DanaInfo=www.sdn.sap.com,SSL+thread?messageID=6449801#6449801
    ( Everyone is providing JAVA mapping as a solution....)
    Is Java mapping the only option to resolve the problem case I have ?
    Thx
    PEERU IN

    Hi Peeru,
    I don't have access to the any FTP or file server of XI to check the file adapter as i am travelling right now(I am 100% sure that the file adapter splitting will work as i have done this for one of my requirement).
    Coming to your requirement:
    I wrote an java map which will read the XML file and create the multiple recordset based on number of different country exists in the file, then i am printing the final structure in an multi mapping layout (please see the attached input file Country.xml and out put file which the java map generated Final.XML) if we do this i think the file adapter will create the different files based on the number of recordset we have as you can see the output file is generated with the 3 recordset (<Country>) tag each country tag has its own records, now if i give the filename in variable substuition pointing to region then i think i should get 3 files with names
    us.xml
    us01.xml
    us02.xml
    i think by using the multi mapping i can generate 3 files and by using the variable substution i can give the 3 different names from the payload of each file and also can add the timestamp for each of the file, again i didn't have access to the file adapter in the project i am working on so i couldn't verify in XI server, but if you still looking for solution then let me know i will give the map details.
    Input File: Country.xml
    <?xml version="1.0"?>
    <check>
         <order>
              <name>Nisar1</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar2</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar3</name>
              <region>US</region>
         </order>
         <order>
              <name>Nisar4</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar5</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar6</name>
              <region>US01</region>
         </order>
         <order>
              <name>Nisar7</name>
              <region>US</region>
         </order>
           <order>
              <name>Nisar8</name>
              <region>US</region>
         </order>
           <order>
              <name>Nisar8</name>
              <region>US02</region>
         </order>
    </check>
    Output File : Final.XML
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
         <ns0:Message1>
              <country>
                   <Order>
                        <name>Nisar1</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar2</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar3</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar7</name>
                        <region>US</region>
                   </Order>
                   <Order>
                        <name>Nisar8</name>
                        <region>US</region>
                   </Order>
              </country>
              <country>
                   <Order>
                        <name>Nisar4</name>
                        <region>US01</region>
                   </Order>
                   <Order>
                        <name>Nisar5</name>
                        <region>US01</region>
                   </Order>
                   <Order>
                        <name>Nisar6</name>
                        <region>US01</region>
                   </Order>
              </country>
              <country>
                   <Order>
                        <name>Nisar8</name>
                        <region>US02</region>
                   </Order>
              </country>
         </ns0:Message1>
    </ns0:Messages>
    regards
    Nisar Khan

  • Filename based on varying payload elemet.

    Hi All,
    My file name is dependent on the payload.The file name is not based on a fixed element in the payload but varies with the payload type (although the schema is the same for all).
    Variable Substitution will not work as the substitutation itself is not fixed.
    I thought of writing a module and change the file name before CallSAPAdapter is invoked.
    Basically I am planning to use Adapter Specific Attibute.This way the Dynamic configutaion will be filled and I an provide the value in my module.
    Has anyone tried this.
    Any other idea on how to manipulate the Filename otherwise without having multiple Receiver defined.
    Please note ,the Sender Adapter in this case is IDoc and using UDF (in mapping) to update DYNAMIC_CONFIGURATION using Adapter Specific Atribute may not work.
    Thanks in Advance,
    Regards,
    Bikram

    Hi Sravya,
    In the example you mentioned, "conf" or the  "valueOld" will be null as there is no dynamic configuration defined in the sender adapter (IDoc in my case).
    // access dynamic configuration
          DynamicConfiguration conf = (DynamicConfiguration) param.get(
              StreamTransformationConstants.DYNAMIC_CONFIGURATION);
          // read value
          String valueOld = conf.get(KEY_FILENAME);
          if (valueOld == null) {
              throw new StreamTransformationException(
                  "Filename is missing. ");
    I tried the following in UDF and "conf" is null.
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    Any other idea ?
    How Can I access the DynamicConfiguration in a module ?
    Regards,
    Bikram

  • Setting save directory and filename based on fillable form fields.

    Hello,
    I'm new to .pdf development in Acrobat. I'm trying to create a form which allows users to fill in data, then save a copy of the form to a directory and file name which will be based upon several of the fields in the document. Is this method of saving possible? I've tried a script but can't seem to make the process work.
    Thanks for the help!

    It's possible, but the code that does the actual save (using the doc.saveAs JavaScript method) needs to be in a folder-level JavaScript file and further in a trusted function and app.beginPriv/app.endPriv block:
    http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript
    http://livedocs.adobe.com/acrobat_sdk/11/Acrobat11_HTMLHelp/JS_API_AcroJS.89.173.html
    or in a certified document that the user chooses to trust to execute privileged code. If you've done either of these, can you post the code you're using?

  • Condition editor in receiver determination does not show payload fields

    Hi !
    We are trying to create some conditions for the receiver determination in a RFC->XI->File scenario, but when we open the condition editor, under the XPATH option we do not set any payload fields to create conditions!!
    Any clues?
    Thanks,
    Matias.

    Hi,
    Check in SLD if your software component is installed on your business system and then clear SLD cache in ID.
    You will see interfaces assigned to your business system and also the payload fields in condition editor
    Thanks,
    Beena

  • Workflow based on created date field in opportunity?

    Hi All,
    Can we write a workflow based on created date field in opportunity that if a opportunity record has not been modified after say 90 days,what will be the workflow syntax.
    I just want an email notification to owner and owner's manager.
    Thanks in advance,
    Manish.

    I think you can use the WAIT workflow using Duration('P90D') then Send Email, triggering it upon save and upon modification. Make sure that the Re-evaluate Rule Conditions After Wait option is checked so that the previous WAIT would be reset upon modification.
    Edited by: marcocollado on Aug 31, 2012 5:57 AM

  • Populate field based on other lookup field in form

    Hello,
    In a list item in Infopath, I have a field which looks up a location. You can select the location in a dropdown list.
    I want to fill another field with the manager name of the selected location. That manager name is a field in the other form also. In a Sharepoint workflow you can do such a thing (look for a specific list item in another list, based on a selected field in
    that list).
    To summarize: if I fill the location field with info from another list, I want to automatically fill another field with the manager of that location - which is also in that other list.

    Hi  mRRRc1,
    For achieving your demand , please take steps in the InfoPath as below:
    Open the list which contains the look up field using InfoPath.
    Create a Data Connections from  SharePoint list:  Click From SharePoint  List  control under tag DATA -> Input your site URL in the Data Connection Wizard page -> Select the original
    list -> Select  Location and Manager field -> Enter a name for this data connection(such as Test) -> Finish.
    Create a Rule for Location look up field :   
    Condition: LocationLookUp  is not blank
    Rule type: Action
    Run these actions: Add “Set a field’s value”
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Can I make certain fields conditionally required?

    I am TOTALLY new to acrobat- just to put that out there first. I am wondering in acrobat (NOT formscentral or indesign) how to make certain fields required based off the answer of the previous required field.
    I.E  first required field- "is this a single application?" if so, do NOT make the next few fields required
    "is this a joint application?" if so, make the next rew fields required.
    Can I get some help with this?
    Thanks!

    What is commonly done is a button is used to initiate the email, using a "Submit a Form" action and specifying the email address of the recipient. The submit will fail if any fields that are marked as required are blank. In your case, you need to set the required property of certain fields conditionally, based on the sate of the form, and this will require a bit of scripting. It's not overly complicated though and you can get some help here.
    The Acrobat help document is a good place to start, though it won't help with JavaScript programming. A good resource is AcrobatUsers.com where there are a number of tutorials and other resources available about forms.
    Be aware that submitting form by email is often less reliable than expected, for many different reasons. A more reliable and secure approach is to set up the form to submit to a web server, but this involves even more expertise as it involves server-side programming and interacting with a PDF form. Emailing may seem sufficient for your needs, but be aware of the alternatives.

  • How to set a payload field value only once for multiple instances selected?

    The user needs to set a payload field value and then he can approve the task so the task can continue through the process, that's fine when the user selects one instance and sets the value in the task details section and then clicks the approve button, but how do we achieve the same behavior in a multiple way?, I mean the user can select multiple tasks in the workspace (in this case the details task page is not available and instead the following label appear "Multiple tasks selected") then if the user clicks the Actions drop down -> APPROVE he only gets the message "your request was processed successfully", so how can the user modify the payload field value only once for all the selected tasks so when he clicks APPROVE the value is populated in all the instances selected.
    Thanks,
    Carlos.

    In the action which displays the edit page just set the form idx value before displaying the jsp.

  • Looking at Data in the IP_IN_QUEUE -- Payload Field within IP_MESSAGE_TYPE

    Does anyone have any sql, that would display the contents of the PAYLOAD field within the IP_MESSAGE_TYPE object, once a message gets queued after an incoming EDI transaction gets processed by B2B successfully --> note BPEL/SOA is not running at this point --> I just want to dump the XML itself.
    I tried using the following code, but can not get the dbms_lob.read function to work properly; my dbms_lob.getlength function returns 5700, but I can not even read 250 bytes --> get sql "06502" PL/SQL numeric or value error: bind too small
    --> I however can read 150 bytes .
    Can someone perhaps figure this out.
    CREATE OR REPLACE PROCEDURE b2b_deq AS
    dequeue_options dbms_aq.dequeue_options_t;
    message_properties dbms_aq.message_properties_t;
    message_handle RAW(16);
    ipmsg ip_message_type;
    inp_clob               clob;
    output_data_clob varchar2(2000);
    len_clob               binary_integer;
    start_pos_clob integer;
    BEGIN
    dequeue_options.consumer_name := 'b2buser';
    dequeue_options.dequeue_mode := dbms_aq.remove;
    dequeue_options.navigation := dbms_aq.next_message;
    dequeue_options.wait := dbms_aq.forever;
    dbms_aq.dequeue ( queue_name => 'IP_IN_QUEUE',
    dequeue_options => dequeue_options,
                        message_properties => message_properties,
                        payload => ipmsg,
                        msgid => message_handle);
    dbms_output.put_line('Message ID: ' || ipmsg.msg_id);
    dbms_output.put_line('Message Size: ' || dbms_lob.getlength(ipmsg.payload));
    SELECT ipmsg.payload INTO inp_clob FROM dual;
    dbms_output.put_line('Message Size #2: ' || dbms_lob.getlength(inp_clob));
    start_pos_clob := 1;
    len_clob := 250;
    dbms_lob.read(inp_clob,len_clob,start_pos_clob,output_data_clob);
    dbms_output.put_line('Message XML: ' || output_data_clob);
    Thanks.
    Arthur (203-921-5925)

    Thanks for the info --> it worked fine now.
    Also Ramesh, with regards to an example/sample of a BPEL process that reads an 850 from an IP_IN_QUEUE and processes this txn via a PL/SQL api (OAD) -
    someone has told me that this does exist somewhere --> do you have any knowledge on this piece of code perhaps.
    My key point here is in the ability to post multiple line items into 11i via the process. I posted this question on the SOA forum, but no replies have come through in five days or so.
    Thanks as always.
    Arthur (203-921-5925)

  • Create a filename based on form content

    Hello,
    I always have a hard time explaining my question's but here goes.
    I have a button which saves a form once filled out. I would like to take the thinking out of this when it comes to naming the file and it create the name based on a numerical field in the form (in this case a serial number). The example would be something like 00000_Inspection Form.pdf. I am certain this can be done with  javascript but not being a programmer, I have no idea where to begin with this. I have a variable set up but no idea how to act upon it.
    thanks in advance.
    Brad

    Hi
    try this syntax
    Sum(HrsWorked)/(Count(Payperiod) In Report)
    Regards,
    Stratos

  • Function-based Index and an OR-condition in the WHERE-clause

    We have some problems with functin-based indexes and
    the or-condition in a where-clause.
    (We use oracle 8i (8.1.7))
    create table TPERSON(ID number(10),NAME varchar2(20),...);
    create index I_NORMAL_TPERSON_NAME on TPERSON(NAME);
    create index I_FUNCTION_TPERSON_NAME on TPERSON(UPPER(NAME));
    The following two statements run very fast on a large table
    and the execution-plan asure the usage of the indexes
    (-while the session is appropriate configured and the table is analyzed):
    1)     select count(ID) FROM TPERSON where upper(NAME) like 'MIL%';
    2)     select count(ID) from TPERSON where NAME like 'Mil%' or (3=5);
    In particular we see that a normal index is used while the where-clause contains
    an OR-CONDITION.
    But if we try the similarly select-statement
    3)     select count(ID) FROM TPERSON where upper(NAME) like 'MIL%' or (3=5);
    the CBO will not use the function-index.
    (This behavior we only expect with views but not with indexes.)
    We ask for an advice like an hint, which enable the CBO-usage
    of function-based indexes in connection with OR.
    This problem seems to be artificial because it contains this dummy logic:
         or (3=5).
    This steams from an prepared statement, where this kind of boolean
    flag reduce the amount of different select-statements needed for
    covering the hole business-logic, while using bind-variables for the
    concrete query-parameters.
    A more realistic (still boild down) version of our prepared select-statement run in
    SQL Plus:
    define x_name = 'MIL%';
    define x_firstname = '';
    select * FROM TPERSON
    where (upper(NAME) like '&x_name' or ( '&x_name' = ''))
    and (upper(FIRSTNAME) like '&x_firstname' or ('&x_firstname' = ''))
    and ...;
    In particular we dont refernce the tablecolumn , but the QUERY-Parameter
    yield the second boolean value in the or-condition.
    The problem is that this condition ('&x_name' = '') dont use any index.
    thanks a lot for spending your time with this problem

    Try
    SELECT /*+ RULE */
    as your hint. I don't have the book with me, but this last weekend I read a section about your very problem. The book was a Oracle Press gold cover about Oracle 8i Performance tuning. If you e-mail me I can quote you the chapter when I get home Friday.

  • Sorting records dynamically in REF cursor, based upon a dynamic field

    Hi,
    I have a REF CURSOR built by using row type, table type and PIPELINE function. I have opened the ref cursor now. I would like to update a field called 'RANK' based upon 'RATIO' field in the REF CURSOR. i.e order the records in the ref cursor by RATIO field and then update the RANK as 1, 2, 3, 4, ....
    Aim: I want to update a field in the REF CURSOR based upon another numeric field.
    Please help me.
    OPEN sales FOR
    SELECT RANK, ratio
    FROM TABLE (fngetfundholdingsale (in_primarykey, in_flag));
    loop
    fetch sales into sale1;
    exit when sales%notfound;
    --I want to update sale1.rank based upon ratio
    end loop;
    Thanks
    Ashok

    Try to use NDS (Native Dynamic SQL):
    l_order := 'ratio';
    OPEN sales FOR
    'SELECT rank' ||
    '  FROM TABLE (fngetfundholdingsale (:in_primarykey, :in_flag))' ||
    ' ORDER BY ' || l_order
      USING in_primarykey, in_flag;Regards,
    Zlatko

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Need Report based on "CUSTOM DATA field @ Shop Order Maintenance"

    Need the REPORT based on CUSTOM DATA field.
    Requirement - I am having the CUSTOM data at Shop Order Maintenance that is called as XXX, I need some report in SAP ME which can display the SFC related to particular Shop order based on XXX Number.

    Hi!
    As far as I remember there is no such base report. So, you may try to create it using SDK or request it as custom enhancement from SAP.
    If you want to create it using SDK, you can find the required data for report in CUSTOM_FIELDS table.
    Regards,
    Alex.

Maybe you are looking for

  • Override add procedure on a/r invoice

    Hello, I'd like when I add a new A/R Invoice, to call some of my methods, after the invoice has been validated and inserted in the database. How can I override the et_CLICK event of the Add button. If I treat it in the ItemEvent procedure, then BO do

  • Can u explin  the IDOC creation with ALE/EDI   step by step .

    can you provide detalied code for i doc creation

  • ACR Overexposure with Nikon D3

    Exposure to the right (ETTR) is a standard technique that requires placing of the image highlights just short of clipping in the raw file. Such exposure is often judged by the histogram or blinking highlights in the camera preview of the image, but i

  • Edit Mini TOC style

    In our project we use a specific style to present a minitoc on a page. With Robohelp 7 we had to manually make bookmarks and hyperlinks. The minitoc seems a perfect improvement. Well, maybe not so perfect. I want to use the same styles as we used in

  • How to do certification as SOA Architect

    Hi, Can anybody suggest that, 1. Is that any certification avialable for "SOA Architect". If yes, Please provide the details. Regards, Adharsh Edited by: Adhi on May 4, 2011 3:53 PM Edited by: Adhi on May 4, 2011 3:56 PM