Get purchase order number before saving

Hi All,
I am working on Purchase order Creation.
I want to know the purchase order number before it was saved.
I have used NUMBER_GET_NEXT function Module.But it is based on Number range.
I dont want to get based on Number Range.
I want to get the Get next number based on the Documnet TYpe.
Is there any possiablity to get that.If yes please let me know.
Thanks,
Swapna.

Hi,
data : lv_ebeln type ebeln.
Select single MAX( EBELN ) from EKKO into LV_EBELN.
Next PO Number =  LV_EBELN + 1.
Try this.
This will work if maintain only one number rage object for PO Number.
Thanks,
Durai.V

Similar Messages

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

  • How to get purchase order number from delivery number?

    hi all,
    how to get purchase order number and item if i have only delivery.
    and in same way how to get po number and item if i know only batch number.
    kindly give me some solution i need this urgently.
    thanks in advance.

    Check the logic below:
    * Selecting the Sales Documents from VBFA for corresponding Invoice
        SELECT vbelv
                     posnv
          FROM vbfa
          INTO TABLE gt_itab3
         WHERE vbeln EQ gt_itab5-vbeln
           AND posnn EQ gt_itab5-posnr
           AND vbtyp_n EQ 'J'.
        IF sy-subrc EQ zero.
          SORT gt_itab3 BY vbelv posnv.
        ENDIF.
      ENDIF.
      IF NOT gt_itab3 IS INITIAL.
    * Selecting the Purchase Orders from VBFA for corresponding Sales Documents
        SELECT vbeln
               posnn
          FROM vbfa
          INTO TABLE gt_itab4
       FOR ALL ENTRIES IN gt_itab3
         WHERE vbelv EQ gt_itab3-vbelv
           AND posnv EQ gt_itab3-posnv
           AND vbtyp_n EQ 'V'.
        IF sy-subrc EQ 0.
          SORT gt_itab4 BY vbeln posnn.
        ENDIF.
      ENDIF.
    Batch number will be there in delivery item.
    Regards
    Kannaiah

  • Getting purchase order number from sales order number

    Hi Experts,
    My requirement is to fetch the following values from a sales-order number:
    Purchase Order Number,
    Delivery Date
    Order Type(Source of Order EDI/EFAX/..)
    Ship To,
    Sold To.
    We are trying to fetch this data from the ECC system in our CRM system.We are exploring the possibilty of RFC calls to get the data from ECC system.
    Is there any standard FM present in ECC which gives the above information from the sales order number?
    Thanks in advance
    Regards
    Shilpi

    Hi,
    Check the FM BAPISDORDER_GETDETAILEDLIST
    It provides the whole data for a particular Sales order which you need to provide Sales order number in the table 'SALES_DOCUMENTS' in tables parameter.
    You have to provide the view what you need and in the import parameter 'I_BAPI_VIEW' like all the views that are in the tables parameter...
    HEADER, ITEM etc...
    The fields
    PO_METHOD
    PURCH_NO
    REQ_DATE_H
    SOLD_TO " will provide you the details you need in the table 'ORDER_HEADERS_OUT'
    SHIP_POINT in ORDER_ITEMS_OUT table provides the ship to
    Regards
    Sarves

  • How to get Purchase Order Number in a workflow

    Hi all,
    I am a new guy in workflow.
    I created one simple workflow - If purchase order is changed, then an email should be triggered.
    It is working fine.
    I want to add in the subject as well as in email text, the purchase order no which is changed.
    I tried to find this thing in existing threads.But m not able to find it.
    Please do the needful.
    Regards,
    Sunny

    Hi Sunny,
    You can pass the data to External User also..!!
    Sending Mail to Outlook : U need the Following things done for this:-
    1> Use the Mail Step in the WF and Choose the Receipient as the E-Mail Address and Give the E-Mail Address there.
    2> Check the Configurations that need to be done in Transaction SCOT. SMTP Server Settings are done to get the Desired Results
    To get Workitems in Outlook..!!.https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/workflow%252bscenario
    Problem in transferring the workitems into OUTLOOK
    /people/saujanya.gn/blog/2006/12/19/how-to-get-work-items-your-outlook-inbox
    Workflow Items in Outlook
    In the Mail Step Type - check the Binding of the WF Container with the Task Container.
    You have the ICON for Variable "Insert Expression" near the Subject line. Double Click that and you can find there your WF Container for the BO Used..Click on that and select the attribute that corresponds to the PO-Number. Copy paste the same in the Mesg Body also from there..
    Let me know if you still have any issues.
    Regards,
    Kanika

  • Purchase Order : function to determine the purchase order number

    Hi,
    I'm working on data migration to create purchase order. I must use the internally range number. Does anybody knows which function must i use to create the purchase order number before calling the bapi bapi_po_create ?
    with regards
    Jean-Luc Ledoux

    Hi,
    The BAPI is designed to generate the next free number that is defined by the company and allocate it in series.
    This is taken care internally.
    explain the scenario like as from what data ur creating the PO and wht exactly do u mean by having ur own internal number range.....
    No body will have 2 number ranges to define PO....
    if ur uploading data from legacy system then u can have 2 fields called as old purchase order number and purchase order number in new erp system.
    if this is ur scenario ask how the functional mapping is done in the company to accomadate legacy purchase order numbers.
    Regards,
    Jayaram Maganti

  • How to Display Purchase Order Number IN G.R.P.O

    Hi Guys,
    i am unable to find solution regarding Getting Purchase order number and displaying in Goods Receipt P.O. Report automatically when we copy from purchase Order ie Copy From button .My problem is we are Expecting Purchase Order Number in Goods Receipt P.O automatically when they copy From Purchase. Order.Can any suggest me reagarding with Good solution asap.
    Regards
    ANAND

    Hi Anand,
    When Your Goods Receipt P O Form is Active Click on form Settings in Menubar( 5ty Icon Form Right) Then one window will be opened then click on table format folder and then check the check box against base ref and base key under Visible column
    If you are not adding any comments on GRPO then by default it will show as based ob purchase order XXX.
    Hope it helps you
    Regards
    Vishnu

  • How to Purchase Order number in badi ME_PROCESS_PO_CUST~INITIALIZE

    Hi SDNers,
               I have problem to get  purchase order number in badi ME_PROCESS_PO_CUST method INITIALIZE, when purchase order release from ME28 tcode.

    Hi Suresh,
    I just tried that ... it is working fine... You have to use CMOD to implement it by creating a project...
    Please documentation on how to implement user exits...
    Also Please understand this is a Workflow forum... please do not post ABAP queries here... You would get better answers if you post in ABAP forums...
    Regards
    Gautam

  • 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

  • How to get sales order number based on purchase order

    hi,
    what is the transaction code to find the sales order number based on the purchase order number
    Regards,
    Murali

    Hi,
    Go to Se16 (data browser), see the table VBKD, enter the PO number, if any, execute.
    Prase

  • Purchase Order Number in Vendor Line Item (FBl1N) and Clear Vendor (F-44)

    Hello,
    I am not getting the Purchase Order Number in Vendor Line Item.(FBl1N).
    Also during Clear of Vendor through F-44 i am not able to identify the Line item on the basis of Purchase Order Number.
    Could any one pleae help me out on this issue as i have to clear the vendor Line item in mass.
    Thanks
    Nitin Jindal
    Moderator: Please, respect the rules of the forum and search SDN before posting new thread. This question has been answered several times. Also, please choose proper forum to post your questions; this one is related to Financials and not to Controlling

    Based on my experience std feature from SD-FI . Depending on the SD Billing config which can be by delivery(VTFL) or sales order(VTFA). You can assign options of A: Cust PO No. B Sales order no. C Delivery no. D External delivery no.  E Actual invoice number to available header fields of Assignment No. or Reference No. Try it out

  • Purchase order number in FBL1N

    Dear all,
    Please suggest how we can fetch purchase order number in fbl1n report even by putting sort key 014 (purchase order number) in vendor master and G/L master it is not fetching
    Thanks and Regards
    Priya

    Hello Priya,
    You should get PO number on vendor account with using FBL1N. But you must do some developments for it.
    I wrote message how can you add additional field in FBL1N before message below.
    Re: Vendor & Customers in FBL3N
    But you can update PO field on vendor line items display.
    You can skip adding field section on message which I gave you above.
    You must copy from SAMPLE_INTERFACE_00001650 to ZFI_INTERFACE_00001650 FM and some customizing for updation BTE. I specified it on message.
    Then you'll write some ABAP for PO number update in vendor line items.
    I'm giving to you some examples below.
      TABLES : bkpf, bseg.
      e_postab = i_postab.
      IF sy-tcode EQ 'FBL1N'.
        SELECT SINGLE *
          FROM bkpf
          WHERE bukrs = i_postab-bukrs
            AND belnr = i_postab-belnr
            AND gjahr = i_postab-gjahr.
        IF sy-subrc EQ 0.
          IF bkpf-awtyp EQ 'RMRP'.
            SELECT SINGLE *
              FROM bseg
              WHERE bukrs = i_postab-bukrs
                AND belnr = i_postab-belnr
                AND gjahr = i_postab-gjahr
                AND ebeln NE space.
            IF sy-subrc EQ 0.
              e_postab-ebeln = bseg-ebeln.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.

  • ME21 Purchase order number.

    hi friends,
             i am in the process of writing a BDC program for transaction ME21 to create P.O, to run in Background via JOB through Batch input session method.
             The purchase order number is generated internally, that means until P.O is created and saved, we don't know the P.O number, after only we save the P.O. the number is generated and shown to us as Information message.
             so i want to catch these numbers and push them into the presentation server as flat file. How do i catch these messages after the batch input, so that i can collect them in an internal table. or is there any other way to do it.
              My ultimate aim is to catch the purchase order numbers created in that batch input session.
    thanks and regards,
    sharon

    hello ram and prafulla,
      Thanks to both of u, for ur time.
    Ram's is a brilliant idea to read the logs, but for it to succeed i need ur help.. i just found out these things,
                  program rsbdc_protocol is responsible for transaction SM35 which shows the message logs, it uses a structure called bdc_protocol on the screen to display the messages, which inturn incldes a structure called bdclm, i went through the code, but could not find out the DB table from which ultimately the messages are coming, this program uses some function modules, may be they get the information i think, could u or any body else give me an idea, how to capture these messages..
               On the other hand when i gave a thought, after th batch has been processed, the P.O. created will have information stored in table EKKO and EKPO, from there also i cud get the P.O numbers, but what should be my search criteria, to get the correct P.O number created in that batch....
    thanks
    nivin

  • Purchase order number for each postings with FBL3N

    Hello
    With tcode FBL3N, I need to get all the postings on expenses accounts. Additionally it is possible to get more information on the postings from the orginal paper invoice. It shall be also more convenient to get the purchase order number walk trhough SAP with it. Then is it possible to get the purchase order number for each postings with FBL3N?
    thanks for inputs
    sb

    Hello,
    Could you please add field BSEG-EBELN as a special field in FBL3N (from
    menu path Settings -> Special fields).
    Then, select the Purchase order field again from "Change Layout"
    (Ctrl+F8). Now this field is available for display variants, it has the
    technical name 1-U_EBELN and the description 'Purchase Document'.
    The other field has the same description but as technical name
    '1-EBELN'. When you create a display variant be aware that you select
    1-U_EBELN and not 1-EBELN.
    *******Please also refer to attached notes 215798 and 984305.
    Best regards, Hana

  • CREATION OF SET FOR PURCHASE ORDER NUMBER

    Dear Sirs,
    I want to create a basic set containing all purchase order number, even though i am using table MSEG and field EBELN, i am not getting and values in it. how to create a basic set containing all the available PO numbers, which can be used in FI validation.
    Give me the full setting to create a above mentioned set.
    Thanks and Regards

    i didn't get what u are saying please elobrate. let me put forth my issue clearly.
    my client want to check where there is any PO available are not, for payments exceeding 1,00,000/-
    So i am cofiguring a validation, for which i want to keep the  "set of PO numbers" in "CHECK" part of the validation. which i am unable to do. when ever i try to select the set it is saying no valid object found.
    SO please help me with ur expert knowledge in this regards
    Thanks & Regards

Maybe you are looking for

  • Error While Extract results from OBIEE 11g Prest. Service to External apps.

    Need a urgent help I am using java to connect to OBIEE's  11g SOAP-API and trying to pull Graph's in External Application. I have successfully been able to connect to the API, create an HtmlViewServiceSoap object, and use a combination of the followi

  • Auto-Anchor Controller's Best Practice

    Hi All, I got confused with this setup. I have 2 Wlc's.One is the internal controller and another one configured for the anchor controller (different subnet-DMZ zone) for guest traffic. Where do i configure DHCP assignment for this users..? Should Pr

  • How to call web services from PL/SQL?

    Hi, Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc.... Thanks in advance

  • No mapping between account names and security IDs was done. (Exception from HRESULT: 0x80070534)

    We are getting below error message in MOSS 2007 server, every few minutes. Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (9daf0827-7c85-41c7-82c5-89f93ecd652a). R

  • Security Issues with 8.1 Pro

    I have had several security issues with Windows 8.1 Pro. I am curious if the following apps should be loaded by default: CheckPoint.VPN JuniperNetworks.JunosPulseVpn SonicWALL.MobileConnect F.vpn.client These programs are installed on a fresh install