Idoc number  as file name

Hi
I am working on idoc - file scenario. I need to get the idoc number as file name in the receiver side? How could it be done ?

Hi,
You need to use Dynamic Configuration to set the file name dynamically in your mapping. In your receiver Communication Channel, on the Advanced tab, mark the Use Adapter-Specific Message Attributes and File Name checkboxes. Please refer to this help if you need further information about it:
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm
Then create a user-defined function in your graphical message mapping, with the following code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = a;
return  SourceFileName;
The "a" here is the importing parameter of the user-defined function. Map IDoc number to this function to have the parameter set.
Hope this solves your problem,
Grzegorz

Similar Messages

  • How to add increment number to file name properly

    Hi, all:
    I have a simple question. As shown in the attached code, I need to add an increment number to file name and save the file. The problem is, if you run the code and put something like ".dat" in the extension name, you will see a blank space between the number and the dot in the file name. What should I do to eliminate the blank space? I can't specify the format of the file name since the file name would vary from case to case.
    Thanks a lot for any suggestion and correction in advance.
    Attachments:
    temp.vi ‏11 KB

    Hi,
    Please take a look to the attached VI. I hope that I understood what you really want.
    I've replaced the Vi: Format into string with Number to Decimal String plus a Concatenate String. 
    Now, this is working for me, I don't get a space anymore.  If something is wrong, please let me know.
    Regards,
    Paul
    Attachments:
    temp_back.vi ‏11 KB

  • Getting PO number as file name when getting output as pdf file

    Hi Experts,
    Is there any possibility to get PO number into file name (instead of spool number) when getting output as pdf file.
    Since I'm printing POs in batches (as pdf) it is too difficult to find exact PO among all the pdf files.
    If PO number maintained as file name, would be great time saver for me.
    Thanks
    Kamal

    Hi,
    Please check the below link..
    Number ranges for Spool Requests
    hope it may help you
    Kuber

  • Limit on the number of file names retrieved using FM 'RZL_READ_DIR_LOCAL'

    Hi All,
    I am using FM 'RZL_READ_DIR_LOCAL' , to retrieve file names from a specified directory.
    When executed, i am getting 10,000 records(file names) only against lakhs of files present in the directory.
    I would like to know if there is any limitation on the number of file names retrieved using that FM and how to over come it.
    Also please let me know if the FM 'EPS2_GET_DIRECTORY_LISTING' also has any such limitations.
    Thanks in advance,
    Sreeni Vallem

    I did not know about this limitation of number of files returned. You can give a try to the external command way of doing it in your development system.  Well, creating 10001 files in development is a boring job . You can write a sample program as Rob has mentioned in this thread and copy files to a specific directory ABAP: Copy files from one R3 directory to another. This doesn't disturb the existing program written.
    Mean while let's wait for expert's reply.
    Kesav

  • ITunes appends incrementing number to file name

    Hi,
    I noticed that with some of my mp3 files iTunes 6 keeps on creating copies of them, appends an incrementing number to the file name and adds the new file to my iTunes library, which means I end up with multiple copies of the same song in my library.
    So if I have got a file called "03 All I Need.mp3" iTunes will create
    03 All I Need 1.mp3
    03 All I Need 2.mp3
    03 All I Need 3.mp3
    etc...
    Perhaps it could be related to the fact that I have got two computers accessing the same mp3 folder via a network?
    I really can't explain to myself why iTunes would be doing this, but it is terribly annoying, as I end up with the same song over and over again in my iTunes library.
    Does anybody know how I can prevent iTunes from doing that?
    Thanks heaps!

    Hi,
    Please take a look to the attached VI. I hope that I understood what you really want.
    I've replaced the Vi: Format into string with Number to Decimal String plus a Concatenate String. 
    Now, this is working for me, I don't get a space anymore.  If something is wrong, please let me know.
    Regards,
    Paul
    Attachments:
    temp_back.vi ‏11 KB

  • EDIFACT File TO IDOC Archive directory file name.

    HI Experts,
    I have EDIFACT file to IODC scenario. I have  multiple source file locaiton but only one Archive location directory.But I have three different kind of file coming form three different location.
    we can only have one archive directory per service, is it possible to manipulate the file name so we can tell if files were successful or failed?
    For example, FileName1.txt, if it was successful, it would move to the archive directory and rename to u201CFileName1.txt.PASSu201D,
    if it failed it would move to archive directory like u201CFileName1.txt.FAILu201D. Is this functionality possible?
    Or will we just have to rely on Alert Categories to tell us when files have failed?
    Kindly give your valuable suggestion.
    Regards,
    Sumit Gupta

    >
    sumit gupta wrote:
    > HI Experts,
    >
    > I have EDIFACT file to IODC scenario. I have  multiple source file locaiton but only one Archive location directory.But I have three different kind of file coming form three different location.
    >
    > we can only have one archive directory per service, is it possible to manipulate the file name so we can tell if files were successful or failed?
    > For example, FileName1.txt, if it was successful, it would move to the archive directory and rename to u201CFileName1.txt.PASSu201D,
    > if it failed it would move to archive directory like u201CFileName1.txt.FAILu201D. Is this functionality possible?
    > Or will we just have to rely on Alert Categories to tell us when files have failed?
    >
    > Kindly give your valuable suggestion.
    >
    > Regards,
    > Sumit Gupta
    When you say success or failure does it mean a successful IDoc created in SAP? if so you will have to use a BPM and on successful creation fo the IDoc write the file out with the PASS name else FAIL name.
    you can also look at employing  scripts but there is no standard feature for this requirement. I gather alert is a better option.

  • Sequence Number in File Name

    Hi All,
    I have a requirment where the Output file name should be appeneded with a sequence number which needs to be in sync with the number of records processed.
    Each time this sequence has to be started from the previous number where it ended.
    The soultion at the moment we have used it to store each time this counter in a file and read is back and update when done. Other solution is to meke use of the Tabe on ECC side
    Is there any solution with in the map it self to maintain this number.
    Any help will be appreciated.
    Thanks
    -Kulwant

    Hi Kulwant,
    Within Mapping you cannot save the counter as container and even global variables are flushed once the mapping is executed for the message, so i think we cannot do it using mapping.
    Also, dont know if you have tried OS commands feature provided by SAP for file adapter explained in link below:
    [/people/santhosh.kumarv/blog/2008/07/27/glimpse-at-os-command-yet-another-scenario]
    We can first create the file on some temporary location of the application server and then execute a batch file which would contain the code to fetch previous count(variables in OS commands can hold this value) and increment the same and copy the flie thus created by communication channel by appending the count to file name and also delete the file created by communication channel.
    Hope this helps !
    Regards,
    Amit

  • Moving from old to new hard drive, some songs lost track number in file nam

    Anyone have thoughts on this? I changed to a larger hard drive a month ago. Copied everything over and things seemed OK. Synced daughter's ipod and things started acting weird. I compared old to new hard drive now and a bunch of songs are missing from the new drive but weirder is that some songs lost the track numebr in the name on the new drive - 04 loving.mp3 is now loving.mp3.
    we can't find a pattern to why those specific songs are like that. any thoughts?

    Sorry, never heard of that before.

  • Material number as receiver file name in XI

    hi experts,
    here iam doing IDoc to file scenario, when i push data from BD10 the data will come to XI and i want that material number as file name.
    can any one explains me how to do that dynamic configuration.
    thanks in advance.
    JOHN

    hi john
    make use of VARIABLE SUBSTITUTION
    checkn this blog for reference
    An interesting usage of Variable Substitution in XI                    
    An interesting usage of Variable Substitution in XI                         
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean                                                  
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    regards
    kummari

  • File name in control record of Idoc

    Hello All,
    I have come across a requirement for File to IDOC scenario where File name picked from dynamic configuration is to be stored in control record of IDOC. As file name is more than 45 chars long, I need to use a long field.
    Can you I use ARCKEY, SNDLAD or RCVLAD fields or there is some restriction to use these fields, means will it impact something?
    Regards
    Prashant

    Hi Prashant,
    I understand that your requirement is to store name of picked up file in SAP system.
    Can you I use ARCKEY, SNDLAD or RCVLAD fields or there is some restriction to use these fields, means will it impact something?
    You can use them if you are sure that it would not affect routing routines and message processing in SAP ECC.
    Regards,
    Radek

  • No File name or number after uploading to MobileMe

    After upgrading to patch Nov 4 with iphoto 11. The number or file name will not show up after uploading to MobileMe for sharing to others.

    Same thing here. Can't get iPhoto 11 to display filenames in MobileMe galleries. I've already filed 2 bug reports from 2 different Macs with the same issue. I recommend you do the same. Just go to the 'iPhoto' menu, then select 'Provide iPhoto Feedback.'

  • From PO Number to IDOC number

    Hi Everyone,
    i want a table where we can get the IDoc number for a partcular PO number. As in PO we have 2 Idocs,that is Inbound and Outbound Idocs.I need to find out the inbound Idocs.
    Regards
    Siva

    Hi,
    Go to -> SE16 for this identifying the PO and corresponding Idoc number using table name: EDID4
    To identify the PO you have to query the field (EDID4-SDATA) from this table. System will display the PO applications,PO number in first segment data.
    otherwise,In transaction code WE02 use to find the PO number.
    Regards,
    thiru

  • Get File name from incoming IDoc

    HI All,
    I am in an IDOC to File scenario using Fcc. (R/3 --> XI --> 3rd party)
    I need to use the  idoc-number(EDI_DC40-Docnum) as my output file name. I planned using variable substitution but there it expects me to get the idoc number from payload which I do not have it in. (refer c ode below)
    As I understand, variable substitution can be used only on payload(the FINAL data set that we will be writing to the file).
    Can we use the data which is part of incoming IDOC and not part of payload(final data what we are writing to file).??
    Other idea was to map this IDOC no to a field in final file, but this field should not be written in the output file, so am confused about how to achieve this.
    E.g
    *Incoming Data*
    IDOC
      |_EDI_DC40
        |_DOCNUM
    Final data (Payload)
    Header
    Data
    Trailer
    As seen in my example above I do not have the IDOC no in the final data so how do I use the Idoc no as my filename? Apprecaite your help on same.
    Regards
    Shirin

    Hi
    You can use dynamic configuration to get the file name .
    Use Adapter Specific Message Attributes for the target Comm Chanel check the indicator for filename in the advanced tab of CC
    create a UDF with i/p as file name  i.e the Idocnum field and
    paste this code
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //conf.removeAll();
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    //String filename= conf.get(key);
    conf.put(key, fileName);
    key= null;
    return fileName;
    PS: use cache as value in UDF
    ands assign the o/p of this UDF to a root node

  • How to get R/3 IDoc number in XI (file- XI- R/3 IDoc)

    Hi all,
    I want to do something simple
    In my scenario file->XI (SP14)->R/3 IDoc, I have to return the list of IDoc numbers to the sender external application.
    So I use a BPM with steps: Receiver (from file adapter), Transformation (Grouping and Splitting) and Parallel Block.
    In this block I have a Mapping (one message to IDOC) and Send step (to Idoc adapter).
    Its works fine, but I have to know the R/3 IDoc number for each message in the block.
    I tried to find solution in this forum but I didn’t find anything useful. Can you help me with any idea or link?
    Regards,
    Emil.

    Hi all!
    I was a little bit surprised. Is my question is stupid or complex or …?
    I found something strange: In the error acknowledgment message in SOAP Header / Trace I saw that there was a runtime error:
    <Trace level="1" type="B" name="CL_XMS_MAIN-RITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="T">Runtime exception return from pipeline processing! </Trace>
      <Trace level="1" type="T">Persist Message in Stopped State</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
      </SAP:Trace>
    The workflow status is still In Process.
    Any idea what happened?
    Regards,
    Emil.

  • IDOC to multiple file with dynamic file names with same content

    Hi,
    My scenario is from IDOC to file.
    The number of files which i need to create is dynamic, which depends on the number of plants.
    I have a Z-table where i will maintin list of all plants ( non SAP plant names).
    I need to fetch the data from this z-table and depending on the nunber of plants i need to create the file for each plant and fiel name should contain plant name in it. EX: abc_<plant>_datatype.txt
    I want to use only receiver one CC, and files should be created in the same directory.
    Can we do this without BPM?

    Hi,
    You can use the Mapping lookup concept to fetch the plant names from Z-tables and then you can use the variable substitution technique to resolve your purpose.
    Here you need to create multiple interfaces ie.e per plant to create multiple files. You can use common Communication channel for all.
    Mapping Lookup
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
    Mapping Lookups - RFC API
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
    Variable Substitution
    An interesting usage of Variable Substitution in XI
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    SP12 -Variable Substitution option
    Receiver File Adapter:Variable substitution :FATAL  ERROR
    Thanks
    Swarup

