Join MARA with MCSHIERB

Hi,
I need to join the dictionary tables MARA and MCSHIERB to create lists of materiales for output in .txt files.
My problem is finding a referencebetween the tables.
I need to select MARA-MTART MCSHIERB-NAME
              where MARA-MTART = 'ZPAC'.
If anyone can help please let me know.
Regards,
Simon

Hi,
Use this way.
1. Use SQVI transaction,
2. Create a View
3. Enter title,
4. Choose the Data source as Table Join
5. Now use Insert table option.
6. And insert the tables which you want. It will propose the relation between them.
Thanks
Nitesh

Similar Messages

  • Join MARA with TKKH

    Hi,
    I need to make a join between the tables MARA & TKKH2. 
    The fields I need to retrieve are MARA-MTART, TKKH2-HRKFT and TKKH2-HRKTX
    where MTART in ('ZENV', 'ZEMB', 'ZMAT')
    I know there is no direct reference between the two but if anyone has any ideas about it let me know.
    Regards,
    Simon

    there is no direct link between MARA and TKKH, so no answer to your request,; more exactly there may be multiple values for one material number.
    You need to start from MBEW, which has a HRKFT field related to TKKH1 table. Look at foreign key on table MBEW field HRKFT. (or build KOKRS from MBEW-BWKEY -(T001K)-> BUKRS -(TKA02)-> KOKRS.)
    I almost forgot to mention that TKKH2 is TKKH1 text table.
    Regards

  • SQ01-query - how to join MARA and DRAD

    Hi all,
    my problem is that I have to create a sq01 query in which I combine data from the MARA
    with data from DRAD. But I can't join the OBJKY (DRAD) with the MATRN (MARA).
    Hoping for help,
    Barbara

    Hi Barbara,
    As mentioned in the previous post, you cannot join the OBJKY field with MATNR field of MARA.
    But if you want to just read the contents in OBJKY from DRAD, then have a look at the below code:
    Note: In the initial step of creating your infoset, just select direct read from table & select on MARA here.
    SELECT SINGLE DOKNR INTO T_DOKNR
    FROM DRAD
    WHERE OBJKY EQ MARA-MATNR
         AND DOKOB EQ 'MARA'
         AND DOKAR EQ (Specify the type of document for this).
    Now you can combine the fields MATNR, T_DONR & the Z field into the field which you want using the CONCATENATE statement.
    \[removed by moderator\]
    Regards,
    Vivek
    Edited by: Jan Stallkamp on Sep 3, 2008 3:51 PM

  • How can I join PRPS with DRAD?

    Hi,
    I would like to join the table PRPS and DRAD in order to see all documents linked to a certain PSP. I tried to join DRADOBJKY with PRPSPSPNR but it doesn't work since the OBJKY is different from the psp-number. If I'm doing this with MARA~MATNR it works. Strange. can someboy help me?
    Thanks

    Hello,
    Can you check if PRPS-OBJNR = DRAD-OBJKY ?
    If this is not successful, then use the conv. exit  CONVERSION_EXIT_ABPSP_INPUT, pass the PRPS-OBJNR get the internal number.
    Now check that this internal number matches with DRAD-OBJKY.
    Plz revert back.
    BR,
    Suhas

  • How to join GRPO with AP invoice thru query ?

    hi all,
    How to join GRPO with AP invoice in sql query ?
    Jeyakanthan

    Hi Jeyakanthan
    Are you using query in SAP Business One or outside the system? If you select the tables in SAP Business One as OPCH and OPDN then no inner join will appear, as the links sit on the line level. You will need PCH1 and PDN1. The link can be found in both directions, but bear in mind that 1 AP Invoice could be based on more than 1 Goods Receipt PO. For this reason the best approach is to start at the AP Invoice line level and use the BaseType and BaseRef fields to view which lines were pulled from which Goods Receipt PO's.
    Kind regards
    Peter Juby

  • Does INNER JOIN work with Oracle 8i ? (ORA-00933)

    hi,
    I try to execute the sql:
    SELECT
    A0.FULL_NAME,A0.MANAGER_ID,A0.DEPT_NO,A0.TOP_DEPT
    FROM
    HR_ORG A0
    INNER JOIN
    HR_EMP A1
    ON
    A0.MANAGER_ID=A1.EMP_NO
    WHERE
    A1.NAME = 'michael'
    but I caught an exception:
    java.sql.SQLException: ORA-00933: SQL...(message in
    chinese)
    Does INNER JOIN work with Oracle 8i ?
    thanks.

    INNER JOIN syntax is introduced in 9i, it does not exists in 8i. You can rewrite your statement:
    SELECT
    A0.FULL_NAME,A0.MANAGER_ID,A0.DEPT_NO,A0.TOP_DEPT
    FROM
    HR_ORG A0
    , HR_EMP A1
    WHERE
    A0.MANAGER_ID=A1.EMP_NO
    AND
    A1.NAME = 'michael'

  • Can I join Structure with Z table ?

    Can I join Structure with Z table?
    If yes...plz explain me with an example.
    PLease provide me with an example to join a structure with a Ztable...
    Any help would be appreciated...
    Regards,
    Krishna Chaitanya

    Hi Chitanya,
      It is possible to add fields in the form of structure to a Z table.it can be done in the form of Include or Append structure.There are no other ways to join structure to the table upto my knowledge.
    if it useful, reward points.
    Thank u,
    Prasad G.V.K

  • How can i join PO with GRPO

    Hi,
    I make query as belown to join PO with GRPO.I wnat to calculate Quantity from PO to GRPO but in my query it show duplicate record i also use distinct but useless.My query as below.
    SELECT T1.DocNum [PO No], T1.DocDate [PO Date], T3.ItemCode, T3.Dscription, T3.U_CostCentre, T3.DocEntry [GRN No], T0.DocDate [GRN Date],T3.Quantity'GRIR Quantity',T2.Quantity 'PO Quantity',
    T3.Quantity-T2.Quantity 'Balance Quantity'
    FROM OPDN T0 , OPOR T1, POR1 T2, PDN1 T3
    WHERE T1.DocEntry = T2.DocEntry
    and T0.Docnum = T3.Docentry
    and T3.BaseRef  =  T1.DocNum
    and T2.ItemCode = T3.ItemCode
    and T3.DocDate between [%0] and [%1]
    Can any body help in this regards.
    Sohail Anwar Ali

    Hi Sohail,
    As i understand, you want to know till now how much of quantity stills needs  to be delivered, in that case instead of trying joining two tables i would suggest to try this query which gives you
    Purchase Order Document No,
    Purchase Order Date,
    Vendor Name,
    Item Code,
    Item Description,
    Ordered Quantity,
    Received Quantity,
    Open Quantity.
    as the filed OpenQty stores the Quantity yet to receive for that particular Purchase Order. As this approach is much more flexible
    Query
    SELECT T0.DocNum, T0.DocDate, T0.CardName, T1.ItemCode, T1.Dscription, T1.Quantity,
    (T1.Quantity-T1.OpenQty) as "Recevied Quantity",
    T1.OpenQty FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.DocDate >=[%0] and
    T0.DocDate <=[%1]
    I hope this helps out your issue
    regards,
    Shreyas

  • Can we join table with structure

    Hi
    i have taken fields from Plaf table and some fields from structures so now i want to join that how can i join.
    Is there any option?
    regards

    Hi,
    structure dont have any data base table associated with them so they dont have any data.
    that's why we cannot join structure witha table but we can include a structure within any table.
    Sytex to include structure in ztable:
    fieldname     data element.
    .include        struname
    hope it will ans ur query.
    Thanks
    Rajesh Kumar

  • Join table with additional data

    Hi,
    I'm new to JPA (Toplink Essentials) and I'd like to know how to handle this situation:
    I have ORDER table, ITEMS table and "join table" ORDER_ITEMS which holds refernces to ordered items with quantity of each oredered item.
    Many thanks

    I did mapping as shown in listing. It works for reading, but for writing JPA returns error. Can somebody help?
    Thanks
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'idexpedice' appears more than once in the result column list.
    Error Code: 264
    Call: INSERT INTO vklad_expedice (IDEXPEDICE, IDVKLAD, VAHA, idexpedice, idvklad) VALUES (?, ?, ?, ?, ?)
    bind => [null, null, 0, 4411, 2]
    @Entity
    public class Expedice implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer idexpedice;
    @Temporal(TemporalType.DATE)
    private Date datum;
    @OneToMany(fetch = FetchType.EAGER, mappedBy="expedice", cascade = CascadeType.ALL)
    private List<ExpediceVklad> vklady;
    @Entity
    public class Vklad implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer idvklad;
    private String nazev;
    @Entity
    @Table(name = "vklad_expedice")
    @IdClass(ExpediceVkladId.class)
    public class ExpediceVklad implements Serializable {
    @Id
    private Integer idexpedice;
    @Id
    private Integer idvklad;
    private Integer vaha;
    @ManyToOne
    @JoinColumn(name = "idexpedice")
    private Expedice expedice;
    @ManyToOne
    @JoinColumn(name = "idvklad")
    private Vklad vklad;
    public class ExpediceVkladId {
    @Id
    private Integer idexpedice;
    @Id
    private Integer idvklad;
    SQL tables
    EXPEDICE
    idexpedice
    datum
    VKLAD
    idvklad
    nazev
    VKLAD_EXPEDICE (this is the join table with additional column)
    idexpedice
    idvklad
    vaha
    Edited by: user10933983 on 31.3.2009 13:47

  • Join parent with child on nested object table

    We made a nested table in Oracle 8i with two object types and collection type.
    We manipulating with it - no problem.
    However trying to join parent with the child cause the problem in PL/SQL
    This sintax is OK for Oracle SQL and returns right result:
    select
    matl.barcode_id,
    matl.LAST_MOD_TSP,
    dtl.matl_nbr,
    bmm.matl_dsc,
    dtl.asn_qty,
    dtl.mfg_dt
    from
    asn_barcode_matl_ot matl,
    table(matl.asn_barcode_matl_dtl) dtl,
    wms_brwy_matl_mstr bmm
    where
    matl.rcpt_seq_id = 1
    and matl.brwy_cd = bmm.brwy_cd
    and dtl.matl_nbr = bmm.matl_nbr;
    But stored procedure with this statement doesn't compile and giving the error:
    PLS-00201: identifier 'MATL.ASN_BARCODE_MATL_DTL' must be declared
    Looks like a bug? What is wrong?

    It is not possible. You can do this with trigger code, or preferably by adjusting your delete procedure api. A delete of the master record will often fail because other children records exists, so you have to catch that exception and do something that is useful to you in this situation.
    Regards,
    Rob.

  • Can we join Ztables with SAP std. tables in SQVI ?

    Dear All,
    Can we join Ztables with SAP std. tables in SQVI ?
    How to use "left outer join" in SQVI ?
    What r the rules/steps to be followed for creating right SQVI/query ?
    Sometimes it gives error / we do not get any output ....
    Pl' give examples.

    hi
    good
    1- Yes
    3-Check this example for SQVI Query.
    It is possible to generate a complete list of purchase document releases with the purchase document number (requisitions and orders), releaser, release date and release time.
    First, create an Infoset using transaction SQ02 directly reading from table CDPOS and create an additional table: CDHDR. If you are releasing purchase requsitions at the item level, it is convenient to create an additional field (PURPS LIKE EBAN-BNFPO) to capture the item number. Once the field is defined add the following code to it:
    PURPS = CDPOS-TABKEY+14(5).
    Once created, make sure to assign your Infoset to the user groups.
    Second, create an SAP Query (SQ00) or QuickViewer (SQVI) based on the Infoset you created previously. Set CDPOS-OBJECTID, PURPS (additional field), CDHDR-USERNAME, CDHDR-UDATE & CDHDR-UTIME, CDPOS-TCODE, CDPOS-VALUE_NEW, and CDPOS-VALUE_OLD as list fields (display screen).
    Set CDPOS-OBJECTCLAS, CDPOS-OBJECTID, CDPOS-TABNAME, CDPOS-FNAME, CDPOS-CHANGIND, CDHDR-USERNAME, CDHDR-UDATE & CDHDR-UTIME as the selection fields (selection screen).
    Finally, execute your query. For filtering purchase requisition releases set:
    Object class='BANF'
    Table Name='EBAN'
    Field Name='FRGKZ'
    Change type='U'
    For filtering purchase order releases set:
    Object class='EINKBELEG'
    Table Name='EKKO'
    Field Name='FRGKE'
    Change type='U'
    Make sure to specify username, dates or purchase document number (object value) in order to reduce run times.
    thanks
    mrutyun^

  • New airport: can't get my macbook or my imac to join my wireless automatically, my other stuff still joins without problems but i have to join manually with the book and the imac ?? I've tried all the settings and every thing else I can think of.....

    new airport: can't get my macbook or my imac to join my wireless automatically, my other stuff still joins without problems but i have to join manually with the book and the imac ?? I've tried all the settings and every thing else I can think of.....
    Running on Lion, never had a problem before until the old airport died and I replaced it.

    try connecting the device in _*recovery mode*_, then restore from your backup.
    also, make sure [_*Apple Mobile Device Service*_|http://support.apple.com/kb/TS1567] is installed and started.
    JGG

  • MARS with Enterprise Library

    Hi,
    How to get the result cursor from the Stored Procedure which is returing 3 cursors using Enterprise Library.
    Thanks in advance

    To return two SELECT statement results from a single command text, you can use anonymous PL/SQL. Here's a code snippet below.
    ODP.NET does not support asynch commands.
                   string cmdtxt = "BEGIN " +
                        "OPEN :1 for select ename, deptno from emp where deptno = 10; " +
                        "OPEN :2 for select ename, deptno from emp where deptno = 20; " +
                        "OPEN :3 for select ename, deptno from emp where deptno = 30; " +
                        "END;";
                   cmd.CommandText = cmdtxt;
                   //ODP.NET has native Oracle data types, such as Oracle REF
                   // Cursors, which can be mapped to .NET data types
                   //Bind REF Cursor Parameters for each department
                   //Select employees in department 10
                   OracleParameter p1 = cmd.Parameters.Add("refcursor1",
                        OracleDbType.RefCursor);
                   p1.Direction = ParameterDirection.Output;
                   //Select employees in department 20
                   OracleParameter p2 = cmd.Parameters.Add("refcursor2",
                        OracleDbType.RefCursor);
                   p2.Direction = ParameterDirection.Output;
                   //Select employees in department 30
                   OracleParameter p3 = cmd.Parameters.Add("refcursor3",
                        OracleDbType.RefCursor);
                   p3.Direction = ParameterDirection.Output;
                   //Execute batched statement
                   cmd.ExecuteNonQuery();
                   //Let's retrieve data from the 2nd and 3rd parameter without
                   // having to fetch results from the first parameter
                   //At the same time, we'll test MARS with Oracle
                   OracleDataReader dr1 =
                        ((OracleRefCursor)cmd.Parameters[2].Value).GetDataReader();          
                   OracleDataReader dr2 =
                        ((OracleRefCursor)cmd.Parameters[1].Value).GetDataReader();
                   //Let's retrieve both DataReaders at one time to test if
                   // MARS works
                   while (dr1.Read() && dr2.Read())
                        Console.WriteLine("Employee Name: " + dr1.GetString(0) + ", " +
                             "Employee Dept:" + dr1.GetDecimal(1));
                        Console.WriteLine("Employee Name: " + dr2.GetString(0) + ", " +
                             "Employee Dept:" + dr2.GetDecimal(1));
                        Console.WriteLine();
                   }

  • Help on Join AP with Order_Lines

    Hi Gurus,
    How to join AP Invoices with Order Lines. I am trying to get order number from order_lines and Invoice number from AP_Invoices
    Regards

    792011 wrote:
    Hi Gurus,
    How to join AP Invoices with Order Lines. I am trying to get order number from order_lines and Invoice number from AP_Invoices
    RegardsAre you referring to a particular Oracle product (pre built database)? this forum is for SQL and PL/SQL questions, so a lot of people here work at the low level end of the coding, not with those products.
    If that's the case, just let us know so we can stop looking at it here, and go post your question in the correct product forum.

Maybe you are looking for

  • I get this error

    I get this error :"The name 'A' does not exist in the current context." And gere's the code. What I want to do: I want to check if my matrix.i file exists,and if it does I want to read the text from it.And if that file does not exist I want the user

  • Dreamweaver Setup isn't working?

    When I go to download Dreamweaver CS3, I run the install that is downloaded then files are extracted to a certain are of my choice. I go to that and find there is a setup.exe. I run it and it shows a dialog saying Extracting Files..... Then after a f

  • Insert Media Flash Video

    I'm having trouble viewing a flash video that I've inserted using: Insert, Media, Flash Video. I can view the video ok in IE7 and Firefox when I preview the page from Dreamweaver, but not online. http://www.swail.com/Untitled-1.html (sample page with

  • Slideshow not working in Internet Explorer 8

    I have a slideshow with transparent PNG's sliding over a background image, and everything works fine in all browsers, except Internet Explorer (shock). I have just tested it in IE 8, and instead of generating a horizontal slideshow, IE just shows all

  • How to make the buggy DR8-A HD Burn work?

    My HD Burn simply don't work. I have change to another new drive from the shop that I bought the DR8-A, but still the same!!!   It is always the error - power calibration error when I am burning a 700MB with HD burn (tried SmartBuy, Sony and Imation,