No records in source

Hi Ipsita, Instead of the below. Use if [ -z filename ] if [ `ls -l $SOURCE_FILE | awk '{print NR}'` -eq 0 ] Let me know what you find? Thanks,Deeshan

Hi All,  I am new to unix . I have a requirement of sending a mail to customer if source file is having zerro records. My source is flat flle and we are processing it in Informatica. I have added a command task before the actual session which will call a shell scrpt which will find is the source is containing 0 recordd or not. If yes then fail the command task by exit 1.  But i have tried with empty source file , still the command task is running successful . Below is my scrpit.  #!/usr/bin/ksh
# checks whether file is containing data or notSOURCE_DIR=Informatica/Script
SOURCE_FILE=$SOURCE_DIR"/RRS.txt" if [ `ls -l $SOURCE_FILE | awk '{print NR}'` -eq 0 ]
then
echo "Hi Team, There is no data extracted from source.Please place the correct file." | mailx -s "No data in Source" [email protected]
exit 1
else
exit 0
fi  Please let me know if it is correct or not. Or any other approach.

Similar Messages

  • DTP does not fetch all records from Source, fetches only records in First Data Package.

    Fellas,
    I have a scenario in my BW system, where I pull data from a source using a Direct Access DTP. (Does not extract from PSA, extracts from Source)
    The Source is a table from the Oracle DB and using a datasource and a Direct Access DTP, I pull data from this table into my BW Infocube.
    The DTP's package size has been set to 100,000 and whenever this load is triggered, a lot of data records from the source table are fetched in various Data packages. This has been working fine and works fine now as well.
    But, very rarely, the DTP fetches 100,000 records in the first data package and fails to pull the remaining data records from source.
    It ends, with this message "No more data records found" even though we have records waiting to be pulled. This DTP in the process chain does not even fail and continues to the next step with a "Green" Status.
    Have you faced a similar situation in any of your systems?  What is the cause?  How can this be fixed?
    Thanks in advance for your help.
    Cheers
    Shiva

    Hello Raman & KV,
    Thanks for your Suggestions.
    Unfortunately, I would not be able to implement any of your suggestions because, I m not allowed to change the DTP Settings.
    So, I m working on finding the root cause of this issue and came across a SAP Note - 1506944 - Only one package is always extracted during direct access , which says this is a Program Error.
    Hence, i m checking more with SAP on this and will share their insights once i hear back from them.
    Cheers
    Shiva

  • BRFplus and creation of info record and source list

    Hi there.
    I would like to use BRFplus to fill out MM values and after that automaticly create info record and source list for this MM record. The first step is ok, but creating IR and Sourcelist I am not sure. What is the best way to do so?
    -> Calling FM? If so how should I use the Result Data Object and Dispatcher field in BRFplus?
    Thanks in advance.
    Per Zanchetta

    Hi,
    Yes could call FM using BRF+ Procedure Call-Function Module. And map the exporting parameter (results of FM) to BRF+ ruleset parameter and do the further processing.
    When you assign FM name then in below container UI you can add all required parameters using "Add Parameter" button.
    regards Tiwari

  • Info record and source list mandatory for PO creation?

    Hi Gurus,
    Client wants to make Info record and source list mandatory for PO creation?
    If Inforec and source list not available for that material, then user can't able to create PO.
    How can I achieve this requirement?
    Any user exit available?
    pls help..

    Hi ,
    SproMM-Purchasing -Source ListDefine Source List Requirement at Plant Level
    If u mark the indicator then the Source list is mandatory for all the materials procured.
    If u want for a speciic material , mark it in purchasing view of Material Master.
    Inorder to create a source list , inforecord is mandatory -- this is by default Standard SAP .
    Regards
    Ramesh Ch

  • Different number of data records in source system and BI system

    Hi all,
    I have been using datasources 0HR_PA_0 and 0HR_PA_1.
    When I run and check the records in source system via RSA3 there are 4893 and 360 records respectively.
    When I extract the records into my 0PA_C01 cube, however, 3058 and 249 records are coming respectively.
    Furthermore, when I create a personnel record in source system, it is not extracted into BI cube.
    What may be the reason?
    I am looking forward to your suggestions.
    Regards,
    Dilek

    Srinath,
    I've created many new personnel records in source system and these records are displayed in the list of RSA3.
    However, these newly created records are not reflected in BI cube when I extract data via the specified datasources.
    I've checked whether there are some filters defined, however no filter seems to exist.
    By the way, I am using full upload; no delta!
    Regards,
    Dilek
    Edited by: Dilek Ersoz on Aug 14, 2009 1:45 PM

  • How to restrict the records in source qualifier?

    What is your source system?If it's Oracle, you could use the following trick:Wrap your original SQL query (which retrieves all the columns which you need plus "ROWNUM AS row_num") into a "common table expression" which returns records based on this "row_num", like this: SELECT a1, a2, a3,... an FROM(select *, rownum as row_num FROM tab1, tab2 WHERE...)WHERE row_num between 11 and 15 Other than that I would recommend you insert an Expression transformation into your mapping right after the Source Qualifier. Within this EXP, define a variable port "v_rownum" of type BigInt with this expression:  v_rownum + 1Then define an output port ROWNUM of type BigInt and set it to this expression:  v_rownumForward all the data from the SQ plus "ROWNUM" from the EXP into a Filter.Define two mapping parameters $$FIRST_ROW and $$LAST_ROW of type BigInt (if possible, I can't try myself at this moment).Set the Filter expression like this:  ROWNUM >= $$FIRST_ROW AND ROWNUM <= $$LAST_ROW This works for all sorts of source systems. Regards,Nico

    I Have loading 10 record on first run , inserted in DB,and again load 5 records in second run in this restrict the first 10 records in source qualifier and took only 5 records to the target?

  • Record External Source (bit/hz config?) Nothing But Static

    :Record External Source (bit/hz config?) Nothing But StaticY Okay - I'm ready to be mutilated for posting this, but I've searched for HOURS so feel free to talk to me like I'm a total noob/fi've year old (but a smart fi've year old).
    I just purchased the PCI Express X-Fi Xtreme Audio card am I am trying to record the audio from?an external source (my?DirecTV receiver.)? I have the optical cable directly connected from the receiver to the S/PDIF-IN and all other cables (HDMI) disconnected.
    A few questions:
    -Do the settings (control panel>sound>recording) for bit/hz have to match those of the Creative MediaSource?
    -Can you record directly from a DirecTV HD-DVR?
    I've tried a lot of different settings and all I get is NOTHING but white noise/static and?the pitch/rate varies depending on the settings I am using. I'm lost.

    >? <img align="top" width="577[/img] src="http://i44.tinypic.com/2d7zytk.jpg" alt="options" height="440">
    I am using console launcher and there you have to set your recording source.......do you see where I have hovered over the recording source where it gives me three choices? Here you can pick yours. If you have the wrong source you will get static. In your sound, recording properties, there you can set your default bitrate.
    If you have the wrong recording source, it will sound like white noise, or intermittant jibberish. I have never done a session of which you speak, but I am guessing when you have plugged in your digital satelite, you can try the "What U Hear"? feature to record sound to make sure your sound is being picked up on the PC. Then change your source to pull directly from the digital in.
    cheers,
    jmacguire

  • DTP Indicator Only Get Delta Once: How to handle deleted records in source

    Hi colleagues,
    I have checked some messages and blogs, but could not find any solution for deleted records in source system.
    My source system is not able to delivere delta for my table of interest. So I checked "Only Get Delta Once" in my DTP and made some tests.
    It works very well for changes of existing records of the source table.
    But, SAP help on this features wirtes:
    ...If this is not logically possible because, for example, data is deleted in the source without delivering reverse records, you can set this indicator and perform ...
    I checked this feature by selecting less data from source at the second load from the same table. But recordmode does not get an deletion flag for the now missing records. So, the indicator "Only Get Delta Once" does not work like BI standard delta mechanism?
    What is wrong?
    Thanks and regards,
    Wolfgang

    Hi,
    If you select the option 'Only get delta once', then every request in the PSA will only be loaded into the Data target once. For example. If you load a full request into the PSA through an InfoPackage and then load it to the Cube. In a snapshot scenario, when the new full load comes to the PSA you will need to delete the previous request from the cube before loading the new request.
    But if you delete the previous request from the cube, and not from the PSA - and if you haven't checked the 'Only get delta once' flag, when you execute the DTP, it will load both previous and the new requests from the PSA to the cube. In order to avoid this you have 2 options:
    1. You can delete a request from the PSA after every successful load into the Cube OR
    2. You can check the 'Only get delta once' flag in the DTP so that it won't load any request it has loaded into the cubes previously even if it was deleted from the cube.
    Using the second option de-couples the PSA maintenance from your regular data loading and also saves you an additional step of deleting the PSA request in your process chain.

  • How to restrict number of Data Records from Source system?

    Hi,
    How can I restrict the number of Data records from R3 source system that are being loaded into BI. For example I have 1000 source data records, but only wish to transfer the first 100. How can I achieve this? Is there some option in the DataSource definition or InfoPackage definition?
    Pls help,
    SD

    Hi SD,
    You can surely restrict the number of records, best and simplest way is, check which characteristics are present in selection screen of InfoPackage and check in R3, which characteristics if given a secection could fetch you the desired number of records. Use it as selection in InfoPackage.
    Regards,
    Pankaj

  • ORA-00001:Unique Constraint while inserting 2 similar records from source

    Hi,
    in TEST1 there are records:
    10 20 ABC
    10 20 DEF
    I amt trying to insert into TEST which has CODE as Primary Key.
    declare
    type cur is ref cursor;
    cur_t cur;
    type v_t is table of TEST%rowtype;
    tab v_t;
    v_act_cnt_str VARCHAR2(4000);
    v_act_cnt NUMBER:=0;
    BEGIN
    v_act_cnt_str:=' SELECT COUNT(*) '||' FROM TEST '||' WHERE '||'('||CODE||')'||' IN '||'('||'SELECT '||CODE||' FROM TEST1'||')';
    DBMS_OUTPUT.PUT_LINE('The Actual Count String is'||v_act_cnt_str);
    EXECUTE IMMEDIATE v_act_cnt_str INTO v_act_cnt;
    open cur_t for select * from TEST1 ORDER BY ROWNUM;
    loop
    fetch cur_t bulk collect into tab limit 10000;
    if v_act_cnt=0 THEN
    forall i in 1..tab.count
    insert into TEST values tab(i);
    commit;
    ELSE
    v_merge_act_str :=
    'MERGE INTO TEST '||
    ' DEST' || ' USING TEST1 '||
    ' SRC' || ' ON (' || DEST.CODE=SRC.CODE || ')' ||
    ' WHEN MATCHED THEN ';
    first_str := 'UPDATE ' || ' SET ' ||
    'DEST.NAME=SRC.NAME,DEST.DEPT_NAME=SRC.DEPT_NAME;
    execute immediate v_merge_act_str || first_str;
    v_merge_act_str := '';
    first_str := '';
    commit;
    END IF;
    end loop;
    END;
    ITS GIVING ERROR as:
    ORA-00001: unique constraint (PK_TEST1) violated
    Any help will be needful for me
    Edited by: user598986 on Sep 22, 2009 4:20 AM
    Edited by: user598986 on Sep 22, 2009 4:22 AM

    Your code makes absolutely no sense whatsover. The whole point of MERGE is that it allows us to conditionally apply records from a source table as inserts or updates to a target table. So why have you coded two separate statements? And why are you using such horrible dynamic SQL?
    Sorry to unload on you, but you seem to have your code unnecessarily complicated, and that it turn makes it unnecessarily harder to debug. As an added "bonus" this approach will also perform considerably slower than a single MERGE statement. SQL is all about set operations. Don't do anything procedurally which can be done in a set.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Fill Multiline container from multi records in source XML ?

    Hi,
    scenario: File-XI-RFC-File(BPM).
    Read company id from source file, call BAPI(company_get_detail) using RFC receiver adapter and then write response to another file.
    This works fine for one record(one RFC call to BAPI) using the BPM.
    Now, I would like to implement the process for multiple records using block(forEach) to make multiple RFC calls in BPM.
    <i>I understand that i have to create multiline container and map 1:n from input xml into that container.</i>  I need help here.
    BPM Steps:
    <b>Receive source file - fill multicontainer ?</b>
    Open block step (forEach)
       send sync RFC call
       save Response in another multiline container
    close block
    send step - write response to file(receiver)
    file structure:
    <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
       <DT_record>
          <companyID>000001</companyID>
       </DT_record>
       <DT_record>
          <companyID>000002</companyID>
       </DT_record>
    </ns0:MT_compRqst_multi>

    Hi -
    For your requirement, as Bill implied, you need a multi-mapping (Transformation step) that maps your single message with multiple records to multiple, <i>complete</i> messages with one record each. 
    To get you started, basically, for the multi-mapping, create a message mapping with your source and target MTs the same (as the one you posted).    Then in "Messages" tab, for your Target message, change the occurance to "0..unbounded".   Now if you go back to the "Design" tab, you see that both your source and target messages have a "Messages/Messages1" wrapper around them.  In the end, the target message would look like the following and would correspond to your multi-line container element:
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
        <ns0:Message1>
            <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
                <DT_record>
                    <companyID>000001</companyID>
                </DT_record>
            </ns0:MT_compRqst_multi>
            <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
                <DT_record>
                    <companyID>000002</companyID>
                </DT_record>
            </ns0:MT_compRqst_multi>
        </ns0:Message1>
    </ns0:Messages>
    You'll need further steps - Interface Mapping, ccBPM (Transformation step, adjusting your Block settings, container element for multi-line element, etc.).   There are some blogs on multi-mapping within ccBPM that will help you - just do a search.
    Note that if your scenario has a large number of records, this approach is not performance friendly.
    Regards,
    Jin

  • Info record and source list

    Hi
    We have two info records for one material and source list is not being maintained.
    What will be the implications in this scenario??
    Regards
    Chitra

    Hi,
    If two info. record exists and none of them are marked a fixed vendor, then at the time of PR creation you will be offered two sources for the material and you will have to manually choose one source.
    Hope this clears your doubt.
    Thanks,
    Reetesh

  • Makepkg: Record PKGBUILD sources in .PKGINFO files for maintenance

    To me, it seems like a good idea to record all the source files listed in PKGBUILD's to their accompanying .PKGINFO files; then, should the user have configured the $SRCDEST variable in his /etc/makepkg.conf, this would allow old source files to be (optionally) automatically removed when `pacman -Sc' is run, the package is upgraded, or uninstalled.  Such a feature would save (me) a lot of time and effort manually sorting through and cleaning them.
    Do you "concur"? ( )
    Of course, for this feature to be really useful, you would have to compile from source often.

    This script will parse all the PKGBUILD's in your $ABSROOT directory, collect all their sources into an array, and interactively remove each package NOT in the array from your $SRCDEST, although recording each pkg's source files into its .PKGINFO file would be SO much easier, faster, simpler, and safer (as no unwanted code -- such as little tid bits outside the build() method of PKGBUILD's -- is executed while the sources are being collected).
    #!/bin/bash
    . /etc/makepkg.conf
    . /etc/abs.conf
    if [[ "${SRCDEST}" != "" && "${ABSROOT}" != "" && -d "${SRCDEST}" && -d "${ABSROOT}" ]]; then
    # Holds the column width of the current terminal window
    COLS=$(tput cols)
    # Create an empty row of the width of the current terminal window
    #+ which will be used to erase the current row.
    for sp in $(seq $COLS); do
    empty_row="${empty_row} "
    done
    # Array to hold the sources
    sources=()
    # Array to hold the files to remove
    remove_files=()
    echo "Collecting sources..."
    for PKGBUILD in $(find "${ABSROOT}" -type f -name PKGBUILD); do
    echo -ne "${empty_row}\r${PKGBUILD:0:$COLS}\r"
    . "${PKGBUILD}" &> /dev/null # Silence is golden
    sources=(${sources[@]} ${source[@]##*/})
    done
    # Sort and prune the files
    sources=($(for src_file in ${sources[@]}; do echo "${src_file}"; done | sort | uniq))
    echo -e "${empty_row}\rExamining ${SRCDEST}..."
    for src_file in $(find "${SRCDEST}" -type f | sort); do
    # Show the status
    echo -ne "${empty_row}\r${src_file:0:$COLS}\r"
    # Copy the basename of the current source file for comparisons
    current=${src_file##*/}
    i=0
    j=${#sources[@]}
    k=$(( (i + j) / 2 ))
    # Perform a binary search for the current file
    for (( c = 0; c < ${#sources[@]}; c++ )); do
    let "k = (i + j) / 2"
    if [[ "${sources[k]}" < "${current}" ]]; then
    let "i = k + 1"
    elif [[ "${sources[k]}" > "${current}" ]]; then
    let "j = k - 1"
    else
    break
    fi
    done
    # If the file at ${sources[k]} isn't the one we're looking for,
    #+ check the element immediately before and after it.
    if [[ "${sources[k]}" < "${current}" ]]; then
    # Bash will let me slide when I try to print an element beyond its indices ...
    let "k += 1"
    elif [[ "${sources[k]}" > "${current}" && $k > 0 ]]; then
    # ... but complains when I try to print an element at an index < 0
    let "k -= 1"
    fi
    # If a match is not found ...
    if [[ "${sources[k]}" == "${current}" ]]; then
    # Since both arrays are sorted, I can remove all the elements
    #+ in ${sources[@]} up to index k.
    sources=(${sources[@]:k + 1})
    # Proceed to the next iteration
    continue
    fi
    # Else, add the file to the list of those to be removed
    remove_files=(${remove_files[@]} ${src_file})
    done
    echo -e "${empty_row}\rFound ${#remove_files[@]} files to remove:"
    if (( ${#remove_files[@]} )); then
    for index in $(seq ${#remove_files[@]}); do
    echo " ${index}) ${remove_files[index - 1]}"
    done
    echo -n | read # Clear the buffer (I had some issues)
    echo -n "Would you like to remove all these? [Y|n|c]"
    read ans # or `read -n 1 ans' if you prefer
    case "$ans" in
    ""|[Yy]|[Yy][Ee][Ss])
    for f2r in ${remove_files[@]}; do
    rm "$f2r" || echo "cannot remove $f2r"
    done
    [Cc]|[Cc][Hh][Oo][Ss][Ee])
    for f2r in ${remove_files[@]}; do
    echo -n "${f2r}? [Y|n] "
    echo -n | read # Clear the buffer, again
    read ans
    if [[ "$ans" == "" || "$ans" == [Yy] || "$ans" == [Yy][Ee][Ss] ]]; then
    rm "$f2r" || echo "cannot remove $f2r"
    fi
    done
    esac
    fi
    elif [[ "${SRCDEST}" == "" || ! -d "${SRCDEST}" ]]; then
    echo "Your \$SRCDEST variable is invalid" 1>&2
    echo "Be sure it's set correctly in your \`/etc/makepkg.conf'" 1>&2
    exit 1
    else
    echo "Your \$ABSROOT variable is invalid" 1>&2
    echo "Be sure you have \`abs' installed and that \`/etc/abs.conf' exists" 1>&2
    exit 1
    fi
    (06/02/2009) If we depended on many little scripts to handle our package management, what would then be the purpose of package managers?
    (06/02/2009) Minor edit -> changed `echo' to `echo -n'  on line 90 of my script (superficial modification).
    Last edited by deltaecho (2009-06-02 21:42:54)

  • Purchasing Info Record and Source list

    Hi all,
          I am using purchasing info record along with a price for the vendor and material.  This would get the net price into the Purchase order.  Do i really need to create source list ?  What will source list do for me ?   Wouldn't having info record be sufficient ?
         Looking forward to hear your suggestions.
    Thank you.
    Joyce

    Hi Joyce,
    If you have not maintained valid conditions in your Pur info record then price is picked from last purchase order through purchase order price history if customizing settings allow so (In your case if customizing settings allow and the net price 100 in the info record is not from valid conditions, price picked will be 250).
    In the price determination process in PO system always first looks for pur info records with valid conditions if not found then it looks for last PO price.
    There is also a parameter for default values for buyers called EVO. If you make settings in customizing for this parameter and tick the Chkbox for picking the last purchase order price in it and you attach this parameter to your user ID in the user-own data with PI value, then last PO price is picked as default value in the net price.
    You can refer the following link
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/75/ee130655c811d189900000e8322d00/frameset.htm
    Source List -
    The source list is used in the administration of sources of supply. It specifies the allowed (and disallowed) sources of a material for a certain plant within a predefined period. Each source is defined by means of a source list record.
    The source list serves:
    To define a source of supply as "fixed". Such sources count as preferred sources over a certain period of time.(For example, the fixed vendor for material 1 is X for the first quarter and Yfor the second quarter of the year.)
    To define a source of supply as "blocked".(This means, for example, that contract 123 may not be used for a certain period of time.)
    As an aid in selecting the preferred source during the source determination process.(For example, the vendor A is determined as the source for an item of a requisition dated 15th June relating to material 1.)
    To block the external procurement of a material
    Regards,
    Rahul.

  • Delete the records in ODS when there is deletion of record in Source system

    Hi,
    Actually i am pulling table thru DBConnect and loading the Data into ODS as Full Load.
    Because the volume of Records are huge we need to go for Delta enabled.
    But the problem i have is that in source system daily they are deleting some records.
    Pls guide me.
    Regards
    Mano

    FYI: I think the pad lock you see in the tab doesn't mean your tab is locked. It means the site you are visiting is using HTTPS (a more secure portocol)... as in Safari is telling you that internet connection to the site you are visiting is safe

Maybe you are looking for

  • Too small UI fonts at Thunderbird [SOLVED]

    Then fonts are unreadably small - here is a screenshot: The same small fonts are all over the UI - in menus and other items. How could I fix them?

  • AP (Administrative Preference) Portlet Preferences are stored in DB table?

    What database table do AP portlets store their preferences in ? I'd like to verify the information that is being stored in the database. I checked the "PTPrefs" database table but they are not located here. I can retrive with IDK using: string oSubje

  • Extract Albums and Tags from files and add back to Organizer

    Had problem with computer and had to reload the Photoshop Elements 6 again and pictures located in my files. When asked if I wanted to add the Tags etc I said yes. Although the pictures loaded the Organizer ok the tags and Albums did not load. I see

  • MSS PCR --- PDF forms probmlem

    Hi.    We are in the process implmenting ESS and MSS on EP NW04 SP11. We have installed Xss 7.0,  ESS/MSS business package   and ADS on Portal J2EE engine.    After PCR configuration we got following error message while accessing forms. com.sap.tc.we

  • Rocket Dual eSATA 6Gb/s For Mac ~ Requires Reboot to Recognize Drives

    I bought this card when ordering my Mac Pro from Apple last year based on the recommendations of the sales staff on the phone.  I have had a huge disappointment at discovering the drives only show up in the finder if I reboot the computer.  No hot sw