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

Similar Messages

  • Report ( invoice number and delivery number)

    Hi
    Is there any report in SAP, which can show invoice number and delivery document number, I know the SAP table, but is SAP standard report available?
    Example:PO: 5500075241, plant abraod delivery number 3510000174 and plant abroad Invoice number 3550000019, we need report which gives Delivery and Invoice no.
    thanks

    No standard reports shows both delivery and billing references in a single report.  You can develop a query in SQVI by table joining VBFA, LIKP and VBRK.
    thanks
    G. Lakshmipathi

  • Link between schedule Line Number and Delivery

    Is there a link between Schedule line Number and Delivery number ?
    Eg. Line item 10 with quantity 100. 
    has 5 schedule lines..with 5 different delivery dates.
    1 .  quanity 40
    2.   quantity 30
    3.   quantity 20
    4.   quanity  6
    5    quantity  4
    For schedule line 1, 2 deliveries were created,
    one      with quantity 20
    another with quantity 15
    quantity 5 is still not delivered.
    also schedule lines 2,3,4 and 5 are fully delivered.
    Is there any table, FM etc in SAP which will give me the link between the schedule line and delivery number ?
    Total deliveries created : 6. - But which delivery corresponds to which schedule line ?
    Please dont tell me to look VGBEL and VGPOS.. that will just give line item number 10.. I need to get the schedule line number.
    Also, RV_SCHEDULE_CHECK_DELIVERIES --> will give me the delivered quantity against each schedule line.
    My purpose is to create an ontime delivery report .
    a report which list each schedule lines, and tell, how many shipments were late/ontime/early etc..
    and for Late ones, how many days late has to be found.
    this is where i need the delivery.
    No. Of days Late = Actual GI Date - Planned GI Date.
    Actual GI date is in the delivery.
    Any suggestions ?
    Thank you in advance.

    Hi,
    Check in the below link.
    relation between VBEP-ETENR and LIKP-VBELN
    Thanks,
    Sree.

  • I haven't got any order confirmation e-mail from Adobe and cannot install Photoshop due to no serial number information.

    Please give me order confirmation e-mail so that I can install Photosho.
    After download installation file, I am stacking due to no serial No information.

    お世話になります。オーダー確認のメールが届かずフォトショップをダウンロードで購入したのですがシリアル番号の情報がないため入力出来ずインストールできません。
    iPadから送信
    2015/01/27 16:58、Chikuromochi <[email protected]> のメッセージ:
    I haven't got any order confirmation e-mail from Adobe and cannot install Photoshop due to no serial number information.
    created by Chikuromochi in ダウンロード、インストール、セットアップ (Japan) - View the full discussion
    OW72247756さん
    AdobeJapanForumをご利用いただきありがとうございます。
    恐れ入りますが、JapanForumですのでご質問内容を日本語で記載していただく事は可能でしょうか?
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7135151#7135151 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7135151#7135151
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in ダウンロード、インストール、セットアップ (Japan) by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Fetch Sales order number and PO number from ship to party and sold to party

    HI,
    I need to get Sales order number and PO number
    from ship to party and sold to party.
    I have only ______sold to party and ship to party and req del date_______ in selection screen as mandatory
    Please let me know
    Sreekanth

    Hi,
    You can do this:-
    SELECT VBELN FROM LIKP
    INTO TABLE T_DELIVERIES
    WHERE KUNNR = SHIP TO PARTY
    AND     KUNAG = SOLD TO PARTY
    AND LFDAT      = DEL DATE.
    You will get a table containing the list of deliveries.
    Use VBFA to get the sales orders from deliveries.
    SELECT VBELV FROM VBFA
    INTO TABLE T_SALESORDERS
    WHERE VBTYP_N = 'J'
    AND     VBELN  = T_DELIVERIES-VBELN.
    T_SALESORDERS WILL give you list of sales orders.
    From Sales Orders you can get Purchase orders through EKKN Table.
    Using EKKN pass T_SALESORDERS-VBELN and get corresponding EBELN.
    Regards,
    SUbhashini

  • Merging of Prodn Order number and operation number into the unloading point

    Hi,
    I am creating the production order using the Tcodes Co01 or co10 and my requirement is that after creating the production number and then when I open that one in the change mode using co02 Tcode the unloading point which is present in the Goods Receipt tab should come as a concatenation of order number and operation number .
    Thanks for the help in advance.
    Regards,
    Venkat.

    Hello Rachit,
    The relation is as follows
    AFKO-AUFPL (Routing number is Order header)
    Use this routing number to get operations from AFVC
    AFVC-VORNR gives operation number
    AFVC-LTXA1 gives operation description
    For sub-operations, VORNR will be sub-operation number, and AFVC-SUMNR for this sub-operation corresponds to the respective superior operation(refers to AFVC-APLZL).
    AFVC-APLZL is a unique number for each operation.
    Hope this helps. You can check with some existing/new orders as well.
    let me know if you need anything about split operations as well.
    Best Regards,
    Subhakanth

  • Sales order number and Allocation Number  in one table

    Hi Frnds,
      We are using ECC 6.0 AFS , i  need sales order number and Allocation number in one table ? I wanted to know how many times they have done the allocation for a particualr sales order ??
    Regards
    Rakesh

    I Have got the tables, there are two tables
    1) /AFS/ARUN_PROT -- AFS log file for arun.
    2) /AFS/ARUN_PROI -- AFS Requirement unable to asign.
    regards
    rajesh

  • Excise Invoice number and Internal Number

    Hello Friends
    I have some queries ,I will be thankful to you if you could guide me, in understanding themu2026
    1) When we see the document in J1IEX ,in excise invoice tab, we see two fields :Excise invoice number and Internal Number.
    For Internal number we define the range in object J_1INTNUM, but how do we define range for Excise invoice  number
    2) Where do we maintain the relation between GRPO (Excise Transaction type) with the Excise Invoice number
    3) When do we require updating of register ,is it done on daily bases, and  how can we see the entries of RG23A part 1.
    4) We have excise invoice number  range of posted ,in process and cancel documents which is  assigned to GRPO transaction type, while running J1I7 though we select last option   part 1 posted  and part 2 not  posted, still the system shows the cancelled documents, How can I avoid  the cancel documents
    Thanks
    Siddharth

    1) When we see the document in J1IEX ,in excise invoice tab, we see two fields :Excise invoice number and Internal Number.
    For Internal number we define the range in object J_1INTNUM, but how do we define range for Excise invoice number
    -->> Ex inv nbr will be entered based on the vendor ex invoice .. this is external nbr assignment
    2) Where do we maintain the relation between GRPO (Excise Transaction type) with the Excise Invoice number
    --->> there is no relation between grpo vs. ex inv nbr
    3) When do we require updating of register ,is it done on daily bases, and how can we see the entries of RG23A part 1.
    >> u can see in J1I7 or thru table J_1IPART1
    4) We have excise invoice number range of posted ,in process and cancel documents which is assigned to GRPO transaction type, while running J1I7 though we select last option part 1 posted and part 2 not posted, still the system shows the cancelled documents, How can I avoid the cancel documents
    >> wait for others answers..

  • Invoice number and document number not printed in payment advice

    Hello Gurus,
           I am executing reprint check through transaction fch7, In that Invoice number and document number not printed in payment advice. I have created zscript for that and also assinged regup-belnr and regup-xblnr and used standard program RFFOUS_C.
    other fields from regup table are displayed but above two mentioned fields are not displayed.
          I even tried debugging standard RFFOUS_C prog, in that regup-belnr and regup-xblnr are coming but it is not printed on form.
    With regards,
    Vikram

    Hi,
    Debug you Zscript and check the invoice no and document no. Have assigned that script in FBZP..? check the which form is calling FCH7 in debugger mode..?
    Rgds
    Aeda.

  • Invoice Number and Document Number

    Are Invoice Number and Document Number in FI AR same?
    Dont they differ, I could find only one infoobject 0INV_DOC_NO relating to both.
    Is there any seperate infoobject which gives the document number in 0FIAR_C03.
    Please comment.
    Thanks.

    hi,
    are you looking for clearing doc number ?
    http://help.sap.com/saphelp_nw04s/helpdata/en/ee/cd143c5db89b00e10000000a114084/frameset.htm
    0CLR_DOC_NO - source field BSID-AUGBL
    hope this helps.

  • Map BATCH number corresponding to ORDER number and Material number .

    hi all,
    i want to map the BATCH number corresponding to Material Number .
    i searched tables MCHA which has two fields Material number and Batch number but it doenot have Order number.
    so how can i get Batch number as in table AFPO/AFKO i have all these three fields batch/material/order numbers.
    but the batch number column is blank for all .
    and in case of table MCHA , these is assigned batch number to every Material number .
    also i want to ask , either the Material number in both tables (MCHA AND AFPO) is same or different as i didnot found any relation to map these three field by other fields too.
    so please suggest me the Possible way to resolve this .....
    sunny

    hi dsk,
    thanks for your earliar reply,
    actually iam working on sapscript there i want to add batch number ,but i am not able to clear my doubt from where i get this.
    how can i map batch number with corresponding to PO num ber, '
    in the report i used structure vbplp with field charg"(batch num).
    also i want to know from which table i can get customer part number and Po number .
    how can i add batch num ,..
    from which table or with which field i can compare itr to get .
    sunny

  • Merging the Production order number and operation number into sequential no

    Hi,
      I am creating the production order using the Tcodes Co01 or co10 and my requirement is that after creating the production number and then when I open that one in the change mode using  co02 Tcode the sequential number which is present in the assignment tab should come as a concatenation of order number and operation number .
    Thanks for the help in advance.
    Regards,
    Venkat.

    dear,
    this depends on the user buffer set.
    for each user there will be a buffer set in when logeed in and create a production order.
    depending on the saving the production order saving time there may be a situation as you have now.
    discuss with your basis people and under stand the user  buffer of numer for production order.

  • Production Order Number and Batch Number same during order creation

    Hi All,
    I wanted to keep the Production Order number and Batch Number same during creation.
    How I can do that during creation of order only. So during creation same number to be get assigned automatically in the background.
    One thing I can maintain ; the same number range for both.
    But how to activate other functionality.
    Regards,
    Amit

    Hi SAP2511,
    For Production order-
    1.You can define a Order type  and  Mantain the number range same as batch number range (in  OPJH transction)
    For Batch
    1.Activate Automatic internal batch assignment - (OMCZ)
    2.Number range for batch - for object - BATCH_CLT - (OMAD)
    For batch creation at time of Order creation -
    You can create Automatic batch at the time of order creation or order release
    1 Create Production scheduler Profile(OPKP) and assign in Work scheduling view of material master for which you want to create batch at the time of order creation or release.(Select automatic batch creation at the time of release or creation in OPKP)
    Things to be taken care -
    1 . What if you set deleation flag for order?
    Regards
    Girish
    Edited by: girish khobare on Aug 20, 2010 9:31 AM

  • Can Business Partner number and Vendor Number, Plant Numbe be same in SRM ?

    Hi Experts,
    We are configuring SRM7.0 with ECC6 ( Ehp4) having Classic Scenario .
    I configured sandbox, and everything working fine.
    I have one query.  The Business Partner Number and the Vendor Code or Plant code are different. So while entewring the Location key in Shopping cart we need to enter BP code, by drilldown ( In drilldown we can see ECC Vendor Plant number).
    Its no big problem,.
    Can anyone suggest  whether it is possible to have both Unique or exactly same , so no need to remeber both code or see in drilldown.
    Thanks
    NAP

    Hi Narendra
    Location - BP can be different only since plant assign  always internal BP number only so BP number and plant number can not be same.
    but Vendor you have two options .
    External Number  - if you were selected BP and Vendor number will be remain same.
    Internal Number - if you were selected BP and Vendor number will be different.
    visit BUCF tcode for Internal and External BP number configuration.
    See our Mentor Ricardo detail explanations
    http://wiki.sdn.sap.com/wiki/display/SRM/ECCPlantorLocationnumberisnotdisplayedinShoppingCart
    All the associated parties which are used in the SRM environment (like location, recipient and supplier) are modelled as business partners.
    Due to this fact the user interface displays the business partner numbers in a uniform manner, as the business partners are the technical representation of the involved parties.
    In order to give the user a better idea which business partners are shown by the numbers, a little text is displayed next to the corresponding field (e.g. 11147 - Werk Hamburg).
    When ERP plants are replicated to SRM system, plant numbers are converted into business partners and a new ID is assumed.       
    Muthuraman

  • BADI to get GR done flag , Final Invoice flag and Delivery completed flag

    Hi all,
    An Idoc needs to be triggered for PO line items to indicate different flags. As soon  as MIGO or MIRO is done for PO line item, I have to check three flags namely GR done flag , Final Invoice flag and Delivery completed flag and send information of these flags as set.
    I want to know which BADI or User exit will give information  to indicate that either of one or all above flags are set for PO line item as soon as MIGO or MIRO is used.
    Thanks in advance,
    Madhura

    HI,
    When Purchase order is created with reference to contract, system carry
    out the check whether Document date of PO should be within contract
    "validity start" and "vaidity end" date. If document date is outside
    the "validity start" and "validity end" date of PO, message 06 040
    "Validity period of contract does not start until &" or message
    06 041 " Validity period of contract expired on &" is raised.
    Same check is also carried out during any change in PO (txn ME22N).
    Please use one of following option to close the PO.
    1. Change the category of message 06041 as warning in customization.
    Txn OLME.
    Environment Data -> Define Attributes of System Messages ->System
    Messages
    2. Change the validity end date in contract and close the Purchase order. Validity end date can be reverted.
    BR
    Nadia Orlandi

Maybe you are looking for