on 03-22-2012 2:41 AM
Hi Guys,
I have a requirement to create a file name with increasing sequence No. at the end instead of time stamp.
Have you come across such requirement ?
Thanks
Sam
u can use Number range object to achieve ur req..chk this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In message mapping u will write the DC code and store value dynamically in ASMA.
Refer below link (wite ur DC code + in receiver file adapter chk "file name " under ASMA)
http://wiki.sdn.sap.com/wiki/display/XI/Combining+three+different+aspects+of+PI+in+one+shot
chk this wiki also (section ASMA and Dynamic configuration)
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407
I find a way to send the sequence No. via IDOC.
But where we write Dynamic configuration UDF ?
u have to write Dynamic configuration UDF in message mapping in ESr
is any other way to pass the sequence No. from Enterprise Builder to Integration Builder ?
in receiver file adapter, you have to enable ASMA and File name .
ex: urefer last example in below link
http://wiki.sdn.sap.com/wiki/display/XI/Combining+three+different+aspects+of+PI+in+one+shot
create a UDF in graphical msg mapping and in UDF take input of Seq number and write DC code for filename generation appending Seq number to filename.
then map the output of UDF to header node of target msg type - so in mapping:
Seq number source field -> UDF -> Header node of target msg type.
in configuration, in receiver file comm channel, enable Adapter specific msg attibutes and tick filename option.
Hi Sam,
Of course there is a way to do it, that is what Dynamic Configuration and Adapter-Specific Message Attributes (ASMA) are for. Please check my Wiki here for an overview of possible methods to dynamically assign the file receiver name:
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407
I think you will find options #2 and #3 particularly interesting ("Variable Substitution" and "Adapter-Specific Message Attributes and Dynamic Configuration"). Also, the examples in this Wiki include the source code for the Dynamic Conf UDF.
Hope this helps,
Greg
Dear Sam,
>>> is that KUNNR is refered as variablePart in the code?
Whatever you put as an inbound parameter for the setFileName function, will be available inside the UDF as the variablePart.
>>> What's the resulting Number field, does it shd be part of the target structure ?
Actually it depends on requirement. It can be, but it doesn't have to. In my example scenario it was transfered do some target field, but in your case you can do it as you wish.
>>> What's the node in between UDF and Number ?
That is also an UDF that I required to meet my requirement.
All in all - do not focus on the things other than setFileName function of my example in Wiki, they do not really matter. Simply adjust the UDF to your scenario if required, and you're done
Hope this helps,
Greg
tick the option of Adapter specific msg attributes and tick filename option in it.
in UDF, using dyanamic configuration code, set filename as you want. Call this UDF in your msg mapping.
Then in comm channel, the filename you specify in filename field becomes of no use, as the filename is determined by UDF code, but you need to specify a filename in filename field to activate your comm channel as filename field is a mandatory field in file comm channel configuration.
Hi SAM,.
refer below my blog
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There is file construction mode in receiver channel called Add counter, if you are using NFS mode. Check help link below:
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm
Also follow these links:
http://scn.sap.com/thread/1477397
http://scn.sap.com/thread/1193038
http://scn.sap.com/thread/1587923
-Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use some database table for the number sequence. Do lookup during mapping time to find the sequence and update it. Since pi does not do persistence, this is one possible solution. Plus using dynamic configuration you can create the file number sequence using the look up method mentioned above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.