How to link tables EKKO, EKPO, EIKP and EIPO

What I'm trying to do is create a view based on these four tables. EKPO contains multiple rows with the same values for EBELN. EKKO contains all distinct values for EBELN. I am trying to pick up all rows from both tables where EBELN in EKPO is the same as in EKKO. This is simple enough for a select statement to handle, without creating a view. The tricky part is linking the relevant rows selected from EKKO and EKPO to EIKP and EIPO. I tried using EXNUM to link EKKO, EIKP and EIPO, but I'm not sure that EXNUM contains distinct values for all 3 tables. In the case of EIKP it doesn't matter because the values for the fields I want (VORNU and VORNA) will be the same for the rows selected from EKKO and EKPO. The problem is with linking EIPO to my selections. If I knew that EXNUM was distinct for all rows in EIPO there would be no problem. However, I have seen some cases where multiple rows in EIPO have the same values for EXNUM. If I am using EXNUM in EIPO as a key field I have no way of being sure that the fields I want to pick up from EIPO (NACNU, BEHOE, NACD2, PRUEL and NACN3) contain the correct values I require. An example of what I am trying to do might make this clearer:
Table EKKO:
EBELN     BEDAT      WAERS
420000001 10.08.2007 USD
Table EKPO:
EBELN     WERKS MATNR MENGE NETWR NETPR TXZ01
420000001   3500  m1    q1    nw1   cnf1  mat1
420000001   3500  m2    q2    nw2   cnf2  mat2
420000001   3000  m3    q3    nw3   cnf3  mat3
Table EIKP:
VORNU  VORDA
125/45 12.08.2007
Table EIPO: (Corresponding to the above three rows in EKPO)
NACNU BEHOE NACD2      PRUEL      NACN3
1234  1001  30.08.2007 28.08.2007 xx
1235  1002  27.08.2007 29.08.2007 yy
1236  1003  18.08.2007 16.08.2007 zz
So basically, given the above table entries, I want that the result of my selection should be:
               | ROW1        | ROW2       | ROW3
EBELN:   |  420000001   |  420000001  | 420000001
BEDAT:   |  10.08.2007   |  10.08.2007  | 10.08.2007
WAERS: |  USD             |  USD           | USD
WERKS: |  3500             |  3500           | 3000
MATNR:  |  m1               |  m2              | m3
MENGE: |  q1                |  q2               | q3
NETWR: |  nw1              |  nw2             | nw3      
NETPR:  |  cnf1              |  cnf2            | cnf3
TXZ01:    |  mat1             |  mat2           | mat3
VORNU: |  125/45           |  125/45        | 125/45
VORDA: |  12.08.2007     |  12.08.2007   | 12.08.2007
NACNU: |  1234              |  1235            | 1236
BEHOE: |  1001              |  1002            | 1003
NACD2:  |  30.08.2007     |  27.08.2007   | 18.08.2007
PRUEL:  |  28.08.2007   | 29.08.2007   | 16.08.2007
NACN3:  |  xx               | yy                | zz
Sorry for the extremely long post. If anyone can shed some light on this I'd really appreciate it. Thanks.
Kal

select req. fields + a~exnum
from ekko as a
inner join ekpo as b
on aebeln = bebeln
into table gt_ekko_ekpo
where.........if u any conditions...
select req.fields from
eikp
into table gt_eikp
for all entries in gt_ekko_ekpo
where exnum = gt_ekko_ekpo-exnum.
select req.fields
from eipo
into table gt_eipo
for all entries in gt_eikp
where exnum = gt_eikp-exnum.
and also ekpo and eipo are line items tables , so for each exnum, will have multiple lines items in eipo table.
imp. the above and check whether, getting the req. result or not.
next in view , maintain rel. among these 4 tables.
ekko -ekpo, ekko-eikp, eikp-eiko.

