How to add Package to a Delivery Note?

Hello, I want to add package information via DI API, but I don't know how start.
Thanks
David Muñoz

Hi David,
You should find the sample by selecting the DocumentPackages object in the DI API reference. The SDK docs I checked were for build 800.171 (ie earlier than patch 47) so the object should be available to you.
I've copied the sample from the SDK below:
Dim Delivery As SAPbobsCOM.Documents
Dim Line As SAPbobsCOM.Document_Lines
Dim Pack As SAPbobsCOM.DocumentPackages
Dim Item As SAPbobsCOM.DocumentPackageItems
'Add a delivery with Package
'Delivery header
Delivery = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
Delivery.CardCode = "C20000"
Line = Delivery.Lines
'Delivery lines
Line.ItemCode = "A00001"
Line.Quantity = 1
Line.Add()
Line.ItemCode = "A00002"
Line.Quantity = 2
'Package settings
Pack = Delivery.Packages
Pack.Number = 1
Pack.Type = "Box"
'Package Content
Item = Pack.Items
Item.ItemCode = "A00001"
Item.Quantity = 1
Item.Add()
Item.ItemCode = "A00002"
Item.Quantity = 1
'Adding Delivery with package
Delivery.Add()
'Get and Update a Package
Delivery.GetByKey(1) ' Get a delivery by it's Document Number
Pack = Delivery.Packages ' Get the Packages of the Delivery
Pack.Type = "Container" ' Change the type of the Package to Container
Delivery.Update() ' Update the Delivery
'Delete a Package
Delivery.GetByKey(1) ' Get a delivery by it's Document Number
Pack = Delivery.Packages ' Get the Packages of the Delivery
Pack.Delete() ' Delete the package
Delivery.Update() ' Update the Delivery Document
Kind Regards,
Owen

