FM to get Text in Sales Orders - VA02

Dear all,
I'am looking for a Function modul, which get all text in HEADER and ITEM for a document number in Sales Orders=> VA02.
Is there any one who can help?
Best regards
Edited by: Rob Burbank on Feb 17, 2010 11:35 AM

Dear  handeglo ,
use the function module READ_TEXT this is helpful in getting the long texts from the database and will work for the VA02
header and item texts retrival .Eg.
CALL FUNCTION 'READ_TEXT'
          EXPORTING
*           CLIENT                        = SY-MANDT                   Field:
            id                                 =          "put here the id of thr text type"     TDID
            language                     = 'D'    "language in which the text exists.    TDSPARS
            name                           =      "put here the name of the text AS in     TDONAME
                       for item texts its sales order number+item number
            object                          = 'VBBP'    "object type for item texts       TDOBJ
*           ARCHIVE_HANDLE                = 0
*           LOCAL_CAT                     = ' '
*         IMPORTING
*           HEADER                        =
          TABLES
            lines                         = i_lines
         EXCEPTIONS
           id                            = 1
           language                      = 2
           name                          = 3
           not_found                     = 4
           object                        = 5
           reference_check               = 6
           wrong_access_to_archive       = 7
           OTHERS                        = 8
also refer the tables stxh and stxl these tables contain all the header and item texts data respectively
Edited by: abhi_014u on Feb 17, 2010 3:44 PM
Edited by: abhi_014u on Feb 17, 2010 3:46 PM
Edited by: Rob Burbank on Feb 17, 2010 11:35 AM

