PO Line item attachments going along with the PO o/p to Vendor!

Hi all,
We are on SRM 5.0 ECS SP 13.
I had one question regarding the attachments in the PO line items.If I attach documents at the PO Line item and sent the PO o/p to vendior through e-mail,then all the attachments at the PO line item also go along with the o/p..Is this is  a  std behaviour in SRM 5.0?
Also if i need to avoid sending of the PO line item attachments along with the PO o/p to the vendor,then I guess the "Internal" indicator for the documents need to be set rt?Is there any way the documents at the PO line item can be set as "INTERNAL"?
I know this is achived in SRM 6.0 and above and there is an OSS note which mentions that.
Has anybody worked on something similar?Please share your eperiences/suggestions.
Thanks!

HI,Rads:
     I think you should do the inhancements in this situation. I met this question in my last case .Follow is my suggestions ,maybe helpful .
    The   BADI NAME:BBP_OUTPUT_CHANGE_SF(Document Output)
  YOU should chage the code .If you do 't  send the attachment to the vendor ,you should set "Space ",jut like this :
  WHEN 'BUS2200'.
      CV_SMARTFORM = 'ZBBP_BID_INVITATION'.
      CV_SMARTFORM_MAIL = 'ZBBP_OUTPUT_COVER'.
      "exclude attachment
      CS_PARAMETERS-ATTACH_IND = SPACE.
   Then  the attachment will not been sent out ,you can try .
Alex !
Bestregards

