Seqence number in an outbound file

Hi experts
I would like to send a sequence number in a file name and use the code below.
DATA: bla, bla, bla
selection-screen begin of block blk1 with frame title text-001.
parameters: P_FILE type string obligatory lower case.
selection-screen end of block blk1.
CALL FUNCTION 'NUMBER_GET_NEXT_SOP'
   EXEPTION
     nrrangenr              = NUMBERRANGENUMBER
     object                    = 'ZHR_SEQNR'
     quantity                 = '1'
    mandt                     = SY-MANDT
  IMPORTING
     number                  = ZSEQNR
CONCATENATE '/usr/sap/' zseqnr '_' sy-datum '.txt' into p_file.
select * from ..............
The parameters should look like /usr/sap/0000000001_20100511.txt but it looks like this /usr/sap/_20100511.txt
If i call the function modul above, further down, after i have done all the selections i get the sequence number but then it is to late, the parameter has already been set.
Anyone having any idea  //  Peter B

Hi,
I simulated your code with some changes & working properly
selection-screen begin of block blk1 with frame title text-001.
parameters: p_file type char256 obligatory lower case.
selection-screen end of block blk1.
data zseqnr(10) type n.
initialization. "You should put this piece of code at initialization event
  call function 'NUMBER_GET_NEXT_SOP'
    exporting
      nr_range_nr = '01'
      object      = 'ZTEST'             
      quantity    = '1'
      mandt       = sy-mandt
    importing
      number      = zseqnr.
  concatenate '/usr/sap/' zseqnr '_' sy-datum '.txt'    into   p_file.
start-of-selection.
  write :/ p_file.
Regards
Vinod

