Reading line item text from sales order

Hi,
I have a sales order which has an item text, I need to get the value from the text. I want to test the READ_TEXT function and I am giving values as
  Import parameters               Value           
  CLIENT                          400             
  ID                                  0011            
  LANGUAGE                   EN              
  NAME                            0001171445000010
  OBJECT                         VBBP            
  ARCHIVE_HANDLE         0               
LOCAL_CAT                               
It is not giving me any value.  Am I giving any thing wrong? In the NAME I gave the value as sales ord num + item number, is this correct. Please help me.
Thanks,
Veni.

Hi
Name is the Concatenation of Order No and Item No.
pass the 4 parameters ID,OBJECT,NAME and LANG
use the correct declarations for the parameters and use
ID  = '0011'
LANGUAGE =  'EN'
NAME = '0001171445000010'
OBJECT  = 'VBBP'
See the doc
READ_TEXT
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters ‘*’ or ‘,’.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
Reward points if useful
Regards
Anji

Similar Messages

  • How 2 Copy Header & Line Item Text from Purchase Order 2 Out Bound Delivery

    Hi SD Gurus,
    I want to copy header and line item text from Purchase Order to Out Bound Delivery (This is required in Stock Transfer Process).
    I have been able to do successful config. for copying header and line item text from Sales Order to Outbound Delivery but config. doesn't seems to be same for copying text from PO to OBD.
    Is there any way to achieve the same? Can some expert show the way to achieve this.
    Thanks in advance.
    Warm regards,
    Rahul Mishra

    Hi Ravikumar thanks for u quick reply.
    This is wht is currently coded.
    concatenate values to get item text for read text function
       invar3+0(10) = invar1. "PO number
       invar3+10(5) = invar2. "PO line number
       SELECT SINGLE * FROM stxh WHERE tdobject = 'EKPO'
                                   AND tdname   = invar3
                                   AND tdid     = 'F01'
                                   AND tdspras  = sy-langu.
       IF sy-subrc = 0.
         invar4 = invar3.
    reading the text for the document items.
         CALL FUNCTION 'READ_TEXT'
           EXPORTING
             id       = 'F01'
             language = sy-langu
             name     = invar4
             object   = 'EKPO'
           TABLES
             lines    = it_itab.
    I have seen some PO's which have info rec texts in that, which gets pulled by the above code...first thing is its id is F02 which exist in STXH table also there is other text with F01 id, and hence the table it_itab gets both these text hence no pbm.
    but i came across a PO which has only one text which is info rec text with id F05 and is not store in stxh and hence doesnot get pulled by read_text fm. How do i change my cod to get this text which should not hamper other PO's as well.
    As mentioned in above msgs, this F05 could be retrieved by providing object name as EINE.
    anyhelp will be appreciated and rewarded.
    thanks

  • Item text from sales order to purchase requisition

    Hi Experts,
    I have below queries ,
    1. What are the controls to generate/create a purchase requisition from a sales order.
    Is this possible that a Pur. req generated from a sales order but sales order is not its account assignment.
    How item text from the sales order can be copied to purchase Requisition, does settings in purchase requisition in SPRO (Purchasing Purchase req-text for purchase req----define copying rules) works only for automatically created Pur req.??
    item text from sales order can be copied for PR created through MRP or planned orders converted to PR.??
    I will appreciate if someone can provide me documentation on basics of sales and distribution at my email
    [email protected]
    Thanks in advance
    anand

    hello, friend.
    i can only answer part of your question as i am not sure of the others.  however, yes... you can automatically create a purchase requisition from the sales order. 
    one example is third party sales.  because of the item category group that you specified in the material master, the sales document determines an item category (and schedule line) that controls the creation of the purchase requisition.  here, the system knows that you must source the material from your vendor for delivery to your customer.
    further, as in the above case, when your company creates the PO with reference to the PR, your company appears as the buying entity but the ship-to address is that of your customer.
    i did not understand your question on account assignment.  please elaborate and we'll see if we can come up with the answer.
    if you wish to see documentation, you could refer to SAP's article on Third Party Sales.  other scenarios such as just-in-time inventory for trading companies or make-to-order companies may also apply.
    regards.

  • Getting Item Text  from sale order items

    Hi All,
    I am trying to get sale order item text using Include text in smartforms.
    my text object  is VBBP and my text id is 0004.
    What should I pass in Text Name  ?.---Order Number or Item Nunmber or Both.
    If both can you guys explain how to pass both ?.
    will be REVARDED.

    Hi,
    When you see the texts in the line item of va03..
    Double click on the text..
    Then in the menu..Goto -> Header..
    There you can find the Text name..
    Generally if it is Item text..Then the text name will be
    order number + line item
    Thanks
    Naren

  • Item text from sales order to delivery

    Hi All,
    I have GTIN number in item texts and it has value to it, but in the delivery only text is comming as GTIN number, no value is comming for it. Can some one please help me how to check why it is not comming and how to resolve this.
    I have to show the same text with value in the Invoice also. I donot even see txt there, no value also.
    Please help me.
    Thanks,
    Veni.

    Hi Siva,
    VOTXN is not valid for me, so used VOTX only. I selected the radio button for sales document -> item, text types. Pressed 'All' push button. Here I see that checkbox for Billing document is not checked, these are disabled here, How should I check the billing document check box.
    Thanks,
    Veni.

  • Replicate the Sales order Line Item Text to Production Order

    I want to replicate the Sales Order Line Item Text to Production Order? Please tell me if this is Functional job or a Developers Job?
    I believe this can be achieved by customization and doesnot need any programming and I am trying hard to gather relevant posts for this, but didnt find any.
    Please help me with some information if some body encountered this earlier.
    Regards,
    Jessica Sam.

    Hey Jay, thanks for your reply.
    Please confirm me if this is a developers job or a functional job?
    Do i need to do some programming to achive this?
    I checked with couple of my collegues and friends and 90% people say it can be achieved throug functional configuration.
    can thorugh some light on this as i had been researching on this seriously and still have mixed opinions .
    Thanks,
    Jessica

  • Copying Text From Sales order to Billing Document

    Hi all,
    I have searched all posts for my issue but found nothing so that i am posting this issue.
    I want to copy the Some text form sales order to billing document is there any cnfig to do this
    order is there any exit for billing in which i can write code to copy text from sales order to billing document.
    please provide me a solution.
    Thanks in adavnce.
    Vinod.

    Hi,
    Use the same t-code VOTXN to do access sequence assignment.
    When you choose text object Billing Doc (header/item), there is 3 folders in dialog structure:
    - Text procedure
    - Access sequence
    - text procedure assignment
    In the text procedure folder, select related text procedure, then assign the created access sequence to respective text id.
    Hope this help.
    Cheers,

  • Delivery doc creation for a selected line item of the Sales order

    Hi folks,
        Can any one help me in how to create a delivery order for a selected line item of the Sales order.My requirement is the request comes from the web browser where a sales document and details of the items are shown the user select one line item and request for delivery create of that particular SO doc.I have used couple of FM to create delivery but the delivery create is depend on the schedule line dates so iam unable to figure out where exactly i can distinguish between the line items.
    Example:
    SO:- 11193645
    Line item -1 has 2 schedule line 06/11
                                     06/13
    Line iteam-2 has 1 schedule line 06/12
    so if i try to create Delivery doc for date 06/12
    it creates partially for line 1 and line 2.
    but my requirement is i wanted to create SO for only line item 1 as i wanted to process Del Doc for only line item 1.
    If you have any idea please help me.

    hi ,
    You can develop a customised FM to process the Idoc data .
    1. Read the Idoc data into internal table for the line items which need to be delivered .
    2. Run BDC for transaction 'VL01N' ( delivery creation ) through which  eliminate the line items which are not in internal table and save the delivery document
    Note : Because in VL01N , you specify the sales document with respect to which you want to perform delivery hence automatically all items are copied to the delivery document .
    During BDC recording , select items by " MOVING TO TOP"
    and then deleting the selected item
    If you face problem in BDC recording , i can help u that too .

  • Keep Quote line item numbers in Sales order

    While creating a Sales order from Quote, SAP always creates line items with 100,200,300...and so on.
    If quote has 3 line items say 100,110, & 120 and we create a sales order with reference to this quote in VA01. The sales order line items become 100,200 & 300.
    The requirement is for Sales order to also have same line item numbers i.e. 100,110 & 120.
    To retain quote line item numbers in Sales order the ABAP change will be in VOFM or user exit?

    Hi,
    It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
    Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
    Regards,
    RS

  • How to combine the line items of 2 Sales orders into 1 delivry

    how to combine the line items of 2 Sales orders into 1 delivry
    and their process, pre-requisites and tcode

    The prerequisites are:
    1) In the customer master sales area data, shipping tab, there is a field called Order combination. u must tick that.
    2) for the two orders, the sold to party & ship to party must be same
    3) both orders must have created from same plant & shipping points
    4) the line items must have same loading grp.
    5) the both orders sheduline line date must be same.
    transaction code for the same is VL04.
    enter the required data and select the order nos to be processed.
    Do reward points if it is useful

  • Can we limit the no of line items in a Sales Order

    Can we limit the no of line items in a Sales Order.

    Hi Atul,
    You can use user exit USEREXIT_MOVE_FIELD_TO_VBAP in MV45AFZZ
    Reward points pls.
    Regards,
    Govind.

  • I want a push button for line items in my sales order entry screen.

    Hi,
    I want a push button for line items in my sales order entry screen.
    How can I do so?
    Thanks.

    Hi Kumar ,
    To have a push buttons you need to first assign a pf-status .
    here a sample code for a push button and its handling :
      set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .
    Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
    Hope it helps!
    Much Regards,
    Amuktha .

  • How to place a delivery block at line item level from Inbound ORDERS IDoc?

    Hi EDI/ABAP Experts,
    Can anyone please tell me how to place a delivery block at line item level from Inbound ORDERS IDoc?
    I tried using exit "EXIT_SAPLVEDA_001'. But there is no LIFSP field in either of XVBEP and YVBEP structures.
    Can you guys throw some light. How to place a delivery block @ line item level on sales order from Inbound ORDERS IDoc.
    Thanks,
    Matt .

    Look into the Include: LVEDAF5A that is the only place where this exit is hit... double click on the Structures and look which structure has billling block field.. and use that..
    FORM CUSTOMER_FUNCTION_IDOC USING IDOC_DATA.
      CALL CUSTOMER-FUNCTION '001'
        EXPORTING SEGMENT = IDOC_DATA
                  DVTCOMAG = VTCOMAG
                  DXMESCOD = IDOC_CONTRL-MESCOD
                  CONTRL   = IDOC_CONTRL
        TABLES    DXBDCDATA = BDCDATA
                  DXVBAP    = XVBAP
                  DXVBEP    = XVBEP
                  DYVBEP    = YVBEP
                  DXVBADR   = XVBADR
                  DYVBADR   = YVBADR
                  DXVBPA    = XVBPA
                  DXVBUV    = XVBUV
                  DD_FLAG_P = D_FLAG_P
                  DXKOMV    = XKOMV
                  DXVEKP    = XVEKP
                  DYVEKP    = YVEKP
        CHANGING  DXVBAK   = XVBAK
                  DD_FLAG_K = D_FLAG_K
        EXCEPTIONS
                  USER_ERROR = 01.
    If you are in ECC6.0  you can also use Enhancement point : INTERPRET_IDOC_ORDERS_01 SPOTS ES_SAPLVEDA. in include: LVEDAF2U

  • Unconfirmed line items of a sales order into account in credit management

    Hi Gurus
    Updated the customer orders via prog. RVKRED09.
    There is only one open order for this customer = 720662. My question is: in the credit master the sales value/credit exposure is USD 77.100,00. The order is for USD 105,900.00 .
    Found out that line item 20 is not confirmed in the schedule lines. So the value in the sales value/credit exposure  equals item 10 and 30. So my 1question is: Where is the setting that  does not take unconfirmed line items of a sales order into account in credit management?
    Thanks in advance
    Regards
    Nalini Iyer

    Hi nalini
    Even though , you create a sales order for that line item , but if that item is not confirmed then the value  wont be considered.  into credit exposure. .
    But once it gets confirmed then the value will be taken into credit exposure..
    Regards
    Srinath

  • Route schedule not updated in some line item of a sales order

    Hi Gurus,
    All order are processed through the EDI interface automatically. Order
    XXXXXXXXX for USA customer 40000XXXX is maintained in route reschedule
    setup T-code VL52 on specific departure day thursday.
    above are line item of same sales order, with same shipping point and route .
    Why only some salesorder lines missing the route schedule ?? 
    Please Help
    Regards
    Abhilash

    When you post a query here, you need to have patience until some members go through your post.  Please dont expect somebody should respond to you immediately as everybody has their own priorities.
    Coming to your query, it could be due to many reasons as per the following note:-
    Note 1750978 - Route Schedule does not populate on sales order
    Go through the Resolutions given in the above note and check with your system
    G. Lakshmipathi

Maybe you are looking for

  • Abap query

    hi all, i want an abap query in which select options should be the fields in the tables like:- field,data element,data type,short desc. database should be either logical or by joining tables what i want as output is what ever field we enter the name

  • Script error - "photoshop is undefined"

    I have been having problems working from Bridge CC to Photoshop CC and also Lightroom to Photoshop CC on my Mac 10.9.2. These are the scripting errors I have been getting: 1. Trying to open a DNG file from Lightroom into Photoshop SCRIPT EXECUTION ER

  • Adobe flash player for ios 7on ipad

    adobe flash player for ios 7on ipad?

  • Offline Processing Credit Card

    Since the secure PDF, which is used to supply the secure CC info to the vendor, no longer includes the CCV that payment forms collect, the Payment Gateway selection of Offline Processing (Process Manually Via Existing Facility) no longer makes any se

  • Installation Difficulties

    I just bought Adobe Photoshop Elements 11 for installation via disc, but the DVD drive on my computer doesn't work. Is there any way to download it offline without having to pay for it again?