Select a field having some content from a table

Hi Friends,
I had a requiremen where I need to fetch the field(having some content).
I need to select FISTL field which is having some value (not space) from table BSIS into my internal table, so that I need to update this field value for all the line items with the same BELNR(doc number).
My Approach:
    SELECT SINGLE FISTL FROM BSIS INTO WA_FINAL-FISTL WHERE FISTL IS NOT NULL AND
                                                           BELNR = WA_BSIS-BELNR.           
But here if the first occurance of FISTL value in BSIS table in space, it is picking the spaces and updating my itab which means that a space value is not null.
Please suggest me how to put condition so that I can select FISTL field having some value in it.
Tried with read keyword also. But it is not accepting "IS INITIAL"  in where clause.
Please look into this.
Thanks,
Murali

Hello,
You should try
FISTL NE space
instead of IS NOT NULL.
As you might be aware ABAP data objects don't have 'NULL' values defined. You can use the 'NULL' values in Native SQL, but in case of Open SQL SAP says,
"When reading with the Open SQL statement SELECT, null values can be created by aggregate functions or an outer join, but they are converted to initial values of the correct type when passed to data objects."
Source: SAP documentation for NULL value.
BR,
Suhas

Similar Messages

  • I can't load some content from my external hard drive to itunes,

    I can't load some content from 1 of my external hard drive to itunes, it can see it and try to load the folder / files but it doesn't appear, these files worked recently as some of them are currently on my ipod touch - I had to factory restore my laptop this week (virus) so have been trying to put everything back on to sync ipod - any ideas???

    To delete files from your external HDD, attach it to your MBP and drag the unwanted files to trash and then empty trash.
    Then you select the files that you want to transfer by 'drag and drop' to the external HDD and trash the files on your MBP.
    Ciao.

  • When I try copying some content from a webpage and paste it to quickoffice document or in e Mail. all the text copies but, no graphics/pictures. how to get them pasted?

    I tried copying some content from various websites (open content from plian HTML pages) and tried to paste it in Quickoffice document as well as in mai application. all the text got pasted properly however the content had some graphics and pictures in it that did not get pasted. So, I want to know if there is any way I can do the copy and paste from website including embedded graphics

    You will need to copy and paste the images separately from the text. Or you can try pasting into TextEdit. However, it should work if the editor can handle RTFD files as does TextEdit. You cannot copy images to a plain text document or editor.

  • How to export some data from the tables of an owner with integrity?

    Hi to all,
    How to export some data from the tables of an owner with integrity?
    I want to bring some data from all tables in a single owner of the production database for development environment.
    My initial requirements are: seeking information on company code (emp), contract status (status) and / or effective date of contract settlement (dt_liq_efetiva) - a small amount of data to developers.
    These three fields are present in the main system table (the table of contracts). Then I thought about ...
    - create a temporary table from the query results table to contract;
    - and then use this temporary table as a reference to fetch the data in other tables of the owner while maintaining integrity. But how? I have not found the answer, because: what to do when not there is the possibility of a join between the contract and any other table?
    I am considering the possibility of consulting the names of tables, foreign keys and columns above, and create dynamic SQL. Conceptually, something like:
    select r.constraint_name "FK name",
    r.table_name "FK table",
    r.column_name "FK column",
    up.constraint_name "Referencing name",
    up.table_name "Referencing table",
    up.column_name "Referencing column"
    from all_cons_columns up
    join all_cons_columns r
    using (owner, position), (select r.owner,
    r.constraint_name fk,
    r.table_name table_fk,
    r.r_constraint_name r,
    up.table_name table_r
    from all_constraints up, all_constraints r
    where r.r_owner = up.owner
    and r.r_constraint_name = up.constraint_name
    and up.constraint_type in ('P', 'U')
    and r.constraint_type = 'R'
    and r.owner = 'OWNERNAME') aux
    where r.constraint_name = aux.fk
    and r.table_name = aux.table_fk
    and up.constraint_name = aux.r
    and up.table_name = aux.table_r;
    -- + Dynamic SQL
    If anyone has any suggestions and / or reuse code to me thank you very much!
    After resolving this standoff intend to mount the inserts in utl_file by a table and create another program to read and play in the development environment.
    Thinking...
    Let's Share!
    My thanks in advance,
    Philips

    Thanks, Peter.
    Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
    With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
    1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
    2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
    Once again, thank you,
    Philips
    Reading Oracle Docs...

  • Copy contents from Webdynpro Table to Clipboard

    I have a requirement, wherein the contents from the table UI in Webdynpro, in an SRM system, have to be copied to a clipboard. The class CL_PERS_ADMIN->SET_DATA is the hint given for the same.
    Not sure how it works or how to implement this!?!
    Have gone through Web dynpro Selectoption: upload from clipboard and as per Harald's comment have also enabled 'Allow Programmatic clipboard access' in IE.
    Please advice.
    Edited by: Wincy J on Mar 23, 2011 9:30 AM

    Hi Wincy,
    Please check this...
    copy data from table
    Check this u understand
    https://wiki.sdn.sap.com/wiki/display/WDABAP/General+Issues#GeneralIssues-1.190
    Cheers,
    Kris.
    Edited by: kissnas on Mar 23, 2011 9:53 AM

  • Goto: How to export some data from the tables of an owner with integrity?

    Hi to all,
    Help please: How to export some data from the tables of an owner with integrity?
    My thanks in advance,
    Philips

    Thanks, Peter.
    Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
    With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
    1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
    2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
    Once again, thank you,
    Philips
    Reading Oracle Docs...

  • How to populate a text field by some value from table in Oracle seeded page through Personalization?

    I have to populate Description field by default in AGIS page (Advanced Global Intercompany System).
    Field Description:
    messageTextInput: Description
    VO: FunTrxHeaderVO
    VO Attribute: Description
    VO is entity based.
    Now if the field is null then I have to populate this value by some value from table for selected batch_id.
    Example:
    (SELECT DESCRIPTION FROM fun_trx_batches WHERE batch_id =
    211061)
    Also, this value is being populated in the Batch Information region in the same page. So the problem is also be treated as to copy a value from one messageStyledText to messageTextInput in a same page.
    Can this be done through personalization, w/o coding?
    Please suggest if you any idea how to resolve..
    Regards,
    Pahari

    Not sure why it is not displying in the front page list??
    I have to search it.
    Admin team, please help.
    Regards,
    Pahari

  • Field name while fetching its content from db table dynamically.

    Hi Experts,
    I am new to ABAP and I  have a situation as follows.
    I have a table say ztable where there are seven fields monday,tuesday,wednesday,thursday,friday and saturday.
    Depending on the current calender day i have to fetch the content.
    Suppose for monday, i have to fetch ztable-monday.
    Is there any other way other than using if statements 7 times ? Like i wanna capture the day and substitute it in the place of z_table-"day".
    Please help.
    Thanks,

    Hi,
    In the below code you can pass any field of the table in W_FIELD.... It will fetch the particular field from the table....
    w_block should be of same data element of your field in W_FIELD
    PARAMETER : w_field TYPE NAME_FELD.
    DATA w_block(1) TYPE c.
    Select single (w_field) FROM RSEG INTO w_block
      WHERE belnr EQ '5105701294'.
      IF sy-subrc EQ 0.
        WRITE / w_block.
      ENDIF.
    Thanks and regards,
    Senthil Kumar Anantham.
    Edited by: Senthil Kumar on Jul 2, 2010 5:37 PM

  • I am trying to Copy paste some content from PDF reader with no success

    Hi,
    I am new here, hope I will find the answer to my prob.
    I am currently working on an Ebook I plan publishing, discussing affiliate marketing.
    I am using some resources from other Ebooks I purchased and have in hand.
    * While I am trying to copy paste some content, it does copy, but when trying to place it in a notepad file, the content is being copied as gibberish. (signs and spaces).
    I've tried using microsoft word, then i totally gets out of contrast.
    Did anyone experience something alike?
    Thank you.
    Mia.

    This is common. In this case it may be done to protect the copyright
    content of the ebook from reuse. Since the amount you can use under
    fair use is only a few sentences, it shouldn't take too long to
    retype...
    Aandi Inston

  • Conditional content from 2 tables in PHP/MYSQL

    I am developing a site in DWCS4 that has a database with 2 tables: audio and notes.
    The tables contain the following fields:
    AUDIO
    audio_id (ai)
    title (varchar)
    filename (varchar)
    (plus other fields for date, speaker etc)
    NOTES
    notes_id (ai)
    audio_id (int) - foreign key
    title (varchar)
    file_location (varchar)
    (plus other fields for date, author etc)
    I have a page which lists audio files which enables a selection to be made that then leads to a page (audio_detail.php) which has full details of the audio and contains a player (see www.wscnf.org/audio.php).
    Some of these audio files have associated notes and others do not - those that do contain the reference from audio.audio_id in notes.audio_id - if there are no notes then the foreign key defaults to a value of 0.
    I have been asked to amend the audio_detail.php page so that, if there is an associated notes file, a link to that file is shown on the page - what I have in mind is if there are asscoiated notes, a new line appears beneath the player which says "Notes accompanying this audio are available:" followed by a download link. If there are no associated notes then this line does not appear.
    Any assistance on how to achieve this would be most welcome - my knowledge of PHP/MYSQL is fairly basic (but growing!)

    There are several ways to go about this, but the one that comes to mind is to use an outer join to select columns from both tables. The outer join will return results from the main table AUDIO regardless of if there are matching results in NOTES. You can then test the column values in NOTES. If the row has a NULL value in NOTES.notes_id, then there is no associate note for that row. If there is an notes_id value, then you can use conditional logic to display the NOTE details, link to other pages, etc.

  • Need help in writing a select query to pull required data from 3 tables.

    Hi,
    I have three tables EmpIDs,EmpRoles and LatestRoles. I need to write a select Query to get roles of all employees present in EmpIDs table by referring EmpRoles and LatestRoles.
    The condition is first look into table EmpRoles and if it has more than one entry for a particular Employee ID than only need to get the Role from LatestRoles other wise consider
    the role from EmpRoles .
    Sample Script:
    Create Table #EmpIDs
    (EmplID int )
    Create Table #EmpRoles
    (EMPID int,Designation varchar(50))
    Create Table #LatestRoles
    EmpID int,
    Designation varchar(50)
    Insert into #EmpIDs values (1),(2),(3)
    Insert into #EmpRoles values (1,'Role1'),(2,'Role1'),(2,'Role2'),(3,'Role1')
    Insert into #LatestRoles values (2,'Role2')
    Employee ID 2 is having two roles defined in EmpRoles so for EmpID 2 need to fetch Role from LatestRoles table and for
    remaining ID's need to fetch from EmpRoles .
    My Final Output of select query should be like below.
    EmpID Role
    1 Role1
    2 Role2
    3 Role1
    Please help.
    Mohan

    Mohan,
    Can you check if this answers your requirement:
    Create Table #EmpIDs
    (EmplID int )
    Create Table #EmpRoles
    (EMPID int,Designation varchar(50))
    Create Table #LatestRoles
    EmpID int,
    Designation varchar(50)
    Insert into #EmpIDs values (1)
    Insert into #EmpIDs values (2)
    Insert into #EmpIDs values (3)
    Insert into #EmpRoles values (1,'Role1')
    Insert into #EmpRoles values (2,'Role2')
    Insert into #EmpRoles values (2,'Role1')
    Insert into #EmpRoles values (3,'Role1')
    Insert into #LatestRoles values (2,'Role2')
    --Method 1
    select e.EmplID,MIN(ISNULL(l.Designation,r.Designation)) as Designation
    from #empids e
    left join #emproles r on e.emplID=r.EmpID
    left join #latestRoles l on e.emplID=l.EmpID
    group by e.EmplID
    --Method 2
    ;with cte
    as
    select distinct e.EmplID,r.Designation,count(*) over(partition by e.emplID) cnt
    from #empids e
    left join #emproles r on e.emplID=r.EmpID
    select emplID,Designation
    from cte
    where cnt=1
    UNION ALL
    select a.EmplID,l.Designation
    from
    (select distinct EmplID from cte where cnt>1) a
    join #Latestroles l on a.EmplID=l.EmpID
    order by emplID
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • How to delete some data from GLPCA table

    Dear Friends,
    We have extracted some data in GLPCA table via the ECPA component. We
    want to delete these records ( Doc type and Posting date is known).
    However we do not want other data already existing the GLPCA to be
    deleted. Is there some Std SAP Trx for deletion of partial/select data
    from EIS tables.
    Please explain us clearaly how we can delete these records.
    Your quick reply for this issue is highly appreciated.
    Thanks & Regards,
    Naveen Kumar.

    Hello,
    Please check the use of the report ZDELETE_PCA_DATA_BUKRS (mentioned in the SAP note 1174360), to delete totals from GLPCT.
    I am not sure of any deletion reports for GLPCA table.
    If you open the Source code of this program, you can see the following information :
    "This report provides a possibility to delete actual and plan
    *& postings on company code level as an alternative for transaction
    *& 0KE1."
    I do not have much information on this report as, personally I haven't used this anytime. Please run in 'Test Run' mode first and look for the results.
    I hope this helps.
    Thanks and regards,
    Suresh Jayanthi.

  • Processing some records from internal table.

    Hi,
    My internal table contains material in lakhs.After fetching the record from database table MARA,i process each material to find out its characteristics.As there are too much records it is taking time, resulting in time out error abap dump. If i want to process first 5000 material then remaining 5000 and so on...what logic should i apply?or can there be any alternative solution?

    Hi,
    You can also check if the read statement has BInary Serach.
    By Adding this it will improve performance.
    Read statement will occupy lots of time to read the records.
    Sort the Internal table with some key field and the use Binary Search for an internal table.
    Ex :
    SORT T_PRGEN by ATTR20A.
    READ TABLE T_V_TCAV201 INTO WA_V_TCAV201 WITH KEY ATTRV20 = WA_PRGEN-ATTR20A BINARY SEARCH.
    This should fix the issue.
    Regards,
    Kittu

  • List all columns having only nulls from all tables in a database.

    I want to select columns from all tables having only null values. Each table has 60+ columns and i have 100+ tables in database. Requesting a script to list all tables at a time and their columns having all nulls? Below is my expected output. Thank
    you in advance !
    Table name
    Null valued Column
    Address
    Address Line 2
    Address
    Address Line 3
    Address
    Zip Code
    Product
    Product Desc
    Product
    Product SKU

    Hello,
    In addition to Naomi's reply, you can refer to the following links about loop through all the tables in the database:
    http://www.codeproject.com/Tips/161663/Loop-through-all-tables-in-SQL-Server
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/07b9799e-aeab-442e-99a0-ba76ab051f59/looping-through-databases-and-count-the-number-of-items-in-a-specific-table?forum=transactsql
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Deletion of contents from database table

    Hi all,
    The purpose of the down program is to delete the entire contents from all the tables.  The deletion of the table should be in sorted manner.  Is there any other way to write the code more efficiently,
    TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR,        ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL,       ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
    DELETE ZFFMCTL_AP.
    IF SY-SUBRC = 0.
       DELETE ZFFMMHDR_AP.
       IF SY-SUBRC = 0.
          DELETE ZFFM_CHANGE_LOG.
          IF SY-SUBRC = 0.
             DELETE ZFFMDTL_AR.
             IF SY-SUBRC = 0.
                DELETE ZFFMHDR_AR.
                IF SY-SUBRC = 0.
                   DELETE ZFFMDTL_JV.
                   IF SY-SUBRC = 0.
                      DELETE ZFFMHDR_JV.
                      IF SY-SUBRC = 0.
                         DELETE ZFFMDTL_SKF.
                         IF SY-SUBRC = 0.
                            DELETE ZFFMHDR_SKF.
                            IF SY-SUBRC = 0.
                               DELETE ZFINVOICE_DETAIL.
                               IF SY-SUBRC = 0.
                                  DELETE ZFFMMASTER.
                                  IF SY-SUBRC = 0.
                                     DELETE ZFFMLOGREAD_CLUS.
                                     IF SY-SUBRC = 0.
                                        DELETE ZFFMCTL.
                                     ENDIF.
                                   ENDIF.
                                 ENDIF.
                              ENDIF.
                           ENDIF.
                        ENDIF.
                    ENDIF.
                 ENDIF.
               ENDIF.
            ENDIF.
         ENDIF.
    ENDIF.
    Waiting for response,
    Thanks in advance
    John

    Hello,
    you could employ the function modules DD_DROP_TABLE / DD_CREATE_TABLE. Purpose of these is to drop/create tables on DB-level.
    Regards Wolfgang

