How to generate a empty file in AL11 using ABAP and unix command

Hi Experts,
when load infopackage triggers it will search file from AL11 if file is available it will get loaded successfully.  When there is no file in AL11 error while opening file (orgin A) and the load will fail.  At this level i have to write a abap code using unix command to generate a empty file.
Is there any way to achieve the above requirement.
Thanks
Vara

Hi,
If i get your requirement properly then you want to create a blank file if there is no file on the application server so that your infopackage does not fail, am i correct.
If this is your requirement then this can be easily done if you use process chain to load the file via infopackage. Follow the following steps:
1. Add a ABAP program before the infopackage and check if the file is present on the server or not. Use a simple ABAP statement OPEN DATASET <FNAME>. Check the SY-SUBRC after this statement if it is not 0 then it means that the file does not exist on the application server.
2. Once you have established that the file is not present create a flat file using a code similar to the below one
OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE
                      MESSAGE D_MSG_TEXT.
IF SY-SUBRC NE 0.
  WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
  EXIT.
ENDIF.
* Transferring Data
LOOP AT INT_table.
  TRANSFER INT_table-field1 TO FILENAME.
ENDLOOP.
* Closing the File
CLOSE DATASET FILENAME.
3. Add your infopackage step after this ABAP program in your process chain.
I hope this helps.
Best Regards,
Kush Kashyap

