Self join on a table with condition to extract records

Hello PL/SQL Gurus/experts,
I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production version
I have following table -
drop table t1;
create table t1(stud_NM,stud_id) as select
'Vikas',1 from dual union all select
'Andy',2 from dual union all select
'Chi',3 from dual union all select
'Derek',4 from dual union all select
'Kristien',5 from dual union all select
'Tom',6 from dual union all select 
'Messi',7 from dual union all select
'Ketty',8 from dual;
drop table t2;
create table t2(stud_id,Class, CDate) as select
1,'BA','20120101' from dual union all select
1,'MA','20120101' from dual union all select
2,'BSc','20120531' from dual union all select
3,'MCA','20120606' from dual union all select
4,'MCA','20120701' from dual union all select
4,'Btech','20120715' from dual union all select
5,'MTech','20120730' from dual union all select
6,'MSc','20120801' from dual union all select
6,'MSc','20120802' from dual union all select   
7,'MA','20120815' from dual union all select
8,'MA','20120815' from dual;
I have to get the output based on condition -
Extract Stud_Name, Count of records which has a condition as that of the one that if combination of Stud_Name & CDate is same then count this combination once only else if Stud_Name & CDate are different then count them as different records -
Currently i am using the following query to get the output -
select t1.stud_NM, count(distinct CASE WHEN orig.CDate<>ali.CDate then t1.stud_NM else
CASE WHEN orig.CDate=ali.CDate then '1' else null
end
end) Count
from t1,
t2 orig,
t2 ali
where t1.stud_id=orig.stud_id
and t1.stud_id=ali.stud_id
group by t1.stud_NM
order by t1.stud_NM
which is giving the following output, which looks fine as well -
STUD_NM       COUNT
Andy              1
Chi               1
Derek             2
Ketty             1
Kristien          1
Messi             1
Tom               2
Vikas             1
8 rows selected.
So want to confirm if i am doing right or it is just because of the data it is giving me the right result ?
Kindly help me thanks in advance for your time and efforts.