Similar Messages

  • How to update TEXT in Sales order header

    Hello ,
    I have requirement in which I am creating SO via IDOC calling BAPI_SALESORDER_CREATEFROMDAT2.
    Question: Can any one help me in finding a solution to update the TEXT in sales order header which is confogured IN TEXT CONTROL in SD.
    I have tried various option using CREATE_TEXT but it is only updating STXH table , the text is not coming in the sales order.
    If someone knows about this , <removed by moderator>.
    Edited by: Thomas Zloch on Nov 15, 2010 4:20 PM - please do assign priorities > normal

    Sounds like a text determination config issue - have you assigned the text in VOTXN?  Have you run the text determination analysis from VA02 in the document?

  • Get quotation from Sales Order?

    Hi,
    I have the following code and its taking a lot of time on the database. Could you help me fine tune this?
      SELECT k~vbeln      "Sales Document
             p~posnr      "Sales Document Item
             k~vkorg      "Sales Organization
             k~vkbur      "sales office
             k~vtweg      "Distribution Channel
             p~werks      "plant
             p~lgort      "storage location
             k~spart      "Division
             p~matnr      "Material Number
             p~vrkme      "unit of measure
             p~netwr      "net value
             p~waerk      "currency
             p~arktx      "Short Text for Sales Order Item
             p~kwmeng     "Target quantity in sales units
             p~pstyv      "Sales document item category
             a~kunnr      "Sold-to-To Party
             k~auart      "sales type               
             k~audat      "sales order doc. date    
             k~bstdk      "cust. PO date
             k~bstnk      "cust. PO no. (text)      
        INTO CORRESPONDING FIELDS OF TABLE gt_item
    *Sales Document: Header Data
        FROM vbak AS k
    *Sales Document: Item Data
        INNER JOIN vbap AS p
        ON pvbeln = kvbeln
    *Sales Document: Partner
        INNER JOIN vbpa AS a
        ON ( avbeln = kvbeln
         AND a~posnr = '000000'
         AND a~parvw = c_sold_to )
        WHERE k~vbeln IN s_vbeln
          AND k~auart IN s_auart
          AND k~erdat IN s_erdat
          AND k~vkorg IN s_vkorg
          AND k~vtweg IN s_vtweg
          AND k~spart IN s_spart
          AND k~vkbur IN s_vkbur
          AND p~lgort IN s_lgort
          AND a~kunnr IN s_kunnr.
    After selecting the sales data I need to check whether there exists any Quotation for the above SO's. I wrote the following code but its taking a hell lot of time bcoz im trying to find out a preceding document from subsequent document.
    SELECT VBELV
            POSNV
            VBELN
            POSNN
            VBTYP_N INTO TABLE GT_VBFA_B
                    FROM VBFA
                    FOR ALL ENTRIES IN GT_ITEM
                    WHERE VBELN = GT_ITEM-VBELN
                      AND POSNN = GT_ITEM-POSNR
                      AND VBTYP_V = C_QUOTATION.
    Any suggestions would be greatly appreciated.

    Hi karthik,
    I think why not have th first query as an inner join between vbak and vbap only usin all its primary keys and then use other query to select data from partner tablbe in other internal table and then read it into the final table with your required structure.
    This will help in having all required data faster because the vbpa's data will be on application server while you are readeing the sam for the final table and hence it will make the execution.
    I think this should work because with more inner joins the underlying database would have to run many queries to get the actual data from database , and everything else seems to be fine as you have used appropriate tables and appropriate keys in the select query , just try this option out.
    Thank You!
    Regards.
    Sunmit.

  • Detecting change on header and item texts for sales order in user exit

    Hi,
    In the user exit of VA02, I need to identify/detect if header or item texts for sales order is changed or not.
    Please advise on this.
    Regards,
    Shreyas

    Normally system stores the old values in XTables and new values in YTables.  Check if you have access to these in your user exit.  If you give the user exit name, someone will be able to guide you.
    hith
    Sunil Achyut

  • Wrong short text for sales order item

    Hi guys,
    I have an issue for the short text for sales order item. It is werid that I get the different short text depends on how we enter the material. If we only enter the material #, we get the short text for sales order item from material master data. If we enter the material #, plant and storage location, we get the short text for sales order item from customer material infor record. However, the customer material infor record is only maintained for inter-compnay transaction. System should not pick it for third-party transaction.
    I found a code in FV45PFAP_VBAP_FUELLEN:
    Bei Primärbedarfen ist MAAPV-ARKTX nicht relevant
        if vbak-vbtyp ne vbtyp_pbed.
          vbap-arktx = maapv-arktx.
        endif.
    Kundenmatinfo hat höhere Priorität
        if knmt-postx ne space.
          vbap-arktx = knmt-postx.
        endif.
        if da_arktx ne space and
           svbap-tabix = 0 and
           vbapin-matnr = vbap-matnr.
          vbap-arktx = da_arktx.
        endif.
    But it is nothing customized. Who can tell me what is wrong here?
    Thanks,
    DL

    Hi,
    Text coming from source (MMR, CMIR etc.) is being "pulled" via the access sequence. Check the Text analysis in your sales order in Tab Texts, at item category level.

  • Marketing text in sales order header

    Hi All,
    Please let me know from where does the text gets reflected in sales order header. Header has a tab TEXTS, in which we have series of texts.
    Do we have option to save the texts in any table/structure
    Thanks in advance
    regards,
    satya

    Hi
    Go to SO10 and check the material text . Now go to VOTXN and check wheather the assignment is there for sales header or not
    Regards
    Srinath

  • Quantity is not getting conformed in sales order

    HI SD Gurus,
    i have one issue we are not able to solve i need your help, it is very urgent,
    My issue:we created sales order but quantity was not getting conformed is sales order even though we have enough stock
    but it was consumed the stock in MD04,
    we ran the SDRQCR21 program but issue is still exist,
    1. we checked all the ATP configuration  every thing is fine,
    2.we replicated the scenario in  quality it is working fine
    3.we try simulated in production but not conformed the stock
    4. total stock is in unrestricted only
    5. no block in sales order
    6. same material working fine with different plant
    7. in same plant different materials working fine
    available stock level in MMBE and MD04 is 330 qty unrestricted
    sales order created for 165
    then stock reduced in MD04 to 165,and sales order displayed in MD04 with quantity 165
    but it was not conforming the schedules in sales order(with any dates)
    I am requesting you to reply ASAP if any one faced the same scenario
    BR,
    CS

    Hi CS,
    Please check the stock availability in CO09. If CO09 shows available quantity as zero then the sales order quantity cannot be confirmed.
    Please review SAP Note Number 89362 - No confirmation despite available quantity/stock for further information on this transaction.
    You will also find further information in this document:
    http://scn.sap.com/docs/DOC-58040
    I hope this helps.
    Kind regards,
    Catherine

  • RBA GATP check is not getting invoked for Sales Order

    Hi Everyone,
    RBA GATP check is not getting invoked for Sales order.
    I maintained the configuration settings for 'Rules-Based Availability Check', APO general settings (check mode, check instruction), carried out integrated rule maintenance, Rule determination for the combination of order type & product, associated the check mode to product master. Also maintained all the settings in ECC towards Req class, Req type, checking control etc.
    However, sales order is not invoking RBA Check though it is showing up the 'Rule' icon in the screen. Also, in the APO Availability check in Sales order when I click onto 'check instruction', I get the checking mode that pertains to RBA for business event 'A' (Sales order). Though I have not maintained any stock for the main material for which I have the sales order, yet system is confirming any quantity that I put in.
    I would expect that system would propose the same material in an alternate location where we have stock through RBA.
    Request you to share ideas on this.
    Regards,
    Avijit Dutta

    Hi Avijit,
    You should used No Checking Horizon in Checking instructions and also Check your rule control settings.
    What you have defined in 1st and 2nd steps. Check whether product substitution is carried out or Location Substitution.
    Thanks,
    Bala.

  • Getting the open sales orders and open deliveries valies

    Hi SDNs,
    I have a requirement that i need to get the all sales orders open values and delivery values. I need to build a logic for this scenario. could you please provide the logic for getting the open sales order values for respective customer.
    Please provide logic instead of standard reports. That would be very useful
    Thanks in advance
    Regards,
    K

    Please provide logic instead of standard reports.
    Really surprising !!!!!!!!!
    But still I would like you to have a look at VA05 where both open quantity and open order value will flow.  If you still feel to get the related tables, you can consider VBBE where you can get open order quantity
    thanks
    G. Lakshmipathi

  • Quantity getting confirmed in sales order without any stock.

    Hi
    My issue is that , the schedule lines are getting confirmed in sales order , even though i have not posted any stock. How to prevent this from happening ?

    Hi Jalaj001, 
    --Go to T.Code  MM02 & in Sales:General/plant data assign availability check as 01 or 02 instead of KP.
    --In MRP 1 -mention MRP Type as PD-Planned MRP
    --Go VOV6 & select your Schedule line category & check mark the Availability
    --Go T.Code OVZ9 & select your availability check control & uncheck the Check without RLT in Replenishment lead Time.
    Let me know if your problem is solved
    Regards
    Pradeep

  • Header Text And Item Text in Sales Order

    Dear ALL
    First one:
    I have two different problems with text in sales order, when i create sales order after giving all the information like customer and material.
    If i navigate through the Go To-- > Header ---> Text then there is a dump is any idea what all i need to check?
    Error  Message
    A RAISE statement in the program "SAPLOLEA " raised the exception 
    condition "CNTL_ERROR".                                           
    Since the exception was not intercepted by a superior program     
    in the hierarchy, processing was terminated.                                                                               
    Short description of exception condition:                                                                               
    For detailed documentation of the exception condition, use        
    Transaction SE37 (Function Library). You can take the called      
    function module from the display of active calls.                 
    The termination occurred in the ABAP/4 program "SAPLOLEA " in          
    "AC_SYSTEM_FLUSH".                                                     
    The main program was "SAPMV45A ".     
    The termination occurred in line 27                                    
    of the source code of program "LOLEAU02 " (when calling the editor 270).
    Second one:
    when i am creating the sales order without enter the quantity  , customer and material if i navigate through the Header Text or item  Text i can able to go but there in no dump, the moment i enter the quantity for the material then it over writes all the text in item and header.
    Any suggestions please?
    Thanks & Regards,
    Veer

    Dear Veer,
              Please take the help from the technical people to fix the issue because it may related activation some Z developments which are related to the text.
    Check the text determination procedure configuration settings also whether the text is calling from the Customer master and Material master.
    If the text is calling from the master data maintain the text in the master data then try.
    I hope it will help you
    Regards,
    Murali.

  • 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.

  • 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,

  • Please tell me table that stores texts in Sales Orders

    To everyone,
    Does anybody know which table stores text in sales orders(VA01 screen -> item data -> under texts tab)?
    I would like to create a query or ABAP report to check data entered in the text field but I don't think it is in VBAK or VBAP.
    Thank you very much in advance.
    Best regards,
    Miki

    Hi Miki,
    Sales text is stored in encrypted form in the database table. You cannot directly read it from database table. but you can use the function modue READ_TEXT to do so. The related table is STXH and STXL
         try using the  FM READ_TEXT.
    double click on the text>Goto>Header. Here you can find the text id & text object.
    Thank you,
    Pavan.
    Edited by: PAVAN CHANDRASEKHAR GANTI on Aug 18, 2009 7:26 AM
    Edited by: PAVAN CHANDRASEKHAR GANTI on Aug 18, 2009 7:27 AM

  • Function Module or BAPI to update Short text  for sales order item(vl02n)

    Hi All,
    I need to update the Short text for sales order item in vl02n transaction from an internal table with Delivery number and other relevant details .
    Does any body know any Function Module or BAPI which can accomplish this purpose .
    Or else writing BDC is the only option I have got ? .
    Please clarify .
    Thanking you in advance .
    With Regards,
    Suriya .

    Hi
    You can try using BAPI_SALESORDER_CHANGE if you want to change sales order
    Regards
    MD

Maybe you are looking for

  • How to skip first step in a FPM roadmap?

    Hello, Our client wants the first step disabled/not displayed in a standard roadmap that has been delivered with the software. The standard roadmap uses component FPM_GAF_COMPONENT and consists of 4 steps (and is based on an application config and co

  • No more connections available to this remote computer...Urgent Help for File server...

    Hi Guys, I need urgent help regards to our school File server which is having "No more connection to this remote computer error" on SMB Shares where I usually authenticate with a domain username it used to work fine since till 3 weeks ago. Now I can

  • Avoiding empty-file creation

    Hi, Is there any way to avoid empty file creation on the receiver side? I am using variable-substituton for file naming. Thanks, Vishal

  • Cannot print pdf close program data execution prevention

    when i try to print a pdf (acrobad standard 8) it closes program and gives me "data execution prevention" windows closed this program to protect ... how do i fix this?  this was not happeneing a couple weeks ago...

  • Printer - sort by date

    Just noticed a strange thing. (Maybe it was posted before, couldn't tell easily.) In the printer window, when I do "Show completed jobs" I get a list. Great. When I sort that list by date, though, it does that sort strangely. Alphabetically. Like an