Copying the item text in case of multiple line items

Hi All,
                I have a scenario where the sales order gets created in our SAP through a 850 idoc. The incoming idoc has only one item segment which carries the total order quantity ( for example say 1000). Since my company has contractual agreements with the end customer for doing multiple shipments , our sales department splits the total quantity into multiple line items in the sales order. Say splitting the 1000 quantities into 5 line items of 200 each.
The problem here is that when the sales order got created , all  the related item text were copied only to the first line item ( of 1000 qty) and which is standard SAP. Since the order quantity was manually split, the related item text are not carried to the subsequent line items. The issue comes when an outbound (810) idoc is sent to customer . As I told earlier since only the first line item has the item text , the 810 idoc which was created for  the first line item only has the item text . The rest of the 810 which were subsequently created for multiple shipments/invoices on different dates didn't have the item text in the 810's. This is becoming a major problem as the 810 files are failing at our trading partners end because of missing text.
Now my question is, Is there a way that I can make the item text copy automatically when multiple line items are created manually by business. Like is there a way where I can modify MV45AFZZ  to copy the item text in their respective segemnts ( z003,z004 etc) to "N" number of line items.
Also please suggest if there is a better way of doing it. Suggstions are most welcome !!!.
Regards
Amrith

Hi,
First of all try to avoid doing select into corresponding fields. THis would improve the performance of the program.
Try to do a single fetch from the BSIS table . fetch the hkont, belnr, dmbtr fields in to a master internal table. Manipulate and play with the data as required.  Don't hit the data base table more than once (unless it is required) . This would improve the performance of your code.
Try to code this way.
types: begin of ty_bsis,
             hkont type hkont,
             belnr type  belnr_d,
             dmbtr type dmbtr,
          end of ty_bsis.
data: it_bsis type standard table of ty_bsis,
         wa_bsis type ty_bsis,
select hkont belnr dmbtr
          from bsis
          into table it_bsis
          WHERE HKONT IN S_RACCT
        AND PRCTR IN P_PRCTR
          AND MONAT IN S_POPER
         AND BUKRS EQ P_BUKRS
         AND GJAHR EQ P_GJAHR
          AND PRCTR IN S_PRCTR.
Using the data availabe in the it_bsis, you can manipulate as required.
Hope this would be helpful
Regards
Ramesh Sundaram