Similar Messages

  • How to restore backed up files after I used Rescue and Recovery

    Hi there lenovo community,
    so I'm struggling to find a solution on how to open these files right here:
    Link to image
    First of all, the program I used to back up my hard drive was the Rescue and Recovery that my lenovo desktop came with. I used an external hard drive (WD My Passport, specifically) to back up my old hard drive. The problem that I'm facing right now is how I can open these files, they seem to be not working with any of the option programs the "open with" thingy offers me. If anyone knows  an easy solution for this please please respond to me immediately.. I would really really appreciate it.  I have important documents there.  
    Thanks,
    Enrico
    Moderator note: large image(s) converted to link(s):  About Posting Pictures In The Forums

    Hello CP101, It seems this file extention is a priority file format.
    Here  is a link that has some information on how to resolve the issue.
    I would suggest reading all the suggestions, as some have different methods for resolving this issue.
    Please click the White Kudos star on the left, to say thanks.
    Please mark Accept As Solution if it solves your problem.

  • How can I import eex files into Applications EUL from the unix command line

    How can I import *.eex and *.dis files into an Applications EUL from the unix command line?
    Thanks

    Hi
    The simple answer is you either have to use the client tool DIS51ADM to import files using the command line (Discoverer Admin is a windows only client tool), or the Java command line which needs a browser.
    In theory if you have a browser running on your Unix box you may be able to use the Java command line to make this work.
    Best wishes
    Michael

  • How to generate an XML file for an animation of IK armature

    Can someone please tell me how to generate an XML file for an animation of IK armature.
    I have a 5 keyframe/16 frame animation of a human character made up of a series of moveiclip symbols that is animated with an IK armature.  I need the XML information from the animation. 
    When I go to Commands > Export Motion XML I get the error message "There is more than one object on frame 1" and then nothing happens.
    Thank you,
    c

    I hope that's not the case.  I want to write to adobe about it.  I think it's a great feature and it functions really well even though it is not a very developed IK tool.  My biggest issue with it is ouput options and integration with motion tweens.
    I have seen a lot of examples of animators using it online, just no one talked about output.  I just feel it hasn't been developed.  It can generate a sprite sheet but only for a single pose frame of the animation, and not all the key frames or pose tweens.  I find that functionality quite odd, as if adobe just forgot about IK when added in sprite sheets, etc. and the reason it half works is just an accident.

  • How To Generate Debug Log Files for ebs jsp?

    hi   How To Generate Debug Log Files for ebs r12 jsp?
    and where i get the log .please help me thanks!

    Please check following MOS Document
    Oracle Application Server Diagnostic Tools and Log Files in Applications Release 12 (Doc ID 454178.1)

  • How to generate dynamic param file

    Hi, Can anyone please tell me how to generate dynamic parameter file from a table. Table has following structure: create table parameter_temp{Folder_name ,Workflow_name,session_name,parameter_name,parameter value} This table stores all the parameters for all the workflows. How can I generate parameter file for specific session or workflow. Thanks,

    Hi All, I have a scenario to implement.Need urgent help. I have relational source which has below fields. ID,Account,AccountType,Balance1,1001,GL,46567.901,1002,SL,56889.971,1003,Equity,45543.9081,1004,GL,89.541,1005,SL,-56889.971,1006,Equity,-45543.9081,1007,SL,-42777.45  Here my first requiremnt is to check if the balance value for entire file is 0 and if balance amount for each AccoutType is 0 , if both condtionn satifies the flow will go , else load will fail. I tried in below approach. SQ >> Expression >> Aggregator  In aggregaor i have first calculated sum(balance) for entire file by group by on ID column in an aggregator , and keep actual data in expression transformation. Then i took an expression to connect actual data with the sum(balance) , since i need to perform further calculation.I tried connecting expression and aggregator , but it is not allowing me to connect the posrts. And if i am using a joiner , then wrong data is loading to target. It is joining each result of aggregator with actual ports in expression.   I am not sure how to handle this scenario, so that we can just calculate sum of entire file and sum on basis of account type , is both sum are 0 then load the target , else fail.

  • How to generate .SQL format file from oracle database?

    How to generate .SQL format file from oracle database?
    I have a database of Oracle 8.1.6,now want to generate script file (including table structure,index,etc.) from it,What should I do?
    Thanks.

    Your question pertains to the Database Export/Import. This forum exclusively focusses on the export/import utilities that come along with "Oracle Portal" which is a web-based tool. Could you please post your question under the RDBMS export/import or migration forum.

  • How to upload a text file from a shared folder and provide an o/p

    how to upload a text file from a shared folder and provide an o/p  containing the details in each order in the text file

    Hi,
    Use <b>GUI_UPLOAD</b> to upload a text file from a shared folder.
    Use <b>GUI_DOWNLOAD</b> to download data in a file on the presentation server or use <b>OPEN DATASET, TRANSFER</b> and <b>CLOSE DATASET</b> statements to download data to the application server.
    Now, I hope the code for data fetching, if required, is already present in the report.
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • I bought a mac air retina to replace a mac pro. How can I get all files of the back up and copy them to the new mac?

    I bought a mac air retina to replace a mac pro. How can I get all files of the back up and copy them to the new mac?

    Mail window may be in the Full Screen mode.
    Move the mouse pointer to the top right corner of the Mail window and hold it there.
    Menu bar should drop down and click the blue double arrow icon.
    Full Screen toggle shortcut:  control + command + F

  • How to get the owner name for the file in ftp using abap ?

    Hi folks ,
    How to get the owner name for the file in ftp using abap ? please help me very ugernt . I tried with all standard FTP commands
    but doest work out me . Helping in this regard highly appreciated ...
    Thanks and regards,
    Swarupa Vanarchi

    Hi
    dont you  have used the os user while calling the FTP_CONNECT FM?
    Hope you are not talking about the user executing the FTP program.
    Else If you are talking about the FTP file creator then its not related to abap as you can handle it by maintaining the user in file name itself.
    May be i am going too far with if and elses here as your question possesses no  clarity.
    Plz elaborate your requirement  before anybody can help.
    Regards
    sateesh

  • How can I convert .pdf file to .doc using the free adobe reader app? when I try to convert the .pdf file it asks me to sign in. when I click on "sign in", I am taken to a service subscription page. So, no free conversions using free adobe reader app?

    how can I convert .pdf file to .doc using the free adobe reader app? when I try to convert the .pdf file it asks me to sign in. when I click on "sign in", I am taken to a service subscription page. So, no free conversions using free adobe reader app?

    As has been mentioned Adobe Reader cannot export PDF page content. Nor can it create PDF or manipulate PDF page content.
    What you can do is use one of Adobe's online subscription services. Two provide for PDF  to Word export.
    There's ExportPDF and PDF Pack.
    Be well...

  • How to generate a chirp(linear FM) signal using dds theory in LabVIEW FPGA.

    how to generate a chirp(linear FM) signal using dds theory in LabVIEW FPGA.
    attachment:a sine signal using dds theory. Hope to get some help. Thanks!
    Attachments:
    FPGA DDS SineGen IP.vi ‏42 KB

    you need to increment the "accumulator increment" during the duration of the chirp.  the "accumulator increment" controls the frequency of the DDS cycle.  by increasing it's value, you are increasing the frequency.  the math for increment values follows the same math as determining the frequency to increment value.
    Stu McFarlane
    Viewpoint Systems, Inc.

  • "dtutil", how to tell which configuration file for packages using after deployment?

    Hello All, 
    Trying to achieve this feature, 
    Using DOS command to automatic my deployment process--glad I found dtutil. However, it doesnt give you any chance to identify which configuration file to be used by SSIS packages after deployment.
    Deployment Method: file deployment
    Configuration sued: XML file and SQL Table. IN XML file, it tells which DB connection for packages to look up the configuration table.
    Who can share some thoughts on this?
    Derek

    It is NOT about sequence.
    It is about how to point which configuration file to be used by deployed packages as during the "dtutil.exe"
    deployment, you dont have chance to identify which physical location confg files to be used.
    Derek
    That you do only at the time of execution of packages. By default it uses configuration settings created at design time within the package. If you want to override it, you can use \Configfile switch of dtexec for that. You can also set explicit values for
    properties using /SET switch
    http://technet.microsoft.com/en-us/library/ms162810(v=sql.105).aspx
    See this to understand how configs are applied in runtime
    http://technet.microsoft.com/en-us/library/ms141682(v=sql.105).aspx
    and this to understand behaviour difference in ssis 2008 
    http://technet.microsoft.com/en-us/library/bb500430(v=sql.105).aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How can I change the file download time using Adobe Send? Adobe SendNow had a lot more options.

    How can I change the file download time using Adobe Send? Adobe SendNow had a lot more options.I don't see nay with Adobe Send.

    There isn't a feature in Adobe Send for setting and end-date for a file's availability. At any time, you can Unshare the file, however.

  • How to generate an OUTBOUND INVOICE IDOC from the ABAP Program?

    How to generate an OUTBOUND INVOICE IDOC from the ABAP Program? Any Function Module that can be used for this?

    Hi
    This is more of configuration
    (1) Create a Output type with Medium 6 ( Check with your functional consultant)
    (2) Maintain Partner Profiles using WE20 transaction
           Idoc type - INVOIC02
           Message type - INVOIC
           Process Code - SD09
    Regards
    Madhan D