Similar Messages

  • Link of table EKKO,EKPO,EKET,KONV

    Hi Experts,
    Now , i am writing a program to print purhchase order, and i met 2 problems.
    1.why it is different price between 'net price' and 'condition price'? sometimes, they are different.
    2.the net price always is wrong. so i need to get the price in condition tab in item detail.
    i sent a OSS to SAP, they told me the talbe KONV is a cluster table, so it can not be join in .
    but i need get the exact and correct price from KONV,
    would somebody please give me the link of table EKKO,EKPO,EKET and KONV?
    our system is AFS SAP. we use me23n to display the purchase order.and there is a request we must group the item by MATNR  with the same price and ex factory date (j_3aexfcp).
    thanks

    thanks first,
    yes , i fetch the data from EKKO,EKPO,EKET first, and alreayd group by them as our user request,but the problem is i can not get the item number (kposn) exactly,  the following are the code. i do not add the item number in it, it will make the wrong result .
    after group them, some different items were grouped,so i do not know how to fetch the item number exactly.
    SELECT DISTINCT EKKOEBELN EKKOBEDAT EKKOLIFNR EKKOZTERM EKKOWAERS EKKOVERKF EKKOTELF1 EKKOINCO1 EKKOINCO2 EKPOMATNR EKPOTXZ01 EKPOJ_3APGNR
    EKPOJ_3AVDAT EKPOj_3aexfcp EKPOBPRME EKPOPEINH EKETEINDT Sum( EKETMENGE ) AS SumOfMENGE EKETMEINS EKETJ_3ASIZE EKPOLOEKZ ekkoknumv
    Avg( EKETJ_3ANETP ) AS AvgOfJ_3ANETP Avg( ekponetpr ) as Avgofnetpr Sum( EKETJ_3ANETW ) AS SumOfJ_3ANETW J_3APGENJ_3AKORD1 J_3APGENJ_3AKORD2 J_3APGENJ_3AKORD3 J_3APGEN~J_3AKORDX
    INTO (EKKO_EBELN,EKKO_BEDAT,EKKO_LIFNR,EKKO_ZTERM,EKKO_WAERS,EKKO_VERKF,EKKO_TELF1,EKKO_INCO1,EKKO_INCO2,EKPO_MATNR,EKPO_TXZ01,EKPO_J_3APGNR,
          EKPO_J_3AVDAT, EKPO_j_3aexfcp, EKPO_BPRME,EKPO_PEINH,EKET_EINDT,SUMOFMENGE,EKET_MEINS,EKET_J_3ASIZE,EKPO_LOEKZ,ekko_knumv,
          AVGOFJ_3ANETP,AVGOFNETPR,SUMOFJ_3ANETW,J_3APGEN_J_3AKORD1,J_3APGEN_J_3AKORD2,J_3APGEN_J_3AKORD3,J_3APGEN_J_3AKORDX)
    FROM
    ( ( EKKO INNER JOIN EKPO ON ( EKKOEBELN = EKPOEBELN ) AND ( EKKOMANDT = EKPOMANDT ) ) INNER JOIN EKET ON ( EKPOEBELP = EKETEBELP ) AND ( EKPOEBELN = EKETEBELN ) AND ( EKPOMANDT = EKETMANDT ) ) INNER JOIN J_3APGEN ON ( EKET~J_3ASIZE =
    J_3APGENJ_3AKORDX ) AND ( EKPOMANDT = J_3APGENMANDT ) AND ( EKPOJ_3AVDAT = J_3APGENJ_3AVDAT ) AND ( EKPOJ_3APGNR = J_3APGEN~J_3APGNR )
    GROUP BY
    EKKOEBELN EKKOBEDAT EKKOLIFNR EKKOZTERM EKKOWAERS EKKOVERKF EKKOTELF1 EKKOINCO1 EKKOINCO2 EKPOMATNR EKPOTXZ01 EKPOJ_3APGNR EKPOJ_3AVDAT EKPOj_3aexfcp EKPOBPRME EKPOPEINH EKETEINDT EKETMEINS EKETJ_3ASIZE EKKOMANDT
    J_3APGENJ_3AKORD1 J_3APGENJ_3AKORD2 J_3APGENJ_3AKORD3 J_3APGENJ_3AKORDX EKPOLOEKZ ekkoknumv
    HAVING
    EKKOEBELN = ZEBELN AND EKPOMATNR = IT_EKPO1-MATNR AND EKPOj_3aexfcp = it_ekpo1-j_3aexfcp AND EKPOLOEKZ <> 'L'
    ORDER BY EKET~J_3ASIZE.
    after fetch the date , i select the KBETR from KONV, the item number is the last important problem.
    select single kbetr into kbetr from konv where knumv = ekko_knumv and krech = 'C' and kposn = ?(i can not fetch exact item number) and ZAEHK = eket-etenr .
    any further reply? thanks very much for your reply.

  • Tables EKKO EKPO and KONP

    Hi,
        I want to link tables EKKO, EKPO and KONP. Actually i checked this tables  but i could not find link between EKKO and KNOP. Please help me in this regards. Actually we are maintaining the tax codes in the PO. I want to print different taxes in PO out put like BED, EDUCATION CESS, CST, VAT.
    NK

    Hello,
    You can link the tables by
    EKKO- KNUMV = KONP-KNUMH.
    And
    EKKO-EBELN = EKPO-EBELN.
    Hope it helps.
    Regards,
    Mansi.

  • How to write SELECT statement using tables ekko,ekpo and eket?

    Hi,
    I got a problem in  performance tuning using below tables?
    how to write SELECT statement using tables EKKO,EKPO and EKET and in conditon ( WHERE clause)  use only fields 
                        ekko~ebeln       IN ebeln
                       ekko~loekz       EQ ' '
                       ekko~lifnr       IN lifnr
                       ekko~ekorg       IN ekorg
                      ekko~ekgrp       IN ekgrp          
                       ekpo~werks       IN werks
                       ekpo~pstyp       EQ  '3'
                       ekpo~loekz       EQ  space
                       ekpo~elikz       EQ  space
                       ekpo~menge       NE  0
                     eket~rsnum       NE space.
    Thanks in Advance.
    bye.

    Hi,
    ekko~ebeln IN ebeln
    ekko~loekz EQ ' '
    ekko~lifnr IN lifnr
    ekko~ekorg IN ekorg
    ekko~ekgrp IN ekgrp
    ekpo~werks IN werks
    ekpo~pstyp EQ '3'
    ekpo~loekz EQ space
    ekpo~elikz EQ space
    ekpo~menge NE 0          " Remove this from where clause
    eket~rsnum NE space.    " Remove this from where clause
    ' instead delete the entries after fetching into the table
    DELETE it_itab WHERE menge EQ '0' AND rsnum EQ ' '.
    Regards
    Bala Krishna

  • Link between EKKO, EKPO and KONP

    Hi,
    can someone help me out to trace the link between EKKO, EKPO and KONP tables?
    regards,
    ravi.

    Hi Ravi
      KONP is conditions table.
      If we need the conditions(prices) of a purchase order, we can get it from EKKO, EKPO & KONV.
      1. Extract KNUMV from EKKO.
      2. Using EKKO-KNUMV - Extract conditions from KONV where KONV-KNUMV = EKKO-KNUMV.
      3. We can find item prices where KONV-KPOSN = EKPO-EBELP.
      Hope this helps you.
    Kind Regards
    Eswar

  • Datasource for the table EKKO,EKPO, EKBE, BKPF, BSEG

    Hello Gurus,
    I am having a requirement wher i need to create report for the fields coming from the above tables.
    pls let me know if der is any such data source from which i can get data for all the tables EKKO,EKPO,EKBE,BKPF,BSEG.
    If der is no single data source then how i have to approach for the same using the standard datasource.
    and what should be the link info objects between them if iam going with the separate one.
    Regards

    Thanks for ur responses,
    Is the Belnr in the EKBE table is same as the BELNR in BKPF table of Data source (0FI_GL_4)  ???
    When i cross verifed i found multible record in BKPF w.r.t EKBE belnr.
    Whats the reason for this ? If i created a infoset by mapping the BELNR AND GJAHR of EKBE and BKPF. Do i get the correct record or i have to handle it by some exception.
    Also pls let me know how the MM and FI flow related , I means once the MIRO ie billing document is created what happen in the FI side ??
    pls update with ur suggestions.
    regards

  • How to link asset with purchase order and PO Item.

    Hello,
           I have to generate a report which contains columns
    Asset No , po no(ebeln) ,PO Item(ebelp),Material no etc
    My query is how to link asset with purchase order and      PO Item.
    I am selecting asset and po no. from anla  but how to get
    po item no(ebelp)?
    po line item is important in this report because every line item has differrent asset and material no.
    i tried to match asset no in mseg table but i am not getting asset no in mseg .
    how should i proceed ?

    Thanks Thomas & Srimanta for the quick response.
    When I checked EKKN table by entering PO there is no asset no. in anln1 field.
    Also I would like to add that, In me23n for a PO, account assignment category we are entering 'F' for internal order settlement.
    Where can i find the link between asset and po no(ebeln) and po item(ebelp)?
    Regards,
    Rachel
    Edited by: Rachel on Aug 11, 2008 7:23 AM

  • Finding Sum of grouped lines / Tables EKKO, EKPO

    Hi, am using the following tables:
    TABLES: ekko,ekpo.
    with Inner Join
    select ekkobukrs ekkoebeln ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekkoernam ekpobrtwr
       into CORRESPONDING FIELDS OF TABLE itab from ekko
        inner join EKPO on ekPOEBELN = ekkoebeln.
    end-OF-SELECTION.
    Basically i want to group the result of this SQL statement by Purchasing Doc (ekko~ebeln) and display the
    sum of Gross value (ekpo~brtwr) for the line items of  each Purchasing Doc.
    Note: i want the Purchasing Doc to appear one time only in the report
    i have tried the following :
    select  ekkobukrs ekkoebeln ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekkoernam sum(  ekpobrtwr )
       into  CORRESPONDING FIELDS OF TABLE itab from ekko
       inner join EKPO on ekPOEBELN = ekkoebeln
    WHERE ekkobukrs IN S_bukrs AND ekkobsart IN s_bsart
    Group By  ekkoebeln ekkobukrs ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekko~ernam.
    then loop through the ITAB:
    LOOP at itab.
    write:/ itab-bukrs under 'Company Code',
             itab-ebeln UNDER 'PO-Number',
             itab-aedat UNDER 'Date' ,
             itab-bsart UNDER 'Doc-Type'  ,
             itab-ekgrp UNDER 'Purchase-Grp' ,
             itab-lifnr UNDER 'Vendor' ,
             itab-waers UNDER 'Currency',
             itab-wkurs UNDER 'Rate' ,
             itab-brtwr under 'Gross Value',
             itab-ernam UNDER 'Created By'.
    ENDLOOP.
    but it is not working with me, am not able to show the result of sum(  ekpo~brtwr ) am getting 0 in all lines
    thanks a lot for your help

    " My Full Code.
    TABLES: ekko,ekpo,ekbe,rbkp.
    data: BEGIN OF itab OCCURS 0,     "EKKO TABLE"
          inco1 like ekko-inco1,
          inco2 like ekko-inco2,
          bukrs like ekko-bukrs,
          ebeln like ekko-ebeln,
          aedat like ekko-aedat,
          bsart like ekko-bsart,
          ekgrp like ekko-ekgrp,
          lifnr like ekko-lifnr,
          waers like ekko-waers,
          wkurs like ekko-wkurs,
          ernam like ekko-ernam,
          BRTWR LIKE ekpo-brtwr,
      end of itab.
    SELECT-OPTIONS : s_bukrs FOR itab-bukrs OBLIGATORY,
                     s_ebeln for itab-ebeln ,
                     s_aedat FOR itab-aedat ,
                     s_bsart for itab-bsart ,
                     s_ekgrp FOR itab-ekgrp ,
                     s_lifnr FOR itab-lifnr ,
                     s_budat FOR jtab-budat ,
                     s_bewtp for jtab-bewtp .
    DATA ProceesITAB LIKE SORTED TABLE OF ITAB WITH UNIQUE KEY TABLE LINE.
    AT SELECTION-SCREEN on s_bukrs.
    START-OF-SELECTION.
    select ekkobukrs ekkoebeln ekkoaedat ekkobsart ekkoekgrp ekkolifnr ekkowaers ekkowkurs ekkoernam ekpobrtwr
       into CORRESPONDING FIELDS OF TABLE itab from ekko
        inner join EKPO on ekPOEBELN = ekkoebeln.
      end-OF-SELECTION.
    LOOP at itab.
    write:/ itab-bukrs under 'Company Code',
             itab-ebeln UNDER 'PO-Number',
             itab-aedat UNDER 'Date' ,
             itab-bsart UNDER 'Doc-Type'  ,
             itab-ekgrp UNDER 'Purchase-Grp' ,
             itab-lifnr UNDER 'Vendor' ,
             itab-waers UNDER 'Currency',
             itab-wkurs UNDER 'Rate' ,
             itab-brtwr under 'Gross Value',
             itab-ernam UNDER 'Created By'.
    ENDLOOP.
    TOP-OF-PAGE.
    write:/70 'Company'.
    uline.
    skip.
    write:/5 'Company Code',25 'PO-Number',40 'Date',55 'Doc-Type',70 'Purchase-Grp',85 'Vendor',100 'Currency',115 'Rate',125 'Created By',
    140 'Gross Value'.
    ULINE.
    SKIP.
    Edited by: YasinN on Mar 24, 2010 9:45 AM

  • Crystal 2011 linking table with a String and a Number

    Hello,
    I am able to retrieve the data I want with the following  SQL Query in SQL: If I try to create it in Crystal 2011 APPLRUNN is a string and CNTBTCH is a number. Is there a way I can link these two fields if one is a string and the other is a number ?
    SELECT   
    ENADV.APPLRUNN, ENPBD.CNTBTCH,
    ENPBD.DOCNBR
    FROM       
    ENADV INNER JOIN
    ENPBD ON ENADV.APPLRUNN = ENPBD.CNTBTCH
    Thanks,
    Debbie

    Hi Debbie,
    You cannot linking  table with a string and a number. I have given a example query:
    SELECT   
    ENADV.APPLRUNN, ENPBD.CNTBTCH,
    ENPBD.DOCNBR
    FROM       
    ENADV INNER JOIN
    ENPBD ON
    ENADV.APPLRUNN = ENPBD.APPLRUNN  or ENADV.CNTBTCH = ENPBD.CNTBTCH
    I modify last sentense because one table primary key is equal to another table Foreign key i.e
    one table ID field = another table ID field or one table NAME field = another table Name field.
    Please understand my intenction and check linking fields in tables.
    Thanks,
    DJ

  • How to refresh table display using slis and 'reuse_alv_grid_display method.

    hello,
    how to refresh table display using slis and 'reuse_alv_grid_display method'.
    when i'm refreshing table display it performs once again reuse_alv_grid_display.and when i back the previous value appear.how to solve it?
    neon

    are you chaning any value in the gird if so use this..
    Pass the user_command form name to the Import parameter
    I_CALL_BACK_USERCOMMAND .
    and have the Dynamic form implementation..
    FORM user_command USING ucomm TYPE sy-ucomm
                selfield TYPE slis_selfield.
    "The below is important for Editable Grid.
      DATA: gd_repid LIKE sy-repid, "Exists
      ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid->check_changed_data .
      ENDIF.
      CASE ucomm.
        WHEN 'REFRSH'.
      ENDCASE.
           selfield-refresh = 'X'.
    ENDFORM.                    "user_command

  • Extractor for Purchasing Conditions for tables EKKO, EKPO and KONV

    Hi Experts,
    I want to know if there is an Extractor for Purchasing Conditions with fields in tables of Origin: EKKO, EKPO and KONV.
    Or, at least an extractor with the table KONV.
    Or, how I can look for it.
    Any feedback, will be really apreciated.
    Thanks in advance

    Hi David,
    Adding to what said above.
    Observe the Fileds in the Datasources and the details.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5c/8ea0e626e442efb109232830faded9/frameset.htm
    Regards,
    Ram.

  • Joing of EKKO, EKPO, EKET and EKBE

    Hi Gurus,
    We want to achieve two reports with the same query. the first report is the requirement to compare the persons who created the PO and the person who received the PO (migo material doc) were same or not? To achieve this we joined tables EKKO, EKBE and EKPO in the order same order. The report started giving out only those results where EKKO - ERNAM was equal to EKBE - ERNAM. This is fine. But now we have a new requirement to create a late PO deliveries report. The users want the actual dates when the receipts were received (mat doc receipts). Because ME2N, ME2M and ME2L only give whether they are late or not but they dont give by how many days they are late. anyways to achive the late deliveries report, i joined EKET table to the as the fourth table to the already existing previous three tables. But beucase of the EKKO -ERNAM = EKBE - ERNAM criteria we are getting the resutls onyly when they match. What needs to be doen so that the both the reports can be achived from this same infoset.
    Thanks
    Anmusha

    Hi,
    If the qns is just how to de-link the join, then select the join in table join view & click on delete join. But if the qns is then how to link these 2 tables, just link them based on document number. Then you will have to add few lines of abap.
    But as i said it would be very simple to achieve this in a Z report than a infoset query, as it is more flexible. You will have to build in a OR condition, which says display the record if the name of creator & the person who posted the GR is same OR display the record if it meets your other criteria.
    So i would strongly suggest go for a Z report & discuss with your abaper.
    Regards,
    Vivek

  • How to link a non-linkable query and a plsql query in the datamodel

    Hi,
    I am creating a matrix group....
    Where in I get my
    1) Column values from a non-linkable query - Period (Jan, Feb....)
    2) Row values from a plsql query (ref cursor). Group is also from this query
    3) Cross product is on the above two queries.
    4) Cell info comes from a plsql query (refcursor).
    I created a group link from the cross product group (3) to the cell info query (4)
    I prepared the layout and executed the report... I am getting redundant data....
    The reason being the (4) and (1) are not linked properly.
    From google, About non-linkable queries column.... I understood that to link two non-linkable queries, we need to create a group link and then add a where clause in the child query referring the parent query column.
    But my case is a non-linkable query (which is a parent ) and a plsql query which is the cell.
    Any help...?
    Thanks in advance.
    KK

    Hello Sam,
    >
    I was wondering if you could have any link or examples to show how to make a form with report and an insert form in the same page, these two forms are related to the same table. Our customer wants a user can add new row to the table in a form and see all of rows created by this user in a report, this report should provide edit link as well. the problem is: whenever I inserted a new row or edit a row or delete a row, and submitted, and return to this page, all of hidden items lost their values, so report is blank, and some display only items also lost their values. Could anyone give me suggestions?
    >
    This will help:
    http://www.grassroots-oracle.com/2011/09/apex-tutorial-form-report-sharing-same.html
    Hope it helps!
    Regards,
    Kiran

  • Link table between AP Invoice and AP Downpayment Invoice

    Hi,
    I want to get the link between the table OPCH and ODPO,
    so that I can monitor the cash advances,
    Thank you very much,
    Regards,
    Clint

    Hi Gordon,
    I have tried that already, if we follow the process, First we enter the Downpayment from AP Down module, after that we go to the AP Invoice and we click the button Total Down Payment to call the amount from Downpayment, we cant see the Base Entry and Target entry since both have different module but we can see they must have be a connection since Ap Invoice can call the payment from Downpayment and there must be a connection between them but I cant see how.
    Thank you very much.
    Clint

  • Query on tables EKKO, EKPO, EKET, EKES

    Hi experts,
    I have given below flow
    select * from EKKO into table GT_EKKO
                  where ANGNR = GS_INPUT-PURCHASE_ORDER.
    select * from EKPO into table GT_EKPO
        for all entries in GT_EKKO
        where EBELN = GT_EKKO-EBELN and
              LOEKZ = space.
    SORT GT_EKPO BY EBELN EBELP.
    DELETE ADJACENT DUPLICATES FROM GT_EKPO COMPARING ALL FIELDS.
    select * from EKES into table GT_EKES
    for all entries in GT_EKPO
            where EBELN = GT_EKPO-EBELN and
                  EBELP = GT_EKPO-EBELP and
                  EBTYP = 'E1'.
    SORT GT_EKES BY J_3ASIZE.
    select * from EKET into table GT_EKET
    for all entries in GT_EKES
            where EBELN = GT_EKES-EBELN and
                  EBELP = GT_EKES-EBELP and
                  J_3ASIZE = GT_EKES-J_3ASIZE.
    SORT GT_EKET BY J_3ASIZE.
    loop at GT_EKES.
    clear LV_QUANTITY.
    READ TABLE GT_EKES WITH KEY EBELN = GT_EKES-EBELN
                                 EBELP = GT_EKES-EBELP
                                 J_3ASIZE = GT_EKES-J_3ASIZE.
    READ TABLE GT_EKET WITH KEY EBELN = GT_EKES-EBELN
                                 EBELP = GT_EKES-EBELP
                                 J_3ASIZE = GT_EKES-J_3ASIZE.
      LV_QUANTITY = GT_EKET-MENGE - GT_EKES-MENGE.
      LV_TOTAL_QTY = LV_TOTAL_QTY + LV_QUANTITY.
    endloop.
    if GS_INPUT-E1_QTY = LV_TOTAL_QTY.
    if this condition satify then I have to assign LV_QUANTITY to some other table.
    But my problem is into EKET & EKES, I am not getting same no. of recoreds...
    can any one suggest me which WHERE conditions I have to give into queries on table EKET & EKES so I can get same no. of recoreds in both of them?
    Points will be rewarded...
    Thanks in advance.
    neo S.

    HI,
       its not necessary to have equal number of entries in two table.. a scheduleing agreement  and vendor confirmation is different.
    One suggestion.. when you are using for all entries ensure that you have to check that that table is not empty example .
    if not gt_ekpo[] is initial.
    select * from EKES into table GT_EKES
    for all entries in GT_EKPO
    where EBELN = GT_EKPO-EBELN and
    EBELP = GT_EKPO-EBELP and
    EBTYP = 'E1'.
    endif.
    thanks
    Mahesh