Similar Messages

  • Copy the Notes/Text maintained in Campaign

    Hi Forum,
    Is there a way through which I can copy the Notes/Text maintained in Campaign to the Task/Activity document generated from my Campaign execution.
    Regards,
    Amit

    Hello Amit,
    could u solve the issue?
    I have the same problem
    regards
    Helene

  • How can i make the input/output field to a multiple lines in ModulePool...

    hi all...
    can any one please let me know, is there any possibility thru Module Pool program where i can make the input/output field to a multiple lines...
    say, when we drag & drop the input/output field on the screen - it'll come with single line display. so, how to make the same field to multiple lines field.
    rather i can say my question like, how to increase the height of the input/output field.
    Desired Functionality:
    • The user wants to display a long text.
    • now the input/output field should not display the record as a single line, now the field has to display the text in multiple lines (something like wrap option in ms excel).
    hope u got my question...
    please help me in this regards...

    hi Rengith, i'm not using Text Field, i'm using Inpu/Output Field to display the long text.
    If u mean text field as input/output field then can u let me know the process for this, how to do the same thru module pool program...
    Edited by: murashali on Mar 18, 2008 1:36 PM

  • Select query in case of Multiple line items

    Hi Gurus ,
                  I've a doubt in general SQL select query. I want to know , if suppose I've an internal table - itab . I've fetched G/L Account numbers 1st, based on the input selections . Next , I want to loop on those G/L accounts. However, if the G/L account has multiple line items, then I personally use this select query -- >
    loop at itab.
    select <field> from <table> appending corresponding fields of  <itab1> where hkont eq itab-hkont.
    endloop.
    Now, the execution time for this query is longer than expected. The biggest problem here is, i've to sum up the totals as well. So totaling is an added load. I want to reduce the execution time of this. Kindly suggest me some good method in case u have any.
    I've pasted the code which I've written , for u ppl to understand--
    SELECT DISTINCT HKONT BELNR
      FROM BSIS
       INTO CORRESPONDING FIELDS OF TABLE OTAB
        WHERE HKONT IN S_RACCT
    *      AND PRCTR IN P_PRCTR
          AND MONAT IN S_POPER
          AND BUKRS EQ P_BUKRS
          AND GJAHR EQ P_GJAHR
          AND PRCTR IN S_PRCTR.
    ***The code below takes a lot of time to execute.***
    LOOP AT OTAB .
      SELECT DMBTR HKONT
      FROM BSIS APPENDING CORRESPONDING FIELDS OF TABLE CREDITS
        WHERE HKONT EQ OTAB-HKONT
          AND BELNR EQ OTAB-BELNR
          AND MONAT IN S_POPER
          AND BUKRS EQ P_BUKRS
          AND GJAHR EQ P_GJAHR
          AND PRCTR IN S_PRCTR
          AND SHKZG EQ 'H'.
      COLLECT CREDITS.
    ENDLOOP.

    Hi,
    First of all try to avoid doing select into corresponding fields. THis would improve the performance of the program.
    Try to do a single fetch from the BSIS table . fetch the hkont, belnr, dmbtr fields in to a master internal table. Manipulate and play with the data as required.  Don't hit the data base table more than once (unless it is required) . This would improve the performance of your code.
    Try to code this way.
    types: begin of ty_bsis,
                 hkont type hkont,
                 belnr type  belnr_d,
                 dmbtr type dmbtr,
              end of ty_bsis.
    data: it_bsis type standard table of ty_bsis,
             wa_bsis type ty_bsis,
    select hkont belnr dmbtr
              from bsis
              into table it_bsis
              WHERE HKONT IN S_RACCT
            AND PRCTR IN P_PRCTR
              AND MONAT IN S_POPER
             AND BUKRS EQ P_BUKRS
             AND GJAHR EQ P_GJAHR
              AND PRCTR IN S_PRCTR.
    Using the data availabe in the it_bsis, you can manipulate as required.
    Hope this would be helpful
    Regards
    Ramesh Sundaram

  • BAPI_ACC_DOCUMENT_POST in case of  multiple line items

    Hi All,
              I'm working on program for uploading of Journal postings ( G/L postings) from excel . I am using
    BAPI_ACC_DOCUMENT_POST for this purpose.
    There is a possibility that the excel data may contain one Dr./Cr line item with multiple DR/Cr line items. System
    can recognise one line item with multiple line item by means of unique header reference field (XBLNR) . The excel
    data contains following fields :
    BLDAT     
    BLART     
    BUKRS     
    BUDAT     
    WAERS     
    KURSF     
    XBLNR     
    BKTXT     
    BSCHL1     
    HKONT     
    WRBTR     
    KOSTL     
    AUFNR     
    PRCTR     
    FKBER     
    SGTXT          
    BSCHL2     
    HKONT1     
    WRBTR     
    KOSTL     
    AUFNR     
    PRCTR     
    FKBER     
    SGTXT
    How can i populate the accountgl , accountrecievable ,ammountcurr tables in BAPi mentioned?
    <LOCKED BY MODERATOR - DUPLICATED THREAD>
    Re: BAPI_ACC_DOCUMENT_POST
    Edited by: Alvaro Tejada Galindo on Jan 13, 2010 4:29 PM

    This is a duplicate post. Please see my answer in the other one.
    Rob

  • I want to write the name (label) of push_button in multiple lines.....

    I have a push button, I want to write the name of it in multiples lines because its too long so how can we do it... I mean I think there's some coding or any thing else. Just if we want to label a button we take it properties and in the label properties we write its name but if the name is too long then it does not come from the next line..We have to maximize the button so the full name comes....How we can do this thing that the name comes from the next line or in multiple lines....

    Also, you could make a text item, with raised bevel and a when-mouse-click trigger:
    Re: Changing caption of a single row button in multi-record block

  • Publishing a text box to be multiple lines of text in SharePoint Form Library

    Hello
    I have some text boxes on an InfoPath form which is then published to a SharePoint form library. However, when the form creates columns in the form library, some of the text boxes are being published as Single Line of Text which then cuts off some of the
    text as users can type more the 255 characters in the text box.
    My question is how can I make sure that the form publishes the field as a multiple line of text instead? Some of the boxes did this by default but there are others that did not and I am missing text on them.
    Thanks

    When you add the control to the form, choose the Multi Line of text option instead of the single line of text option, if you are unsure, when you add the control to the form, right click it and select properties, from here you can change the data type
    from single line of text to multi line of text.
    Regards
    Sergio Giusti
    http://sergioblogs.blog.co.uk/
    Whenever you see a reply and if you think is helpful, click " Vote As Helpful". And whenever you see a reply being an answer to the question of the thread, click "
    Mark As Answer".

  • How to wrap the too big string name in multiple line

    Hi All,
    String s="Diwali_Photos_For_Testing_Purpose_Test"
    How to wrap this string into multiple lines in jsp.
    by setting the width of the outputText component, it is not wrapping into multiple lines.
    If the String s="Deputy chief executive takes up position at Hibernian"
    then it will be wrapped in next line..

    In IE you can apply CSS property 'word-wrap' on that field with the value 'break-word'. For other browsers you'll have to write some JS yourself which breaks long words with spaces or even do it already at the server side.

  • Copy and/or Cut and Paste no longer works from within Firefox yet I can Paste to Notepad and yet again copy the same text from within Notepad or any app will not Paste back into Firefox, thanks

    I 'Copy & Paste' from within Firefox quite often but for some reason the function has stopped working when using some sites, even the menu item 'Paste' is greyed out, yet I can open Notepad and 'Paste'. I tried pasting into 'Notepad' then copying from Notepad and pasting back into Firefox, which I've found in the past sometimes works but today even that does not work. I accept it may not actually be a Firefox problem but I have noticed since upgrading to the latest version, I am having several problems with crashing and hanging exceedingly long execution of the browser.

    See:
    *http://kb.mozillazine.org/Clipboard_not_working

  • DON'T copy the selected text automatically!!!

    version: 11.1.1.7
    OS: Linux
    In jdev code editor, when you select "something1", click Ctrl+C, then select "somehting2", click Ctrl + P. You will find nothing happens.
    This is because when you select "something2", the clipboard is replaced with "something2".
    When you select something, the editor copy it automatically. Not sure if user can disable this behavior.
    Really bad feature, no editor behaves like this.

    Leon,
    It is not JDev issue, it is a feature in Linux.
    You may post this question in Linux forums or give a try to the solution in [this link|http://vim.wikia.com/wiki/Auto_copy_the_mouse_selection], haven't tried though.
    Sireesha

  • How to display a long text with several in multiple lines in template cell

    Hi,
       here i have one string such as 'Power MOS_TestTestTest'. But it will display in the template cell as
       'Power
       MOS_TestTestTest'.
       And what i want is 'Power MOS_TestTes
                                   tTest'.
      How to achieve this ? ths

    Hi,
    If the Width of the Templete in not sufficient to display whole text then from the next word it is dislpayed in the next line. As in your case ..
    'Power
    MOS_TestTestTest'.
    If you want to have this like
    'Power MOS_TestTes
    tTest'.
    You need to write the logic to split the string as per your rquirement and print them.

  • Write one line of numbers to a text-file or write multiple lines each iteration?

    Hi,
    I'm currently working on an application that has a few different while-loops running at the same time. One loop acquires the data (DAQloop), another shows the data (raw and processed data) on graphs (Graphsloop) and yet another stores the data in an open ascii text file (Storageloop).
    The data is passed on from the DAQloop to the Storageloop through a queue. At this moment I let the Storageloop take up the first element of the queue (the oldest) to store it in the textfile each iteration. I was wondering however whether it would be better to let the Storageloop take up all the elements currently available in the queue to store it in one go.
    Does anybody have any ideas on this? Which would be better performancewise? The textfile is already opened and is just passed on as a refnum.
    Thx!
    Giovanni Vleminckx
    Using LabVIEW 8.5 on Windows7
    Solved!
    Go to Solution.

    With the normal LabVIEW file primitives, you will get your best disk speed when you write about 65,000 bytes to disk at once (or read, for that matter).  When I write similar code, I include a string buffer in the write loop.  Every time I get write data, I add it to the string.  When the string hits 65,000 bytes, I write to disk.  You could break this into three loops, as well - a read, buffer, and write.  Depending upon you current chunk size, you could see over an order of magnitude change in disk write speed.  This write operation is often throttled by the conversion from binary to ASCII, not the disk I/O.  If you do this, be careful with your buffer.  You can get some serious slowdowns depending upon how you implement it.  This post has some details and examples.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How to copy the line item description to other same line items - FBL5N

    Hi All,
    I have an issue while printing the description in the script.In the final internal table there are multiple same line items but the description is comming for the only one line item but my requirement is i want to copy the description text(bseg-sgtxt) to the other same line items also. I trying to use the control break statements but i am not getting the solution.
    can any one please provide me the solution.
    FYI.. please find the attched text doc..in the document the first four lineitems are same but description is comming for only one line item. I want to display the description to all the same line items.
    Thanks in advance.
    Regards,
    koushik

    Hi Bharat,
    Can u just attach the code where populating the internal table with description.
    Regards,
    Shashikanth

  • I did a COPY of some text from a web page, and then did a PASTE into notepad.exe (Windows). The text from each line was duplicated -- on the line! Instead of "Fred", it became "Fred Fred".

    I just recently installed Firefox for the first time. It seems nice and quick. The version is reported as: "10.0.1".
    I wanted to save some text from a web page, so navigated to that page, selected the text, and pressed the Control-C combination to COPY the selected text to the buffer. For example, the text I selected looked something like this:
    Harry
    Ron
    Hermione
    Hagrid
    Albus
    NOTE: Each line of text has a small icon to the left of the text.
    It is not reasonable to COPY and PASTE each line individually, as there can be hundreds of lines of data. I recall, however, that
    doing a COPY and PASTE on this data into Microsoft's Excel will produce cells which have the icons included in the cell, but unfortunately one cannot can't get rid of them! At least I've never found a way to remove them, but that's another issue. :)
    Once I'd done the COPY operation I switched to a Notepad window and did a PASTE operation. To my surprise, the text from each line was duplicated. It looked like this:
    Harry Harry
    Ron Ron
    Hermione Hermione
    Hagrid Hagrid
    Albus Albus
    Thinking that there might be something unusual about the web page I looked at the source, but it appeared "normal" -- that is, as expected.
    Note: I have done this operation several times before, and have never seen this occur before.
    Note: In the actual data some of the lines have quoted text in them. Curiously there is weird behavior on these lines. In some cases the entire line is shown only once. (These occur at the top of the line, and the quoted text is at the beginning of the name.)
    When quoted text appears "later" in the name, in some cases the quoted text is duplicated, and in other cases the quoted text is missing altogether! I have also noticed an error with the quoted text, and so will be reporting that to the web site which generates the HTML.
    Note that each line of "text" is "anchor text", so if I click on a name the browser navigates to a page for that name.
    I believe that the problem is that the COPY operating in Firefox is not simply copying the visible text, but also the ALT=
    Below is a sample of what the source HTML looks like:
    &lt;a class="lnk" target="_blank" href="http://details.aspx?id=Harry">
    &lt;img width="16" height="16" alt="Harry" class="tb_icon" src="http://.../Harry.gif"/>
    &lt;span>Harry&lt;/span>&lt;/a>
    <br/>
    (Because of the true length of the lines in the source HTML, I have stripped out the actual URL of the site.)
    To make sure I wasn't imaging this difference I repeated the process within Internet Explorer. In that browser I did not get duplicated data.

    Try:
    *Extended Copy Menu (fix version): https://addons.mozilla.org/firefox/addon/extended-copy-menu-fix-vers/

  • Copy of header text to Line item text in MIRO transaction

    Hello Friends,
    I have a requirement where i need to copy the header text ( BSEG-SGTXT) to item text ( EKPO-TXZ01 i.e PO text) during MIRO creation.
    Is there any user exit or BADI .OR is there any other method for doing the same .
    Thanks and Regards !
    Ashish

    Dear,
    Go to se37 MRM_FINAL_CHECK.--display
    then click on that enhance source button ( shift+f4) then go to edit--enhancement operation ---show implicit enhancement option   this is how you can find out the eh=nhancementts .
    Cheers
    fareed

Maybe you are looking for