Similar Messages

  • Outbound File Adaper : Dynamic configuration of FileSize and number of msg

    I want to configure dynamically following parameters of Outbound file adapter
    1) Number of Message equals
    2)Elapsed time exceeds
    3)File size exceeds
    If we set all those parameter at designtime then automatically it stored at adapter.wsdl file but how can I change those parameter at runtime.
    Let me know regarding this.
    Thanks in Advance

    Noway.
    Only statically. Stop adapter, change in manually and restart adapter.
    Or write your own adapter in java.
    Or create several adapters with different configuration and pick appropriate adapter dynamically.

  • TargetFilename in the Outbound File Adapter

    Hi all,
    I have created an interface that sends projects form SAP PS (by tRFC) to a file directory (using an outbound file adapter). Each project is created as a individual file. All this works well, but the filenames created for the files are not very intuitive for the users looking at the files at the receiver point since there are quite a lot of similar files only distinguished from each other by a timestamp (usualy only separated by milliseconds).
    Is there a way to make the file adapter append data from one XML tag in the file name? I.e:
    file.TargetFilename='<project></project>'.txt
    file.writeMode=addTimeStamp
    giving i.e a file '1234567_timestamp.txt'
    This way I can include i.e. the project number + timestamp as filename making it user friendly for the people using the files.
    Any suggestions will be appreciated.
    Best Regards
    Odd Hilt

    HI
    Read the file without using key field. Just define the FCC parameters Header and Items PI will pick the file.
    DT_Source
       Record
         Header 0..1
           PO_Number String 0..1
         Items  0..unbounded
           Items String 0..1
    Do the FCC
    Header.fieldnames PO_Number
    other config for Header
    Items.fieldnames Items
    other config for items
    Thanks
    Gaurav
    Edited by: Gaurav Bhargava on Nov 12, 2008 10:27 AM
    Edited by: Gaurav Bhargava on Nov 12, 2008 10:27 AM

  • About EDI outbound file name

    Hi Anuj,
    When I test EDI X12 834 outbound, the file generated is in the format %From_party%_%unique_id%.dat. I am not sure the unique_id is message ID or transaction control number, anyway it is a timestamp unique.
    My question is can I specify outbound file name format? File name convention is recently proposed. It is not compliant with the default outbound file name.
    Thank you,
    Alena
    CGI

    Hello Sir,
    Thank you for reading my thread.
    Yes, we have worked on edi 834 and completed a few different transactions with people's support in this forum. Now I am glad to help other people on this.
    1. Is HCA Adapter required for EDI 834?
    HCA is not required for EDI 834. There are a couple threads discussed this in the forum. You can search Anuj's comments regarding this. See the the link. Oracle B2B is the right solution.
    https://forums.oracle.com/thread/2551859
    2. Any Healthcare Libraries?
    If you are encountering B2B validation problem, you need to install Healthcare Library. But your problem has nothing to do with that. If you don't install the healthcare library, you still can do everything except B2B validation.
    3. Any patches
    If you are running SOA Suite 11.1.1.6.0, you need to install Health Care Patch to fix B2B validation problem. That is a bug.
    If you are running SOA Suite 11.1.1.7.9, you need to install HealthCare Library to fix B2B validation problem. It is the same bug.
    4. Any other??
    If you are using Oracle B2B, you need to active B2B ui project. It has already deployed on Weblogic server, but you need to activate it. You should be able to access B2B via:
    http://localhost:7001/b2bconsole or: http://localhost:7101/b2bconsole
    5. Any special care while generating .ecs,xsd,.dazt from doc editor???
    I don't need .dazt.  You need ecs and xsd for B2B configuration. I disabled a couple validation rules to meet our business requirements. You may not need to.
    For your particular problem, as the error message says "it can't find the agreement for the trading partners. B2B needs three information to identify the agreement. The document type (here it is 820 or 834), From TP, and To TP. If these three things meet, then B2B should be able to find it.
    Let me know how are you doing after you check these things.
    Alena Li

  • I recently uploaded 10.8, but I have a number of VALUABLE old files which I can no longer read because "power PC applications are no longer supported.  How can I retrieve them?

    I recently uploaded 10.8, but I have a number of VALUABLE old files which I can no longer read because "power PC applications are no longer supported.  How can I retrieve them"?

    Here is a post I assembled for another with a similar problem:
    Unfortunately you got caught up in the minor miracle of Rosetta.  Originally licensed by Apple when it migrated from the PowerPC CPU platform that it had used from the mid-1990's until the Intel CPU platform in 2006, Rosetta allowed Mac users to continue to use their library of PPC software transparently in emulation.
    However, Apple's license to continue to use this technology expired with new releases of OS X commencing with Lion (and now Mountain Lion).  While educational efforts have been made over the last 6 years, the fact is that Rosetta was SO successful that many users were caught unaware UNTIL they upgraded to Lion or Mountain Lion.
    Workarounds:
    1. If your Mac will support it, restore OS X Snow Leopard;
    2.  If your Mac will support it, partition your hard drive or add an external hard drive and install Snow Leopard into it and use the "dual-boot" method to choose between your PPC software or Lion/Mt. Lion;
    3. Upgrade to an Intel compatible versions of your software, or find alternatives that will open your data files;
    3.  Install Snow Leopard (with Rosetta) into Parallels:
                                  [click on image to enlarge]
    Full Snow Leopard installation instructions here:
    http://forums.macrumors.com/showthread.php?t=1365439
    NOTE: STEP ONE of the instructions must currently be completed on a Snow Leopard or Lion Mac and the resulting modified Snow Leopard.cdr install file can then be moved over to your Mountain Lion Mac for completion of the remaining steps.
    NOTE 2:  Computer games with complex, 3D or fast motion graphics make not work well or at all in virtualization.

  • Dynamic file names in outbound file adapter

    I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
    Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
    Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
    I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem.

    I have to configure a flow in XI system wich takes an input file from one machine and after mapping process leaves the output file in target machine with the same name of input file.
    Name of input file won't be always the same (*.dat) so i cannot hardcode this name in outbound file adapter.
    Does anyone know how to transfer input filename from inbound file adapter to XI message and then to outbound file adapter?
    I know there is an option to create dynamic file names in file adapter but i think it isn't enought to solve my problem.

  • Get the filename after an outbound file adapter operation

    Hello,
    I am calling an outbound file adapter operation in BPEL (10.1.3.3) - using a filename mask with a sequence (i.e. po_%SEQ%.xml). I would like to provide the filename created at run-time (i.e. po_123.xml) to my BPEL process so I can send this in an e-mail. Is this possible?
    Thanks in advance!
    Rod
    Message was edited by: Rod - fixed a typo
    Rod Tunnels

    Well, I took a different approach - which looks like it will work. Instead of letting the adapter decide the filename - I'm generating that in BPEL and passing that to the adapter using the header variable. So ... nevermind. ;-)

  • Serial number adobe has on file for me for my Adobe Acrobat 9 pro is not working

    I lost the installation disc for my long time love Acrobat 9 pro.  I checked with adobe and the serial number they have on file for me is not working on my downloaded version of 9 pro.  I have a running copy of the software on another machine.
    How can I solve this problem?

    start here, http://helpx.adobe.com/creative-suite/kb/error-serial-number-valid-product.html
    if that info fails to resolve the problem, contact adobe support  https://helpx.adobe.com/contact.html

  • How to change namespace in outbound file

    Hi,
    When I creates a outbound file using file adapter, BPEL or jDeveloper creates a file with its own namwspace like ns1: or ns15: or so on... But if I want to change it to my own tag say like tns: or its:, is it possible?
    example:
    the usual creation in BPEL:
    <?xml version="1.0" ?><ProvisionsInterface xmlns:ns1="http://www.mycomapny.com/ns/company/payments" xmlns="http://www.mycomapny.com/ns/company/payments">
    <ns1:Provider>
    <ns1:Id>1909909</ns1:Id>
    <ns1:Name>BASSETTS</ns1:Name>
    <ns1:Addr1>1 High Street</ns1:Addr1>
    I want to change it to:
    <?xml version="1.0" ?><ProvisionsInterface xmlns:tns="http://www.mycomapny.com/ns/company/payments" xmlns="http://www.mycomapny.com/ns/company/payments">
    <tns:Provider>
    <tns:Id>1909909</tns:Id>
    <tns:Name>BASSETTS</tns:Name>
    <tns:Addr1>1 High Street</tns:Addr1>
    Any idea, plase advice.
    Regards,
    Sreejit

    Hi,
    Thanks for reply.
    Actullay the requirement is that the target system doesn't want any namespace tag in front of the elements.
    I have got the answer and created a wrapper xsd, by which you can change or remove the namespace from the output file.
    example:
    <?xml version="1.0" encoding="utf-8" ?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.mycompany.com/ns/suppliers" <!-- target namespace from actual xsd -->
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="DTD">
    <include schemaLocation="NameOfActualSchema.xsd"/>
    </schema>
    Regards,
    Sreejit

  • Append functionality in Outbound File Adapter

    Hi all,
    I have a question regarding append functionality in outbound file adapter.
    When I append files for example I get a XML file with different XML files in one file, but is it also possible to collect and bundle the files and get a same result when u use BPM?
    Do I have to add some parameters?
    Kind regards,
    Kamran Vakili

    It is not possible, when you append XML files.
    The result XML file is not valid, as you have multiple declarations and root tags.
    The append mode for the file adapter should be used only for flat files.
    Regards
    Stefan

  • OutBound File Adapter Issue

    Hi,
    I need some help in configuring file adapters:
    Process: I have a inbound adapter where i am feeding 4000 - 5000 rows of data from a flat file. I use these records to query a database and get response. I have a outbound file adapter where I write database response to a file.
    Problem: I have set the, write new file to 100 records. But if there are 3950 records going to outbound file adapter, It is only writing 3900 records in the output file directory.
    I need to write all records to the file. Please help me achieve this.
    Thank You
    Anil

    Hi,
    the batching criteria (100) is not met.
    You could improve the bahaviour by setting "Elapsed Time Exceeds" parameter, but still, there are some probs because critaria is only evaluated on invocation (anyone has an answer to that?!):
    from Doc:
    Elapsed Time Exceeds: Specify a time which, when exceeded, causes a new outgoing file to be created.
    Note:
    The Elapsed Time Exceeds batching criteria is evaluated and a new outgoing file is created, only when an invocation happens.
    For example, if you specify that elapsed time exceeds 15 seconds, then the first message that is received is not written out, even after 15 seconds, as batching conditions are not valid. If a second message is received, then batching conditions become valid for the first one, and an output file is created when the elapsed time exceeds 15 seconds.

  • Changing a number in an excel file that has been changed to a PDF

    Changing a number in an excel file that has been changed to a PD ?

    Hi llkwx,
    I would like to confirm ,do you want to change the page number of the PDF  or any other number in the data given in that PDF?
    For changing the page number display
    You can select Page Thumbnail option from the left hand side .In that panel ,right click and select the option "Number Pages" from the drop down menu.You can further change the page numbers as per your requirement.
    Adding page numbers to PDF
    Tools>Pages>Edit Page Design>Header and Footer>Add Header and Footer>click Insert Page Number
    Do write us back with your response .We will be glad to help you out with your queries.
    Regards
    Sukrit Dhingra

  • How write the Outbound file name in the Inbound file

    Friends,
    I have a scenario like this.
    Outbout filename - sample.txt
    In sample.txt, i have having data like 20
    Inbound filename - vivek.txt
    i need data the like sample, 20
    (NOTE: sample is the outbound file)
    How to get this scenario.
    Thanks in advance.
    regards,
    Vivek.

    Hi Vivek,
      If your PI is of SP14 and more you have an option called Adapter Specific Message Attributes.(ASMA) in communicatoin channel configurtaion, Which will help you in capturing the Sender file name during runtime.
    So you will have to enable that option (ASMA) in Commchannel and capture file name  in UDF using Java Code with the help of sap related API and map it to the target field which u would like to get populated.
    follow the thread it has the discussion about acessing the Source file name.
       Re: Getting file directory using dynamic configuration:Code needed
    Thanks,
    Ram.

  • Failed to start essbase process:  number of back up files exceeds limit

    Can someone help to take a look at this?
    More details is logged in bug 11887650
    Failed to start essbase process, message in log file:
    11/03/18 11:44:10 Start process
    Info: Essbase is reducing the number of soft file descriptors because the 32K limit has been exceeded. Exceeding the limit may significantly increase application load time.
    Environment variable [HYPERION_LOGHOME] is set - use it to define Log location folder.
    Log location is [u01/APPLTOP/instance/BIInstance/diagnostics/logs/Essbase/essbaseserver3/essbase].
    ODL log location is [u01/APPLTOP/instance/BIInstance/diagnostics/logs/Essbase/essbaseserver3/agent-log].
    [Fri Mar 18 11:44:10 2011]Local/ESSBASE0///4072736080/Warning(1056807)
    The number of back up files found on disk (40) exceeds the configured limit which is 2
    [Fri Mar 18 11:44:10 2011]Local/ESSBASE0///4072736080/Info(1051283)
    Retrieving License Information Please Wait...
    [Fri Mar 18 11:44:10 2011]Local/ESSBASE0///4072736080/Info(1051286)
    License information retrieved.
    65535 Essbase user 65535 Planning user system
    Logging configuration class "oracle.core.ojdl.logging.LoggingConfiguration" failed
    oracle.core.ojdl.logging.LoggingConfigurationException: ODL-52050: unable to process file '/u01/APPLTOP/instance/BIInstance/Essbase/essbaseserver3/bin/logging.xml', XML parse exception (line: 5, column: 38): org.xml.sax.SAXParseException: Attribute "class" is required and must be specified for element type "log_handler".
    Mar 18, 2011 11:44:14 AM oracle.security.jps.az.internal.common.scanner.PolicyChangeScannerThread run
    INFO: Policy store cleanup thread started.
    Mar 18, 2011 11:44:14 AM
    INFO: EPMCSS-CSS Fusion system initialized successfully. : [2724 ms]
    [Fri Mar 18 11:44:14 2011]Local/ESSBASE0///4072736080/Info(1051199)
    Single Sign-On Initialization Succeeded !
    [Fri Mar 18 11:44:14 2011]Local/ESSBASE0///4072736080/Info(1051639)
    Info: Essbase is reducing the number of soft file descriptors because the 32K limit has been exceeded. Exceeding the limit may significantly increase application load time.
    Essbase 64-bit - Release 11.1.2 (ESB11.1.2.1.0B154)

    I am an infrastructure idiot (I have all kinds of other idiocy available as well -- I am versatile), but I found:
    http://troubleshooot.wordpress.com/2010/05/26/essbase-login-is-not-working/
    To my ignorant eyes, this looks like some kind of *nix-centric issue.
    If the post doesn't help, perhaps one of the infrastructure guys will chime in.
    Regards,
    Cameron Lackpour

  • Error while batching outbound files in b2b

    Hi,
    i am trying to batch the 1-n outbound files of for a specific Trading Partner and doc type.
    i refered this.
    http://download.oracle.com/docs/cd/B14099_19/integrate.1012/b19370/edi_batch.htm
    but while i am runnin this it is just saying wait batch state in b2b.
    can anyoone help me on this ???
    anew

    Hi Anuj,
    thanks i got is working
    actually i was refering Orcale EDI book there it is mentioned that for batching we use like
    insert into b2b_batch_event values(sys_guid(),to_date('WED 16-JUN-2010 15:00:00','Dy DD-Mon-YYYY HH24:MI:SS'),60,'Test','ORDERS','D96A',1,1,1,'EFT_ONE_TP',null,null,null,null)
    for EDIFACT messages.
    but at batch time it was just showing wait batch ...doing nothing
    i changed it to
    insert into b2b_batch_event values(sys_guid(),to_date('MON 28-JUN-2010 9:00:00','Dy DD-Mon-YYYY HH24:MI:SS'),60,'Test','ORDERS','D96A',1,1,1,null,null,null,null,null)
    then i got it working
    thanks for you help.
    Br,
    anew
    Edited by: anew on Jun 29, 2010 4:30 AM

Maybe you are looking for

  • Error Reading from a File

    Right now i am coding a game and i need to read from a text file to load the map. The only problem is that i cant do this in internet exploerer because i get an error saying that access is denied. I've been researchign the problem nonstop and the onl

  • Iisforward iisproxy error

    Hi, I have installed and configured the iisforward/iisproxy plugin with IIS 6.0 + WLS 8.1 SP5. iisproxy.ini [CONTENT]: WebLogicHost=10.20.140.34 WebLogicPort=8010 Debug=ON DebugConfigInfo=ON WlForwardPath=/portal I tried to load the page but nothing

  • My Ipad2 and Iphone4 won't accept updates.  How do I fix this?

    My Ipad2 and Iphone4 won't accept updates.  How do I fix this?

  • NIC Teaming with CSS

    Hi Gilles, Is NIC teaming supported with CSS? How can I load balance two servers with each server having two NIC and using NIC teaming. Thanks Sushil

  • Cannot open PDF file with name "CRB"

    I updated Acrobat Reader to X version on my laptop recently and found something wired. When I tried to open some PDF file including name "CRB" (either the folder path or file name), some error appeared said "Before proceeding you must first launch Ad