Hi,
You can simplify that, too.  Since you're GROUPing BY stud_nm, concatenating COUNT (DISTINCT stud_nm || cdate) is just the same as COUNT (DISTINCT cdate), assuming cdate is not NULL.
Also, that assumes stud_nm is unique.  (If it's not, the desired output doesn't make sense, but that's a different matter.)  I'd do it this way:
SELECT    t1.stud_nm
,         t1.stud_id    -- If wanted
,         COUNT (DISTINCT t2.cdate)  AS cnt
FROM             t1
LEFT OUTER JOIN  t2  ON  t1.stud_id  = t2.stud_id
GROUP BY  t1.stud_nm, t1.stud_id
ORDER BY  t1.stud_nm, t1.stud_id
OP: the query you posted will get the wrong results with other data.  For example, if we add this to the sample data in t2:
7,'WX','20120816' from dual union all select
7,'YZ','20120817' from dual union all select
Karthick's solution (and my variant of it) correctly show a count of 3 for stud_id=7 (Messi), but your query has 2.

Similar Messages

  • Joining two fact tables with different dimensions into single logical table

    Hi Gurus,
    I try to accomplish in Oracle Business Intelligence 11.1.1.3.0:
    F1 (D1, D2 and D3)
    F2 (D1 and D2 and D4)
    And we want to build a report F1 F2 D1 D2 D3 D4 to have data for:
    F1 that match only for D1-D2-D3
    and data for
    F2 that match only D1-D2-D4
    all that in one row, so D3 and D4 are not common dimensions.
    I can only do:
    F3 (D1, D2)
    F4 (D1, D2 and D4)
    And report
    F3 F4 D1,D2,D4 (all that in one row, and only D4 is not a common dimension)
    Here is the very good example how to accomplish the scenario 1
    http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
    But looks like it does not work in 11.1.1.3.0
    I get
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 14025] No fact table exists at the requested level of detail: [,,Clients,,Day,ROI,,,,EW_Names,,,,,,,,,,,,,,,,,]. (HY000)
    I am sure I set up everything correctly as advised in the blog but it works with only one not a common dimension
    Is it a bug in 11.1.1.3.0 or something?
    Thanks,
    Kate

    Thanks for all your replies.
    Actually, I've tried the solutions you guys mentioned. Generally speaking, the result should be displayed. However, my scenario is a little bit tricky.
    table Y's figures are not the aggregation of table X for D dimension. Instead, table Y's figures include not only D dimension total, but also others (others do not mean A, B, C dimension). For example, table Y stores all food's figure, while table X stores only drink's figure. D dimension is only about drink's detail. In my scenario, other foods' figure is not provided.
    So, even if I set D dimension to all/total for table X, table X's result is still not the same as table Y.
    Indeed, table Y does not have a column key to join to D dimension's key. So, if I select D dimension and table Y's measures at the same time in BI Answer, result returns no data. Hence, I can't compare table X and table Y's results with selection of D dimension.
    Is there any solution to solve this problem?
    Edited by: TomChan on Jun 3, 2009 9:36 AM

  • SELECT STATMENT USING JOINS OF 2 TABLE WITH UPT 200 ROWS

    Hi
         Any give me sample code for select statment'' SELECT STATMENT USING JOINS OF 2 TABLE WITH UPT 200 ROWS''.
    Thanks in advance .
    regards
    veera

    tables : mara.
    data : begin of itab occurs 0,
           matnr like mara-matnr,
           maktx like makt-maktx,
           end of itab.
    start-of-selection.
    select amatnr bmaktx into table itab up to 200 rows
            from mara as a inner join makt as b on bmatnr = amatnr.

  • To split a table as two tables with equal no of records

    Hi Everyone,
    I have a table with size of 100000 records which is reterieved from different tables thats why idx is not in a sequential order. for example
    idx
    1
    5
    100 and so on
    i want to create two different tables with same number of records but i dont want any duplicate records. Please anyone can help how can i get it.
    Best Regards,

    Please check the following script - hope that will help you --
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL>
    SQL> create table test_vaneeza
      2  as
      3   (
      4     select 1 idx,'55 Mary Road' address from dual
      5     union all
      6     select 2, '10 Glenhuntly Road' from dual
      7     union all
      8     select 3, '5 Terrace' from dual
      9     union all
    10     select 100, '1212 Dandenong Road' from dual
    11     union all
    12     select 1000, '12 Liverpool Street' from dual 
    13   );
    Table created.
    SQL>
    SQL>
    SQL> set lin 1000
    SQL>
    SQL> select * from  test_vaneeza;
           IDX ADDRESS
             1 55 Mary Road
             2 10 Glenhuntly Road
             3 5 Terrace
           100 1212 Dandenong Road
          1000 12 Liverpool Street
    SQL>
    SQL>
    SQL> drop table gghh;
    Table dropped.
    SQL>
    SQL>
    SQL> create table gghh(a  number(10),
      2                     b  varchar2(100));
    Table created.
    SQL>
    SQL>
    SQL> drop table ggyy;
    Table dropped.
    SQL>
    SQL>
    SQL> create table ggyy(c  number(10),
      2                     d  varchar2(100));
    Table created.
    SQL>
    SQL>
    SQL> select count(*) from ggyy;
      COUNT(*)
             0
    SQL>
    SQL>
    SQL> select count(*) from gghh;
      COUNT(*)
             0
    SQL>
    SQL>  insert all
      2       when rownum<=(select count(distinct idx) from test_vaneeza)/2
      3       then 
      4         into gghh
      5       else
      6         into ggyy
      7      select distinct idx,address
      8      from test_vaneeza;
    5 rows created.
    SQL>
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL>
    SQL> select count(*) from ggyy;
      COUNT(*)
             3
    SQL>
    SQL>
    SQL> select count(*) from gghh;
      COUNT(*)
             2
    SQL>
    SQL>
    SQL> select * from ggyy;
             C D
             3 5 Terrace
           100 1212 Dandenong Road
          1000 12 Liverpool Street
    SQL>
    SQL>
    SQL> select * from gghh;
             A B
             1 55 Mary Road
             2 10 Glenhuntly Road
    SQL> Regards.
    Satyaki De.

  • Find - tables with largest number of records?

    Hi,
    I need to find tables with largest number of records. Any transaction show this details?
    aRs

    Go to transaction DB02,  then click on the button that reads,  "Space Statistics", the dialog box, click ok, leave the "*" for all tables,   In the next screen put your cursor in the appropriate column labeled as Rows and click the sort button.  Now you will see your biggest tables at the top of the list.
    Regards,
    Rich Heilman

  • Performance for join 9 custom table with native SQL ?

    Hi Expert,
    I need your opinion regarding performance to join 9 tables with native sql. Recently i have to tunning some customize extraction cost  report. This report extract about 10 million cost of material everyday.
    The current program actually, try to populate the condition data and insert into customize table and join all the table to get data using native sql.
    SELECT /*+ ordered use_hash(mst,pg,rg,ps,rs,dpg,drg,dps,drs) */
                mst.werks, ....................................
    FROM
                sapsr3.zab_info mst,
                sapsr3.zab_pc pg,
                sapsr3.zab_rc rg,
                sapsr3.zab_pc ps,
                sapsr3.zab_rc rs,
                sapsr3.zab_g_pc dpg,
                sapsr3.zab_g_rc drg,
                sapsr3.zab_s_pc dps,
                sapsr3.zab_s_rc drs
            WHERE mst.zseq_no = :p_rep_run_id
            AND mst.werks = :p_werks
            AND mst.mandt = rg.mandt(+)
            AND mst.ekorg = rg.ekorg(+)
            AND mst.lifnr = rg.lifnr(+)
            AND mst.matnr = rg.matnr(+)
            ...............................................   unitl all table (9 tables)
            AND ps.mandt = dps.mandt(+)
            AND ps.knumh = dps.knumh(+)
            AND ps.zseq_no = dps.zseq_no(+)
            AND COALESCE (dps.kbetr, drs.kbetr, dpg.kbetr, drg.kbetr) <> 0
    It seems the query ask for database to using hashed table. would that be it will burden the database ? and impacted to others sap process ?
    Please advise
    Thank You and Best Regards

    you can only argue coming from measurements and that is not the case.
    Coming from the code, I see only that you do not understand it at all, so better leave it as it is. It is not a hash table, but a hash join on these table.

  • Get records number from internal table with condition.

    Internal table itab got more than 1000 records,now i need to get the number of records with condition that itab-field1 = 'XXXX'.
    actully, i got an inefficient logic to count the number in a loop statement. is there better way to implement it?

    hello,
    Every time assigning data into temp table and delete may that may not be much efficient. You can check in loop logic how much time is taken. You can check the below code. here I am trying to check the numbers of plant for for one material.
    In this logic material is the first field. So if there is option to make the required field in to the 1 st position then it will be nice.
    TYPES: BEGIN OF x_count,
            matnr TYPE matnr,
            count TYPE i,
           BEGIN OF x_count.
    DATA: i_marc  TYPE STANDARD TABLE OF marc,
          i_count TYPE STANDARD TABLE OF x_count,
          wa_count TYPE x_count.
    FIELD-SYMBOLS: <wa_marc> TYPE marc.
    SELECT * UP TO 1000 ROWS
      FROM marc
      INTO TABLE i_marc.
    IF sy-subrc = 0.
      SORT i_marc BY matnr.
      LOOP AT i_marc ASSIGNING <wa_marc>.
        wa_count-count = wa_count-count + 1.
        AT END OF matnr.
          wa_count-matnr = <wa_marc>-matnr.
          APPEND wa_count TO i_count.
        ENDAT.
      ENDLOOP.
    ENDIF.
    Thanks
    Subhanakr

  • JOIN over 3 tables with 'null' values?

    Hello all,
    I would like to join data from 3 tables, whereas from the 3rd table I just wanna join 2 columns, if a condition is met. otherwise those 2 columns should be NULL.
    The following statement works, but only shows me the rows where all conditions are met. How do I display the rows from JOIN 1 if the JOIN 2 condition is not met?
    SELECT
         a.c_name, a.c_date, a.c_description, a.c_sid,
         b.c_cID, b.type,
         c.name, c.value
    FROM
         TABLE_1 a
    INNER JOIN
         TABLE_2 b
    ON
    (b.c_name = a.c_name)
    INNER JOIN
         TABLE_3 c
    ON
    (c.c_name = a.c_name)
    AND
    (c.comp_cID = b.comp_cID)
    Thanks a lot and best regards,
    Tom

    OUTER JOIN

  • Rendering a table with more than one record per "row"

    Ok, it's like this. I have a collection that I want to render as an ADF Table with a single column. Except I want to render multiple entries in the collection per row of the table
    i.e. a normal ADF table would be like:
    [Column Header]
    [Row1.TextField]
    [Row2.TextField]
    [Row3.TextField]
    [Row4.TextField]
    [Row5.TextField]
    I would like to render it something like:
    [Column Header]
    [Row1.TextField] [Row2.TextField] [Row3.TextField]
    [Row4.TextField] [Row5.TextField]
    That is, I want to add each record's text field horizontally first before adding a new row vertically.
    Any way to do this with the ADF Table? Or is there another component I should use?

    Hi,
    you can try the "af:iterator" component
    example
    <af:panelGroupLayout id="pgl4" layout="horizontal">
                    <af:iterator id="i1" value="#{bindings.MyTree.collectionModel}"
                                 var="row" varStatus="vs">
                      <af:panelGroupLayout id="pgl5"
                                           rendered="#{(vs.index mod 3) eq 1}"
                                           inlineStyle="width:100px;"
                                           layout="horizontal">
                        <af:outputText value="#{row.CityCode}" id="ot2"/>
                      </af:panelGroupLayout>
                      <af:panelGroupLayout id="pgl6"
                                           rendered="#{(vs.index mod 3) eq 2}"
                                           inlineStyle="width:100px;"
                                           layout="horizontal">
                        <af:outputText value="#{row.CityCode}" id="outputText3"/>
                      </af:panelGroupLayout>
                      <af:panelGroupLayout id="pgl7"
                                           rendered="#{(vs.index mod 3) eq 0}"
                                           inlineStyle="width:100px;"
                                           layout="horizontal">
                        <af:outputText value="#{row.CityCode}" id="outputText4"/>
                      </af:panelGroupLayout>
                      <af:outputText value=" &lt;tr>" id="ot3" escape="false"
                                     rendered="#{(vs.index mod 3) eq 2}"/>
                    </af:iterator>
    </af:panelGroupLayout>Regards
    Nicolas

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • Database table with potentially millions of records

    Hello,
    We want to keep track of user's transaction history from the performance database.  The workload statistics contain the user transaction history information, however since the workload performance statistics are intended for temporary purposes and data from these tables are deleted every few months, we loose all the user's historical records.
    We want to keep track of the following in a table that we can query later:
    User ID      - Length 12
    Transaction  - Length 20
    Date         - Length 8
    With over 20,000 end users in production this can translate into thousands of records to be inserted into this table daily.
    What is the best way to store this type of information?  Is there a specific table type that is designed for storing massive data quantity?  Also, over time (few years) this table can grow into millions or hundreds of millions of records.  How can we manage that in terms of performance and storage space?
    If anyone has worked with database tables with very large amounts of records, and would like to share your experiences, please let us know how we could/should structure this function in our environment.
    Best Regards.

    Hi SS
    Alternatively, you can use a <u>cluster table</u>. For more help refer to F1 help on <b>"IMPORT TO / EXPORT FROM DATABASE"</b> statements.
    Or you can store data as a <u>file</u> on the application server using <b>"OPEN DATASET, TRANSFER, CLOSE DATASET"</b> statements.
    You can also select to archieve data of older than some definite date.
    You can also mix your alternatives for the recent and archieve data.
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Nested Internal tables with cl_gui_alv_grid - not displaying records

    Hi,
    I wrote a program using nested internal tables with cl_gui_alv_grid class
    At runtime, when I select dropdown on one of the cells (RESWK - driver to the nested table), it does not bring the related record and display it
    Does cl_gu_alv_grid support nested internal tables?
    Or which class to use
    Appreciate reply at the latest
    Thanks
    Rajeev
    Edited by: Thomas Zloch on Feb 7, 2011 4:11 PM - priority reduced

    Hi Rajeev,
    Maybe checking out this documnetation will answer your question:
    [ALV Grid Control (BC-SRV-ALV)|http://help.sap.com/saphelp_erp2004/helpdata/EN/bf/3bd1369f2d280ee10000009b38f889/frameset.htm]
    To my knowledge ALV does not support deep structures.
    Kind regards,
    Robert

  • Regarding joining of two tables with same feilds

    hello gurus
    i am new to abap programming. i have to extract data from two tables ie coss and cosp tables . one table has 180 records and another table has 500 records i want to extract these two table records into internal table(680 records) and then i have to populate it to flatfile through gui download. can any one give me use code to work on it.these two tables has same set of feilds.

    Hi,
    First you should verify if you want to get all the data from both tables regardless if its the same record. If it is, then you can follow this logic:
    select * from coss into table it_coss_cosp. "step 1
    select * from cosp appending table it_coss_cosp. "step 2
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                  =
        filename                      = data.txt
      FILETYPE                      = 'ASC'
      APPEND                        = ' '
      WRITE_FIELD_SEPARATOR         = ' '
      HEADER                        = '00'
      TRUNC_TRAILING_BLANKS         = ' '
      WRITE_LF                      = 'X'
      COL_SELECT                    = ' '
      COL_SELECT_MASK               = ' '
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = it_coss_cosp
    EXCEPTIONS
      FILE_WRITE_ERROR              = 1
      NO_BATCH                      = 2
      GUI_REFUSE_FILETRANSFER       = 3
      INVALID_TYPE                  = 4
      NO_AUTHORITY                  = 5
      UNKNOWN_ERROR                 = 6
      HEADER_NOT_ALLOWED            = 7
      SEPARATOR_NOT_ALLOWED         = 8
      FILESIZE_NOT_ALLOWED          = 9
      HEADER_TOO_LONG               = 10
      DP_ERROR_CREATE               = 11
      DP_ERROR_SEND                 = 12
      DP_ERROR_WRITE                = 13
      UNKNOWN_DP_ERROR              = 14
      ACCESS_DENIED                 = 15
      DP_OUT_OF_MEMORY              = 16
      DISK_FULL                     = 17
      DP_TIMEOUT                    = 18
      FILE_NOT_FOUND                = 19
      DATAPROVIDER_EXCEPTION        = 20
      CONTROL_FLUSH_ERROR           = 21
      OTHERS                        = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    But if you plan to get those record which exists in both tables then use a join condition for your select statement.
    Hope this helps...
    P.S. Please award points for useful answers.

  • Creation of SAP Query in SQ02 with Single Table With Condition

    Hi All,
    I want to Create SAP Query in SQ02 using single Table MCHA.
    ii) I dont want all entries of MCHA Table I mean , I have to apply some Condition on this Table.
    i.e  Suppose I am having actual data in MCHA table is like this for Material M1.
    Plant    Material   Batch   BatchCreationdate
    P1          M1         B1       20.06.2007
    P2          M1         B1       04.05.2009
    P3          M1         B1       04.05.2009
    But I want the Output of SAP Query is like this:
       Material   Batch   BatchCreationdate
          M1         B1       20.06.2007
    That is irrespective of Plant if Material & Batch are equal ---> 1st record with Lowest date shoud get at the output.
    Please help me How write the code on single table in the SAP Query.
    Thanks,
    Kiran Manyam

    Hi,
    Your query should be like this:
    Select MATNR CHARG HSDAT
    from MCHA
    into table t_mcha
    where matnr = Materlal number from selection screen.
    The structure of t_mcha should contain the fields that you select.
    Then sort the table by date ascending
    Sort t_mcha by HSDAT.
    Hope this solves your problem.
    Thanks,
    Sowmya

  • How to append records to final table with conditions

    Hi
    I am working on a report using tables vbrp vbrk glpca & konv to fetch the amount of billing document based on condition type (kschl)
    Below is my query & records are fetching fine. But now I need to append my final display table.
    Question 1.... which table I should loop into  & which tables should be read ?
    Question 2.... I want 4 coulumn in my alv to display amount from konv based on condition type (VPRS, ZK03,Z004, EK02)
    EX:   vbeln          refdocnr         fkdat    ............     VPRS-KBETR    ZK03-KBETR    Z004-KBETR    EK02-KBETR
             000001      000001        1.1.14    ............        14.00               -12.00                 5.00                 0.02
             000002      000002        2.02.14  .........          18.00              -10.00                  0.00                0.00
    It may be possible that for particular record there would be on ZK03 & VPRS VALUES BUT NO Z004 & EK02 so it will display 0 in that cell.
    WITH ABOVE mentioned output how should I put my condition to read it_konv  table based on condition types but append it in different colums for display  ???
    Is there a solution available or not please guide me through this.

       *declare output itab
    DATA: BEGIN OF it_output,
      vbeln type....
      refdocnr...
      fkdat...
      vprs_kbetr...
      zk03_kbetr..
      z004_kbetr...
      ek02_kbetr...
    end of it_output.
    LOOP AT it_join INTO wa_join.
      MOVE vbeln fkdat from wa_join into wa_output.
      LOOP AT it_konv INTO wa_konv
        with key.....
        CASE wa_konv-kschl.
          WHEN 'VPRS'.
            MOVE wa_konv-kbetr TO wa_output-vprs_kbetr.
            etc....
        ENDCASE.
        READ TABLE it_glpca WITH KEY.... into wa_glpca.
        IF sy-subrc = 0.
          MOVE wa_glpca-refdocnr TO wa_output-refdocnr.
        ENDIF.
        APPEND wa_output TO it_output.
      ENDLOOP.
    ENDLOOP.

