Determine next delivery number

Is there an FM that will give the next delivery number? thanks.

first u have to get the number range object of this delivery.
NUMBER_GET_NEXT
check the same in ur SPRO , or put a break-point-->
<b>FV50XF0B_NUMMERNVERGABE_LIEFER</b> line no-52
Regards
Prabhu

Similar Messages

  • Urgent:- How to determine next MIGO Document Number to be genrated by syst.

    HI all
        Is there any method using which i can determine next migo (G.R.)  document number (only number)  to be genrated by system.
    Regards
    Deepak

    use FM "NUMBER_GET_NEXT". and fill in the Object for GR.
    award if it helps
    Krishn

  • Help needed in Automatic Batch determination during Delivery

    Hello gurus..
    Can anyone point me in the right direction. I am trying to trigger auto batch determination during delivery creation based on available batches. thank you
    If any can give me the config that goes with it, that'll be great

    Steps to configure Batch Management
    1)  Specify Batch Level
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Specify batch level and activate batch status management Transaction  OMCT
    2)  Batch Number - Activate Internal Number Assignment
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Number Assignment --> Activate internal batch number assignment Transaction  OMCZ
    3)  Batch Creation - for Goods Movements 
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Creation of new batches --> Define batch creation for goods movements
    4) Characteristic Value Assignment -- Update Standard Characteristics 
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Characteristic Value Assignment --> Update Standard Characteristics
    5) Activate Batch Classification for Goods Movements in Inventory Management 
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Characteristic Value Assignment --> Valuation for goods movements --> Activate Batch Classification for goods movements in Inventory Management Transaction  OMCV
    6) Batch Determination – Condition Table(Cross Client)
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Condition Tables --> Define production order condition tables Transaction  OPLB
    7)  Batch Determination – Condition Table(Cross Client)
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Condition Tables --> Define SD condition Tables Transaction  V/C7
    8) Batch Determination – Access Sequence(Cross Client)
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Access Sequences --> Define Production Order Access Sequences Transaction  OPLF
    9) Batch Determination – Access Sequence(Cross Client)
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Access Sequences --> Define SD Access Sequences Transaction  V/C2
    10) Batch Determination – Strategy Types
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Define Production Order Strategy Types Transaction  OPLE
    11) Batch Determination – Strategy Types
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Define SD Strategy Types Transaction  V/C1
    12) Batch Determination – Batch Search Procedure
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Define IM   Search Procedure Transaction  OMCY
    13) Batch Determination – Batch Search Procedure
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Define Production order Search Procedure Transaction  OPLG
    14) Batch Determination – Batch Search Procedure
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Define SD Search Procedure Transaction  V/C3
    15) Batch Determination – Batch Search Procedure Allocation
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Allocate IM search procedure/activate check Transaction  OMCG
    16) Batch Determination – Batch Search Procedure Allocation
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Assign Search procedure to production order Transaction  OPL8
    17) Batch Determination – Batch Search Procedure Allocation(SD)
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Allocate SD Search procedure Transaction  V/C5
    18) Batch Determination – Activate Automatic Batch Determination(SD)
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Activate Automatic Batch Determination in SD -->For delivery item categories Transaction  V/CL
    19) Batch Determination – Batch Selection Class
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Define Selection Classes Transaction  CL01
    20) Batch Determination – Sort Rule
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Batch Determination & Batch Check --> Define Sort Rules Transaction  CU70
    21) Batch Determination – Make Settings for Batch Where-used list
    Menu Path  Enterprise Structure> Logistics General> Batch Management --> Make Settings for Batch Where-used list Transaction  OMBB
    thanks
    G. Lakshmipathi

  • External Delivery Number in VL31N

    Hi,
    When creating inbound deliveries against a Purchase Order in VL31N, is there a user exit that will let me put in an external delivery number instead of an internally generated one.
    Deliveries in our system are created in a third party LE system and then sent back to SAP. We need to create deliveries in SAP using that external number.
    Your help is greatly appreciated.
    Thanks,
    Jay Viswanathan.

    Hi,
    These are the user exits present for the VL31N transaction,
    V02V0001            Sales area determination for stock transport order             
    V02V0002            User exit for storage location determination                   
    V02V0003            User exit for gate + matl staging area determination (headr)   
    V02V0004            User Exit for Staging Area Determination (Item)                
    V50PSTAT            Delivery: Item Status Calculation                              
    V50Q0001            Delivery Monitor: User Exits for Filling Display Fields        
    V50R0001            Collective processing for delivery creation                    
    V50R0002            Collective processing for delivery creation                    
    V50R0004            Calculation of Stock for POs for Shipping Due Date List        
    V50S0001            User Exits for Delivery Processing                             
    V53C0001            Rough workload calculation in time per item                    
    V53C0002            W&S: RWE enhancement - shipping material type/time slot        
    V53W0001            User exits for creating picking waves                          
    VMDE0001            Shipping Interface: Error Handling - Inbound IDoc              
    VMDE0002            Shipping Interface: Message PICKSD (Picking, Outbound)         
    VMDE0003            Shipping Interface: Message SDPICK (Picking, Inbound)          
    VMDE0004            Shipping Interface: Message SDPACK (Packing, Inbound)          
    Regards,
    Azaz Ali.

  • Output Determination in Delivery and billing

    Hi Gurus,
    Can anybody tell me how to maintain output determination for delivery. i have maintained Condition record for LDOO but when in delivery i goto Extras-output-header it taked me back to the same setting of LDOO. How do i see the output for delivery.

    Hi,
    Complete the condition technique for output determination for outbound dellivery.
    IMG-logistics execution-shipping-basic shipping functions-output control-output determination-maintain output determination for outbound deliveries.
    Create the condition table, access sequence, condition type, procedure and assig the output type LD00 to the procedure. Assign this procedure to your delivery document type.
    Maintain the condition record for outbound deliveries in VV21. Select LD00, enter Sales Org, customer no. of Ship to party, SH partner function. Select the line item an click on communication, select the printer and save the settings.
    Now you have created the delivery in VL01N. Save the delivery. Now go to VL02N, select the delivery number, In the menu bar in outbound delivery, click on issue delivery output. Her select the output type and click on print preview.
    Reward points if solution helps.
    Regards,
    Allabaqsh G. Patil

  • Issue with batch determination in delivery

    Hi All,
    I have an STO and when creating delivery via VL10I I get an error "doc is incomplete, you cannot save delivery". I have all the sufficient data in STo for delivery creation. Infact there should be batch strategy not taking place i guess.
    When I enter batch number in STO then a delivery is created, why? batch shd be determined automatically when creating deliveries.
    But there is no issue is quality system with same materials and plants I can create deliveries..

    Hi,
    Are you sure that the incompletion is because of Batch determination?
    In that case goto
    Spro> Log. general> Batch management> Batch determination and batch check> Activate automatic batch determination for delivery item
    and flag Auto Batch det check box for Item category "NLN"
    Hope this helps.
    Regards,
    sharan

  • Reg: Getting an error for getting Delivery number

    Hello ABAPers,
    Could you pleae assist me, For getting Delivery number based on the Sales Order Number.
    Here for getting Delivery number i used "BAPI_OUTB_DELIVERY_CREATE_SLS" Function Module, how ever i'm getting the below error message through Retrurns. i.e The sales document is not yet complete: Edit data.
    it would be a great helpful if you provide with sample coding. Thank you.
    Regards
    Mallikarjun

    to get delivery, read document flow table VBFA for next document....  However, the error you're mentioning comes from incompletion processing....probably cannot create a delivery when the SO document is incomplete!  Complete the SO document (by processing the incompletion data) and try again.

  • Shipment stages and delivery number

    Hi Friends
    we have four delivery number process by one shipment number.
    Shipment is having two stages, How we can identify which delivery numbers are related to whihc shipment stage.
    Thanks.

    Hi Shiv,
    Please go to VT02N transaction enter your shipment number then go in to the shippment document.
    To display details about the stages in the shipment document:
    1.On any of the shipment overview screens, choose Overview -->Stages.
    2.Select the stage(s) for which you want to display details.
    3.Choose Stage --> Stage detail.
    You can get display about the deliveries or partners for the stage by choosing Deliveries in stage or Partner stage.
    You will reach the detail screen for the first stage that you selected. If you are in change mode, you can make any necessary changes. To reach the detail screen for any other stages you marked, choose Stage --> Next stage.
    I hope it will help you,
    Regards,
    Murali.

  • How to look for sales order number if I know outbound delivery number?

    How to look for sales order number if I know outbound delivery number?

    Hi ,
        If you want to see the Sales order Number from Outbound delivery or invoice,go to their respective T-codes,say for example,
    for delivery,Goto Tcode: VL02N / VL03N.There you will find Document Flow Icon,click on that,or press F7.
    You will get a window,there you can see the Sales order Number before your outbound delivery Number
    With Thanks and Regards,
    Priya

  • 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

  • [SOLVED] Unable to determine major/minor number of root device - USB

    I installed Arch on a USB harddrive of mine from within VirtualBox with the intention of running the installation (via the drive) on a laptop in my house. I passed through the drive through by creating a special vmdk (here - it's for "expert users only". ) and installed Arch on it by booting off the Arch 2011.08.19 iso and following the instructions. I do recall the installer complaining because /sbin/mkinitcpio was missing, so I copied over the one from the host (which is also an up-to-date Arch system). After that, everything worked and I was able to boot the drive within virtualbox.
    Then I went and plugged it in to another laptop in the house and, surprisingly (for me at least), it got past GRUB. My joy was short-lived, because it failed just a bit later:
    :: Running Hook [udev]
    :: Triggering uevents...done.
    ERROR: Unable to determine major/minor number of root device 'Waiting 10 seconds
    for device /dev/disk/by-uuid/[the uuid] ...
    /dev/disk/by-uuid/(the uuid)'.
    You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
    sh: can't access tty: job control turned off
    [ramfs /]#
    So I googled around for a while and plugged it back in to my computer, booted it up in virtualbox, and added "usb" to the HOOKS array right after udev in /etc/mkinitcpio.conf. Then I rebuilt the initramfs:
    # mkinitcpio -p linux
    So I plugged it back into the laptop, booted it, and got the same error.
    Later, in an attempt to isolate the problem, I removed "sata" from HOOKS, ran the same mkinitcpio command again, and rebooted the VM. I got what looked like the same error as the one above. yay. So I guess the usb hook isn't being loaded or something like that. (I've since added the "sata" hook back and rebuilt the initramfs so I can mess around in the VM )
    I've tried removing autodetect from HOOKS (saw that in some threads) and trying different USB ports on the laptop, but nothing seems to be working. I also checked to see if virtualbox was providing a bogus uuid or something, but the one it's specifying seems to be correct - I looked in my computer's /dev/disk/by-uuid and it matched.
    Info on the drive (first partition is /boot, second is swap (derp!), third is /, and fourth is /home):
    # sudo fdisk -l /dev/sdg
    Disk /dev/sdg: 500.1 GB, 500107861504 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773167 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016b3d
    Device Boot Start End Blocks Id System
    /dev/sdg1 * 63 208844 104391 83 Linux
    /dev/sdg2 208845 4417874 2104515 82 Linux swap / Solaris
    /dev/sdg3 4417875 209230559 102406342+ 83 Linux
    /dev/sdg4 209230560 976768064 383768752+ 83 Linux
    Screengrab of my VirtualBox storage setup (just for giggles):
    My /etc/mkinitcpio.conf:
    # vim:set ft=sh
    # MODULES
    # The following modules are loaded before any boot hooks are
    # run. Advanced users may wish to specify all system modules
    # in this array. For instance:
    # MODULES="piix ide_disk reiserfs"
    MODULES=""
    # BINARIES
    # This setting includes any additional binaries a given user may
    # wish into the CPIO image. This is run first, so it may be used to
    # override the actual binaries used in a given hook.
    # (Existing files are NOT overwritten if already added)
    # BINARIES are dependency parsed, so you may safely ignore libraries
    BINARIES=""
    # FILES
    # This setting is similar to BINARIES above, however, files are added
    # as-is and are not parsed in any way. This is useful for config files.
    # Some users may wish to include modprobe.conf for custom module options
    # like so:
    # FILES="/etc/modprobe.d/modprobe.conf"
    FILES=""
    # HOOKS
    # This is the most important setting in this file. The HOOKS control the
    # modules and scripts added to the image, and what happens at boot time.
    # Order is important, and it is recommended that you do not change the
    # order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
    # help on a given hook.
    # 'base' is _required_ unless you know precisely what you are doing.
    # 'udev' is _required_ in order to automatically load modules
    # 'filesystems' is _required_ unless you specify your fs modules in MODULES
    # Examples:
    ## This setup specifies all modules in the MODULES setting above.
    ## No raid, lvm2, or encrypted root is needed.
    # HOOKS="base"
    ## This setup will autodetect all modules for your system and should
    ## work as a sane default
    # HOOKS="base udev autodetect pata scsi sata filesystems"
    ## This is identical to the above, except the old ide subsystem is
    ## used for IDE devices instead of the new pata subsystem.
    # HOOKS="base udev autodetect ide scsi sata filesystems"
    ## This setup will generate a 'full' image which supports most systems.
    ## No autodetection is done.
    # HOOKS="base udev pata scsi sata usb filesystems"
    ## This setup assembles a pata mdadm array with an encrypted root FS.
    ## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
    # HOOKS="base udev pata mdadm encrypt filesystems"
    ## This setup loads an lvm2 volume group on a usb device.
    # HOOKS="base udev usb lvm2 filesystems"
    # Tried this line instead -- didn't work either
    #HOOKS="base udev usb autodetect pata scsi sata filesystems usbinput"
    HOOKS="base udev usb sata filesystems"
    # COMPRESSION
    # Use this to compress the initramfs image. With kernels earlier than
    # 2.6.30, only gzip is supported, which is also the default. Newer kernels
    # support gzip, bzip2 and lzma. Kernels 2.6.38 and later support xz
    # compression.
    #COMPRESSION="gzip"
    #COMPRESSION="bzip2"
    #COMPRESSION="lzma"
    #COMPRESSION="xz"
    #COMPRESSION="lzop"
    # COMPRESSION_OPTIONS
    # Additional options for the compressor
    #COMPRESSION_OPTIONS=""
    My GRUB menu.lst:
    # Config file for GRUB - The GNU GRand Unified Bootloader
    # /boot/grub/menu.lst
    # DEVICE NAME CONVERSIONS
    # Linux Grub
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,1)
    # /dev/sda3 (hd0,2)
    # FRAMEBUFFER RESOLUTION SETTINGS
    # +-------------------------------------------------+
    # | 640x480 800x600 1024x768 1280x1024
    # ----+--------------------------------------------
    # 256 | 0x301=769 0x303=771 0x305=773 0x307=775
    # 32K | 0x310=784 0x313=787 0x316=790 0x319=793
    # 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
    # 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
    # +-------------------------------------------------+
    # for more details and different resolutions see
    # https://wiki.archlinux.org/index.php/GRUB#Framebuffer_resolution
    # general configuration:
    timeout 5
    default 0
    color light-blue/black light-cyan/blue
    # boot sections follow
    # each is implicitly numbered from 0 in the order of appearance below
    # TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
    # (0) Arch Linux
    title Arch Linux
    root (hd0,0)
    kernel /vmlinuz-linux root=/dev/disk/by-uuid/b4a677d0-cb0d-4acd-bb09-2dc2f4b9501f ro
    initrd /initramfs-linux.img
    # (1) Arch Linux
    title Arch Linux Fallback
    root (hd0,0)
    kernel /vmlinuz-linux root=/dev/disk/by-uuid/b4a677d0-cb0d-4acd-bb09-2dc2f4b9501f ro
    initrd /initramfs-linux-fallback.img
    # (2) Windows
    #title Windows
    #rootnoverify (hd0,0)
    #makeactive
    #chainloader +1
    Last edited by UncleNinja (2011-12-02 15:33:21)

    UncleNinja wrote:
    skunktrader wrote:https://bugs.archlinux.org/task/27385
    Perfect! Thank you!
    Would it be safe to copy over the version from HEAD into my mkinitcpio?
    EDIT: nevermind, derp derp the package is updated
    EDIT again: Actually, it's not.
    I copied over the init_functions in HEAD into /lib/initcpio/init_functions and rebuilt the initramfs. It worked!
    Thanks guys!
    Last edited by UncleNinja (2011-12-02 15:35:20)

  • Assign external delivery number using BAPI_DELIVERYPROCESSING_EXEC

    Hi Experts,
    How to assign the external delivery number using "BAPI_DELIVERYPROCESSING_EXEC?
    For internal no, the BAPI works and I try to pass the parameters "tbl_request-EXTDELV_NO = XXX" to the BAPI , it prompt an error "Unexpected issue of error message (output NR 751)"
    Thanks

    Hi,
    Please check the external number which you are giving is within the number  Range defined  in Configuration  .
    regards
    Deepak.

  • Delivery number for a material document posted

    Hi experts,
    I need to delivery number for the material document number posted,
    I tried to use the field XBLNR from the table MKPF
    but i see that the feild is empty in the case of inbound delivery
    why is it so.
    How ever i can get the data from VBFA ,but can any one tell me the reason why XBLNR is empty in case of inbound delivery.
    Thanks a lot in Advance.

    Hi,
    If you do GR w.r.t. Inbound Delivery No in MIGO then it will not update "Reference" field i.e. XBLNR.
    To update same with Inbound Delivery No, you have to do "Post Goods Receipt" from Inbound Delivery Document itself in VL31N or VL32N.

  • How to create invoice using bapi  base on delivery number with example

    hi,
    Pl give me one example to create invoice using bapi base on delivery number (PGI).

    Use this code
    * Pass the delivery no to the FM to create the invoice
          wa_vbsk-smart = u2018Fu2019.
            wa_komfk-vbeln = nast-objky. u201CuF0DF-----delivery number
            APPEND wa_komfk TO it_komfk.
            CLEAR wa_komfk.
    *    To fill the message structure
    *        l_wa_error-vbeln_vl = nast-objky. " Delivery No.
    *        l_wa_error-fkart = wa_ztab-bil_doc_type." Billing Doc type
            CALL FUNCTION 'RV_INVOICE_CREATE'
                    EXPORTING
    *                 delivery_date             = 0
                     invoice_date              = v_date  u201C<- date
    *                 invoice_type              = '    '
    *                 pricing_date              = 0
                     vbsk_i                    = wa_vbsk
                     with_posting              = u2018Du2019
    *                 select_date               = 0
                     i_no_vblog                = ' '
                     i_analyze_mode            = ' '
                     id_utasy                  = ' '
                     id_utswl                  = ' '
                     id_utsnl                  = ' '
                     id_no_enqueue             = ' '
                     id_new_cancellation       = ' '
    **             IMPORTING
    *               VBSK_E                    =
    *               OD_BAD_DATA               =
    *               DET_REBATE                =
                    TABLES
                      xkomfk                    = it_komfk
                      xkomv                     = it_komv
                      xthead                    = it_thead
                      xvbfs                     = it_vbfs
                      xvbpa                     = it_vbpa
                      xvbrk                     = it_xvbrk
                      xvbrp                     = it_vbrp
                      xvbss                     = it_vbss
    *               XKOMFKGN                  =
    *               XKOMFKKO                  =

  • 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

Maybe you are looking for