Similar Messages

  • How to from more than one delivery note - conversion into one invoice

    Dear Experts,
    How to from more than one delivery note - conversion into one invoice?
    Thanks and best regards,
    Wilson Hong

    Dear Wilson Hong,
    Single invoice for multiple deliveries will takes place based on these criterion
    1.If you want single billing document for multiple deliveries these data should be same in all order for all items.
    -> Payer
    -> Inco term
    -> Payment term
    -> Actual GI Date from Delivery
    -> Shipping Condition
    -> Account Assignment Group
    -> Exchange rate (in case of export sale order)
    -> Foreign trade data.
    2.In addition to this you need to maintain proper copy control settings between delivery and invoice.
    Go to VTFL transaction input your delivery type and invoice type then go in to the item level settings here you find field Data VBRK/VBRP maintain this field with routine 3-Single invoice.
    If the above data and settings are exists you can do single invoice for multiple deliveries.
    I hope this will help you,
    Regards,
    Murali.

  • How to add package text to smartform

    Hi,
    i'm new to SAP and I have a question. We have smartform with material number and material text output. We also have package number - in what this material gets packed (palette, case etc.) Now we want to add also package text to smartform.
    How to include package text from table?
    Thanks

    Hi,
    i'm new to SAP and I have a question. We have smartform with material number and material text output. We also have package number - in what this material gets packed (palette, case etc.) Now we want to add also package text to smartform.
    How to include package text from table?
    Thanks

  • How to print Warranty (Duration) on Delivery Note using PLD

    Hi,
    How can I print Warranty (No. of Months) on Delivery Note using PLD. Warranty is already defined in a service template which is assigned to Item Master record.
    when i try to print "duration" from OCTT is shows all the duration values set in all service templates with the combination of all the items in the delivery note. Please help me. I am working on SAP B1 2007 A PL47.

    Hi
    Its Very Easy just Follow the Steps:
    Create One DB field in Repetative area0 - Table -octt(contract Temp) Column- Duration(Duration of Coverage)
    Check the Item code Field or Item description field for EX( F_123), then in Duration DB field - Go to Properties -Field in that - General - Lint to - connect the  ( F_123), code Field or Item description field for EX( F_123),
    So it will show automatically Duration of the Item which was connected in master data.
    It works perfectly in 2007B PL 10.
    If issue Resolved pls close the thread
    Giri

  • How to put footer in the Delivery note  sap script form.

    Hi All,
      i am new to SAP SCRIPT , can any one guide us how to Create a footer in the Delivery note sap  script.
      I need to put  some message if the stock of the material is "0"(zero).
           can anyone  tell me the process to do this.
    Thanks
    Channappa Sajjanar

    Hi,
    U create a window in script (Footer), and in the Driver program call this window at last..
    eg:
    create a window in script and call it at the end in the layout..
    /E FOOTER
    P1 'Write Required text what u want to display;.
    now in print program, after printing all the line items in ur internal table call the FM write_form to print the footer...
    LOOP AT itab.
      call function 'WRITE_FORM'
        exporting
         window = 'MAIN'
        exceptions
          others = 1.
    endloop.
    now call, FM write_form to print the footer
    IF stock EQ 0.
    call function 'WRITE_FORM'
        exporting
         window = 'FOOTER'
          element = 'FOOTER'
        exceptions
           others = 1.
    endif.
    Hope it helps!!
    Rgds,
    Pavan

  • Add ordered quantity to delivery note idoc desadv01 with user exit

    Hi,
    I am using the IDOC DESADV01 to output electronic delivery info when a user PGIs on a delivery note.
    The problem is I need some extra data like the original order qty, this exists in field VBAP-KWMENG
    So I think I would need to extend the idoc and do some kind of user exit to populate the value into the new idoc field.
    Unfortunately I have no experience with this, can anybody advise if its the correct way and how to get started?
    With thanks
    Rob.

    I apologies our system is totally different based on that I suggested.
    But current I guess you have to extend idoc.
    Below link is helpful for extending idoc.
    Let me know if still if you face any problem.
    http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
    Thanks,
    Narayan

  • How to prevent  a printing of Delivery Note for Spcecific Material Type

    Hi,
    I had a requirement wherein it was required to "Prevent Mask Delivery notes from printing to Shipping dept"
      addition info:  All delivery notes are currently set to print in shipping. We can put in a logic to prevent the printing of
      delivery note for a specific material type (like mask)
      for this i used copy control routine 'RV61B902' in the include  for tcode vl02n or vl01n..
      my logic is fine..
    include 'RV61B902'.
    sy-subrc = 0.
    DATA : w_matnr LIKE lips-MATNR.
    IF T683S-KSCHL = 'LD00'.
      IF sy-tcode = 'VL01N' OR SY-TCODE = 'VL02N'.
        select  matnr into w_matnr  from lips where vbeln eq komkbv2-vbeln.
          condense w_matnr.
          if W_matnr cs '*MASK'.
              SY-SUBRC = 4.
              exit.
            endif.
        ENDSELECT.
      ENDIF.
      ENDIF.
      question : My check was overwritten by the subsequent logic
    please advise.
    ESWAR
    Edited by: tarakeswar  rao on Nov 5, 2008 3:39 PM

    end user wants output to be stopped right, that will be controlleed in Output requirement only.
    What does that has to do witj copy control. It will not do anything in your case

  • How to add custom field in delivery address/performance location tab in SRM shopping cart and Ship to address Pop-up in SRM PO?

    Hi Experts
    i have a reuirement where i have to add custom field in delivery address/performance location tab in SRM shopping cart and Ship to address Pop-up in SRM PO
    i am doing below steps for this.
    1. Adding custom field ZZfield in structure INCL_EEW_PD_PARTNER_CSF by  using  append structure.
    2. Spro ->Supplier Relationship Management -> SRM Server -> Cross application basic settings -> Extensions and field controls (personalization) -> Configure field control ->Configure Control for Fields of Substructures
    then click on  "Metadata for Fields of Substructures and Table-Like Enhancements"  
    add the below entry
    Bus. Object Set Type  : I am trying 7 and 29
    Structure Field Name  : ZZfield
    Bus. Object Type       : BUS2121/BUS2201
    Set Level                    : Item
    Field Visible :  Check box should be checked
    Field Enable :  check box should be checked
    Can anyone has the idea of this?
    Thanks
    Rohit

    Hello Rohit,
    Please create a enchancement for component  /SAPSRM/WDC_UI_DO_SHIPTO.
    Add new input field and label in view V_DODC_SHIPTO.
    Bind the input field value with field ZZfield from structure  /SAPSRM/WDC_UI_DO_SHIPTO in the context node SHIP_TO .
    Regards,
    Neelima

  • How to reverse goods issue for delivery note by using IDoc

    Hi all,
    I would like to reverse goods issue and picking request for delivery note by using inbound IDoc.
    I used message type SHPCON and IDoc type DEVLRY03 for posting goods issue in inbound processing and it's work but I couldn't find solution for posting reverse goods issue.
    Pls let me know which IDoc type or any ways for posting goods issue reversal and cancelling picking request.
    Thanks for your time.
    Su R.

    Hello,
              For this requirements we can actually follow two Approaches that I can think of. Here they are.
    Approach 1
             Little Complex Approach. What we can do is to make use of the Same Function Module (Posting Program) IDOC_INPUT_DELVRY to do the Delivery Updates (Except reversing the Goods Issue). During this,  we can make use of one of the Customer Functions available in the Enhancement V55K0001 and satisfy our Requirement.
    Approach 2
            We can actually code a Custom Posting Program (Function Module) in which the first part will take care of updating the Delivery & if the PGI is done, then we can make use of the Function Module BAPI_GOODSMVT_CANCEL to reverse the PGI.
            I think the later Approach is much easier rather than going for the Standard Function Module (Posting Program), Exits and find a place where we have to find another Enhancement Spot / Enhancement where we can call the above FM to Cancel the Goods Movement.
    Hope these inputs were helpful.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • How to add music videos that are not from the itunes store?

    This drives me CRAZY that iTunes will allow me to classify my .mp4 music videos that I get from other sources (NOT bought from the iTunes store) as a Music Video but iTunes STILL keeps it classified under the Movie listing. Does anyone know how I go about or what is needed to get my music video files in the Music Video list?
    While I'm at it...
    It also bugs me that I can't organize my library properly. For example, I have a music performance/concert video and instead of having it in a separate list of "Musical Performances", iTunes contains it under Movies. This is a first for me to complain about my iTunes experience but I just wish there would be some flexibility for me to add content and categorize/list it under my personal preferences. Anything wrong with that?

    If you go to the Get Info menu and set Video Kind to Music Video it will only appear in your music library, and not in the Movie section.
    The tool VideoDrive (www.aroona.net) will automatically classify all your videos when you import them in iTunes, based on file and folder name, the length of the video and other metadata...

  • PackageDoc: how to add package Comments in Java code?

    There is a PackageDoc.commentText() that (should) return package comments. This would be great because i want to write package related comments. But where in the java code do i have to add this text? i tried adding javadoc over a apckage declaration:
    * Test package comment.
    package de.dlib;But PackageDoc.commentText() for this package returns nothing...

    Each package can have its own documentation comment, contained in its own "source" file, that the Javadoc tool will merge into the package summary page that it generates. You typically include in this comment any documentation that applies to the entire package.
    To create a package comment file, you must name it package.html and place it in the package directory in the source tree along with the .java files. The Javadoc tool will automatically look for this filename in this location. Notice that the filename is identical for all packages.
    For more info:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html#packagecomment
    -Doug Kramer

  • How to add a field that is not part of existing page attributes

    Hi Experts,
    Can someone give step by step procedure for adding a field that is not part of IC web view page attributes. I mean the field that I want to add is in BOL entity BTSaleset which is linked to BTAdminH through BTHeadersaleset relation. I have BTadminH in the page attributes but not BTsaleset.
    Thanks in Advance

    Experts.. any inputs ?

  • How to add a language that is not preinstalled from beginning

    Hi everybody,
    Is there a way to add a language in the Forms without installing the developer suite. I tried to change the NLS_LANG in the registry for the developer specific but nothing happen. Thanks for helping.

    Thanks for answering my question.
    I changed this value as I said in my first post NLS_lang to this your value and to this value AMERICAN_AMERICA.AL32UTF8 but still I'm facing same language. Actually I want to create Form that is Hebrew so I write from right to left and I need the Forms to accept multi languages. The problem is when I change the value in NLS_lang to HEBREW_ISRAEL.IW8MSWIN1255 I only get the Forms in the Run time started from Right to Left and I wanted to be in the same position from left to right and I can read Hebrew but when I write in Forms I only see like this character "??????" and the fonts is installed properly in windows OS.
    By the way, when I said the language is not preinstalled from beginning I meant when I installed the Forms but in my operating system I can write Hebrew.
    Any other suggestion. Thanks
    Edited by: [email protected] on Jun 16, 2009 6:21 AM

  • How to add mouseListener to classes and not to main, so each object is clic

    Hello everyone,
    Im developing a window system for applets. I know I could use the jframe windows but I want black outlined semi transparent windows. Im working on the basic stuff now. Basically you call the constructor and send it a string, the constructor will chop up the strings at '^' chars and determine the width and height of the window from there, anyway i can do all that.
    Is it possible to have each instance of my appletwindow class implement mouseListener and act upon mouse clicks separately or should i make a window manager and send mouse events from the main to my window manager? Of course if each object could have its own mouse handling that would save me having to iterate through all the objects every time there is a mouse click. Also do i need to extend component? Here is my code so far.
    public class AppletWindow extends Component implements MouseListener{
        String winText;
        Rectangle2D bounds;
        boolean isTop;
        Color bgColor;
        Color fgColor;
        int Margin;
        Font font;
        int fontHeight;
        int fontWidth;
        // some other contstructors here
        public AppletWindow(String winText, int x, int y)
            super();
            this.winText = new String();
            this.winText = winText;
            this.Margin = 10;
            this.fontHeight = 12;
            font = (new Font("SansSerif", Font.PLAIN, this.fontHeight));
            this.fontWidth = font.getSize()/2;
            int j = 0;
            int Width = 1;
            int Height = 1;
            for (int i=0; i<this.winText.length()-1; i++){
                if (this.winText.charAt(i) == '^'){    
                    if(Width < (i-j)){
                        Width = (i-j);
                    j=i;
                    Height++;
            } // end for
            this.bounds = new Rectangle(x, y,
                    Width*fontWidth+Margin*2,
                    Height*10+Margin*2 + fontHeight);
            this.bgColor = Color.BLACK;
            this.fgColor = Color.ORANGE;
            addMouseListener(this);
            boolean isTop = false;
        // all the mouse methods here
        // a method to paint the window to the screenIn my main (applet) i have these lines in the init()
      public void init() {
        this.setSize(800,600);
        testwin.addMouseListener(this);
        addMouseListener(this);
        } but when i click on the window or do anything to it, it does not respond. I had set up inside the appletwindow class so it would print out "applet window" on any mouse actions but none of them print.
    Thanks In advance

    Well i made my own window manager. So i pass the mouse events from the applet to the window manager and then to all the windows like so
    main (the appletscenemanager is my "window manager")
        AppletSceneManager asm = new AppletSceneManager();
        Thread repaintMe;
        // double buffering stuff
        Graphics bufferGraphics;
        Image offscreen;
        Dimension dim;
        public void init() {
        this.setSize(800,600);
        this.setBackground(Color.DARK_GRAY);
        dim = getSize();
        offscreen = createImage(dim.width,dim.height);
        bufferGraphics = offscreen.getGraphics();
        String winText = new String();
        int j = 0;
        int k = 0;
        for (int i=0; i< 25; i++){
            if(j==5){j=0;k++;}
            winText = "Window: " + i + '^';
            asm.addWindow(winText, j*160, k*120,160,120);
            j++;
        addMouseListener(this);
        addMouseMotionListener(this);
        public void mouseMoved(MouseEvent e) {
            //asm.processMouseEvent(e);
        public void mouseDragged(MouseEvent e) {
            asm.processMouseEvent(e);
        public void mousePressed(MouseEvent e) {
            asm.processMouseEvent(e);
        }then in my applet scene manager (which holds the windows in a linked list)
        public void processMouseEvent(MouseEvent e){
            AppletWindow temp = null;
            System.out.println("e.gid" + e.getID());
            for(AppletWindow aw :appletWindows){
                if(aw.processMouseEvent(e) != null)
                temp = aw;
            if (temp != null){
            appletWindows.remove(temp);
            appletWindows.push(temp);    
        }and in the actual window class its getting a little messy, its hard to tell which window is currenty being acted upon because i find if the window was clicked using .contains so if windows are on top of each other several can .contains(e.getpt()) and then several are "selected" at one time, which causes problems
        public AppletWindow processMouseEvent(MouseEvent e)
        if(dragging)
            moveWindow(e.getPoint());
            if (e.getID() != e.MOUSE_DRAGGED)
                dragging = false;
        if(sizing)
            sizingWindow(e.getPoint());
            if (e.getID() != e.MOUSE_DRAGGED)
                sizing = false;
        if(contains(e.getPoint()))
            // we are in this window pay attention
            if(e.getButton() == e.BUTTON1)
                setTopMost(true);                   // set it to topmost
                alpha = makeComposite(0.9F);        // make this one less transparent
            if(e.getID() == e.MOUSE_DRAGGED && isTopMost()  // are they draggin me?
                    && this.titleBounds.contains(e.getPoint())){dragging = true;}
            if(e.getID() == e.MOUSE_DRAGGED && isTopMost()
                        && this.sizeBounds.contains(e.getPoint())){sizing = true;}
            }else{
            setTopMost(false);
            alpha = makeComposite(0.5F);
            return this; // let them know it was us !
        return null; // it aint my fault!
        // window operations stuff
        public void moveWindow(Point pt){
            this.bounds.x = (int)(pt.getX() - (this.bounds.width/2));
            this.bounds.y = (int)(pt.getY()-5);
            this.titleBounds.setBounds(this.bounds.x, this.bounds.y,
                    this.bounds.width, fontHeight);
            this.sizeBounds.setBounds((int)this.bounds.getMaxX()-resizeWH,
                    (int)this.bounds.getMaxY()-resizeWH,resizeWH, resizeWH);
        public void sizingWindow(Point pt){
            if((pt.x - bounds.getMaxX()) > 0 && (pt.y - bounds.getMaxY()) > 0){
            this.bounds.width = (int)(bounds.width + (pt.x - bounds.getMaxX()));
            this.bounds.height = (int)(bounds.height + (pt.y - bounds.getMaxY()));
            }else{
            this.bounds.width = (int)(bounds.width - (bounds.getMaxX() - pt.x));
            this.bounds.height = (int)(bounds.height - (bounds.getMaxY() - pt.y));       
            this.titleBounds.setBounds(this.bounds.x, this.bounds.y,
                    this.bounds.width, fontHeight);
            this.sizeBounds.setBounds((int)this.bounds.getMaxX()-resizeWH,
                    (int)this.bounds.getMaxY()-resizeWH,resizeWH, resizeWH);
        public boolean contains(Point pt)
            if (bounds.contains(pt))
                return true;
            return false;
        }As anyone can see im getting no feedback what so ever from these forums (as usual), so i might be doing this the very hard way.
    here is the applet if anyone wants to see it run [http://www.zonemikel.com/smf/index.php?topic=18.0]

  • How to insert into dln3 automaticaly (delivery notes - expenses)

    Hellow experts!!!
    I have a problem, i'm progamming an add-on that i want to insert automaticly a row into dln3. I have declare a SAPbobscom.Documents and after like a SAPbobsCOM.BoObjectTypes.oDeliveryNotes and i access to dln3 like this:
       If oDln3.GetByKey(oRST.Fields.Item("DocEntry").Value) Then
          oDln3.Expenses.SetCurrentLine(0)
          oDln3.Expenses.BaseDocEntry = oRST.Fields.Item("DocEntry").Value
          oDln3.Expenses.ExpenseCode = "8"
          oDln3.Expenses.LineTotal = (oMinKGB - oKGB) * oDiferencia
          oKGB = oDln3.Expenses.add
          If oKGB <> 0 Then
             oApplication.MessageBox("ERROR")
          End If
       End If
    I don't have an error, but the add-on don't insert any row into dln3 and i don't know where is inserting the fields...
    I hope someone can help me!!!
    THANK'S!!!!!!

    Very helpfull answer, THANK'S A LOT!!!

Maybe you are looking for

  • Excise capture in customer return

    HI, For customer return we are useing J1IEX Transaction for capturing excise invoice, without purchase order document type. But in J1IEX,there is a field for Vendor. I want to know that in above case, who will be the Vendor? Regards Prabudh

  • Spam or real

    Did apple send these out?  Thanks "Apple" <[email protected] Account Closure Notice12 Nov 2013

  • A way to display status all users in a LYNC group

    Lync Group Users status; Is there a way to create an easy to view folder  or window that would show all my Lync contacts in a group along with their current status as well as the green red etc. dot that indicates the same. I am currently doing this b

  • JavaFX crash moving divider SplitPane

    Hi all, Java FX is giving me this error when I move several times a SplitPane Divider. What can I do to avoid it? Thanks in advance. java.lang.NullPointerException   at com.sun.scenario.effect.impl.prism.ps.PPSDrawable.create(PPSDrawable.java:54)   a

  • Dynamic Data - Images, Pricing, Copy

    I am new to the print world and we just hired a new graphic designer and she uses In-Design for creating our new print catalog.  My question (I am a developer) is - is there a way that In-Design can pull in dynamic data (images, pricing, etc) from so