Skip to Content
avatar image
Former Member

IDoc no and Timestamp to be populated in File Name Scheme

Dear Team,

This is basically IDOC-FILE(xml) conversion.

Requirement is to populate the IDOC no and timestamp in Filename when the file gets posted into FTP server:

<FILENAME_IDOCNO_timestamp>

Please help on this. Thank you very much in advance. Below is the reference thread

https://archive.sap.com/discussions/thread/3960305

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 04, 2016 at 11:04 AM

    Hi Ryan/Raghu/Nitin,

    I have used the same UDF but taken the EDIDC segments(DOCNUM,CREDAT,CRETIM) as arguments and passed it to UDF and mapped it to root node and used ASMA in communication channel.

    Thanks all for your valuable inputs.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2016 at 03:43 PM

    Hello Rajesh,

    The Idoc number is coming from the input. So you need to give the input field name without quotes.

    you have written as "DOCNUM_" this will be marked as constant. Please give the input variable name of Idoc number from your UDF.

    For ex - Filename (String Idoc_num, ResultList Output)

    So in your expression you need to give Idoc_num as the field name, without any quotes. This is actually basic Java.

    Regards,

    Nitin

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Rajesh,

      The usage of the variable is fine as that won't get output via FCC to my knowledge and for the naming you can use ASMA based on the UDF. In the communication channel just use the value passfilename in the field for FileName and it will take whatever value is created in the UDF.

      If BLR and KEY will also vary then you need to adjust the UDF to have two more additional input variables that will also be used in the above statement to generate the string.

      Regards,

      Ryan Crosby

  • Oct 25, 2016 at 07:55 AM

    You can use dynamic configuration in mapping and generate the file name using that.

    Regars

    GB

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 25, 2016 at 08:06 AM

    Hi Rajesh,

    Check example#3 in below my blog.

    Reuse FunctionLibrary for DynamicConfiguration and Message Header Attributes

    Regards,

    Praveen.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2016 at 10:58 AM

    Link is opening as Praveen suggested.

    If I remember I gave you the code also Rajesh.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 01, 2016 at 04:25 PM

    Hi Rajesh,

    Please go through the below link. You can change your code as per your requirement.

    https://blogs.sap.com/2009/03/26/dynamic-configuration-vs-variable-substitution-the-ultimate-battle-for-the-file-name/

    Regards,

    Suhale Shaik.

    Add comment
    10|10000 characters needed characters exceeded