Similar Messages

  • Line item attachments were missing for the documents in FB03

    Hi all ,
    i had an issue that within the transaction FB03,  attachments for line items were missing for all the documents that were posted from zprogram (artist statement) but attachments for the header items were displayed .
    Is there any clue why these attachments are missing.
    help me out of this.................!

    Check that that document key has been specified correctly. How are you storing the attachments??

  • How to make plant default on the line item along with the item category

    Hi All,
    I want to default Plant on the line item along with the item category.In order to meet the following scnario.
    1. I have two plants,first plant is maintained for the valuated item and the second plant is maintained for the non valuated item (Free Goods).
    Whenever user is entering an item in the sales order for which corresponding free goods item is maintained in the master record.System is proposing two lines items in the sales order.
    First line item is the main item which appears along with the Plant 1 which contains valuated items
    Second line item is for the Free of charge item which is being proposed from Plant 2, which contains the non valuated items.
    I want that the system should always propose Plant 1 with main item and Plant 2 with the Free of Charge item by default. (Along with the item category TAN and TANN)
    Rahul

    Delivering Plant is determined in the following order
    1. Customer material info record.
    2. Customer master
    3. Material master.
    Use one of them an default your plant.
    I think in your case you can use the materila master which will give an item level plant different. The other two will default the plant at the header level.
    regards
    jude

  • Query of GL line items along with "the other side of the JEs"

    Hello All,
    I am trying to create an ABAP program or SAP query that would allow me to create an output of all line items posted to a general ledger account for a particular fiscal year(s) along with the other side the journal entry.
    Said another way, I want all documents posted to a general ledger account along with the rest of the line items included with those journal entry.
    For example, if I wanted to do this for Bad Debt Expense (P&L acct), I would like to see all those bad debt write off postings that were (credit Trade AR and Debit Bad debt Expense) vs. adjusting the bad debt reserve or any other posting in there.
    Rather than looking at each transaction individually, I think this query would allow me to see the big picture of all posting to a particular account.
    Any help is appreciated.

    Rob,
    I appreciate the insight. I think you answered my questions, but could you provide me with a little more detail so I am on the same page as you.
    For the BSIS and BSAS, I am assuming I can just use a FI  t-code FBL3N to obtain the information.
    Could you explain to me how to get the output in such a way and how to include it in the BSEG to get the complete journal entries for all of the document numbers I would get from the FBL3N. Or can I perform this in one function.
    Thank you.

  • How to get Header data into multiple times along with the Line Items

    Dear All,
      I have problem while mapping the Header data and line item data to the flat file structure, Header data have to repeat along with the Line item data in the flatfile.
    Details is below.
    Example
    Header record is one
    E1EDK01
    E1EDKA1
    Line items are two
    E1EDP01
    E1EDP01
    I want in the flat file two records having duplicate data in the fields which is belongs to header data
    Like :
    Record #  partner data     Line item data
    Record 1 : WE name1 city   00010 materialname1 156
    Record 2 : WE name1 city   00020 materialname2 198
    ( WE name1 city - data is same in the record 1)
    For this what I did is I mapped the node E1EDP01 to the flat file message type node then I got all the line item data and first record is with header data but not in the second record.
    I tried all node functions but no result because Idoc itself header data exists one record, I am not able to copy.
    If any one knows , please give solution.
    It is great help to me.
    Thanks in Advance.
    Ramarao

    Dear Ramarao,
    This will help you,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f7d3b
    No Documentation for Mapping Function useOneAsMany (Mapping Problem)
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Thanks & Regards
    Agasthuri Doss

  • Withholding tax lines are being cleared along with other line items

    Hi All,
    While doing J1INCHLN(payment making of TDS), system giving error i.e.
    "Withholding tax lines are being aleared along with other line items"
    Please suggest me in this issue...it would be great help for me.
    Thanks,
    Saisri

    Hi,
    As per my analysis we found some documents, here We have made advance payment to vendors with TDS and again rised invoce to vendors with TDS and these documents have been nockedoff in F-54.
    We have many documents of such nature and as per me it is because of these documents  the system is throwing error. Pls. advice as to how to proceed on this.
    Thanks,
    Saisri

  • I did a full system restore to my phone along with the new 7.0 update. Now I went to restore my phone setting back through Itunes and it goes through all the steps but when it is completed it wont get past the "Connect to Itunes" screen

    I did a full system restore to my phone along with the new 7.0 update. Now I went to restore my phone setting back through Itunes and it goes through all the steps but when it is completed it wont get past the "Connect to Itunes" screen

    So what happens when you connect to iTunes?

  • Resizing or moving an opacity mask along with the items inside it

    I'm trying to resize a opacity mask by doing
    transMaskItem.resize(
      10, //scaleX,
      10, //scaleY,
      true, //[,changePositions]
      true, //[,changeFillPatterns]
      true, //[,changeFillGradients]
      true, //[,changeStrokePattern]
      0.1, //[,changeLineWidths]
    This resizes the item, but it does not resize the item inside it. I tried similar command with the translation command
    transMaskItem.translate(
    100, //([deltaX]
    100. //[,deltaY]
    True, //[,transformObjects]
    True, //[,transformFillPatterns]
    True, //[,transformFillGradients]
    True, //[,transformStrokePatterns])
    and similar thing happened. The item gets moved, but the object inside it doesn't.
    How do I resize or translate an opacity mask along with the items inside it?

    I see...it seems to be a bug, the actual mask gets ignored. Probably to be consistent with the user interface, you can not select the mask with the mouse either.
    maybe someone else has found a way to work with Opacity Masks, I haven't.
    as a side note, there's no need to select the objects in order to size them or move them, you can just reference them. Also, there's no "Selected" object, change that to "selection".

  • Buyer change the PO line items and end up with Awaiting Approval status.

    Can you please help to look into this issue.
    1.Buyer change the PO line items and end up with Awaiting Approval status.
    2. But user claim that she got enough limit and should not route to her manager's approval. Also check with her manager and this PO do not exist his queue.
    Any clue or tips on how to investigate on this issue. All your tips are appreciated,
    -Rick

    You cannot change these POs because their changed version has status
    'Deleted'. My proposal to fix them will be the following:
    You will have to set changed version as closed(DOC_CLOSED set to X)
    and in active version set DOC_CLOSED to space.
    __-For the above statement, Can you guys please let me know, which table DOC_CLOSED belongs to and what are the steps to do this, as i come from a functional back ground.__

  • ALV to EXCEL along with the color

    Hello,
          Is it possible to download an ALV report output to an EXCEL along with the color in the ALV report.I made an ALV report with some rows having red color depending on a bussiness logic. When user downloads the ALV report to excel from standard ALV layout they cannot get the colors in the excel. Is there a way to do this or any sunstitute?
    Thanks,
    Giri.

    Hi Giridhar,
    Have a look at this code
    Download a report to excel with format (border, color cell, etc) 
    Try this program...it may help you to change the font ..etc.
    Code:
    REPORT ZSIRI NO STANDARD PAGE HEADING.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
      Have a look this Link
    http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm
    Regards,
    Santosh

  • Display number of line items in my report at the title bar

    hi,
    i would like to ask, how am i going to add in the number of line items to be display under the title bar above of the SAP. example similar to SE16, where it will show you the number of lines under the bar above.
    may i know how am i going to program it for my report? thanks

    Hi,
               check out the following code........copy-paste....and then....................
    data : it type STANDARD TABLE OF vbak,
           wa type vbak.
    data : ctr TYPE sy-dbcnt.
    data : str(20) type c.
    select * from vbak into table it UP TO 10 ROWS.
      ctr = sy-dbcnt.
      move ctr to str.
    set titlebar 'LIST' OF PROGRAM sy-repid with str.
    loop at it into wa.
      skip 1.
      write wa-vbeln.
    endloop  .
    ................create the title-bar 'LIST' as 'List Details : &'.
    (double-click on 'LIST' ....... 
    give 'TITLE' as 'List Details : &'. ).
    run.....& get solved !!!!!
    Rewards points if helpful..............

  • Few line items are not coming at the time of creation of delivery

    Dear Experts,
    When the user creating the delivery few line items are not picking in the delivery document
    the following checks i verified,
    Stock is available
    shpping condition is differ from sold to party and sales document
    Plants are same for all the line items
    why the few line items are not coming in the delivery document creation,
    please help me to sort out this issue
    Thanks and Best Regards,
    Muralidharan S

    Hi,
    Check below points.
    Point 1:
    When you create a delivery document, you create it for a Shipping Point.
    So whatever the line that came in to one delivery has determined same shipping point that you entered in VL01N screen.
    Others got a different shipping point and that's why it didn't come to the same delivery document.
    Shipping point determined based on below criteria
    - Shipping Condition - From customer master
    - Loading Group - Material
    - Plant  - Delivery Plant of the sales order line item
    You assign a proffered shipping point for above combination in configuration.
    If that combination is not find, those line items are not going in to the delivery.
    You can check the log of the delivery document for more information as well.
    Point 2:
    Check the line item Requested delivery date and the "Selection Date" you entered in the VL01N screen.
    Al  Requested delivery dates has to be on or before the  "Selection Date" you entered in the VL01N screen.
    Those line items which has a date more than that will dropped in the delivery.
    Best regards,
    Anupa

  • Accruals Condition Record posted late in COPA along with the Settlement

    Hi Gurus,
    Accruals condition record for 1 item in an Invoice is posted along with the Settlement Credit Note in COPA. While condition records of the other items from the same invoice were posted on the Billing Date itself.
    For eg:
    Invoice 111       Date 01.03.2011
    Items     Condition   value
    1              Z1            100
    2              Z1             200
    3              Z1             300
    COPA Doc No.        Value Field        Date
         001                         200             01.03.2011
         002                         300             01.03.2011
         003                         100             30.05.2011
    30.05.2011 is the date of Rebate Credit Note for the Invoice # 111
    I also got that if Posting of Accrual is not done for an Item, Retroactive rebate settlement automatically posts a new document for accrual.
    So the question is why the posting of accrual was not done on the Invoice date in the first place?
    Edited by: Parth Kulkarni on Jul 1, 2011 4:31 PM

    Hi Suraj,
    i too have the same problem, the condition types for Values and quantity in COPA are assigned. The system updates the quantity for the first billing document but not for the subsequent billing documents.
    Cost of goods sold and revenue gets updated.
    Regards,
    Prateek

  • Customized Pf Status along with the standard Pf status

    Hi all
    I have created an ALV report and has its default pf status which includes all function like sum ,sort, export, variants save etc.
    I have a requirement to have an extra push button along with this PF status.
    I have created a pf status with this button.. and activated and called in REUSE_ALV_GRID_DISPLAY and did everything..
    But in my output, only my customised pf status is displayed ie only the push button is displayed and all other standard functions are gone..
    Can anyone help me to solve this problem.
    Ie I want one push button along with the standrad pf status in ALV report using REUSE_ALV_GRID_DISPLAY .
    Cheers
    Christina

    Hi All
    Creation of new button in output refer below document and screen
    if you want to add one more button in the Red line like below.
    Reffer Below steps after that you can create or change STANDARD Gui in the program .
    Go to Se41 give details like below.
    Select Copy Status button in up. As shown below screen.
    You will get below screen. Provide your custom program name.
    Like below screen. Click on Copy.
    You will get below screen click on copy button.
    You will get below status.
    Click on Activate like as shown in below.
    Click on OK button you will get it in your program.

  • Adding a batch to a line item in an Order with B1WS

    Hi,
    I am trying to create code which can update a batch in a line item in an order.  The updating works great, if the batch is already attached to the line item.  However, I am unable to add a batch if one doesn't already exist.
    Can you please have a look at this code and let me know what is wrong?
    I've tried various things, though am still unable to get it to work.
    Thank you very much!
    Mike
    using System;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using orderWebRef;
    using System.Text;
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
            // B1BATCH performs batch operations on SAP via DISERVER and B1WS
            // The inputs are:
            // o = Order Number (this is the DocEntry value, NOT the DocNum value)
            // b = Batch Number
            // q = Quantity
            // i = Item Code
            // p = Project
            // debug = 1 or true if you want to see output messages
            // For some security, we will encode some values at the client,
            // and verify them here for consistency.
            // The "Secret Formula" is these variables, which will be passed to the URL
            // 1 = Order Number * 2 (encoded at the client)
            // 2 = Batch Number * 2 (encoded at the client)
            // To decode, we do this:
            // Correct decoding if ((1 = (o/2)) AND (2 = (b/2))
            string o = "";
            string b = "";
            string q = "";
            string i = "";
            string p = "";
            string v1 = "";
            string v2 = "";
            int orderNumber = 0; // This is the DocEntry value, NOT the DocNum value
            int batchNumber = 0;
            int quantity = 0;
            int v1int = 0;
            int v2int = 0;
            bool debugMode = false;
            bool allVarsPresent = true;
            bool allVarsValid = true;
            try
                o = Request.QueryString["o"].ToString();
            catch
                allVarsPresent = false;
            try
                b = Request.QueryString["b"].ToString();
            catch
                allVarsPresent = false;
            try
                q = Request.QueryString["q"].ToString();
            catch
                allVarsPresent = false;
            try
                i = Request.QueryString["i"].ToString().ToUpper();
            catch
                allVarsPresent = false;
            try
                p = Request.QueryString["p"].ToString().ToUpper();
            catch
                allVarsPresent = false;
            try
                v1 = Request.QueryString["1"].ToString();
            catch
                allVarsPresent = false;
            try
                v2 = Request.QueryString["2"].ToString();
            catch
                allVarsPresent = false;
            try
                string debug = Request.QueryString["debug"].ToString();
                if ((debug == "1") || (debug.ToLower() == "true"))
                    debugMode = true;
            catch
                debugMode = false;
            if (!allVarsPresent)
                WriteDebugMessage(debugMode, "All required variables are not in the request.");
                return;
            else
                // All variables are present, now check that they are valid.
                // First, check the v1 and v2 variables are correct
                // Then check that the order exists
                // Then check that the batch exists and has the appropraite quantity available
                try
                    orderNumber = Convert.ToInt32(o);
                    batchNumber = Convert.ToInt32(b);
                    quantity = Convert.ToInt32(q);
                    v1int = Convert.ToInt32(v1);
                    v2int = Convert.ToInt32(v2);
                    if ((v1int / 2) != orderNumber)
                        allVarsValid = false;
                    if ((v2int / 2) != batchNumber)
                        allVarsValid = false;
                catch
                    WriteDebugMessage(debugMode, "Error in processing variables.");
                    return;
                if (!allVarsValid)
                    WriteDebugMessage(debugMode, "Error in validating checksum.");
                    return;
                // All variables are present and valid!
                WriteDebugMessage(debugMode, "All variables are present and valid.");
            try
                loginWebRef.LoginService ls = new loginWebRef.LoginService();
                string sessionID = ls.Login("DBSERVER", "DBNAME", loginWebRef.LoginDatabaseType.dst_MSSQL2005, true, "sa", "PASSWORD", "manager", "managerPass", loginWebRef.LoginLanguage.ln_English, true, "LICENSE:30000");
                WriteDebugMessage(debugMode, "<BR><BR>SessionId: " + sessionID + "<BR><BR>");
                orderWebRef.MsgHeader msgHeader = new orderWebRef.MsgHeader();
                msgHeader.SessionID = sessionID;
                msgHeader.ServiceName = MsgHeaderServiceName.OrdersService;
                msgHeader.ServiceNameSpecified = true;
                orderWebRef.OrdersService order = new OrdersService();
                order.MsgHeaderValue = msgHeader;
                DocumentParams param = new DocumentParams();
                param.DocEntry = orderNumber;
                param.DocEntrySpecified = true;
                orderWebRef.Document document = new orderWebRef.Document();
                document = order.GetByParams(param);
                StringBuilder orderSb = new StringBuilder();
                orderSb.Append("Order " + document.DocNum.ToString() + "<BR><BR>");
                foreach (DocumentDocumentLine docLine in document.DocumentLines)
                    if ((docLine.ProjectCode == p) && (docLine.ItemCode == i))
                        orderSb.Append("Line Num:      " + docLine.LineNum + "<BR>");
                        orderSb.Append("Item Code:     " + docLine.ItemCode + "<BR>");
                        orderSb.Append("Project Code:  " + docLine.ProjectCode + "<BR>");
                        orderSb.Append("Description:   " + docLine.ItemDescription + "<BR>");
                        // Find the batch if it exists and update the quantity
                        // Add the batch if it doesn't exist
                        bool batchExistsInLineItem = false;
                        int batchCount = 0;
                        foreach (DocumentDocumentLineBatchNumber batch in docLine.BatchNumbers)
                            batchCount++;
                            if (batch.BatchNumber == b)
                                batchExistsInLineItem = true;
                                orderSb.Append("<BR>");
                                orderSb.Append("+++++ Batch exists in line item.  Updating.<BR><BR>");
                                orderSb.Append("+++++ Batch Line:   " + batchCount.ToString() + "<BR>");
                                orderSb.Append("+++++ Batch Num:    " + batchNumber + "<BR>");
                                orderSb.Append("+++++ Quantity:     " + quantity + "<BR>");
                                batch.Quantity = quantity;
                        if (!batchExistsInLineItem)
                            docLine.BatchNumbers = new DocumentDocumentLineBatchNumber[1];
                            DocumentDocumentLineBatchNumber batch = new DocumentDocumentLineBatchNumber();
                            batch.BatchNumber = b;
                            batch.Quantity = quantity;
                            docLine.BatchNumbers[0] = batch;
                            orderSb.Append("<BR>");
                            orderSb.Append("+++++ Batch does not exist in line item.  Adding.<BR><BR>");
                            orderSb.Append("+++++ Batch Line:   " + batchCount.ToString() + "<BR>");
                            orderSb.Append("+++++ Batch Num:    " + batchNumber + "<BR>");
                            orderSb.Append("+++++ Quantity:     " + quantity + "<BR>");
                try
                    order.Update(document);
                catch (Exception ex)
                    WriteDebugMessage(debugMode, "SAP Exception:  " + ex.Message.ToString());
                    return;
                WriteDebugMessage(debugMode, orderSb.ToString());
            catch (Exception ex)
                WriteDebugMessage(debugMode, "Error in processing the request.  Exception:<BR><BR>" + ex.Message);
                return;
        private void WriteDebugMessage(bool debugMode, string exitMessage)
            if (debugMode)
                Response.Write(exitMessage);

    Hi Everyone,
    I found the answer, you can find the code here: [B1WS Batch Manipulations with Orders|http://paste-it.net/public/dbbcea0/]
    Cheers,
    Mike

Maybe you are looking for

  • Sound card issue

    I have onboard sound, it's been working perfectly fine in Arch. The other day I took apart my computer to move it into a new case, dropped a screwdriver on the motherboard a couple of times, straightened a pin that I noticed was bent on the front pan

  • Creating a correct trigger condition

    hi All, I have a problem in my trigger condition in my query. The background: 1. I have a List view with a Data insertion (Lead Select) into a ROW. 2. Also, I have 5 different queries which are triggered based on a selection of a Radio button. Now, m

  • Workflow sd letterbox to 16:9 hd through iohd?

    Hi.  Let me preface this with saying I've waited three years to be able to do the following workflow to get a hardware upres of my feature film affordably as using a teranex etc. was out of reach for me and I didn't want to throw my money away on edi

  • Wrong behaviour in link generated by HTML editor

    Hi all, anybody knows if there is some bug in HTML editor used in XML Form Builder projects? We are facing the following problem: 1) we create a link by filling the html editor area in a news XML edit form 2) save and publish the news 3) in rendering

  • Why can't I connect to my external hard drive anymore through my AirPort extreme?

    I have a WD 500 GB external hard drive connected to my AirPort extreme that I have been using just fine for some time now. All of a sudden, I cannot access the files on the hard drive and when I try to connect to my AirPort in finder, the connection