Inner join Vs Outer join with ABAP code...?

Inner join Vs Outer join with ABAP code...?

Inner Join means, it will not select that recor at all, unless there is a matching entry in the second table.
suppose table VBAK INNER join table VBAP on VBAKVBELN = VBAPVBELN.
In this case, if there are no entries in VBAP, the header entry also will not show up.
But in case of OUTER JOIN, even if there is no items, it will show the header entry(VBAK) with blank columns for fields  from item table.(VBAP)
here is one sample for inner join.
SELECT   A~EBELN
           A~EKORG
           A~EKGRP
           A~BSART
           A~LPONR
           A~LOEKZ
           A~LIFNR
           A~RESWK
           B~AEDAT
           B~WERKS
           B~MATNR
           B~MENGE
           B~EBELP
           B~ELIKZ
           B~PLIFZ
           B~PSTYP
           B~KNTTP
           B~MATKL
           B~ZZD_PLANT
           FROM EKKO AS A INNER JOIN EKPO AS B
           ON
           AEBELN = BEBELN
           INTO CORRESPONDING FIELDS OF TABLE T_DATA
           FOR ALL ENTRIES IN T_EKET
           WHERE
           A~EBELN EQ T_EKET-EBELN AND
           A~BSART EQ C_UBSTO      AND
           A~EKORG IN S_EKORG      AND
           A~EKGRP IN S_EKGRP      AND
           A~BSTYP EQ C_BSTYP      AND
           A~LOEKZ EQ SPACE        AND " Order not deleted
           A~RESWK IN S_RESWK      AND
           B~EBELN EQ T_EKET-EBELN AND
           B~EBELP EQ T_EKET-EBELP AND
           B~WERKS IN S_WERKS      AND
           B~MATNR IN S_MATNR      AND
           B~MATKL IN S_MATKL      AND
           B~LOEKZ EQ SPACE.           " Line item not deleted