Maybe you are looking for

  • Bind Variable popup when no bind variable declared

    I am writing a fairly complex SQL (FYI, I want to keep this all in one step and not split out with multiple sub-selects) and I am getting the bind variable popup and an error message ("The requested URL /apex/wwv_flow.show was not found on this serve

  • Segment has no subnode of type element/composite/technical node

    Hi all, I have created a DME tree format. but not able to activate it because has following errors: 1). Node HEADER A: segment has no subnode of type element/composite/technical node Message no. DMEE_ABA338 the node HEADER A is of kind Segment. and i

  • STATISTICAL POSTINGS repost between cost centers

    STATISTICAL POSTINGS repost between cost centers. I try to repost statistical postings in a cost center with KB11N tr., but I can´t because the original cost center (sender) still have the statistical postings and the receiver cost center will have t

  • APEXIR_ACTIONS

    Hi, for someone who need to translate 'Actions' button of Interactive Report: APEXIR_ACTIONS message is missed in Table 15-4 Interactive Report Messages Requiring Translation of Application Express Application Builder User's Guide Release 4.0

  • Navigating between movies

    I thought I had this working after finding a post - then losing said post never to be found again... So I am reposting. So Sorry. I have been given a task to create an interactive product catalog for the company I work for. Is it possible to navigate