Maybe you are looking for

  • Picking Premiere Pro CC as the Default Program in Windows 8.1

    I have both Premiere Pro CS6 and CC on my computer and have to have it that way for access to older projects. I can't get Windows to default to the newer CC version. Using the "Open With" and drilling down to the newer version does not change the def

  • Alsa - running or not?

    Quick question: could someone tell me if there is a surefire test to establish if my sound system is using alsa or not? I "think" I have got alsa running, but alsaconf does not detect my sound card (onboard CM8738 chip).  Sounds are working OK (excep

  • After Effects CC Screen Blurry Mac

       As you can see the preview screen is VERY Blurry for me and I need help Its apperently like this with everying 0_0

  • Should my DNS server be talking to the internet?

    I have the DNS service running on my OSX server in order to use Open Directory and server-based home folders. To use these server-based home folders I have to put the IP address of the server in the "DNS Server" entry on all the machines in Network P

  • 16x9, 300ppi, 75mb tiff file, LR converts to 1mb jpg.  Export in LR 5 is being done at 100%, no file size reduction.

    I've got a 16x9, 300ppi, 75mb tiff file that LR converts to 1mb jpg.  Export in LR 5 is being done at 100%, no file size reduction.  Can't figure out why it is downsizing so small?  Even upsized to 420ppi in PS and the export was still only 2mb. Stoc