Error Extracting data from a STRUCTURE in SELECT statement

Hi,
I have an SAP defined structure BIW_KNA1_S which has been enhanced with 2 fields (ZZS1 and ZZS2). I need to populate these 2 fields with data from the 2 SORT fields from ADRC table.
I tried the following code but i do not get any output. This piece of code is in a FORM statement from which i should return contents of table ITAB in the foll. code.
DATA ZS TYPE TABLE OF ADRC WITH HEADER LINE.
DATA ITAB LIKE TABLE OF BIW_KNA1_S WITH HEADER LINE.
FIELD-SYMBOLS: <FS> LIKE ITAB.
SELECT SORT1 SORT2 FROM ADRC INTO CORRESPONDING FIELDS OF TABLE
ZS WHERE ADDRNUMBER IS NOT NULL.
LOOP AT ITAB ASSIGNING <FS>.
IF ZS-ADDRNUMBER IS NOT INITIAL.
  <FS>-ZZS1 = ZS-SORT1.
  <FS>-ZZS2 = ZS-SORT2.
ENDIF.
ENDLOOP.
Since i did not get any output, I then added the foll. line of code before the LOOP statement.
SELECT * FROM BIW_KNA1_S INTO CORRESPONDING FIELDS OF TABLE ITAB
WHERE KUNNR IS NOT NULL.
When i execute this, i get the foll. error.
"BIW_KNA1_S is not defined in the ABAP dictionary as table, projection view or database view."
How to extract data from a structure BIW_KNA1_S using a SELECT statement.
Could someone help.
Thanks

Hi Roberto,
Ok. Let me explain my requirement more clearly. I don't want to write the code in include ZXRSAU02. In ZXRSAU02, i will have only PERFORM statement which will call the FORM statement depending on the name of the program.
Ex: PERFORM form_name ...tables i_t_data.
In this way, i don't need to make any changes in this file. I will only need to make the changes in the report where my Actual FORM code resides. In the ABAP report, i will have my FORM code which will return contents.
And this is the code which my FORM report will consist:
DATA ZS TYPE TABLE OF ADRC WITH HEADER LINE.
DATA ITAB LIKE BIW_KNA1_S OCCURS 10 WITH HEADER LINE.
FIELD-SYMBOLS: <FS> LIKE ITAB.
SELECT SORT1 SORT2 FROM ADRC INTO CORRESPONDING FIELDS OF TABLE ZS WHERE ADDRNUMBER IS NOT NULL.
LOOP AT ITAB ASSIGNING <FS>.
IF ZS-ADDRNUMBER IS NOT INITIAL.
  <FS>-ZZS1 = ZS-SORT1.
  <FS>-ZZS2 = ZS-SORT2.
ENDIF.
ENDLOOP.
But as you said, i will have some problems i suppose. Like if my ADRC has some 70 records and if there are 100 records in BIW_KNA1_S, then when i try to copy the fields from ADRC into ITAB (BIW_KNA1_S) i might have problems. I will get back to you once i clarify these things.
Thanks for your reply.

