How to insert sales text (MM02) into a single record of a Ztable.

Hi,
I'm extracting data from different data base tables and populating a Ztable which has Matnr as primary key and sales text as a field.
I have already used READ_TEXT to display the text and it is displayed in multiple records which in turn leads to duplication of Material numbers.
Now I want to avoid duplication of records (Matnr) as this being a primary record, and display the sales text of a particular material number into one single record.
Can anyone tell me how to insert sales text (MM02) transaction into one single record.
Thanks,
Govind

sorry i am not enough clear about your requirement...
as i can understand i am explaining to you.
suppose your itab contains repaeating matnr.
matnr
1
1
2
2
2
3
3
like this.
data : text(200),
         matnr like mara-matnr.
loop at itab.
call READ_TEXT fnmodule.
loop at tline.
concatenate text tline-tdline into text.
endloop.
matnr = itab-matnr.
at end of matnr.
itab1-matnr = matnr.
itab1-text = text.
append itab1.
clear text.
endat.
endloop.
NB change the code as per your requirement
regards
shiba dutta

Similar Messages

  • How to insert a calculation/formula into a single cell?

    I have a cell at the bottom of a column. Right now a subtotal exits in this cell. I do not want any of the packaged total options that come with Discoverer. What I do want is to insert a formula into this cell that utilizes two totals already in the worksheet.
    i.e. if column D has a subtotal of 4 and column G has a subtotal of 8 - when a break occurs because of a change of value in column A. I want to insert a formula into column J that takes the subtotal in column D and divide that by the value of the subtotal in column G to get a percentage. Can this be accomplished?

    In a word - nope.
    A total can only do total stuff (like adding the column up). You cannot place any kind of item such as a calculation, etc. in the total cell as such.
    The way this is accomplished is to create a calculation on the line level that then carries over the math to the total.
    In your case however, the only thing I could envision trying, is one a summary level (ie: not showing individual lines, but just the totals for each group sort) where you create a calculation as you described:
    ie: your column J would be defined as: case when sum(column_d) = 4 and sum(column_g) = 8 then sum(column_d) / sum(column_g) else null end
    Again, you'd only display the sum of each field, not the details. Also, I'm assuming your = 4 and = 8 example, is just an example, as it's always equal to 50%. Otherwise, if it's just a sum percentage your doing, then just do:
    case when sum(column_g) = 0 then 0 else sum(column_d) / sum(column_g) end
    or using decode: decode(column_g,0,0,sum(column_d)/sum(column_g))
    Russ

  • How to Insert the Text in Selected Text Frame-Reg.

    Dear all,
    I am using the SnipperRunner - SDK, and create the TextFrame, but I can't insert the Text in the Particular Frame. so please give me the soultions,
    (*) Create TextFrame is ok,
    (*) Select TextFrame is also ok,
    (*) now, my Query ->
    How to Insert the Text in the Selected Frame?. (or)
    How to Link the Selectable Frame and my Text.? (or)
    How come to know the TextFrame is select?.
    Please any one can suggest me through the Coding....I will appreciate you...
    Thanks & Regards,
    T.R.Harihara SudhaN

    Hi,
    you have to get the TextModel associated with the textframe. Once you got that, ITextModel has an Insert()-method. You could also process kInsertTextCmdBoss - there are quite a few examples around. I believe WriteFishPrice also inserts text into a frame, just as an example. Good luck ...
    Bernt

  • How to Insert a Landscape Page Into a Portrait Document?

    How to Insert a Landscape Page Into a Portrait Document?
    i use pages 5.2
    thanks

    You can't.  But you could add a text box and rotate it (select the box, click arrange, rotate).

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • How to Copy Sales Text Data from Customer Master to Sales Order.

    Hi SAP Guru's
    I have Completed Configuration for Central Text for Customer Master for two texts 1)Additional Attachments 2) Wooden Packing
    I got these two fields in Customer Master.
    I need these data to be copied from  Customer Master to sales order. But i am unable get these two in to sales order.
    Steps which  I have done for Text Determination.
    1) Text Id in for Text Object KNA1
    2)Placed Text Id  in Text Procedure  and assigned   this procedure to Customer Account Group.
    Could you please advice me
    Thanks in Advance.

    Text Control
    In this IMG activity, you define the rules for text determination. You must carry out the following steps:
    Select a text object and define the rules for text determination for this object. Text objects are, for example, the sales texts in the customer master record or the sales document header.
    Define the permitted text types for every text object. If the text types contained in the standard SAP R/3 System are not sufficient, create new ones.
    Define the access sequences. This way, you define how the SAP System should determine the texts for a text type.
    Group the text types together in text determination procedures. The SAP System then proposes the text types from the procedure when you maintain a customer master record or a sales & distribution document. The search for the respective text is carried out using the access sequence which you have stored for each text type in the procedure.
    Allocate the text determination procedures so that a procedure applies to the following criteria in each case:
    account group customer
    sales & distribution document type
    item category

  • How to get Sales Text & Purchase Order Text in MM based on (MSEG-MATNR)

    Hi
      Am working on a Report based on Purchase order & Sales, Could any body tell How to get Sales Text & Purchase Order Text in MM based on (MSEG-MATNR).
    the Field i need to get are : SALES TEXT, PO TEXT.
    Sunil.

    Hi Sunil,
    For getting Material PO text and sales text, you have to rely on Purchase Order and Sales Order. And use READ_TEXT function module to fetch the text.
    Below are examples of PO text and Sales Text:
    1. PO text:
        CALL FUNCTION 'READ_TEXT'
         EXPORT
           ID = 'F03'
           LANGUAGE = SY-LANGU
           NAME = '450000011200010' conacte PO number and line item number
           OBJECT = 'EKPO'
         TABLES
           LINES = INT_TLINES "you will get text in this table
    2. Sales order text:
            CALL FUNCTION 'READ_TEXT'
         EXPORT
           ID = '0001'
           LANGUAGE = SY-LANGU
           NAME = '0000000036000010' conacte SO number and line item number
           OBJECT = 'VBBP'
         TABLES
           LINES = INT_TLINES "you will get text in this table
    ref: STXH and STXL tables.
    Hope it will solve the problem.
    Regards
    Krishnendu

  • How to insert vietnameese text in a form

    Hi all,
    How to insert Vietnamese text in a smartform since it is not supported by SAP.

    You can insert using standard text So10 call the standard text in your form where every it is required.
    Download text/language converter using google search. Convert text to your desired language and place it in SO10.
    close the thread once your question is answered.
    Regards,
    SaiRam

  • How to insert a tumbler blog into muse web site?

    Hey I was wondering if you know how to insert a tumbler blog into adobe muse? I have a tumbler account but would like to use it in adobe muse. how can I add it to my blog page in muse for desktop?

    Goto your Tumblr account and then view it when you're logged out ... the URL link should look something like this?:
    http://my-tumblr-blog.tumblr.com
    Now copy & paste that URL link and insert it into this code snippet:
    <iframe src="http://my-tumblr-blog.tumblr.com" onLoad="calcHeight();" scrolling="YES" frameborder="0" width="660" height="950" name="resize" id="resize"></iframe>
    Now copy and paste this edited snippet into the Muse page where you want your Blog ... set the correct width and height in the code (see above) to fit your page ...
    Cutomize it:
    I would suggest customizing your Blog with the built-in customize HTML section to tweak the embedded Blog page ... i.e. turn off some of the Tumblr sections like Header, Description, etc, if you don't want them ...
    Better still go over to this Tumblr Theme site and create a nice custom theme where you can do it all yourself ...
    Then after that still use the snippet code above once you have copied & pasted the new customised Tumblr HTML into you Tumblr Blog:
    http://www.totallylayouts.com/tumblr-generator/
    The art is to streamline your Blog as much as possible so you get the most screen estate shown in Muse, because as an inserted iFrame widget you do lose a bit ...
    cheers,
    Gem

  • How to insert a gif file into a table?

    Hi,
    I need to insert a gif file into a table. Can anyone tell me where I can find the information on how to create this kind of table, how to insert a gif file into a table and how to select?
    Thanks,
    Helen

    Hi Helen,
    You could read about that in the documentation which is available online.
    For a starter: BLOB. And I bet there are many examples to be found on the web.
    Good luck. :)
    Regards,
    Guido

  • Can any one out there tell me how to insert a zoom tool into my slide show in dreamweaver CS5.5

    Hi there
    Can any one out there tell me how to insert a zoom tool into my slide show in dreamweaver CS5.5
    My slide show consists of lots of thumb nails of paintings under a large painting.
    When the small painting thumb nail is clicked the large painting appears.
    I would like to be able to enlarge all areas of the large painting when a zoom tool is placed over areas of the large painting.
    Really appreciate any one help.

    Here's the Dreamweaver forum...
    http://forums.adobe.com/community/dreamweaver/dreamweaver_general

  • How can I sync text files into iPhone?

    How can I sync text files into iPhone? like doc. txt. for reading or editing

    The native iPhone OS doesn't allow that. I think there are several solutions to this, some of which may be against the AT&T or Apple rules. One legitimate solution is The Missing Sync for iPhone by mark/space (http://www.markspace.com).
    Before I had an iPhone, I owned a copy of The Missing Sync for Windows Mobile. It was a pretty decent app. In my opinion, though, their app for the iPhone is NOT worth the price ($40 new, $25 for a cross-grade).
    Also, check the App Store (if you have 2.0 software)--there may be an app that does this, probably for a lot less $.

  • How to insert one table data into multiple tables by using procedure?

    How to insert one table data into multiple tables by using procedure?

    Below is the simple procedure. Try the below
    CREATE OR REPLACE PROCEDURE test_proc
    AS
    BEGIN
    INSERT ALL
      INTO emp_test1
      INTO emp_test2
      SELECT * FROM emp;
    END;
    If you want more examples you can refer below link
    multi-table inserts in oracle 9i
    Message was edited by: 000000

  • Could someone help me out how to insert a Node properly into a DOM?

    I am trying to insert a Node built from a String to a DOM.
    Here is how I created the Node
                   Detail = "<Detail><Msg>Detail Message</Msg></Detail>";
                   prolog = "<?xml version="1.0" encoding="UTF-8"?>";
                   Node DetailNode = null;
                   Document DetailDoc = null;
                   if( Detail != null ){
                        Detail = prolog + BiometricDetail;
                        DetailDoc = xp.XML2DOM( BiometricDetail ); // transform a XML String into a DOM.
                        DetailNode = BiometricDetailDoc.getDocumentElement();                    
    Here is how I created the DOM
                   javax.xml.parsers.DocumentBuilderFactory factory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
                   javax.xml.parsers.DocumentBuilder builder = factory.newDocumentBuilder();
                   Document document = builder.newDocument();
                   Element beeE = document.createElement("BeeSets");
                   Element grpE = document.createElement("Group");          
                   bioE.appendChild( grpE );
                   // the document looks like "<BeeSets><Group></Group><BeeSets>";
                   // After inserting the Node DetailNode, I want it to look like
                   // "<BeeSets><Group><Detail><Msg>Detail Message</Msg></Detail></Group><BeeSets>";
    Now when I tried to insert the node DetailNode to the DOM document, I tried
    1) document.importNode( DetailNode, true );               
    No exception was thrown. But when I transformed the DOM document back to a String, I could not see the information from the newly imported Node DetailNode.
    When I tried
              grpE.insertBefore( BiometricDetailNode, dataE );
    I got the following exception.
         org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
         at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
         at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
         at com.jadcs.bioidentity.role.base.RP.getNodes(RP.java:497)
    2) document.adoptNode( DetailNode );
    I got the following exception.
         java.lang.ClassCastException: org.apache.xerces.dom.DocumentImpl
         at org.apache.xerces.dom.DeferredTextImpl.synchronizeData(Unknown Source)
         at org.apache.xerces.dom.NodeImpl.setOwnerDocument(Unknown Source)
         at org.apache.xerces.dom.ParentNode.setOwnerDocument(Unknown Source)
         at org.apache.xerces.dom.ElementImpl.setOwnerDocument(Unknown Source)
         at org.apache.xerces.dom.ParentNode.setOwnerDocument(Unknown Source)
         at org.apache.xerces.dom.ElementImpl.setOwnerDocument(Unknown Source)
         at org.apache.xerces.dom.CoreDocumentImpl.adoptNode(Unknown Source)
         at com.jadcs.bioidentity.role.base.RP.getNodes(RP.java:509)
    3) detailStr = "<Detail><Msg>Detail Message</Msg></Detail>";
    Element detailE = document.createElement("Detail");
    detailE.setTextContent( detailStr );
    grpE.appendChild( detailE );
    This way gives result like "<BeeSets><Group><Detail><Detail><Flash>On</Flash></Detail></Detail></Group><BeeSets>";
    The content is messed up.
    Could someone help me out at how to insert a Node properly into a DOM? Thank you very much.

    Said another way, importNode actually only makes and returns a copy of the node you gave it (it will be a deep copy only if you pased true as the second parameter), but where the new dom you called import on is owner.
    So what you need to do is more like this:
    Node tempNode = domYouAreAddingTheNodeTo.importNode(node2copy,true); //true if you want a deep copy
    domYouAreAddingTheNodeTo.appendNode(tempNode);You can also traverse to any point in the DOM and insert the node there with the same method, but you always have to import first so that the DOM has a copy of the node that it owns.

  • How to insert large xml data into database tables.

    Hi all,
    iam new to xml. i want to insert data in xml file to my database tables.but the xml file size is very large. performance is also one of the issue. can anybody please tell me the procedure to take xml file from the server and insert into my database tables.
    Thanks in advance

    Unfortunately posting very generic questions like this in the forum tends not to be very productive for you, me or the other people who read the forum. It really helps everyone if you take a little time to review existing posts and their answers before starting new threads which replicate subjects that have already been discussed extensively in previous threads. This allows you to ask more sensible questions (eg, I'm using this approach and encountering this problem) rather than extremely generic questions that you can answer yourself by spending a little time reviewing existings posts or using the forum's search feature.
    Also in future your might want to try being a little more specific before posting questions
    Eg Define "very large". I know of customers who thing very large is 100K, and customers who think 4G is medium. I cannot tell from your post what size your files are.
    What is the content of the file. Is it going to be loaded into a single record, or a a single table, or will it need to be loaded into multiple records in a single table or multiple records in multiple tables ?
    Do you really need to load the data into exsiting relational tables or could your application work with relational views of the XML Content.
    Finally which release of the database are you working with.
    Define performance. Is it reasonable to expect to process this kind of document on this machine (Make, memory, #number of CPUs, CPU Speed, number of discs) in this period of time.
    WRT to your original question. If you take a few minutes to search this forum you will find a very large number of threads with very similar titles to yours. These theads document a number of different approaches that can be used to solve this problem.
    I suggest you start by looking for threads that cover topics like DBMS_XMLSTORE, XMLTable(), Relational Views of XML content, loading XML content in relational tables.

Maybe you are looking for

  • Acrobat Multitasking?

    Hello, I have Adobe Acrobat 6.0 professional. I am a tile contracter, and I use Adobe Acobat 6.0 Pro for estimating. I download .PDF files to run. But my only problem is I don't know how to run Adobe Acrobat 6.0 Pro twice, so I can have two different

  • Safari 6.0.4 - java applet keeps running when not in use?

    Mac OS X 10.7.5 Safari 6.0.4 all the latest updates (software) as of 4/27/13 Oracle's Java r 21 also installed (latest) website: http://javatester.org/version.html NOTE: I have seen this on more than 1 computer that the 1st time running the Java appl

  • How to use example formulas in a customized spreadsheet

    I like the set up and formulas used in the example spreadsheet for Checking in Numbers 09. However, I would like to remove the data that is there and replace with my own data without losing the formulas used. How can I do that? Also, I would like to

  • Suppress writing cache files with rwrun.exe

    Hello, we`re using rwrun.exe (9.0.4.2.0) with parameters to create pdf-files in a loop: REPORT=mytest.rdf USERID=scott/tiger@orcl BLANKPAGES=no DESTYPE=file DESNAME=mytest.pdf DESFORMAT=PDF OUTPUTIMAGEFORMAT=GIF CACHELOB=NO Each process write a cache

  • Update for  Photoshop 5

    Hi I just re-install my photoshop 5 due to corrupted Windows 8.  As such the Harddisk was re-formated and Windows 8 re-installed on the computer.  But when I re-install my photoshop 5 I was unable to update the Camera Raw to 6.7 to read and open Niko