Variable Substitution not working for multiple files

Hi,
Have a scenario in which we are using Interface Collection with multiple files as output.
The naming of the files is derived from a payload field as follows.
payload:MT_OrdersAck,1,Order,1,File_Header,1,StoreNo,1
When the first file is generated this works fine, but fails for the rest of the files.
I guess this is because of the hardcoding 1 in 
payload:MT_OrdersAck,1,Order,1,File_Header,1,StoreNo,1
how do we get around this problem?
Any Ideas?

Hi, I suppose you are using Mapping-Based Message Split, right? Do the following files look the same like the first file with respect to File_Header?
Make sure that the payload structure (payload:MT_OrdersAck,1,Order,1,File_Header,1,StoreNo,1) is equal in all files and that first occurrence of StoreNo always has a value in all the files.
Regards, Martin

Similar Messages

  • Variable substitution not working for dynamic file name in Receiver File CC

    Hi Experts,
    I am doing the scenario of Proxy sender to File receiver and my purpose is to Create the text file
    as per the filename available in Source Message payload.
    I am using the Variable Substitution method for this as shown below.
    Source Message Structure:-
         <Row>            -
    having Cocurence 1.1
             <Filename>     -
    having Cocurence 1.1
             <Item>            -
    having Cocurence 1.Unbounded
              <Field1>
              <field2>
             <Item>
             <Item>
              <Field1>
              <field2>
                <Item>        
         <Row>
    Target structure is same as the source structure and i have mapped the Filename field of the Source
    with the Target structure Filename.
    In ID the following is the File receiver CC Configuration.
    File Name Scheme:- %Dyn_filename%
    In Advance tab, I have selected the Enable option and added one row as Variable name %Dyn_filename%
    and Reference as payload:Row,1,Filename,1
    In testing I am getting the Error as 'variable Dyn_filename is not found in Message payload'.
    Please suggest me.
    Regards,
    Jagesh

    Hi Pooja,
    Hi Pooja,
    Thanks for your valuable reply..
    I  tried with the same. but still Filename is appearing in Output file.Giving you some details regarding my Receiver File Configuration settings.
    Target Message Type:-
              <MT_Target_Struct>
                    <Row>----
    1.1 occurence
                            <Filename_test>----
    1.1 occurence
                            <ITEM>----
    1.unbounded occurence
                                  <Field1>
                                  <Field2>
                            <ITEM>
                            <ITEM>
                                  <Field1>
                                  <Field2>
                            <ITEM>
                    <Row>
              <MT_Target_Struct>
    Recordset structure:-  Row,Filename_test,ITEM
    Row.fieldSeparator----
    >'nl'
    Filename_test.fieldFixedLengths----
    >0  (Zero)
    Filename_test.fixedLengthTooShortHandling----
    >Cut
    ITEM.fieldSeparator----
    >,
    ITEM.endSeparator----
    >'nl'
    I want only ITEM node to be written in the output file.
    Please suggest.
    Regards,
    Jagesh

  • SELECT INTO ( variable ) STATEMENTS NOT WORKING FOR SYBASE TABLE AS VIEW

    Dear Experts,
    We have connected our 9i db with Sybase db using Hs connectivity.
    and then we have create the view in oracle db for SYBASE_TABLE as SYBASE_TABLE_VIEW.
    ALL THE INSERT, UPDATE AND DELETE COMMANDS ARE WORKING BUT THE
    select Into (variable) is not working.
    Please help to resolve the select into statment which is in BOLD in the below routine
    PLEASE NOTE! FORM WAS COMPILED SUCCESSFULLY AND FORM IS RUNNING BUT SELECT INTO COMMAND IS NOT WORKING.
    Thanks & Regards
    Eidy
    PROCEDURE SRBL_INSERT IS
    CURSOR SRBL IS
         SELECT impno,impcod,impnam
         from oracle_table1 a, oracle_table2 b
         WHERE a.impcod=b.empcod
         v_srpcod varchar2(5);
    BEGIN     
    FOR rec in SRBL loop     
         begin
    select "im_code" into v_impcod                    
         from SYBASE_TABLE_VIEW
         where "im_code"=rec.impcod;
    exception when no_data_found then
         v_srpcod:=null;
    end;
    END LOOP;
    END;
    Edited by: Eidy on Aug 16, 2010 11:28 AM

    hellow
    try this.
    select "im_code" into v_impcod
    from SYBASE_TABLE_VIEW
    where "im_code"=rec.impcod;
    v_srpcod := v_impcod ;
    ........

  • Encode Video Files not working for avi files

    Hi,
    I've been trying to convert some .avi files to apple format using Lion's native 'Encode video files' function however keep getting a 'avconvert: source file not found for source file://fileparthhere avconvert: failed to create an export session. Check setup
    I can't work out why as this has worked before in Lion and works fine for other video formats. The only thing I've done is remove Final Cut Express HD and can't add it again as I don't own it anymore
    Suggestions? Is there a encoder to make this work or should it work anyway?
    Thanks

    If you click Yes the project file will be updated when you save it. That has nothing to do with the media.
    Are the Lesson and Media folders still in the Book Files folder (or whatever it's called)?
    Select one of the clips in the browser and use Edit>Item Properties. One of the first lines is Source. That gives you the file path for where your media is supposed to be located. What does it say? If nothing is there, use the File>Reconnect function and point the application to where the media is located.

  • Oracle text search not working for  WSDL files

    I have a table (resources) with blob data type column (xml_data) and I've created context type index on that column. I've XSD and WSDL files stored in that blob column.
    I can search XSD and XML files with a query with contains operator. But any search on the words from wsdl file returns zero results.I am not able to perform search on wsdl file.
    Please advise me whether oracle text can work for WSDL files also ?
    Query details
    ===========
    create index myIndex on resources (xml_data) indextype is ctxsys.context;
    select * from resources where contains(xml_data, 'searchword') > 0
    Thanks a lot,
    Santhi

    Even though it isn't listed specifically, I can't see why it wouldn't work. The WSDL file should be a simple XML file, so in theory it shouldn't be any different to Oracle Text than the XML file that you loaded and searched successfully. Did you get any errors during indexing, and what do your tokens look like in the DR$MYINDEX$I.TOKEN_TEXT column?
    Do you have a mini test case that didn't work for you? Perhaps we could play with it a bit.
    Long term you might want to consider using section groups so that you can search "within" tags.
    -Ron

  • Variable Substitution not working when using ABAP mapping

    Hi all,
    I am doing an IDoc to File scenario.
    Due to some complex mapping requirements, i had to use ABAP mapping for IDoc to File ( IDoc : SHPMNT05)
    There is also one more requirement where in i need to generate the receiver filename dynamically
    i.e the filename is of the form :     
        GW-XYZ-DD/MM/YYYY.csv
    Where
    XYZ is the Shipment number (E1EDT20- TKNUM)
    DD/MM/YYYY is the IDOC creation date in ECC (EDIDC-CREDAT)
    so i used the variable substitution option in receiver file adapter.
    But its not working.
    Is there any limitation for using the variable Substitution, doesnt variable substitution work in case of ABAP mapping?
    Regards,
    Loveena.

    Hi,
      u written ABAP mapping program to get the file name in the required format ,
    is it rt?
    when u test it at message mapping(including ABAP map program)
    u get the the required format of file name in the one of target filed.
    if that was fine, please check the variable substituiton parameters at receiver file adapter.
    i mean, are u maintain variable name and refernece.
    u have to specify the payload information.
    warm regards
    mahesh.

  • Variable Substitution not working correctly?!

    Hello all,
    perhaps some of you faced the same problem. It depends on the variable substitution in XI (PI).
    We have got an IDOC - FILE szenario. As far everything is working fine. The XML is created correctly.
    Now we want to get two fields from the payload to use both in our receiver file adapter as filename.
    The IDOC is a standard ORDRSP.ORDERS05.
    (1) The first field is the "job number" and located in the IDOC element: E1EDK01
    (2) The second field ist the "purchase order number" and located in the IDOC element: E1EDK02
    The fields are both named BELNR (and here seems to be a problem).
    To use the variable substitution we did as it is described in help.sap.com and used the following path to get the variables from the payload:
    (1) variable name: aufnr  ;  reference: payload:ORDERS05,1,IDOC,1,E1EDK01,1,BELNR,1
    (2) variable name: bstnr  ;  reference: payload:ORDERS05,1,IDOC,1,E1EDK02,1,BELNR,1
    these two variables "aufnr" and "bstnr" we want to use in our filenameschema. So we wrote the following for the schema:
    Ordrsp_%aufnr%_%bstnr%.xml
    The effect is that both variables always contain the same value, the value of "bstnr".
    Strange is that, if we delete one substitution i.e. (2) "aufnr" contains the correct payload value. It seems he overwrites the value of "aufnr" with the value of "bstnr" because of the same name in the IDOC structure (BELNR).
    Has anyone any idea what to do?
    Many thanks and kind regards,
    Steven
    PS: Of course points will be rewarded for helpfull answers. :o)

    Thank you for your answers!
    But there are several Problems using a dummy field in an IDOC structure. We have got a naming convension so that we can't create an IDOC-like structure named ORDRSP.ORDERS05.
    But perhaps I am thinking to complex and there is an easier way to add a dummy field to an IDOC structure.
    Could you perhaps also suggest a solution for that dummy field problem?
    Many thanks and kind regards,
    Steven

  • Variable substitution not working properly

    Hi,
    I am using variable substitution method for creating receiver file name but file is being created with a different name,not as expected .
    what may be the reason for this .??
    Thanks ,
    rohit

    Hi,
    It may help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/106d42ab7fd142e10000000a1550b0/content.htm
    Thanks,
    Vijaya.

  • File.execute() not working for bat file

    Dear all,
    The purpose of my function copyToWinClipboard (text) is to get a string directly into the Windows Clipboard. The purpose is to allow the user of my project just to paste into the open-dialog of the application EndNote. I’m not certain whether the FM clipboard (supported by the copy/cut/paste methods for Doc) really fills into the Windows Clipboard also.
    In the PhotoShop script forum I found the idea how to do this.
    #target framemaker
    // note the blank in the path
    copyToWinClipboard ("E:\\_DDDprojects\\FM+EN escript\\FM-11-testfiles\\BibFM-collected.rtf");
    function copyToWinClipboard (text) {
      var theCmd, clipFile = new File(Folder.temp + "\\ClipBoardW.bat");
      clipFile.open('w');
    //  theCmd = "echo \"" + text + "\" | clip"; // this doesn’t help either
      theCmd = "echo " + text + " | clip";
      clipFile.writeln (theCmd);
      clipFile.close ();
      clipFile.execute ();
    Running this script provides a short flicker (the command prompt), but the clipboard does not contain the expected string. However, when double clicking on the generated I:\!_temp\ClipBoardW.bat the clipboard is filled correctly.
    IMHO the execute method does not work correctly for bat files. In another area of my project-script i run an exe file with this method correctly.

    Hi Klaus,
    sorry for my late response.
    execute definitely works witch batch-files
    Here's a "batch" - example you can test.
    There are two methods to prevent window from closing:
    "|more" - kind of pagebreak
    "pause"
    var oTemp = app.UserSettingsDir + "\\tmp";
        var MyDosCommand = "ipconfig.exe /a|more";
        var MyPath = new Folder (oTemp);
        if (!oTemp.exists)
            var MyPath = new Folder (oTemp);
            var lFehler = MyPath.create();
        oTemp = oTemp + "\\" +"nw.bat";
        var MyFile = new File (oTemp);
             MyFile.open ('w');
               if (MyFile.error > "")
                    alert("ERROR");
            MyFile.writeln(MyDosCommand);
            MyFile.writeln("pause");
            MyFile.close();
            MyFile.execute();

  • EXIT_SAPLV50E_001 User Exit is not working for multiple plants case

    Hi,
    I have to update foreign trade data in Invoice during invoice creation using VF11. For that, I have written code in EXIT_SAPLV50E_001 and updated segal value. This functionality is working fine, if I have a single plant in an invoice. But customer has scenario where they can have multipl plants in an invoice.
    For multiple plants in an invoice, this EXIT_SAPLV50E_001 is not called.
    I am unable to find another better place where in I could place my code. Please help. Remember, case in multiple plants.
    Will be rewarded.
    Regards
    Arpit

    Hi Arpit,
                   Please use below mentioned user exit in T-code VF11
    he following user exits are available for tcode VF11
    Exit Name           Description
    SDVFX001            User exit header line in delivery to accounting
    SDVFX002            User exit for A/R line in transfer to accounting
    SDVFX003            User exit cash clearing in transfer to accounting
    SDVFX004            User exit G/L line in transfer to accounting
    SDVFX005            User exit reserves in transfer to accounting
    SDVFX006            User exit tax line in transfer to accounting
    SDVFX007            User exit: Billing plan during transfer to Accounting
    SDVFX008            User exit: Processing of transfer structures SD-FI
    SDVFX009            Billing doc. processing KIDONO (payment reference number)
    SDVFX010            User exit item table for the customer lines
    SDVFX011            Userexit for the komkcv- and kompcv-structures
    V05I0001            User exits for billing index
    V05N0001            User Exits for Printing Billing Docs. using POR Procedure
    V60A0001            Customer functions in the billing document
    V60P0001            Data provision for additional fields for display in lists
    V61A0001            Customer enhancement: Pricing
    J_3RSINV            Customer enhancement: Pricing
    or You can use BADI
    BADI_SD_SALES_BASIC
    BADI_SD_TO_FM
    BADI_SD_BILLING
    Regards,
        Thangam.P

  • "Open With"  CS3 not working for JPEG file

    Operating system is XP. I am trying to get CS3 to automatically open all JPEG files when I double click on them in windows explorer.
    I open windows explorer, right click on the image that I want to open, then click "open with" ....
    ...at this point CS3 is not one of the choices on the "open with" menu so I already smell a problem ....
    ..... so I click "choose program" and navigate to the adobe photoshop cs3 folder and point to photoshop.exe, then click the "always use the selected program" box, click open, and bada-boom, bada-bing, the image opens in photoshop CS3, right? WRONG.
    The image opens in the Quicktime Picture Viewer program and NOT IN PHOTOSHOP CS3.
    I feel that I have entered the Twilight Zone, otherwise known as The Adobe Messed Up Someting In The Registry Upon CS3 Install Zone. Does anyone have any hints on how to get PS CS3 working as the default program for JPEGs when I double click them from explorer on my XP computer?
    Thanks,
    Mark

    After a long search I found the answer:
    To associate all jpeg files with Photoshop CS3 so that they will open into CS3 when double clicked:
    Click Start, Run and type in: Control Folders.
    Click the file Types Tab.
    Wait for the list of file types to populate.
    Single click on the jpeg file type.
    Click the Advanced button.
    Highlight open and click the edit button.
    Browse to the location of photoshop.exe in the CS3 folder.
    A few OK's and you are done.
    AND ANOTHER THING .........
    After the change above was made, jpg files would open directly to photoshop cs3 when doubleclicked, but the maintained the same goofy quicktime pictureviewer icon when viewed in windows explorer. To change the icon for jpeg files displayed in all folders to the photoshop icon, do this:
    Start / My Computer
    Click Tools at the top of the screen.
    Click folder options .... then the file types tab
    Click on jpeg in the list and click the advanced button
    Click change icon and browse to the photoshop.exe for CS3
    A list of ocon choices will appear .... I chose the second row first icon
    A couple of OKs and you are done

  • Calculation formula userexit not working for multiple condition types

    Hi,
    we have a problem in the CRM ISA-B2B scenario where the custom user exit is only working for single condition type.
    but we need it for multiple condition types .
    the value of the subtotal is not being retrieved for multiple conditions. at a time only one condition value is being retrieved and shown in the webshop - shopping basket.
    for ex:
    we have scenario 1 where Y001 -Freight condition type is applicable for one customer.and Y002 is applicable for another customer.
    when we are trying to show the subtotal condition value in the webshop by using a single custom user exit in the pricing procedure it is only working for either of the above 2 customers depending on the VMC cache status.
    is there any problem if use the single user exit for both condition types?
    and if it needs to be differentiated how exactly we can do that with the same logic in the java class.
    Thanks in advance,
    PSR.

    Hi Arshi,
    below is the code:
    public class ZValFormula_ZZWI1 extends ValueFormulaAdapter {
         private static String zzwi = "ZZWI1";
         private static char  zzwiC = '@';
         private static UserexitLogger userexitlogger = new UserexitLogger(
         ZValFormula_ZZWI1.class);
         public BigDecimal overwriteConditionValue(IPricingItemUserExit item,
                   IPricingConditionUserExit condition) {
              ICurrencyValue val = condition.getConditionValue();
              userexitlogger.writeLogDebug( "value saved for " + zzwi + " (" + zzwiC + ") = "
                        + val.getValueAsString());
              item.setSubtotal( zzwiC, val.getValue());
              return val.getValue();
    hope this would give more idea to look at the problem.
    Thanks,
    PSR

  • "Automatically Write Changes Into XMP" Not Working for DNG Files

    Hello,
    I am needing to update DNG/JPG file pairs with keywords that I add  in lightroom.  The following is the problem that I am encountering. 
    When the image consists of only a JPEG file (ie. I had my DSLR only snap a jpeg and not an associated DNG), and I add one or more keywords to the file in Lightroom, these are written / saved immediately in Lightroom and are visible immediately in the 'tags' column for that image in windows explorer.  Very useful and important functionality for my workflow.
    However, when the image consists of both a JPEG and a sister DNG (i.e.,snapped simultaneously by my DSLR), and I try to add keywords to these (treated at this point as a single image by lightroom) then Lightroom does not record the keywords into either of the two files and consequently no tags are visible in windows explorer.  I have confirmed this apparent problem with a seperate image metadata utility software, and am hoping that it's just something simple that I am missing.
    Also "Automatically Write Changes Into XMP" is selected and I have also  tried manually both: "right click," "metadata," "write metadata to file;"  and  "right click" "update DNG preview and metadata" and the problem  persists.
    Hopefully someone has encountered something similar and can point me in the right direction.
    Thanks in advance.

    @Eric: hitting cntrl+s works but can be tedeous on large galleries. I've been doing this but it can be a pain.
    @Jeannine: different topic than this thread but to answer anyways... Lightroom automatically saves all changes into your catalogue. You never need to dave your changes (here's the kicker though) as long as you do not move the original file. If you
    move the file than lightroom won't know that it's the same image as the one you've edited. Once you are done editing your image you will need to "export" the image to a new file (you don't wan to overwrite the original). If you don't export than only lightroom will have your edits. Lightroom is "non-destructive" Which means that it doesn't touch your original photo. Lightroom keeps a text file containing the instructions on what you did to make the edited version. Since your changes are just text inatryxtions you have to "export" the image to get your final image in a version you can put online, print, etc. But to answer your original question, I think you prob moves the original image. If not, could you give us more info?

  • Preview is not working for MEdia files

    Suddenly whenever I would like to have a quick look for any video file via (Space bottom) its not working, keep giving that "Loading preview" but never show the video.
    i am using quick time X.
    any help
    mohammad

    There are quite a few different settings that you can choose from when converting a RAW file to a DNG. Without knowing what settings you set up in LightRoom there's no way to tell why your images aren't importing properly.
    Roughly speaking, a linear DNG is one where the first part of the RAW conversion process (called debayerising or demosaicing) has already been done by Adobe.
    Ian

  • FA segment derivation from business area substitution not working for AFABN

    Hello Gurus,
    I have a FA substitution of Field 'segment' is substituted by Field BSEG-GSBER.
    But its not picking the Business area as Segment for the 'AFABN' postings.
    Thanks for your early reply.
    Thanks and regards.
    Gopa

    Hi, AFABF it's depriciation?
    Try do it with tcode obbh.
    And if you have some problems with substitution simulate it for  inspection

Maybe you are looking for