Delivery Number and EKBE table

I have  a requirement to find out and print Delivery number all I have is PO number.
and I was told that In EKBE if the PO history cat is "L" then fetch the Delivery Number.
My question is from which table and which field i need to pull if the PO history category is L in EKBE table.
Thanks in advance,,

Here is the Link
Get all the PO's From EKBE-BEWTP  " PO history cat is "L"
Equal to 'L'.
select * from ekbe
into table it_ekbe
where BEWTP = 'L'.
if sy-subrc eq 0.
select * from LIPS
   into table it_lip
   for all entries in it_ekbe
   where vgbel = it_ekbe-ebeln and
            vgpos = it_ekbe-ebelp.
"This will give all the Deliveries realted to PO histort cat " L"
endif.

Similar Messages

  • Report with Delivery number and header text as output

    Hello all,
    I need to create a "quick and dirty" report that which will give me every delivery number, and the corresponding header text, in the month of July for given shipping points.  I am having trouble figuring out how to get the header text for the deliveries.  I have searched and searched but the solutions given just don't make sense to me.
    Regards,
    Davis

    Hi,
    You need to use the function module READ_TEXT to read delivery header text.
    Please go to transaction SE75 and use VBBK as the OBJECT to find the specific ID which is required.
    Regards,
    Ferry Lianto

  • Relation between BKPF and EKBE table for reversing document?

    Is there any relation between BKPF and EKBE table for reversing document when STBLG is blank in BKPF.
    AND
    How to differentiate Old Accounting document / Reverse document / New document when in BKPF-STBLG is blank for all three document and BKPF-XBLNR are same for all.

    Hi Varun,
    Table Document no (BKPF-BELNR) is link between Material document no (EKBE-BELNR). If you are looking for validating Material reversal document then please use following logic for your requirement.
    Material Document (MBLNR) & Material Document Year (MJAHR). Pass material document (MBLNR) to MSEG-SMBLN to read MSEG-MBLNR with MSEG-MJAHR to MSEG-SJAHR, if record found delete both the documents i.e. MSEG-SMBLN & MSEG-MBLNR (donu2019t consider these documents in the logic) and display Material Document No. (MSEG-MBLNR)
    Regards,
    Santosh

  • BAPI to get delivery number and Sales order

    Dear all,
    Is there a standard BAPI that would help me get the delivery number and sales order number when Shipment number is given as an input?
    Regards,
    Neha.

    BAPI_SALESDOCU_CREATEFROMDATA  Creating a Sales and Distribution Document
    BAPI_SALESORDER_GETSTATUS      Sales Order: Display Status  
    BAPI_SALESORDER_SIMULATE       Sales Order: Simulate Sales Order
    Reward Points if useful.

  • PO number from EKBE Table

    Hi Experts,
    I want to prepare a new custom report in which the PO number should appear. I was advised to use EKBE table. On checking I found that I can pass only Material doc# and Fiscal Year and No company code field is found. Is it reliable to use only to input values and try to fetch the PO number? I am not sure if there could be more documents across company codes since the number range is set as company code level. Can you suggest any alternative?
    I have already searched for similar topic but could not find the correct answer.
    Please help.
    Thanks in advance.
    Sunil

    Hi Both,
    If I use MSEG table, I must use GR-MM document. As per my knowledge, IR document (MM/FI) won't reflect in MSEG table.
    If GR entry is done first, then I can fetch the AWKEY field from IR-FI doc to get the MM doc#. If the IR entry is done first, (without GR entry posted on PO line) then it is not very easy to fetch the GR-MM document number at a later point of time also.
    If the PO# is unique, independent from company code and year, then there are no issues, the below logic will work.
    Pass the IR-FI Document number to BKPF with BUKRS&GJAHR and take get IR-MM document (AWKEY - 10 +4). Then pass this to EKBE table with BELNR and GJAHR then pick the EBELN (PO#) and EBELP (line item).
    Please correct if I am not right.
    Thanks in advance!

  • BSAK and EKBE tables...

    Hello experts,
    I am currently trying to modify a report where in it gets a PO's balance from BSAK-wrbtr but instead I need to get it from EKBE-wrbtr. So, is there a link between the 2 tables? Thanks guys and take care!

    Hi Vijay,
    You can check the link as Purchasing Document Number and Item Number of Purchasing Document:
    BSAK-EBELN and BSAK-EBELP
    in  EKBE-EBELN and EKBE-EBELP.
    Then you ca retrieve EKBE-WRBTR.
    Hope this may help you.
    Regards,
    Lanka

  • Delivery date and tax tables-

    Hi,
    In which table the delievery date in the PO is stored.I did not find it in EKKO or EKPO table.
    Secondly,taxes values are taken from the tax calulation procedure of the country and not the MM pricing procedure.
    Which table  are these values stored ?
    Regards,
    Deepak.

    Hi,
    Entry is there in table T165 and teh values is picked in PO.
    I want the condition type values to be printed in the PO document.
    Should I search for the tax value(MWVS value) in any PO tables(KONV etc.) or
    any other tables coz,these condition too is stored in the same structure as the PO conditions
    Regards,
    Deepak.

  • Getting delivery number by  using Purchase order number

    Hi,
      I need to get a delivery number for a perticular Purchase order number.give me the sap tables link for getting the delivery number by using the purchase order number.
    As per my knowledge,
    'Likp' for delivery number and
    'ekbe' for purchase order.how we can link these 2 tables?
    Thanks,
    suma.

    U can use the field BELNR field EKBE to link the two tables..please not that it is only valid for VGABE = 8.
    select EEBELN EEBELP EBELNR LVBELN
    into itab
    from ekbe as E inner join likp as L
    on Ebelnr = lvbeln
    where vgabe = 8
    Regards
    Anurag
    Message was edited by: Anurag Bankley

  • In order confirmation i need invoice number and delivery number.

    Dear Experts,
    I need invoice number and delivery number in order confirmation.
    how can i get the delivery number an invoice number.
    Program name: RVADOR01
    Regards
    Ahmed

    Hi
    In the Order confirmation Only sales order details will be there
    You better write a PERFORM  statement in Script and in the subroutine fetch the Delivery number and Invoice number with the following links and display them in script
    LIPS-VGBEL = VBAK-VBELN
    LIPS-VGPOS = VBAP-POSNR
    VBRP-AUBEL = VBAK-VBELN
    VBRP-AUPOS = VBAP-POSNR
    You can also can use the VBFA table
    using Prev doc type = C (order) and Subsequent doc type = J to get the Delivery
    and Sunsequent type = M for getting the Invoice Number
    see the sample code for subroutine
    REPORT ZMPO1 .
    form get_freight tables in_par structure itcsy out_par structure itcsy.
    tables: ekko,konv,t685t.
    data: begin of itab occurs 0,
             ebeln like ekko-ebeln,
             knumv like ekko-knumv,
           end of itab.
    data: begin of itab1 occurs 0,
             knumv like konv-knumv,
             kposn like konv-kposn,
             kschl like konv-kschl,
             kbetr like konv-kbetr,
             waers like konv-waers,
             kwert like konv-kwert,
           end of itab1.
    data: begin of iout occurs 0,
             kschl like konv-kschl,
             vtext like t685t-vtext,
             kbetr like konv-kbetr,
             kwert like konv-kwert,
           end of iout.
    data v_po like ekko-ebeln.
    read table in_par with key 'EKKO-EBELN'.
    if sy-subrc = 0.
       v_po = in_par-value.
       select
         ebeln
         knumv
      from ekko
      into table itab
      where ebeln = v_po.
      if sy-subrc = 0.
        loop at itab.
          select
            knumv
            kposn
            kschl
            kbetr
            waers
            kwert
          into table itab1
          from konv
          where knumv = itab-knumv and
                kappl = 'M'.
        endloop.
        loop at itab1.
          if itab1-kposn <> 0.
            select single * from t685t
                              where kschl = itab1-kschl
                                and kappl = 'M'
                                and spras = 'EN'.
            iout-vtext = t685t-vtext.
            iout-kschl = itab1-kschl.
            iout-kbetr = itab1-kbetr.
            iout-kwert = itab1-kwert.
            append iout.
            clear iout.
          endif.
        endloop.
        sort itab1 by kposn.
        loop at iout.
          sort iout by kschl.
          if ( iout-kschl eq 'GSDC' OR
               iout-kschl eq 'GSFR' OR
               iout-kschl eq 'GSIR' ).
            at end of kschl.
              read table iout index sy-tabix.
              sum.
             write:/ iout-kschl,iout-vtext,iout-kwert.
          out_par-name = 'A1'.
          out_par-value = iout-vtext.
          append out_par.
          out_par-name = 'A2'.
          out_par-value = iout-kwert.
          append out_par.
              endat.
            endif.
          endloop.
        endif.
      endif.
    endform.
    IN THE FORM I AM WRITING THIS CODE.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:ENDPERFORM
    &A1&
    &A2&
    This Code is to be written in the PO form under ADDRESS window.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:DEFINE &A3& = ' '
    /:DEFINE &A4& = ' '
    /:DEFINE &A5& = ' '
    /:DEFINE &A6& = ' '
    /:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:CHANGING &A3&
    /:CHANGING &A4&
    /:CHANGING &A5&
    /:CHANGING &A6&
    /:ENDPERFORM
    &A1&
    &A2&
    &A3&
    &A4&
    &A5&
    &A6&
    Regards
    Anji

  • What table stores delivery header and item texts?

    Hi Gurus,
    Which table stores header and item text of delivery? We use VBBP text object and provide test id, language to read the texts using function module 'READ_TEXT'.
    Can you please tell me which table store the texts?
    Best regards,
    Pavan

    >
    Pavan1 wrote:
    > Hi Gurus,
    >
    > Which table stores header and item text of delivery? We use VBBP text object and provide test id, language to read the texts using function module 'READ_TEXT'.
    >
    > Can you please tell me which table store the texts?
    >
    > Best regards,
    > Pavan
    This stores in text objects so you need to pass
    Here is simple thing to find what to pass to the read_text function module.
    Go to delivery - If you want to find header text - GOTO (on application menu) - Header -texts - Double click on the text where you enter text - GOTO (on application menu) - Header - This will give you a popup kind of screen where you can find the
    text name (if it is header - only delivery number and if it is item - deliverynumber + item number ) , lang, Text id, Text object
    This will give you the required parameters... .

  • How to get the last 3 digits of a Delivery Number

    Hi All,
    On the Transfer Order Collective form, the Delivery Number is printed. But I need to capture the last 3 digits of that delivery number and make the 3 digits to be printed on the same form with bigger font size. I would like to know how to capture the last 3 digits.

    If so, your form(subroutine) can look like this.
    form  get_last_3_digits tables co_sym_using   structure itcsy
                                   co_set_symbols structure itcsy.
      data: xvbeln type likp-vbeln.
    * Get the USING Values
      read table co_sym_using with key name = 'LIKP-VBELN'.
      check sy-subrc eq 0.
      shift co_sym_using-value left deleting leading space.
      xvbeln  = co_sym_using-value.
    * make sure it is internal format
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = xvbeln
           importing
                output = xvbeln.
    * Update the value
      read table co_set_symbols index 1.
      co_set_symbols-value = xvbeln+7(3).
      modify co_set_symbols index 1.
    endform.
    Regards,
    Rich Heilman

  • I want Inbound Delivery number from Material document

    Hi,
    I wish to know where is the Inbound Delivery number (which SAP table) stored when we do a MIGO_GR against an Inbound Delivery ? I want to fetch the Inbound Delivery number from the Material document number.
    I observe, when we do a MIGO_GR against an Inbound Delivery; the original PO number (against which the Inbound Delivery was created) is stored in MSEG_EBELN. However, there is no trace of the Inbound Delivery number...neither in MKPF, nor in MSEG.
    Since a PO number- line item can have multiple Inbound Deliveries associated with it, having a PO number in MSEG is of no use to me.
    Please help.
    Thanks,
    Pranav

    Dear Pranav,
    I think you should check again, in MSEG, there's also PO -item with field name : MSEG-EBELP. So from PO and PO item , you can get all the Inbound delivery number.
    Regards,
    w1n

  • VL04 - Problem in capturing delivery number in background

    Hi Friends,
    I have a requirement to run VL04 and then do goods issue for all the deliveries created. All of this has be done in the background Can someone please help me in capturing delivery numbers when VL04 is run as BDC ? I read a thread in SDN which spoke about getting delivery number from VBSS table but I do no know how to capture the SAMMG for that table.
    Please help. Other approaches of getting this done are also welcome.
    Thanks,
    Dikshitha G

    when writing bdc for error handling try this code
    "change this as per your requirement
    *       STRUCTURE FOR THE BDCMSGCOLL to handle errors                  *
    data : wa_bdcmsgcoll type bdcmsgcoll,
           it_bdcmsgcoll like table of wa_bdcmsgcoll.
    data : l_mstring(480).
    "your code"
    *FM FOR ERROR HANDLING.
        loop at it_bdcmsgcoll into wa_bdcmsgcoll.
          select single * from t100 where sprsl = wa_bdcmsgcoll-msgspra
                                    and   arbgb = wa_bdcmsgcoll-msgid
                                    and   msgnr = wa_bdcmsgcoll-msgnr.
          if sy-subrc = 0.
            l_mstring = t100-text.
            if l_mstring cs '&1'.
              replace '&1' with wa_bdcmsgcoll-msgv1 into l_mstring.
              replace '&2' with wa_bdcmsgcoll-msgv2 into l_mstring.
              replace '&3' with wa_bdcmsgcoll-msgv3 into l_mstring.
              replace '&4' with wa_bdcmsgcoll-msgv4 into l_mstring.
            else.
              replace '&' with wa_bdcmsgcoll-msgv1 into l_mstring.
              replace '&' with wa_bdcmsgcoll-msgv2 into l_mstring.
              replace '&' with wa_bdcmsgcoll-msgv3 into l_mstring.
              replace '&' with wa_bdcmsgcoll-msgv4 into l_mstring.
            endif.
            condense l_mstring.
            write: / wa_bdcmsgcoll-msgtyp, l_mstring(250).
          else.
            write: / wa_bdcmsgcoll.
          endif.
        endloop.
        if sy-subrc = 0.
          write: / wa_bdcmsgcoll.
        endif.
      endloop.
    endform.              

  • How to find country code based on delivery number

    HI Folks,
    plz suggest which table is having country code(ship-to party) based on delivery number.this should be storage location country.
    Thanks,
    Ritesh.
    Message was edited by:
            Ritesh Shrivastava

    Hi,
    You can also get it from the table VBPA..
    SELECT SINGLE * FROM VBPA
                  WHERE VBELN = 'DELIVERY NUMBER'
                  AND       PARVW = 'WE'.   "SHIP TO PARTY.
    VBAP-LAND1 will be the country code..
    Thanks,
    Naren

  • User Exit or BADI for MIGO on entry of inbound delivery number

    Hi all,
    I want a user exit or BADI for MIGO, my requirement is that whenever a user enters an inbound delivery number and presses enter in MIGO the exit should get fired.
    Please help, if someone knows.
    Thanks and Regards,
    Mohammed.

    hi
    you can try out various BADI'S-
    MB_MIGO_BADI
    MB_MIGO_ITEM_BADI
    Helpful function modules:-
    MIGO_BADI_EXAMPLE
    MIGO_BADI_EXAMPLE_GET_DATA
    MIGO_BADI_EXAMPLE_GET_HEADER
    MIGO_BADI_EXAMPLE_PUT_DATA
    MIGO_BADI_EXAMPLE_PUT_HEADER
    MIGO_BADI_EXAMPLE_UPATE_DATA
    MIGO_BADI_EXAMPLE_UPDATE_HEAD
    I hope at least one of these helps.
    regards
    Aakash

Maybe you are looking for

  • ITunes and my PC won't recognize my iPod Nano (2nd gen.)

    Just this morning, my iPod nano (2nd gen.) stopped getting recognized in my iTunes and on my computer hard drive. It still charges when it's plugged into the computer, but the device is not recognized otherwise. What is going on?? Thanks!

  • UCCE 10.0 EDMT will reduce database size ?

    Hi We are doing Tech Ref. upgrading CCE 8.0.3 server to CCE 10.0, Intial HDS DB size is 145GB after patch upgrade to 8.5, the HDS DB size is 125 GB, but after EDMT to ver 10.0 the migrated data is 79GB does something happened in migration towards the

  • Problem in downloading alv output to spreadsheet using sap standard downlo.

    Hi all, I have an ALV report Output of approx 120 columns , But when I am downloading the output to spreadsheet using standard download button , thefile is downloaded but the columns in multiple lines, is there any method/setting by which i can downl

  • Sales BOM in different Sales Organizations

    Hi Does anybody knows if a Sales BOM can work just onyl in a specific sales organization? Regards

  • RAID 1 question for external drives...

    Hope this is the right category for this question... I have a 2-dock external hard drive (Icy Dock with eSATA and USB) and just put in two 2TB drives to handle all my video. When I plug it into my MBP (via USB), the LED indicators - from Icy Dock's s