Similar Messages

  • CALL function to extract data from a structure table

    Hi Gurus,
    Anyone knows how to write a call function to extract data from a structure table?
    Your help is very much appreciated.
    Thanks alot.

    Hi,
    structure doesnot hold any data. instead of it you can check the stucture in which table it is used, find the table name,use select query to extract the data u needed.
    you can use where used list option to find the structure in which table it is used.
    regards
    siva

  • How to extract data from a structure?(Data Dictionary)

    Hi all,
           This is regarding extracting data from a structure.
    For Eg:if we want to extract data from a structure ADDR1_DATA,How will we do that in report programming?Structures on its own has no existence unless it s attached to a database table or view.when am using 'Where used List' on that structure also I am not getting any database tables or views.What can I do about this?
    Thanking you,
    anjaly

    HI Anjaly,
    as you said structure does not have any value .. unless something is added to it..
    So just use the structure to define the type of the sttructure you want..
    Or to include it in your itab like..
    data : Begin of itab occurs 0.
           include structure ADDR1_DATA.
    data  i type i.
           end of itab.
    you cannot directly extract data from the  structure ADDR1_DATA..
    regards
    satesh

  • Extracting data from a Structure in R/3.

    Hi,
    This is in continuation to one of my previous questions.
    I found that for a standard report  "S_ALR_87012347"  for FI GL in R/3, the values are taken from a structure "FAGL_S_RFBPET00_LIST2".
    I have used 0FIGL_O02 DSO and 0FI_GL_3 Datasource. The problem is I do not get proper values for G/L Account where the account type is either K (Vendor) or D (Customer). Instead of showing the Vendor/Customer Number here the report shows the G/L account number which is quite obvious. But if we see in the R/3 report (mentioned above), the account number field shows the Vendor/Customer Number if the Account Type is either K or D.
    My question is: can I directly extract data from the Structure FAGL_S_RFBPET00_LIST2?
    If yes, then how...???
    Thanks...!

    Structure does not contains any data. You have to write code (Function module) to populate the data for structure fields.

  • Error extracting data from essbase cube using MDX method

    Hi,
    We have some problems extracting data from essbase cube using MDX method, we believe that the problem is the MDX query, this is the problem and query:
    ERROR:
    [DwgCmdExecutionThread]: Cannot perform cube view operation. Analytic Server Error(1260046): Unknown Member SELECTNON used in query
    com.hyperion.odi.essbase.ODIEssbaseException: Cannot perform cube view operation. Analytic Server Error(1260046): Unknown Member SELECTNON used in query
         at com.hyperion.odi.essbase.wrapper.EssbaseMdxDataIterator.init(Unknown Source)
    MDX:
    SELECT
    NON EMPTY {[YearTotal].[Jan]} ON COLUMNS,
    NON EMPTY {[Total Movimientos].[Presupuesto Base]} ON AXIS(1),
    NON EMPTY {[Año].[FY11]} ON AXIS(2),
    NON EMPTY {[Escenario].[Presupuesto_1]} ON AXIS(3),
    NON EMPTY {[Version].[Trabajo]} ON AXIS(4),
    NON EMPTY {[Moneda].[Moneda Input]} ON AXIS(5),
    NON EMPTY {[Centros de Costo].[1101]} ON AXIS(6),
    NON EMPTY {Descendants([Resultado Operacional],4)} ON AXIS(7)
    FROM [DSR02].[ROP]
    We try extract data using a sample cube and work fine, this is the mdx query:
    SELECT
    {[Actual],[Budget]} ON COLUMNS,
    {[Sales]} ON ROWS,
    NON EMPTY {[Product].levels(0).members} ON PAGES,
    NON EMPTY {[East].levels(0).members} ON AXIS(3),
    NON EMPTY {[Year].levels(0).members} ON AXIS(4)
    FROM Sample.Basic
    The model reversed ([DSR02].[ROP]) have the same structure than query need, the query and the model are fine, definitely we can´t see the problem, someone can help us?
    Regards

    You will be able to test the MDX query in EAS, it is usually best to test the query first before trying to use it in ODI.
    Is there any reason you are using MDX to extract the data, have you tried reportscript as I usually find it more efficient to extract the data.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How extract data from case structure

    Hi all, I would like to extract the data from case structure, it's circled in red in the attached file. How should I do it? Thanks for taking your time to look at my post. Your help is greatly appreciated.
    Attachments:
    bp.jpg ‏161 KB

    Thank you guys for your prompt reply.
    As u can see from the vi, there's an error, I need the values in the circled area to be passed on to the block ( Bundled by name)
    Thanks !
    Attachments:
    fyp_bp_only.vi ‏90 KB
    fyp_bp_only.vi ‏90 KB

  • How to extract  data from a structure?

    I want to get the data KWERT from structure KOMV.
    is there a way to do this? thanks..

    Hello,
    U can't get data from the structure.
    Find out the dataelement of the field KWERT and search for where used list.It will list number of tables from which u can find out the table from which can fetch the data of the field KWERT.
    Don't forget to award points.#
    Regards,
    Vasanth

  • Extract data from CAUFVD

    Is there a way to extract data from CAUFVD structure? I need to get the field for the Delivered Quantity (CAUFVD-GWEMG) but it is not in tables AUFK or AFPO.
    Thanks

    Hi,
    Check the field WEMNG in table AFPO.
    System passes the  above table details to CAUFVD-GWEMG in LCOIHFHI.
    move afpod-wemng            to caufvd-gwemg.
    Please check, I dont have any data to test in my system.
    Shiva

  • Extract date from time stamp

    hi ,
    how to extract DATE from timestamp column
    thanks

    SQL>select to_char(systimestamp,'DateFormat') from dual;
    eg:
    SQL>select to_char(systimestamp,'DD') from dual;
    SQL>select to_char(systimestamp,'DD-MON-YYYY') from dual;
    Edited by: Rash on Jun 17, 2012 3:00 PM

  • Error during extraction data from APO system

    HI Gurus,
    We are extracting data from APO system at regular intervals. As poart of business requirement, we enhanced the data existing data source in APO dev system and replicated the same in BW dev system and activated the Tx structure and Tx rules.
    When we checked it is working fine in dev environment.
    Now we moved the same in Quality system, and we tried to extract data, it throws error " error in data selection in source system".
    We tried to check in RSA3 in APO and found that the extract program still refers to the old extract structre and gives dump " Extract structure unknown".
    Could anybody throw some light on this issue.
    Tnx in advance.
    Guru

    Hi,
    Have u collected all the objects in R3,like the Table/View , DS,Extract Structure.
    And
    Has replication been done in BI side for the same.
    Rgds
    SVU
    Edited by: svu123 on Sep 24, 2009 7:50 AM

  • Error while extracting data from Generic VBAK Table

    Hi,
    When i am extracting data from VBAK using generic extraction via tavle, i am, getting the error "Syntax error in program "SAPLXRSA ""
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLRSAP" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
        The following syntax error occurred in program "SAPLXRSA " in include "ZXRSAU01
         " in
        line 159:
        "The type of the database table and work area (or internal table) "L_ST"
        "R_CE1IDEA" are not Unicode convertible. ."
    Please help me out in fixing this,
    Thansk,

    do you have an user-exit? if yes, post the code....
    did you try regenerating the entire stuff (ds, structure,...)...there might be a mismatch between the structures of datasource and the generated extraction program....
    M.

  • Error while extracting data from CRM

    Dear all,
    I have used some standard and generic datasources to extract data from CRM. These were working fine for more than a year and are scheduled in Process chains. For the past few days I am getting Caller 09 error as shown below, only for the generic datasources. I have checked the connection,replicated the datasources and activated them, reinitialized and have tried all the solutions that were posted earlier, but still the process chain fails. When I execute the process chain for generic datasources manually, it is working fine.
    When I tried in RSA3 for both standard and generic datasources in CRM with update mode D, I get a message 'Error occured during the extraction',
    Kindly suggest what can be the problem.
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
    Thanks all in advance.
    Regards
    Adhira Anand

    Hi Meyappan,
    I have checked SM37, SM21 and ST22. There are no errors.
    in SM37 the below log is displayed.
    Job started
    Step 001 started (program SBIE0001, variant &0000000005420, user ID ALEREMOTE)
    Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
    DATASOURCE = ZCRM_SRV_DEFECT
    RLOGSYS    = CLNT645BIP
    REQUNR     = REQU_4JHQ8HH6KA40JHC1TYLYIV2W2
    UPDMODE    = D
    LANGUAGES  = *
             Current Values for Selected Profile Parameters               *
    abap/heap_area_nondia......... 2000000000                              *
    abap/heap_area_total.......... 2000000000                              *
    abap/heaplimit................ 40000000                                *
    zcsa/installed_languages...... DE                                      *
    zcsa/system_language.......... E                                       *
    ztta/max_memreq_MB............ 2047                                    *
    ztta/roll_area................ 6500000                                 *
    ztta/roll_extension........... 2000000000                              *
    1 LUWs confirmed and 1 LUWs to be deleted with function module RSC2_QOUT_CONFIRM_DATA
    IDOC: Info IDoc 2, IDoc No. 101415, Duration 00:00:00
    IDoc: Start = 13.10.2010 22:51:39, End = 13.10.2010 22:51:39
    Synchronized transmission of info IDoc 3 (0 parallel tasks)
    IDOC: Info IDoc 3, IDoc No. 101416, Duration 00:00:00
    IDoc: Start = 13.10.2010 22:51:42, End = 13.10.2010 22:51:42
    Job finished

  • Error while extracting data from ODS using Infospokes - URGENT

    Hi all,
    I am extracting data from an ODS using infospokes and nothing fancy, no selection criteria but I am getting an error message saying
    Syntax error in row3(-> long text) Msg id = "RG" and msgno is 102
    Any ideas on how I can see what is the exact error and how to debug this?
    thanks
    Sabrina.

    Hi Sabrina
    service.sap.com can help you getting the details of your mesg.
    I found one OSS note suitable to your mesg. So just check out OSS note # 671097. I hope this note will be some help to you. If not go and chk in the OSS you can find some more.
    Here is the note details also
    <i>Symptom
    Error message RG102: 'Syntax error in &1, row &2 (-> long text)' appears in the request log of an InfoSpoke.
    Reason and Prerequisites
    The data source is an ODS object and the extraction mode is 'delta'. The cause of the error message is that the ODS extractor is unable to select the request ID (InfoObject 0REQUID) from the change log of the ODS object. However, the request ID is mistakenly provided in the field list of the ODS object on the InfoSpoke maintenance screen. --
    Solution
    Delete the 0REQUID InfoObject from the field list of the InfoSpoke and activate the InfoSpoke. As of the patch mentioned below, the request ID in the template tab is no longer provided.
    BW 3.0B
               Import Support Package 16 for 3.0B (BW3.0B Patch 17 or SAPKW30B16) into your BW system. The Support Package will be available once note 571699 with the short text "SAPBWNews BW 3.0B Support Package 16", which describes this Support Package in more detail, has been released for customers.
    BW 3.1 Content
               Import Support Package 10 for 3.1 Content (BW3.10 Patch 11 or SAPKW31010) into your BW system. The Support Package will be available once note 571747 with the short text "SAPBWNews BW 3.1 Content Support Package 10" has been released for customers.
    To provide information in advance, the notes mentioned above may already be available before the Support Package is released. In this case, however, the short text still contains the words "preliminary version".
    Refer to note 110934, which contains information about BW Support Packages.</i>
    Regards,
    Rohini

  • Error when extracting data from ETL - Missing messages and missing InfoIdoc

    Hi All,
    We are using BW 3.0 and extracting data from other source systems through Informatica Powercenter (ETL). The system is working fine but when we try to extract data on 31st Dec , we get the following error. Only this load gives the error and all the other load to other data targets are going fine. All the data are one-to-one mapped from ETL to BW.
    Error messages from Monitor -Status tab:-
       "InfoIdocs missing; external system
       Diagnosis :- InfoIDocs are missing. The IDocs are created in BW with non-SAP systems as source    
       systems that transfer the data and metadata to BW using BAPIs. Since the IDocs are missing, a   
       short dump in BW probably occurred.
       System response:  No selection information arrived from the source system"
    Error messages from Monitor -Details tab:-
        Missing message: Number of sent records,   Missing message: Selection completed
    Highly appretiate your suggestions.
    Vinod.CH

    Hi Rathy Moorthy,
    Thank you very much for your reply. The source system connections are OK and we are able to load data to other Data targets from ETL, we have issue only with this this particular load. The load extracts data and I have loaded the data from ETL to PSA and have checked the data content and it is correct. But when I update the same data to the target I get this error. I have also tried to update from PSA to target and also directly from ETL to target.
    Appretiate your suggestions.

  • How to extract data from multiple tables (always got errors)

    Dear Experts,
    I have a simple mapping to extract data from multiple tables as a source (A, B, C) to a target table (X). Below is the picture:
    (Sources)....(Target)
    A----------------***
    B----------------X
    C----------------***
    Sample Source Data:
    Table A:
    ColA1
    100
    200
    etc
    Table B:
    ColB1 ColB2 ColB3
    10 Y Ten
    20 Y Twenty
    30 Y Thirty
    etc
    Table C:
    ColC1 ColC2
    11
    12
    13
    etc
    Target table (X) should be (just has 1 group INGRP1):
    ColA1 ColB1 ColB3 ColC1
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    Scenarios:
    1. Directly map from A, B, C to X. Unable to map with error message: "API8003: Connection target attribute group is already connected to an incompatible data source. Use a Joiner or Set operator to join the upstream data first before connecting it into this operator."
    2. Map each source to Expression Operator and then map from each Expression to target table. I am able to map all attributes successfully but got error when validating it with message: "VLD-1104: Attributes flowing into TEST.EXPR_SRC.INGRP1 have different data sources."
    How can I achieve the correct mapping for this purpose?
    Use Joiner? I have no key to join the sources
    Use Set? The sources have different number of columns
    Thanks in advance
    Prat

    Thanks Nico,
    I think it will results data like this:
    100 10 Ten 11
    200 20 Twenty 12
    300 30 Thirty 13
    etc
    and not the expected:
    100 10 Ten 11
    100 10 Ten 12
    100 20 Twenty 21
    etc
    But it inspired me to solve this by adding key expression in each source table (B & C) to be joined to table A with this formula:
    100+TRUNC(INGRP1.COLB1,-2)
    Regards
    Prat

