Sales order Text Line (Type)  Add

Hi,
I look into
..\Program Files\SAP\SAP Business One SDK\Samples\COM DI\CSharp\19.SpecialLines
But it Update SpecialLines into existing order.
I am building Order Line and SpecialLines, Order Line and SpecialLines, etc.
So I used Add instead of update, without success.
I write my Order Line = OK, then not OK
oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "My Text Here" ;
oDocument_SalesOrder.SpecialLines.Add();
In SDK Help Center
oDocument_SalesOrder.SpecialLines.Add();
oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "No Text here...Hello?? ";
I manage to add SpecialLines after I had created my Sales Order:
oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "Hello 2";
oDocument_SalesOrder.SpecialLines.AfterLineNumber = 0;
resultMessage = oDocument_SalesOrderP3.Update();
if ( resultMessage != 0 ) // Check the result
oCompany.GetLastError(out resultMessage, out ErrMsg);
But I did not manage to add more then 1 SpecialLines:
I tried to Add, Update, change AfterLineNumber, etc without success.
I need Help Here...
(David, where are you? don't tell me yo open the bottle you bought...:)
Thank you,
Rune
Edited by: Rune Brattas on May 8, 2008 5:01 PM

Hi
The code below create 1 Special Line.
I like to create 1,2,...,n Special Lines.
You are right I do not manage to create Special Lines when I create the Sales Order. I have to create special line after the Sales Order is created.
I have repeated the same code twice without success of creating the second Special Line...
I cannot be the first person to create Special Line in SDK?
Thank you,
Rune
CODE - Add a Special Line to existing Sales Order
oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "Specual Line YES :)) ";
oDocument_SalesOrder.SpecialLines.AfterLineNumber = 0; // Sales Order Line 0
resultMessage = oDocument_SalesOrder.Update();
if ( resultMessage != 0 )          // Check the result
oCompany.GetLastError(out resultMessage, out ErrMsg);
If I repeat the code:
oDocument_SalesOrder.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Text;
oDocument_SalesOrder.SpecialLines.LineText = "Specual Line YES, but I lose my first Special Line:)) ";
oDocument_SalesOrder.SpecialLines.AfterLineNumber = 1; // Sales Order Line 1; I lose my Special Line 0; I only get 1 Special Line
resultMessage = oDocument_SalesOrder.Update();
if ( resultMessage != 0 )          // Check the result
oCompany.GetLastError(out resultMessage, out ErrMsg);
Edited by: Rune Brattas on May 12, 2008 7:03 AM

Similar Messages

  • Sales order Text Line (Type)

    Hi,
    How do I add Text Line by selecting the field "Type" in Form Settings in my DI Add-On?
    Here is the code for adding a regulare Sales Order line:
    CODE
    oDocument_SalesOrder.Lines.FreeText = "This is not the Text I want to have...It is a Drop Down List and you can select Regular, text, sun-total in Type Column";
    oDocument_SalesOrder.Lines.Add();
    Thank you,
    Rune

    Rune,
    You need to use the Document_SpecialLines Object which is new to SAP Business One 2007A.  You can find more detail on this in the 2007A SDK Help Center documentation as well as sample code with the SDK at ...
    ..\Program Files\SAP\SAP Business One SDK\Samples\COM DI\CSharp\19.SpecialLines
    Eddy

  • Sales Order Text Lines in SAP Query

    I have a requirement to output several text lines into a SAP query based around sales orders.
    I have included some code to read the details into my query and get no syntax errors, however the report gives a blank output for each of the text fields included, despite there definitely being some text with the specified attribute ID and text object in the table STXL.
    Where am I going wrong?
    Please find the coding below for one of the text field I'm trying to extract:
    TABLES:STXL.
    DATA:
        VBELN LIKE VBAP-VBELN,
        POSNR LIKE VBAP-POSNR,
        TDNAME LIKE STXL-TDNAME,
        MYLINE LIKE TLINE-TDLINE,
        ZE18_LINE(1200) TYPE C.
    DATA:BEGIN OF LINES OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA:END OF LINES.
    DATA:BEGIN OF MYHEADER.
            INCLUDE STRUCTURE THEAD.
    DATA:END OF MYHEADER.
    CLEAR TDNAME.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      INPUT = VBAP-VBELN
    IMPORTING
      OUTPUT = VBELN.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      INPUT = VBAP-POSNR
    IMPORTING
      OUTPUT = POSNR.
      CONCATENATE VBELN POSNR INTO TDNAME.
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
            ID = 'ZAT2'
            LANGUAGE = SY-LANGU
            NAME = TDNAME
            OBJECT = 'VBBP'
         IMPORTING
            HEADER = MYHEADER
         TABLES
            LINES  = LINES
    EXCEPTIONS
            ID = 1
            LANGUAGE = 2
            NAME = 3
            NOT FOUND = 4
            OBJECT= 5
            REFERENCE_CHECK = 6
            WRONG_ACCESS_TO_ARCHIVE = 7
            OTHERS = 8.
    IF SY-SUBRC = 0.
      LOOP AT LINES.
        MOVE LINES-TDLINE TO TEXT.
        ENDLOOP.
    ENDIF.

    Hi -
    Please check in debuging.
    check the value of TDNAME correctly populated with sales order no and sales order item.
    You can cross check with the table STXH with TDNAME and see if any entries is available for TDID 'ZAT2' as your case.
    Here are sample code.
    DATA :    lv_tdname TYPE tdobname,
                     lw_line TYPE tline,
                    li_line TYPE STANDARD TABLE OF tline.
    CLEAR : lv_tdname , li_line[],
    cocatenate w_vbak-vbeln w_vbap-posnr into lv_tdname.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        id                      = 'ZAT2'
        language                = 'E'
        name                    = lv_tdname
        object                  = 'VBBP'
      TABLES
        lines                   = li_line
      EXCEPTIONS
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7
        OTHERS                  = 8.
    IF sy-subrc = 0.
      CLEAR lw_line.
      loop at li_line INTO lw_line .
    * Put your logic
      endloop.
    ENDIF.

  • How 2 read all the line of a sales order text ID plz

    Dear all
    I have the following to read sales order text of single line of limited char(40)
      TIDNO = '0003'.
        CONCATENATE SSORD
                    LIPS-POSNR
        INTO        TNAME.
        TOBJT = 'VBBP'.
        PERFORM FINDTEXT.
        LOOP AT MSLINES.
          WA_ITEM-PACKTYP = mslines-tdline(40).
          EXIT.
        ENDLOOP.
      How do i read mutiple lines plz tell me ?
    Thnx
    Moni
    Message was edited by: md monirujjaman

    Hi Md,
    sorry I don't understand your question, can you explain more ?
    Regards
    Frédéric

  • Can we add Delivery texts/Sales order text in VL10 report

    Hi,
    Is it possible to have delivery texts/sales order texts on VL10 report.
    Please let me know if there is a way to do it.I've looked at the note198137.
    Thanks in advance.
    Regards,
    Rekha

    Yes I am aware of the fact that text is accessed thru read_text FM .....
    My question is what parameters/ field values can we plug in STXH/STXL to get info that a particular "text" entry exists in this table. I have a sales order which has few texts, I want to know if they have an entry in STXH and STXL about their text i.d.s....
    Let me put it this way - What ever entry exists in STXH for this sales Order I want to see that. What parameters of this sales order do I pass in this Table STXH to see that entry ??
    I hope this is clear now

  • Mapping between Sales Order-Schedule-Line and Delivery-item

    Hi together,
    I want to extend the Datasource 2LIS_12_VCITM (Delivery-number, -item, Order-number,-item is available) by Sales Order Schedule Line.
    Could not find any ERP table (VBEP and LIPS allow a mapping only on item level) for the mapping between Sales Order Schedule Line and Delivery item yet. The use of the extractor 2LIS_12_VCSCL for the extention (e.g. infoset) afterwards is no option.
    Thanks for your help in advance!!
    Assign full points!!
    Sven

    Hi Reddy,
    thanks for your answer.
    I know that I have to add this field.. but the problem is, how to fill this field. I don't know how to map the delivery-item with the schedule line-item.

  • Material availabity date showing incorrectly in sales order schedule line

    Hi ALL,
    In Sales order Schedule line(after clicking shipping i.e displaying bottom of the screen)  material availabity date is coming incorrectly . In my material in mrp2 view i selected proceument type as F and i gave planned delivery  time as 19 days and GR processing days as 1 . suppose if i am putting sales order as on today 9-6-2010 it should show material avaialbity date as
    7-7-2010 but it is showing 10 days more (excluding saturday and sunday) . So please give me suggestion where to check in the program SAPMV45A.
    Regards
    R.Vijayakumar

    Check to see if your pick, pack,transportation planning lead time etc are also being included.

  • Price is not changing in sales order in line item

    dear all.,
    price is not changing in sales order on line item,error comes "CHECK ORDER STRUCTURE.
    Regards,
    Praveen

    Dear
    You can go into VA03 --> Menu --> Environment --> Partner --> display credit account (if the data is maintained, than the system springs into FD33). Another way is to check if the sales order type is assigned to credit management in the transaction OVAK (should be D for aut. credit management).
    Did you enter the pricing date , prcing condition and press enter , so  that it should pick the correct price?
    Check this and come back
    Regards
    JH

  • Retrieve Sale Order Text

    Hi,
      How can i retrieve the sale order text?? Any FM / BAPI available?? OR which table should  i use??  I want to display the fields in the delivery sap script.
    Regards,
    Kit

    Hello Kit,
    There is a function Module called READ_TEXT to get the sales order text.
    you can see the example program in the folowing thread given by Anji Reddy Vangala.
    https://forums.sdn.sap.com/click.jspa?searchID=6591847&messageID=3274740
    He wrote like:
    You have to fetch it useing the fun module READ_TEXT
    double click on that text in SO, it goes to text editor,
    from the menu GOTO -> header
    displays the OBJECT, ID< OBJECT NAME and the Language
    pass them to the fun module and fetch it
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    ID = TEXT_ID
    LANGUAGE = SY-LANGU
    NAME = Same as TDNAME in Save_text
    OBJECT = TEXT_OBJECT
    TABLES
    LINES = LI_LINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8.
    Genrally text are stored in STXH tables.
    Regards
    Sasidhar Reddy Matli.
    Message was edited by:
            Sasidhar Reddy Matli

  • Sales Order Text not getting copied after configed with tcode VOTNX

    Hi All ,
    We have configed  one of  sales order texts to be copied from customer master text at sales org level  .
    It works fine for some sales org , But for some it does not and says "Text could not be structured " in log .
    I tried to debug while creating sales order , But unable to reach the point where the texts are copied .
    Any help would be appriciated .
    Thanks
    Vinay

    Wanted to add more thing ,
    The log Says that the error is recogized by the sapscript FM INIT_TEXT.
    Thanks
    Vinay kolla

  • Restrict Sales order text based on Sales group

    Hi,
       My requirement is currently 12 different text ID's showing in my sales order text.But I want to restrict certain sales order text ID's based on sales group entered in the sales order header. Is there is any user exit or routines available to restrict sales order text ID's.
    Regards,
    Palani

    Hi,
    This is actually a configuration item.  Transaction VOTXN (VOTX in 4.6C) can be used to configure the text types, text procedures, and access sequences for sales order texts as well as other types of texts.  Part of the configuration procedure allows for some ABAP control over the copying requirements. 
    This is from the online help for data element COPNR (on the VOTXN screen SAPMV80T 800, field TTXZI-COPNR) :
    You can create your own routines for text determination. For example, if you want to send different messages to particular groups of customers, you can create routines that automatically assign different messages to different groups (e.g. wholesalers, retailers).
    Note
    The fields available for determining texts are defined in structure TVCOM, which can be found in the routine under FTVCOM. Generally, however, the fields filled in the structure are only those which are used or recognised for text determination by the caller. Other fields can, for example, be filled during sales document processing via user exits USEREXIT_MOVE_FIELD_TO_TVCOM_H and USEREXIT_MOVE_FIELD_TO_TVCOM_I. The user exits are described in the IMG under Sales and Distribution -> System Modification -> User exits.
    I'm not sure if filtering by sales group is possible, but I don't see why not.
    Regards,
    Jamie

  • Sales order Text need to copy in to PR or PO

    Hi All
    I am trying to copy Sales orde header text and item text in to Purshase Requisition or Purchase order. I have configured settings in VOTXN. But still i am unable to copy sale order text in to PR or PO. plz help on these.  (this is Third party scenario i am copying text.)

    Hi,
    You can use the functuion READ_TEXT to read the SO Text.
    Then refer to function SAVE_TEXT, you need to fill the structure THEAD with all PO Values and the fill lines directly.
    The text will be updated.

  • Sales order texts - only printed correctly on repeat print out

    Hi all,
    We have an issue, where on the first printout through VF31 of a sundry billing document, the material sales text maintained in French is not printed, even though the language in the customer's master data is French, the material sales text in the sales document is maintained in French and in VOTXN the access sequences are maintained for all languages.
    I first checked this post Sales order text determination which unfortunately didn't resolve the issue (although a very interesting discussion).
    The strange part is, when we do a repeat print out through VF31 selecting procession mode 2 (Repeat Processing) the document is printed WITH the material sales texts correctly. For me even stranger is that the repeat printout uses the same output type as the initial printout. I am now officially lost. Would any of you have any idea, where the issue lies here?
    I would try to change some setup in VOTXN, but knowing that the repeat print out does print the texts correctly, let's me think there might be a different issue.
    Any idea are very welcome.
    Thank you in advance!
    Alexis
    Edit: when we copy the text and make it "Dutch", for some reason it's printed out correctly on the first printout. Although I cannot find any restriction, where Dutch is specified specifically, nor do I see where French is excepted specifically.

    Guys --
    Thanks for the help! 
    Suda -- will try out your suggestion.  Gordon - in answer to your question, we actually go from Sales Order to A/R Invoice (Draft) to A/R Invoice. 
    We use the A/R Invoice (Draft) as our packing slip and skip Delivery module altogether.
    I realize this is a bit unconventional but seems to work best for our business practice.
    Thanks!
    Mike

  • Interesting and an  imporatant issue at sales order schedule line.

    hi all,
    interesting and an  imporatant issue at sales order schedule line.
    i created a sales order with 10 qty.and the system proposed a two schedule lines.
    let's say to order created date is 27.11.2008.and the requested delivery date is 27.11.2008.
    but the stock is not available today then the system proposed two more schedule lines apart from the 27.11.2008.so now there are three schedule lines like below.
    schedule line date                      Material availabilyt date   delivery date                   
    27.10.2008 with zero quantity.     
    28.10.2008 with 5 qty.                28.10.2008                     29.10.2008
    02.10.2008 with 5 qty.                02.10.2008                     03.10.2008
    now the delivery and pgi already for the schedule line 28.10.2008.
    then when i run the availability check on 01.11.2008 system is over writing the material vailability date as today at the scheduleline number two.
    now i can able to view only two schedule lines only.
    schedule line date                      Material availabilyt date   delivery date                   
    28.10.2008 with 5 qty.                01.11.2008                     29.10.2008
    02.10.2008 with 5 qty.                01.11.2008                     02.11.2008
    now my concern when we reschedule the avalability check it should notchange the Material availability date of the schedule line which i already delivered.
    Regards,
    sheshukumar

    can any one repsond for this.....

  • Sales Order Schedule line not populating in the Production order

    Queation: Is there a way to tell the system to look at the sales order, line item AND schedule line. It is displayed in MD04 but it doesn't carry over to the Production Order. We are a MTO and this information is relevant in a number of ways. 
    Please Help.

    Vickie,
    If you are using MTO scenario then when you run the MRP for the material, it will create a planned order for that sales order based on the dates calculated from the sales order schedule line (Shipping tab)...
    So now when you convert the planned order to production order, all the sales order details will get copied.
    try and revert back.
    Swapnil

Maybe you are looking for

  • How to use AppleScript to set "character fill color" in Pages 5.2?

    For Pages 5.2 on OSX 10.9.3, what is the correct applescript for changing the "character fill" of text in pages.  If you highlight text, you do this via your mouse in the inspector by clicking "style," "advanced option (the gear wheel to the right of

  • Make firefox stop going into full screen

    I upgraded to Firefox 10 on my macbook pro snow leopard and now the browser keeps going into full screen mode automatically. If I toggle it off, it just goes back to full screen in a few seconds. I have re-sized the screen and it still does it.

  • ERROR # 1439. Not able to update USB drivers

    OK So I got the error message 1439. Went to Apple Support here first. http://support.apple.com/kb/TS1372 This in turn told me to go here: http://support.apple.com/kb/TS1538 to update my USB drivers. So I am going through the steps and I come to "The

  • Failing to create the controlfile...

    Hi Experts.. I am trying to create the controlfile manually. I have added the existing datafiles and given the logfile location. However, met with error while executing the script... Please help. ERROR at line 1: ORA-01503: CREATE CONTROLFILE failed

  • Another bose sounddock question

    ok ive read all the complaaints about the iphones all the way back to ios 4  about the updates causing the sound docks not to work i have almost the same issue mine is a iphone 4 i have the newer 6.1 update and mine wont work in any sound dock that i