Idoc - File, file name sent in IDOC

Hi All,
Scenario is : IDOC to File
Name of the file to be created at receiver is sent in an IDOC that is, a field in IDOC contains file name. And the requirement is , this file name should be copied in the message mapping to the corresponding adapter specific message attribute.
I have a field ' filename ' in IDOC but <b>target structure does not contain any such field/element to map with.</b>
So without having a field ' filename' in target structure is there any way to achieve the requirement.
Your suggestions, clues are welcome.
Thanks.

Hi Mughda,
yes this is possible......just create a UDF in which you use dynamicconfiguration to set filename property......in UDF take input your idoc -> filename field.....in UDF, assign the filename property this input argument.......in mapping, take source filename field.....send it to UDF......take output of UDF to the topmost node of your target struc..........in ID, check the apdapter specific attributes and then check the filename attribute.......then your filename will be generated according to the filename field of your source idoc.
Thanks,
Rajeev Gupta

Similar Messages

  • Set xml file name

    Dear,
    I want to set the name of the xml sended by mail.
    I use a botton for this, cane help me to set the name of this file before attachement !
    Thanks

    I know that, but i need to set the xml file name sent by mail with information typed in a text field.
    For exemple un have a PDF file named : myPdf.pdf
    And each user of this pdf file will type in a text feld his name so the xml file should be named : brain.xml and not myPdf.xml
    Thanks

  • HR-PDC interface: Problems in the file name of the downloaded idoc file

    I'm currently busy with the HR-PDC interface to EBI-time recording system. The RFC destination to EBI's quality system is working fine but we are experiencing differences in the idoc file name that we are creating in the EBI path. When we send a request to EBI to upload clocks, an idoc (Message Type: HRCC1REQUPTEVEN and IDOC type: HRCC1REQUPTEVEN01 ) is sent to EBI The file name is HRCC1REQUPTEVEN whereas in a previous implementation file name is HRCC1REQUPTEVEN01. The control record information on the outbound idoc are the similiar in terms message types and idoc types sent through to EBI. Have you ever come across this issue in your previous experiences with SASOL's HR-PDC interface. SAP has not changed the IDOC type HRCC1REQUPTEVEN01 since 1998.

    can you please also contact IDM support about it?
    * http://www.internetdownloadmanager.com/register/new_faq/main.cgi

  • 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

  • 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

  • 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.

  • File to idoc how to get file name at runtime

    Hi Experts,
    In my file to idoc scenario,
    the requiremnt is like in mapping i have to give condition like if file name is name1 then one target filed is 40 and if file name is name2 then that target field is 60.
    how can we achieve this ?
    Regards,
    rohit

    Hi Rohit
    mughdha is right but you can do it through graphical mapping easily
    give condition in fix value under category conversion like this
    1) source-> FIX VALUE ->if value is true then map FIX value
    else nothing
    double click on first FIX VALUE function and assign your input values for file (for ex 40 or 60,......) in the key field and in the value field assign TRUE
    if this condition will be true the it willl map second FIX VALUE
    else assign a constant with empty value
    in second fix value assign values (for ex 40 or 60,......) which you have checked in first FIX VALUE function in key field and assign corresponding name which you required in the value field
    hope this will solve your problem
    Thanks
    sandeep
    if helpful reward points

  • 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

  • IDoc to File with different file name and data based on the IDoc header dat

    Hi,
    I got a requirement to implement IDOC to file senario.  In this the Converted file should have the file name and file content based on IDoc Header data.  Means If one of the IDoc header field value is
    'A'  - then the file name recieved by reciever system should be 'A.txt' and with the columns A  B  C  D  F.
    'B'  - then the file name recieved by reciever system should be 'B.txt' and with the columns C  D  F.
    In both the case IDoc message type is same.
    Please suggest me what i need to do to achieve this.
    Thanks in Advance. ...
    Regards
    Sri

    Hi,
    As per my requirement, we need to create one file for each IDoc based on IDoc header data. SAP program generates 10 IDocs for each run. All 10 IDoc's message type is same.  Each IDoc has one header record with the file name. Base on the  name in the IDoc header record, file needs to be created with different columns and file name. Means..
    IDoc 01- Header Description contains 'A' - than file will be generated should have name as 'A.txt' and columns 'parent'  'child' 'descripion'.
    IDoc 02- Header Description contains 'B' - than file will be generated should have name as 'B.txt' and columns 'Name' 'Department' 'Description'.
    IDoc 10- Header Description contains 'J' - than file will be generated should have name as 'J.txt' and columns 'Order No'  'Materail' 'Description'.
    Hope this will give more clarity on my requirement. Please let me if you are still not clear on requirement.
    Thanks for your all help..
    Thanks & Regards
    Sreeni

  • Idoc to file with file name as ABCD timestamp and count

    Hi,
    Greetings!
    I have an requirement like iDoc to File and the output file name should be ABCDYYMMDDXX (e.g ABCD14091701) in PI 7.1
    where,
    Default = ABCD
    YY = year
    MM = month
    DD = date
    XX = sequence no. on the same day; e.g. first batch on same day = 01, second batch on the dame day = 02
    I tried checking many blogs but its not meeting this requirement.
    Kindly please help me out in completing this interface.
    Regards,
    Vinoth

    Hi Vinoth,
    Below is the code. Use it in-conjunction with your dynamic config code.
    String inputFile = "D:\\Receiver"; //This is your target receiver folder
      String dateStr = DateFormat.getDateInstance().format(new Date());
      dateStr = dateStr.substring(0, 2)+ dateStr.substring(3, 5)+ dateStr.substring(8,10);
      final String fileNamePattern = "DEFAULT"+dateStr;
      File file = new File(inputFile);
      File[] listFiles = file.listFiles(new FilenameFilter() {
      @Override
      public boolean accept(File dir, String name) {
      if(name.contains(fileNamePattern))
      return true;
      return false;
      //System.out.println("Number of files in the directory "+inputFile+" : Next Counter"+ (listFiles.length+1));
      int counter = listFiles.length+1;
      String fileName = "";
      if(counter < 10)
      fileName = fileNamePattern+0+counter;
      else
      fileName = fileNamePattern+counter;
      System.out.println("Name of the file will be:"+fileName);
    Hope it helps!
    Best Regards,
    Anand Patil

  • Idoc file name restricted to 100 characters

    The file name (include Directory Path) for Idocs seems limited to 100 characters (it truncates).
    Can anyone confirm this?
    Is there a workaround (other than changing to a shorter path)?
    Thanks,
    Matt.

    Hi Matt
    Please refer to the following link.
    https://www.sdn.sap.com/irj/sdn/collaboration
    Award Points if useful
    Regards
    Inder

  • File Name from File Adpter in IDOC

    Hi all,
    We have scenario of file->xi->zidoc.
    Now in one field for segement  i also want to store the file name which has been processed by xi , is there anyway to get it ?
    Thanks & Regards,
    Tuhin

    Hi Holger,
    Thanks but can u guide  me how to include  customize code  in module for communication channel and does it need to be EJB only or jar file can also be included.
    If i get filename thorough this customize code but how to get this name in graphical mapping ??
    Please send me any code or docs on [email protected] .
    Thanks & Regards,
    Tuhin

  • Have recently updated Adobe Reader and now unable to open downloaded documents - Message received is could not open 'file name.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email a

    Have recently updated Adobe Reader and now unable to open downloaded documents - Message received is could not open 'file name.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded). When I check the file it shows Zero KB downloaded but the file appears - any suggestions?

    Obviously your download was not successful.
    What is your operating system?  How exactly do you download such files?

  • Full name of attachment not shown in MFCMAPI when file is sent using OWA

    Hi everyone,
    I am developing an application where I want to notify about file being sent in Microsoft Exchange. So, I have implemented notifications on the message store and trying to retrieve the file name. The problem is filename of only eight characters can be retrieved
    when a file is sent as an attachment using OWA. I am attaching 2 snapshots of the attachment table of two emails. I have sent a file as attachment using OWA (results shown in first snapshot) and using Microsoft Outlook (results shown in the second snapshot).
    Also the properties of attachment are less when a file is sent as an attachment in email using OWA.

    Hello Talib,
    I'd recommend asking OWA related questions in the
    SharePoint 2013 - General Discussions and Questions  forum instead. There you will get the most qualified feedback.  

  • Need attachment file name which had sent or received in entire days.

    Hi Friends
    I need your help for getting information on exchange mailbox user who had sent or received  mails along with attachment file name for entire day.
    Basically I get the information of entire mails which had received or sent in all days but I am unable to get the information about attachment file name.
    Please do the needful.
    Regards, Md Ehteshamuddin Khan All the opinions expressed here is mine. This posting is provided "AS IS" with no warranties or guarantees and confers no rights.

    Hi,
    Based on my knowledge, Exchange has no built-in feature to get the attachment statistics report. But you can check if EWS can achieve it.
    About issues related to EWS, actually, we have a dedicated support team regarding the Exchange Server Development. I recommend you ask your question on our Exchange Server Development forum which is staffed by more experts specializing in this kind of problems.
    Thanks for your understanding.
    For your convenience:
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads
    Hope this can be helpful.
    Best regards,
    Amy Wang
    TechNet Community Support

Maybe you are looking for