Maybe you are looking for

  • In app purchase is not working

    I recently made an in app purchased in game Infinity Blade II but it doent seems to work so I want my money back. Item Developer Type Unit Price Infinity Blade II, Bag of 150,000 Gold Report a Problem Chair Entertainment Group In App Purchase $4.99 I

  • Firmware for Creative Zen 20 GB mp3 pla

    Hi,was wondering if anyone can help me,my mp3 zen 20gb?player after few years of use now starts up and says firmware problem after trying to rebuild library, i have got it into recovery mode,and downloaded the firmware from asia creative website, how

  • Mail successfully sent but nothing received in inbox

    Hi experts, I am doing (at least trying to) a file to mail scenario. The configuration seems to be correct and is as follow for my receiver adapter : Transport protocol : SMTP Message protocol : XIALL Adapter Engine : Central Adapter Engine URL : smt

  • SAP MM-IM & WM stock in one report

    Hello Everybody, We are operating SAP MM & WM in two different server and our client requirement is to see the MM-IM stock & WM stock in one report.Pls let me know how it is possible. Thanks, AC

  • Relevant for billing and pricing

    Hi All, In the config for item category. There are two settings, one is "relevant for billing" and other is "pricing". what is the difference bewteen the two.... since if i enable relevant for billing, it automatically means the pricing will happen s