Similar Messages

  • Difference between inner join and outer join

    1.Difference between inner join and outer join
    2.wht is the difference in using hide and get crusor value in interactive.
    3. Using join is better or views in writting program . Which is better.

    Table 1                      Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
        Inner Join
        |--||||||||--|
        | A  | B  | C  | D  | D  | E  | F  | G  | H  |
        |--||||||||--|
        | a1 | b1 | c1 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a2 | b2 | c2 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a4 | b4 | c4 | 3  | 3  | e2 | f2 | g2 | h2 |
        |--||||||||--|
    Example
    Output a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE   LIKE SFLIGHT-FLDATE,
          CARRID LIKE SFLIGHT-CARRID,
          CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
        INTO (CARRID, CONNID, DATE)
        FROM SFLIGHT AS F INNER JOIN SPFLI AS P
               ON FCARRID = PCARRID AND
                  FCONNID = PCONNID
        WHERE P~CITYFROM = 'FRANKFURT'
          AND P~CITYTO   = 'NEW YORK'
          AND F~FLDATE BETWEEN '20010910' AND '20010920'
          AND FSEATSOCC < FSEATSMAX.
      WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or a table alias.
    Note
    In order to determine the result of a SELECT command where the FROM clause contains a join, the database system first creates a temporary table containing the lines that meet the ON condition. The WHERE condition is then applied to the temporary table. It does not matter in an inner join whether the condition is in the ON or WHEREclause. The following example returns the same solution as the previous one.
    Example
    Output of a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out:
    DATA: DATE   LIKE SFLIGHT-FLDATE,
          CARRID LIKE SFLIGHT-CARRID,
          CONNID LIKE SFLIGHT-CONNID.
    SELECT FCARRID FCONNID F~FLDATE
        INTO (CARRID, CONNID, DATE)
        FROM SFLIGHT AS F INNER JOIN SPFLI AS P
               ON FCARRID = PCARRID
        WHERE FCONNID = PCONNID
          AND P~CITYFROM = 'FRANKFURT'
          AND P~CITYTO   = 'NEW YORK'
          AND F~FLDATE BETWEEN '20010910' AND '20010920'
          AND FSEATSOCC < FSEATSMAX.
      WRITE: / DATE, CARRID, CONNID.
    ENDSELECT.
    Note
    Since not all of the database systems supported by SAP use the standard syntax for ON conditions, the syntax has been restricted. It only allows those joins that produce the same results on all of the supported database systems:
    Only a table or view may appear to the right of the JOIN operator, not another join expression.
    Only AND is possible in the ON condition as a logical operator.
    Each comparison in the ON condition must contain a field from the right-hand table.
    If an outer join occurs in the FROM clause, all the ON conditions must contain at least one "real" JOIN condition (a condition that contains a field from tabref1 amd a field from tabref2.
    Note
    In some cases, '*' may be specified in the SELECT clause, and an internal table or work area is entered into the INTO clause (instead of a list of fields). If so, the fields are written to the target area from left to right in the order in which the tables appear in the FROM clause, according to the structure of each table work area. There can then be gaps between table work areas if you use an Alignment Request. For this reason, you should define the target work area with reference to the types of the database tables, not simply by counting the total number of fields. For an example, see below:
    Variant 3
    ... FROM tabref1 LEFT [OUTER] JOIN tabref2 ON cond
    Effect
    Selects the data from the transparent database tables and/or views specified in tabref1 and tabref2. tabref1 und tabref2 both have either the same form as in variant 1 or are themselves join expressions. The keyword OUTER can be omitted. The database tables or views specified in tabref1 and tabref2 must be recognized by the ABAP-Dictionary.
    In order to determine the result of a SELECT command where the FROM clause contains a left outer join, the database system creates a temporary table containing the lines that meet the ON condition. The remaining fields from the left-hand table (tabref1) are then added to this table, and their corresponding fields from the right-hand table are filled with ZERO values. The system then applies the WHERE condition to the table.
    Left outer join between table 1 and table 2 where column D in both tables set the join condition:
    Table 1                      Table 2
    A
    B
    C
    D
    D
    E
    F
    G
    H
    a1
    b1
    c1
    1
    1
    e1
    f1
    g1
    h1
    a2
    b2
    c2
    1
    3
    e2
    f2
    g2
    h2
    a3
    b3
    c3
    2
    4
    e3
    f3
    g3
    h3
    a4
    b4
    c4
    3
    |--|||--|
        Left Outer Join
        |--||||||||--|
        | A  | B  | C  | D  | D  | E  | F  | G  | H  |
        |--||||||||--|
        | a1 | b1 | c1 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a2 | b2 | c2 | 1  | 1  | e1 | f1 | g1 | h1 |
        | a3 | b3 | c3 | 2  |NULL|NULL|NULL|NULL|NULL|
        | a4 | b4 | c4 | 3  | 3  | e2 | f2 | g2 | h2 |
        |--||||||||--|
    Regards
    Prabhu

  • Why Inner join or Outer join is not used for Pool or Cluster tables  ?

    Hi SAP-ABAP Experts .
    With Due Regards .
    May u explain me why Inner join or Outer join is not useful for Pool or Cluster tables  ?
    because peoples advised not use Joins for Pool and Cluster tables , What harm will take place , If we do this ?
    Best Regards to all : Rajneesh

    Both Pooled and Cluster Tables are stored as tables within the database. Only the structures of the two table types which represent a single logical view of the data are defined within the ABAP/4 Data Dictionary. The data is actually stored in bulk storage in a different structure. These tables are commonly loaded into memory (i.e., 'buffered') due to the fact they are typically used for storing internal control information and other types of data with little or no external (business) relevance.
    Pooled and cluster tables are usually used only by SAP and not used by customers, probably because of the proprietary format of these tables within the database and because of technical restrictions placed upon their use within ABAP/4 programs. On a pooled or cluster table:
    Secondary indexes cannot be created.
    You cannot use the ABAP/4 constructs select distinct or group by.
    You cannot use native SQL.
    You cannot specify field names after the order by clause. order by primary key is the only permitted variation.
    I hope it helps.
    Best Regards,
    Vibha
    Please mark all the helpful answers

  • Inner join and outer join

    hi friends,
    how to use inner join and outer join methods in abap. pls explain

    you have to code them
    Seriously, I suggest you take an ABAP class, it's out of the scope of this forum to tech you how to program joins.
    Markus

  • Inner join and outer  join in infosets

    hi everyone,
    i have a doubt in infosets...
    when and why we use inner and outer joins(right outer join and left outer join) for infoset
    please give a real time scenario........
    Thanks in advance.
    Bye.

    Hello,
    Inner join:
    For example, the requirement is to show all sales documents where you have delivery exists. In this case, you join both sales ods and delivery ods in a infoset as inner join. This will match the record against the reference documents and pull only matched records.  
    Outer Join:
    Suppose you want to pull all billing/invoice details along with their FI documents related data in a report. Assume that always there might be a situation that invoice exists but not posted to FI, however, you want to have all billing documents details either it has FI document or not. In this case, you link both Billing data and FI document data in a outer join.  This will pull all invoices data either FI document exists or not.   Other words, you want to show one side of data always but adding additional details from differenent source if data exists.
    Hope, it clarifies your doubt. Let me know if any questions.
    Thanks
    Viswa

  • SYNTAX "INNER JOIN and OUTER JOIN"

    Hi Experts,
    I think LEFT JOIN,INNER JOIN syntax is in ANSI.
    I know that Oracle has got its own alternate(+) operator to serve the purpose.
    Please tell me whether INNER JOIN,OUTER JOIN,LEFT JOIN,LEFT OUTER JOIN,RIGHT OUTER JOIN these syntaxes present in ORACLE 8I.
    If not in 9i Or highr versions are they existing?
    Thanks in advance,
    Ananth
    null

    Hi,
    8i has inner join. (+) syntax supports LEFT or RIGHT OUTER JOIN.
    FULL OUTER JOIN is supported in 9i, which introduces the JOIN keyword.
    Herman

  • How to use left outer joins ,right outer joins and order by clause for belo

    Hi,
    How to use left outer joins ,right outer joins and order by clause for below XML query.
    The query which is red colour returns null then its not displaying any values for columns in that tables. Tried decode, nvl function hasn't worked.
    SELECT XMLAGG ( XMLELEMENT( "P", XMLFOREST( P.process_id AS Ppid,
              (SELECT XMLAGG( XMLELEMENT( "PI", XMLFOREST( PI.question_id AS PIqid,
                                       PI.process_id AS PIpid,
    PI.innertext AS
                                       PItext, PI.itemtype AS PItype,
                                       PI.linkfrom AS PIfrom,
                                       PI.linkto AS PIto,
    PI.associated AS PIas,
                                       PI.content_id AS PIc,
                                       PI.exitpoint1_id AS PIe1,
                                       PI.exitpoint2_id AS PIe2,
                                       PI.exitpoint3_id AS PIe3,
                                       PI.followoncall AS PIfoc,
    PI.userinput AS PIui,
                                       PI.resolveidentifier AS PIri,
    PI.libquestion_idfk AS PIlqid,
                                       PI.isLocked AS PIstls,
                                       PI.PreviousAnswer AS PIPAns,
                                       PI.VisibleToAgent AS PIVAgent,
                                       PI.RetryAttempt AS PIRetry,
                                       PI.Tags AS PITag,
                                  SELECT XMLAGG( XMLELEMENT( "PO", XMLFOREST( PO.option_id AS POoid,
                                       PO.question_id AS POqid,
                                                           PO.process_id AS popid,
                                                           PO.opt_innertext AS POtext,
                                                           PO.opt_linkfrom AS POfrom,
                                                           PO.opt_linkto AS POto,
                                                           PO.libquestion_idfk AS POlqid,
                                                           PO.liboption_idfk AS POloid ) ) )
                                  FROM vw_liveProcessOption_Sim_v6 PO
                                       WHERE PI.question_id = PO.question_id (+)
                                  AND PI.process_id = PO.process_id (+)
                                  ) "A" ) ) ) AS "PO"
         FROM vw_liveProcessItem_Sim_v6 PI
              WHERE P.process_id = PI.process_id
              ) "A" ) ) ) AS "PI"
    FROM liveProcess_ec P
    WHERE (P.process_id = 450)
    Any help really appreciated.
    Thanks

    user512743 wrote:
    Hi,
    Here below is the scripts of tables, insert statements and Required output.
    CREATE TABLE VW_LIVEPROCESSOPTION_SIM_v6
    (     "OPTION_ID" NUMBER,
         "QUESTION_ID" NUMBER(10,0),
         "PROCESS_ID" NUMBER(10,0),
         "OPT_INNERTEXT" VARCHAR2(200 CHAR),
         "OPT_LINKFROM" VARCHAR2(20 CHAR),
         "OPT_LINKTO" VARCHAR2(20 CHAR),
         "LIBQUESTION_IDFK" NUMBER,
         "LIBOPTION_IDFK" NUMBER
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,2,450,'Yes',null,'5',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,3,450,'Yes',null,'5',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,5,450,'Yes',null,'6',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,6,450,'Yes',null,'7',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,8,450,'Block All',null,'9',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,9,450,'Yes',null,'10',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,11,450,'Yes',null,'12',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,12,450,'Yes',null,'13',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (1,14,450,'Yes',null,'16',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,2,450,'No',null,'3',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,3,450,'No',null,'4',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,5,450,'No',null,'8',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,6,450,'No',null,'8',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,8,450,'Standard',null,'11',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,9,450,'No',null,'11',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,11,450,'No',null,'14',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,12,450,'No',null,'14',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (2,14,450,'No',null,'15',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (3,8,450,'Disabled',null,'12',null,null);
    Insert into VW_LIVEPROCESSOPTION_SIM_v6(OPTION_ID,QUESTION_ID,PROCESS_ID,OPT_INNERTEXT,OPT_LINKFROM,OPT_LINKTO,LIBQUESTION_IDFK,LIBOPTION_IDFK) values (4,8,450,'User Defined',null,'12',null,null);
    REATE TABLE "VW_LIVEPROCESSITEM_SIM_v6"
    (     "QUESTION_ID" NUMBER(10,0),
         "PROCESS_ID" NUMBER(10,0),
         "INNERTEXT" VARCHAR2(200 CHAR),
         "ITEMTYPE" VARCHAR2(50 CHAR),
         "LINKFROM" VARCHAR2(500 CHAR),
         "LINKTO" VARCHAR2(500 CHAR),
         "ASSOCIATED" VARCHAR2(200 CHAR),
         "CONTENT_ID" NUMBER,
         "EXITPOINT1_ID" NUMBER(10,0),
         "EXITPOINT2_ID" NUMBER(10,0),
         "EXITPOINT3_ID" NUMBER(10,0),
         "RESOLVEIDENTIFIER" VARCHAR2(40 CHAR),
         "LIBQUESTION_IDFK" NUMBER(10,0),
         "FOLLOWONCALL" NUMBER(1,0),
         "USERINPUT" VARCHAR2(200 CHAR),
         "ISLOCKED" NUMBER(1,0),
         "PREVIOUSANSWER" NUMBER(1,0),
         "VISIBLETOAGENT" NUMBER(1,0),
         "RETRYATTEMPT" NUMBER(10,0),
         "TAGS" VARCHAR2(50 BYTE)
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (1,450,'CBB1015 - Router Firewall Settinngs Process','Title',null,'2',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (2,450,'Is the customers PC Firewall turned off?','Question','1','2.2,2.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (3,450,'Advise the customer to turn off the PC Firewall in order to continue. Has this been done?','Question','2.2','3.2,3.1',null,278,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (4,450,'Advise the customer the PC Firewall must be switched off before this process????','ExitPoint','3.2',null,null,null,14,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (5,450,'Is the customer able to access the internet now?','Question','3.1,2.1','5.2,5.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (6,450,'Is the customer having a problem with a specific website?','Question','5.1','6.2,6.1',null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (7,450,'1536: CBB1008 - Browser Setup and Daignostics','SubProcess','6.1',null,'1536-1-0',null,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (8,450,'What is the security level on the CPE Management page?','Question','6.2,5.2','8.4,8.3,8.2,8.1',null,279,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (9,450,'Change the security level to Standard. Does this resolve the customers issue?','Question','8.1','9.2,9.1',null,280,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (10,450,'Issue Resolved','ExitPoint','9.1',null,null,null,1,6,122,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (11,450,'Change the security level to Disabled. Is the customer able to browse the internet?','Question','9.2,8.2','11.2,11.1',null,281,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (12,450,'Change the security level to Standard. Is the customer able to browse the internet now?','Question','11.1,8.3,8.4','12.2,12.1',null,283,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (13,450,'Issue Resolved','ExitPoint','12.1',null,null,null,1,6,123,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (14,450,'Ask the customer to perform a master reset. Does this resolve their issue?','Question','12.2,11.2','14.2,14.1',null,282,null,null,null,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (15,450,'Faulty CPE','ExitPoint','14.2',null,null,null,1,6,124,null,null,null,null,null,null,null,null,null);
    Insert into VW_LIVEPROCESSITEM_SIM_v6 (QUESTION_ID,PROCESS_ID,INNERTEXT,ITEMTYPE,LINKFROM,LINKTO,ASSOCIATED,CONTENT_ID,EXITPOINT1_ID,EXITPOINT2_ID,EXITPOINT3_ID,RESOLVEIDENTIFIER,LIBQUESTION_IDFK,FOLLOWONCALL,USERINPUT,ISLOCKED,PREVIOUSANSWER,VISIBLETOAGENT,RETRYATTEMPT,TAGS) values (16,450,'Issue Resolved','ExitPoint','14.1',null,null,null,1,6,123,null,null,null,null,null,null,null,null,null);
    CREATE TABLE "LIVEPROCESS_EC_V"
    (     "PROCESS_ID" NUMBER(10,0),
         "USER_ID" NUMBER(10,0),
         "CREATED" TIMESTAMP (6)
    Insert into LIVEPROCESS_EC (PROCESS_ID,USER_ID,CREATED) values (450,7460,to_timestamp('21-APR-08 09.34.41.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'));
    Required O/P in XML format
    <P>
    <Ppid>450</Ppid>
    <PI>
    <PIqid>1</PIqid>
    <PIpid>450</PIpid>
    <PItext>CBB1015 - Router Firewall Settinngs Process</PItext>
    <PItype>Title</PItype>
    <PIto>2</PIto>
    <PO />
    </PI>
    <PI>
    <PIqid>2</PIqid>
    <PIpid>450</PIpid>
    <PItext>Is the customers PC Firewall turned off?</PItext>
    <PItype>Question</PItype>
    <PIfrom>1</PIfrom>
    <PIto>2.2,2.1</PIto>
    <PO>
    <POoid>1</POoid>
    <POqid>2</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>5</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>2</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>3</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>3</PIqid>
    <PIpid>450</PIpid>
    <PItext>Advise the customer to turn off the PC Firewall in order to continue. Has this been done?</PItext>
    <PItype>Question</PItype>
    <PIfrom>2.2</PIfrom>
    <PIto>3.2,3.1</PIto>
    <PIc>278</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>3</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>5</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>3</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>4</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>4</PIqid>
    <PIpid>450</PIpid>
    <PItext>Advise the customer the PC Firewall must be switched off before this process????</PItext>
    <PItype>ExitPoint</PItype>
    <PIfrom>3.2</PIfrom>
    <PIe1>14</PIe1>
    <PO />
    </PI>
    <PI>
    <PIqid>5</PIqid>
    <PIpid>450</PIpid>
    <PItext>Is the customer able to access the internet now?</PItext>
    <PItype>Question</PItype>
    <PIfrom>3.1,2.1</PIfrom>
    <PIto>5.2,5.1</PIto>
    <PO>
    <POoid>1</POoid>
    <POqid>5</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>6</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>5</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>8</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>6</PIqid>
    <PIpid>450</PIpid>
    <PItext>Is the customer having a problem with a specific website?</PItext>
    <PItype>Question</PItype>
    <PIfrom>5.1</PIfrom>
    <PIto>6.2,6.1</PIto>
    <PO>
    <POoid>1</POoid>
    <POqid>6</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>7</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>6</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>8</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>7</PIqid>
    <PIpid>450</PIpid>
    <PItext>1536: CBB1008 - Browser Setup and Daignostics</PItext>
    <PItype>SubProcess</PItype>
    <PIfrom>6.1</PIfrom>
    <PIas>1536-1-0</PIas>
    <PO />
    </PI>
    <PI>
    <PIqid>8</PIqid>
    <PIpid>450</PIpid>
    <PItext>What is the security level on the CPE Management page?</PItext>
    <PItype>Question</PItype>
    <PIfrom>6.2,5.2</PIfrom>
    <PIto>8.4,8.3,8.2,8.1</PIto>
    <PIc>279</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>8</POqid>
    <popid>450</popid>
    <POtext>Block All</POtext>
    <POto>9</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>8</POqid>
    <popid>450</popid>
    <POtext>Standard</POtext>
    <POto>11</POto>
    </PO>
    <PO>
    <POoid>3</POoid>
    <POqid>8</POqid>
    <popid>450</popid>
    <POtext>Disabled</POtext>
    <POto>12</POto>
    </PO>
    <PO>
    <POoid>4</POoid>
    <POqid>8</POqid>
    <popid>450</popid>
    <POtext>User Defined</POtext>
    <POto>12</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>9</PIqid>
    <PIpid>450</PIpid>
    <PItext>Change the security level to Standard. Does this resolve the customers issue?</PItext>
    <PItype>Question</PItype>
    <PIfrom>8.1</PIfrom>
    <PIto>9.2,9.1</PIto>
    <PIc>280</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>9</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>10</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>9</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>11</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>10</PIqid>
    <PIpid>450</PIpid>
    <PItext>Issue Resolved</PItext>
    <PItype>ExitPoint</PItype>
    <PIfrom>9.1</PIfrom>
    <PIe1>1</PIe1>
    <PIe2>6</PIe2>
    <PIe3>122</PIe3>
    <PO />
    </PI>
    <PI>
    <PIqid>11</PIqid>
    <PIpid>450</PIpid>
    <PItext>Change the security level to Disabled. Is the customer able to browse the internet?</PItext>
    <PItype>Question</PItype>
    <PIfrom>9.2,8.2</PIfrom>
    <PIto>11.2,11.1</PIto>
    <PIc>281</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>11</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>12</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>11</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>14</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>12</PIqid>
    <PIpid>450</PIpid>
    <PItext>Change the security level to Standard. Is the customer able to browse the internet now?</PItext>
    <PItype>Question</PItype>
    <PIfrom>11.1,8.3,8.4</PIfrom>
    <PIto>12.2,12.1</PIto>
    <PIc>283</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>12</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>13</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>12</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>14</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>13</PIqid>
    <PIpid>450</PIpid>
    <PItext>Issue Resolved</PItext>
    <PItype>ExitPoint</PItype>
    <PIfrom>12.1</PIfrom>
    <PIe1>1</PIe1>
    <PIe2>6</PIe2>
    <PIe3>123</PIe3>
    <PO />
    </PI>
    <PI>
    <PIqid>14</PIqid>
    <PIpid>450</PIpid>
    <PItext>Ask the customer to perform a master reset. Does this resolve their issue?</PItext>
    <PItype>Question</PItype>
    <PIfrom>12.2,11.2</PIfrom>
    <PIto>14.2,14.1</PIto>
    <PIc>282</PIc>
    <PO>
    <POoid>1</POoid>
    <POqid>14</POqid>
    <popid>450</popid>
    <POtext>Yes</POtext>
    <POto>16</POto>
    </PO>
    <PO>
    <POoid>2</POoid>
    <POqid>14</POqid>
    <popid>450</popid>
    <POtext>No</POtext>
    <POto>15</POto>
    </PO>
    </PI>
    <PI>
    <PIqid>15</PIqid>
    <PIpid>450</PIpid>
    <PItext>Faulty CPE</PItext>
    <PItype>ExitPoint</PItype>
    <PIfrom>14.2</PIfrom>
    <PIe1>1</PIe1>
    <PIe2>6</PIe2>
    <PIe3>124</PIe3>
    <PO />
    </PI>
    <PI>
    <PIqid>16</PIqid>
    <PIpid>450</PIpid>
    <PItext>Issue Resolved</PItext>
    <PItype>ExitPoint</PItype>
    <PIfrom>14.1</PIfrom>
    <PIe1>1</PIe1>
    <PIe2>6</PIe2>
    <PIe3>123</PIe3>
    <PO />
    </PI>
    </P>
    Thanks in advance
    Edited by: user512743 on Nov 18, 2008 4:46 AM

  • Invalid combinations of joins involving outer joins

    Hi all, I have the following problem
    Scenario: I created 6 custom folders:
    Tasks (with measures)
    Type
    Criticity
    Status
    Owners
    Assignees
    The first folder is used to retrieve how many tasks (COUNT(tasks)) have a particular type or status or a combination between them, and the others 5 are dimensions.
    I create 6 joins starting always from the dimensions in this way (radio buttons):
    Detail item values always exist in master folder (Typical)
    Outer join on detail
    where the master is always a dimension and the detail is always the custom folder with the measures.
    I put the outer join on the custom folder with the measures because I want to show '0' in case I don't have any record on this folder for a specific attribute on a dimension (the join fails).
    I saw that if I put the outer join on the master (dimensions), when the join fails I don't see at all the information regarding that particular dimension.
    For example
    I select 2 folder: Tasks and Assignee
    join: Tasks.task_id (+) = Assignee.task_id
    Result:
    TASK ASSIGNEE
    10 Mr. A
    20 Mr. B
    30 Mr. C
    0 Mr. D
    Just to make a test, If I change the join on Administrator putting :
    Detail item values might not exist in master folder
    Outer join on master
    ...the result is this
    TASK ASSIGNEE
    10 Mr. A
    20 Mr. B
    30 Mr. C
    ...I don't see the last record.
    The customer asked to see always the record with task =0 (if exists), so I joined all the custom folders as I expalned above, but when I try to link (on Discoverer Plus) more than two tasks I have the following error:
    Invalid combinations of joins involving outer joins
    So, my question is this: how can I avoid this error ? Does it exist any trick or another way to link the custom folders (showing always the records with '0' when the join doesn't retrieve nothing ) ?
    Thanks in advance
    Alex

    Well I will take a stab at answering this. The problem is not knowing what is in your custom folders. Also not knowing the specifics on your Discoverer Join definitions. On something like this you may be better going to Oracle support, since they can start a Web Conference and see exactly what you see, and can check out the various possibilities. All we here can do is make guesses, and the guesses could be wrong.
    You do have to be careful in your join definitions in Discoverer. You have to pick the correct table as the Master table, and the correct table as the Detail table. Mess that up and you can mess yourself up. So my first though is check your join definition. Sounds like you want assigned to be the master table. Then tasks would be the detail table.
    Then you want to pick the option that detail items might not exist in master. Which it looks like you have done.
    Then for the other options, Oracle, in my mind, does the opposite of what I would think to pick. If you pick OUTER JOIN ON DETAIL, that will include the Master items with no detail items. So that is what you need to pick.
    Looks like you did the OUTER JOIN ON MASTER, which means will include detail items with no master. Since you had a master with no detail, it will not show, and that is why the Mr. D does not show.
    I always have to do the help on this because it is opposite of what I would expect - my mind thinks outer join on master should include all masters. Nope, it has to be the outer join on detail to do that.
    The master with no detail will probably show a NULL value in the column for the detail, instead of 0. You could convert the null value to display as a 0.
    Hope this helps a bit. Just remember that I am guessing/speculating on a possible cause.
    John Dickey

  • SQ01 - Join of different tables or ABAP Code in SAP Query

    Hello,
    I am trying to link some TO tables LTAK and LTAP together with the header table of the production orders AFKO.
    It seems that the SQ01 won't let me joint the LT* and the AFKO table.
    But I need to read some values from the AFKO table according to the transfer orders apart from the production order number.
    Is there a way in QUERY to join this or can I add somewhere in the query a little ABAP code?
    My aim is to avoid writing a ABAP report due to various reason.
    Any help would be nice.
    Cheers
    Uwe Neumann

    Hello,
    thanx for your answers so far.
    I was able to join in the third table.
    After a little investigation, I found out that I have to join the table AFPO with the materialnumber instead of AFKO, because the components are in AFPO.
    But this is just the one side of the material.
    Let's assume the transfer order contains of material A and B and we have production order 111.
    If I would let run the query, it would select all material A and B in table AFKO, because I have not said, just look for material A and B for production order 111. As I cannot join the field AFPO-AUFNR with LTAK-BENUM this is missing.
    Where can I specify this?
    Best regards
    Uwe Neumann

  • Equal Join and Outer Join in OBIEE

    Hello expert,
    I think the default join in OBIEE is Outer Join. So no matter what join conditions that I specify on the physical layer, the result that I get in the presentation layer is still outer join.
    How to specify the equal join or inner join in Business and Logical layer?

    Hello,
    Thank you for your reply. However it does not work. I got the following message:
    [nQSError: 32005] The object "Fact - Fruit" bc if type 'LOGICAL TABLE SOURCE': is missing a foreign key or a complex join in the join graph.
    The situation that I have is:
    Fact table: "Fact - Fruit"
    List of value table (look up table): "dim_list_of_values"
    I am only interested in the type in the "dim_list_of_values" table where equals to "Apple". So I only want to join the "Fact - Fruit" and "dim_list_of_values" with those records with "Apple" type.
    It sounds to me that I am unable to define a freign key.

  • IDOC: How to create child segment with abap code.

    Hi,
    I'am trying to write an abap code to create segments for an Idoc which structure is the following:
    ZLE_00060_DLVY
    >  E1EDL20
    > Z1DEL_CONS
    >Z1DEL_MAT_HEADER
    > Z1DEL_MAT
    > E1EDL20RET2
    > E1EDL22
    > E1EDL21
    > E1EDL23
    > E1EDL51
    I receive a sintax error: Error in IDoc with status 26 .
    Checking the result I note all segment at the same level and an error about the segment E1EDL22
    EDI: Syntax error in IDoc (segment cannot be identified)
         Message no. E0078
    Diagnosis
         The segment E1EDL22 does not occur at the current level of the basic
         type DELVRY05 (extension ZLE_00060_DLVY).
         This error can have several reasons:
         o   The segment E1EDL22 is assigned to a group whose header segment does
             not occur.
         o   The segment E1EDL22 does not exist in the syntax description of the
             basic type DELVRY05 (extension ZLE_00060_DLVY).
         o   The sequence of segments in the group in which the segment appears
             is incorrect.
         Previous errors ('mandatory' segment or group missing) may be due to
         this error.
    Procedure
         Please check the IDoc or the syntax description of the basic type
         DELVRY05 (extension ZLE_00060_DLVY).
    After the error I have:
    data records
    E1EDL20
    Z1DEL_CONS
    Z1DEL_MAT_HEADER
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    Z1DEL_MAT
    E1EDL20RET2
    E1EDL22
    E1EDL21
    Abap code:
            idoc_data-segnam = 'Z1DEL_CONS'.
            idoc_data-sdata = s_z1del_cons.
            append idoc_data.
              idoc_data-segnam = 'Z1DEL_MAT_HEADER'.
              s_z1del_mat_header-tsegment = 'MATERIAL'.
              idoc_data-sdata = s_z1del_mat_header.
              append idoc_data.
            clear idoc_data-sdata.                            <<<<<<<<<<< how to indent the structure because this is a child.
             idoc_data-sdata = s_Z1DEL_MAT.
             idoc_data-segnam = 'Z1DEL_MAT'.
             append idoc_data.
             idoc_data-segnam = 'E1EDL20RET2'.
             idoc_data-sdata = s_E1EDL20RET2.
             append idoc_data.
             clear idoc_data.
             idoc_data-segnam = 'E1EDL22'.
             idoc_data-sdata = s_e1edl22.
             append idoc_data.
             clear idoc_data.
             idoc_data-segnam = 'E1EDL21'.
             idoc_data-sdata = s_e1edl21.
             append idoc_data.
    Any help will be well appreciated.
    Thanks in advance.
    Regards,
        Giovanni

    Hi,
    following in debugging mode the abap code of the INCLUDE ZXTRKU02 where is defined the TABLES IDOC_DATA STRUCTURE  EDIDD, I find that all field of the table IDOC_DATA are not set. More exactly my expectation is to find values for SEGNUM, HLEVEL, PSGNUM.
    In a few words I need to execute an enhancement, via abap code, of the struscure of the idoc before sending it out since I have a requirement to test this enhancement in my XI environment, receiving as input this ideoc modified.
    Then, I need to add a new segment and one child.
    Any suggestion will be well appreciated.
    Thanks in advance.
    Regards,
        Giovanni

  • Outer Join without Outer Join

    I'm trying to do is learn how to do an outer join without specifying right, left or full outer join. Why? Performance reasons mostly and to gain a better understanding of Oracle.
    Thanks,
    Charles.

    Another option would be a scalar sub-query in the select portion, like:
    SQL> select * from t;
            ID DESCR
             1 T One
             2 T Two
             3 T Three
    SQL> select * from t1;
            ID DESCR
             1 T1 One
             2 T1 Two
    SQL> select t.*, t1.descr t1_descr
      2  from t
      3     left join t1
      4        on t.id = t1.id;
            ID DESCR      T1_DESCR
             1 T One      T1 One
             2 T Two      T1 Two
             3 T Three
    SQL> select t.*, (select t1.descr
      2               from t1
      3               where t.id = t1.id) t1_descr
      4  from t;
            ID DESCR      T1_DESCR
             1 T One      T1 One
             2 T Two      T1 Two
             3 T ThreeThis can be faster if the correlated column in t1 is indexed, and there are a "large" number of records in t that do not match with t1.
    John

  • Equi Join and Outer join using outer keyword

    Hi,
    First lets take the create statment for scott schema.
    create table scott.emp_details(empno number, bonus_date date);
    Insert Into Scott.Emp_Details Values(7369, To_Date('01-jan-2013'));
    Insert Into Scott.Emp_Details Values(7499, To_Date('05-jan-2013'));
    Insert Into Scott.Emp_Details Values(7521, To_Date('10-jan-2013'));
    Insert Into Scott.Emp_Details Values(7566, To_Date('01-feb-2013'));
    Insert Into Scott.Emp_Details Values(7654, To_Date('05-feb-2013'));
    commit;lets also consider the basic scott.emp and scott.dept tables
    Now I would like to equi join emp table deptno col with dept table deptno col and left outer join emp table hiredate with emp_details bonus_date and empno col in emp_details can be joined(Equi Join) with empno col of emp table if needed .The outer join has to be placed using the keyword (left/right)outer join
    The select statement can have all the detials of emp table .The requirement may look weird but we have some such requirement.
    Please suggest

    Hi,
    sri wrote:
    Hi,
    First lets take the create statment for scott schema.
    create table scott.emp_details(empno number, bonus_date date);
    Insert Into Scott.Emp_Details Values(7369, To_Date('01-jan-2013'));
    Insert Into Scott.Emp_Details Values(7499, To_Date('05-jan-2013'));
    Insert Into Scott.Emp_Details Values(7521, To_Date('10-jan-2013'));
    Insert Into Scott.Emp_Details Values(7566, To_Date('01-feb-2013'));
    Insert Into Scott.Emp_Details Values(7654, To_Date('05-feb-2013'));
    commit;
    It's best not to create your own tables in Oracle-supplied schemas, such as SCOTT. Use your own schema for your own tables.
    lets also consider the basic scott.emp and scott.dept tablesI see; you're using the standard scott,emp and scott.dept tables, plus the emp_details table you posted above.
    Now I would like to equi join emp table deptno col with dept table deptno col and left outer join emp table hiredate with emp_details bonus_date and empno col in emp_details can be joined(Equi Join) with empno col of emp table if needed .The outer join has to be placed using the keyword (left/right)outer join
    The select statement can have all the detials of emp table .The requirement may look weird but we have some such requirement.
    Please suggestThanks for posting the sample data. Don't forget to post the exact output you want from that sample data.
    Do you want something like this?
    `    EMPNO ENAME          DEPTNO DNAME          BONUS_DAT
          7369 SMITH              20 RESEARCH       01-JAN-13
          7499 ALLEN              30 SALES          05-JAN-13
          7521 WARD               30 SALES          10-JAN-13
          7566 JONES              20 RESEARCH       01-FEB-13
          7654 MARTIN             30 SALES          05-FEB-13
          7698 BLAKE              30 SALES
          7782 CLARK              10 ACCOUNTING
          7788 SCOTT              20 RESEARCH
          7839 KING               10 ACCOUNTING
          7844 TURNER             30 SALES
          7876 ADAMS              20 RESEARCH
          7900 JAMES              30 SALES
          7902 FORD               20 RESEARCH
          7934 MILLER             10 ACCOUNTING
                                  40 OPERATIONSIf so, here's one way to do it:
    SELECT       e.empno, e.ename     -- or whatever columns you want
    ,       d.deptno, d.dname     -- or whatever columns you want
    ,       ed.bonus_date
    FROM           scott.dept  d
    LEFT OUTER JOIN      scott.emp   e   ON  e.deptno     = d.deptno
    LEFT OUTER JOIN      emp_details ed      ON  ed.empno     = e.empno
    ORDER BY  e.empno
    ;

  • Joins and Outer joins

    Sorry for being a newbie!
    I was using JPQL to grab data from one table that requires an outer join to another table.
    I thought I could do this:
    select a.f1,a.f2,b.f3 from A a LEFT OUTER JOIN B b
    where a.id = b.id and
    a.match = b.match;
    A and B are entities and I need to join with two columns. Can someone please tell me what I'm doing wrong.
    Thanks!

    osubb wrote:
    Sorry for being a newbie!Everybody starts out with less knowledge than others, no need to apologize for that.
    >
    I was using JPQL to grab data from one table that requires an outer join to another table.Okay.
    >
    I thought I could do this:
    select a.f1,a.f2,b.f3 from A a LEFT OUTER JOIN B b
    where a.id = b.id and
    a.match = b.match;
    A and B are entities and I need to join with two columns. Can someone please tell me what I'm doing wrong.
    Thanks!Generally you do these kind of mappings through the Entities. For example, you can have a OneToMany / ManyToOne mapping between the two entities. Check out the Toplink reference guide for some examples on how to do this:
    [http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-annotations.html#ManyToOne|toplink JPA annotations reference]
    Even if you are not using Toplink, this is the same for all persistence providers.

  • How can I join/Full outer join two different columns instead of union all?

    Hi,
    I have a scenario as the following:
    I am performing set operations using obiee 11g where I want to take values from two different criteria. Howwver, I dont want union to take place, instead i want join to take place to see all the columns in the output.
    For that, I tried changing the sql in advanced tab and tried to put full outer join instead of union all but its not allowing me to change.
    How can I achieve it? please help.
    Thanks.

    Hi,
    My problem is that I am unable to modify the sql in advanced tab. Probably due to some security reason,it's restricting me to change.
    Can you suggest me a way to change it?
    Thanks..

Maybe you are looking for