Maybe you are looking for

  • Scrollbar

    THis is probably a very simple thing but i really havent been able to find much on the topic. I need to increase the speed of the verticle scroll bar in a progam im working on. If anyone can give me some ideas or somewhere to reference to it would be

  • [solved] xfce-wavelan-plugin

    Hi All, I have recently installed ArchLinux and have been experimenting ever since. I have my wifi set up through netcfg which uses multiple profiles so I can connect wherever I am. I have also settled with XFCE desktop environment, and am happy so f

  • Different playlists saving position where i paused at

    Hey there, i have this problem with my iPod touch but it seems to me that it's an iOS problem as a whole. Basically, i have like 30 playlists and i would like to listen to each of them from time to time. AND i want the device to remember the place i

  • Is it possible to select all files within a directory (and not the folders/subfolders)?

    For instance, in my iTunes directory, I would like to select all of the music files without selecting the other olders (artist name, album name). Going through with Shift+click and command+click will take an eternity. If I just highlight everything a

  • Opening web jpeg files by dragging to CS3 Photoshop Dock Icon

    G5/2.0ghz/dual/3gigRAM/OSX5.8/CS3 Suite Extended In Tiger, why was I able to drag any web image to the dock CS3 icon and it open in CS3 Photoshop immediately, and I am unable to do this in Leopard? I have repaired by DiskUtility and Disk Warrior, rep