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

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • Sales order schedule line quantities in decimals

    Gurus - Required your help to resolve the following scenario.
    I'm facing with the problem where schedule lines of a sales order allocated with decimal quantities even though materials with UOM as EA(Each). For example Material A of sales qty 13 has the schedule lines allocated as 11.960 and 2.040. The delivery has been created as per the schedule lines with qty 11.960 and 2.040 and it has been pick/packed and delivered to the customer. Now, while issuing goods for the delivery, received the error message as <b>"Serial number management only allows whole numbers".</b>
    Can anyone provide what are the possible ways to round the delivered qty and issue the goods, when the delivery is complete?

    Sree - Question 1 - Why would you deliver the product and then try goods issue it (In general ;)...anyway....I know, a lot of companies do that way....
    Question 2 - How much exactly did you ship out, surely must not have shipped products in decimals, since you've EACHES defined and not KGs....or LBs...
    I would suggest finding out the correct quantities shipped out and then cancelling this delivery document....you can then go on to modify sales order schedule line accordingly and then process it again..."WHAT ABOUT PICK PACK DETAILS"....before cancelling this delivery doc out..capture the packing details (HUs) and then apply them to the new delivery doc... if you are using external system for packing HUs.....process the IDOC (or file etc) using the new delivery doc number....
    Hope you got the direction )
    Thanks
    Nikhil

  • Sales order schedule line quantity update

    Hi
    I'd like to know if there is a FM to update the Sales order schedule line quantities.
    In particular, the fields in VBEP:  WMENG, BMENG, LMENG, CMENG.
    Thanks.

    Hi Lily,
    Can you please tell us how you updated BMENG using the BAPI BAPI_SALESORDER_CHANGE?
    Thanks,
    Vitz.

  • Sales Order schedule line from CN to CP

    Hi,
    When i  update the sales order schedule line from CN to CP , the quantity is not showing in the MDO4.
    Can any one help me.
    Thanks in advance
    Suresh S

    Once the schedule line category is changed to CP,  just hit the enter key and save.  Now check in MD04
    thanks
    G. Lakshmipathi

Maybe you are looking for

  • Is there a way to *disable* tv-out on ipod touch?

    I just upgraded from a regular ipod classic to the new touch. I had one of those Peripheral ipod kits in the car, and my son likes to watch movies on our longer drives to the grandparents every weekend. Anyway, got this new ipod touch, which blocks o

  • SRM BID over R/3 RFQ

    Need to know the advantage of SRM Bid/Auction over R/3 RFQ a.Can RFQs be converted to electronic format/files? b.Are RFQs directly convertible to OAs or POs? c.Can Suppliers be notified of ‘acceptance’ electronically from within SRM?  If so, would th

  • Is there a way to search for photographs that are missing?

    I have discovered that some shots that I thought had been imported from iphoto are in fact missing (when I go to open them there is a badge with the yield sign and an exclamation point in it) I don't think this is the end of the world as I have the o

  • Problems installing Solaris 10 on Dell PowerEdge 800

    Hi, I am experiencing some trouble when I attempt to install Solaris 10 on a Dell PowerEdge 800. It is equipped with two RAID disks controlled by a Dell CERC SATA 1.5/6ch (according to the BIOS). The installation program reports that it cannot write

  • HT3991 is backup 3.2 still necessary?

    Using Time Machine and a separat harddisk to make my backups, do I still need Backup 3.2 or may I cancel it?