Maybe you are looking for

  • What's wrong with 7.6 firmware?

    My Time Capsule was unreachable from my computers after installing the new firmware 7.6 a few weeks ago. I downgraded today back to 7.5.2 and everything is fine again. What's wrong with this firmware and why hasn't Apple realized that it's causing pr

  • Letter Of Credit Thru GTS

    Hello Guru's: 1. Can anyone give me a over view of Business Process specific for LOC from Export and Import side? 2. How can it be handled thru SAP GTS and SAP ECC? Thanks

  • Firewire drives not working in Audition 3

    We have Audition v3 installed on some XP machines.  We've recently switched out our external USB CD drives and installed new firewire drives and are now unable to use the 'extract audio from CD' option.  The drive shows up in the list of drives but w

  • Tax jurisdiction

    Hi All, I would like know if given county has more than one tax jurisdiction and if more than one Tax jurisdiction  available for a county, i would like to display them. I have tried with function module TAX_TXJCD_GET_EX_JURCODE_LIST but i was unsucc

  • Two Network : Ethernet and Wifi

    Hello I'm connect at two sort of network : 1- Ethernet 2- Wifi When i connect to my network, with ftp client, the soft take by default the Ethernet Netword. How do forced my FTP client or other soft to take the wifi Network by default ? Thank you