Maybe you are looking for

  • Basis Changes possible with prod client set to "no changes"

    Hi SAP Basis Experts I am busy with an internal security review of a client's SAP Environment and I experienced a query from the client side regarding a finding on SAP Basis Changes - an area I'm not too well versed in. The Client's Change procedures

  • Autodiscover not working internally

    Hi So far this has driven me crazy. I cannot seem to get this to work. I am going to try and explain the situation fully. What we have is a hosted Exchange environment where we have multiple tenants with their own domains. We have a SSL certificate f

  • Using DTS Wizard to Import a Flat File containing data like "4124, rue Champenois"

    THE BELOW DATA SHOULD BE ONE FIELD, but the COMMA causes it to separate into two fields. The FLAT FILE is a comma-delimited CSV file. The data in the CSV file for this one field actually uses double quotes at each end of the street number and street

  • How can I use AirPlay on an Ipad 1?

    the Ipad 1 doesn't seem to include AirPlay.  Is there any way I can obtain AirPlay or some alternative app so I can display my Ipad screen on my MacBook Pro? Thanks.

  • Need More Help!

    Hi Sorry to be such a pain but I always have problems with this. This isn't related to my other project. I'm saving video from Fraps at 1920 by 1200, in AVI format, the resolution of my monitor. I want to import it into PE10, crop it to a wide screen