Problem in fetching the code for the line item

Hi,
I am working on a report in which to display the values corresponding to the line item of a PO.
For, ex, if there are 3 line items 10,140,150 and their condition values such zing,zgrd,zbrd are the condition types consist of different values depending on the line item i.e. 10,140,150.
My problem is when i execute the code the data of 1st line item is correctly fetched but the rest 2 line item data is pasted as it is. only the main pricre changes and the code for zing,zbrd,zgrd remains same as it is in the first line item 10.
plzz proivde me guide lines how to solve this problem.
Here's d code:-
DATA : vspl LIKE konv-kbetr.
DATA : vspl1 LIKE konv-kbetr.
DATA : vkwert LIKE konv-kwert.
DATA: VSPL2 LIKE KONV-kbetr.    "ZING COST
DATA: VSPL3 LIKE KONV-kbetr.    "ZGRD COST
DATA: VSPL4 LIKE KONV-kbetr.    "ZBDL COST
LOOP AT item.
    SELECT kbetr FROM konv INTO item-rate  WHERE knumv = header-knumv AND kposn = item-ebelp
     AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
      MODIFY item.
   ENDSELECT.
  ENDLOOP.
  LOOP AT item.
    SELECT kwert FROM konv INTO vkwert  WHERE knumv = header-knumv AND kposn = item-ebelp
    AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
    ENDSELECT.
  ENDLOOP.
CLEAR : vspl , vspl1 , vspl2 , vspl3 , vspl4.
  LOOP AT item.
    SELECT kbetr FROM konv INTO vspl  WHERE knumv = header-knumv AND kposn = item-ebelp  
   AND  kschl = 'ZCOM'.
    ENDSELECT.
    SELECT kbetr FROM konv INTO vspl1 WHERE knumv = header-knumv AND kposn = item-ebelp
    AND  kschl = 'ZBR1'.
    ENDSELECT.
*******************Begin - new code added on 14.01.2009******************
    SELECT kbetr FROM konv INTO vspl2 WHERE knumv = header-knumv AND kposn = item-ebelp
    AND  kschl = 'ZING'.
    ENDSELECT.
   SELECT kbetr FROM konv INTO vspl3 WHERE knumv = header-knumv AND kposn = item-ebelp
   AND  kschl = 'ZGRD'.
    ENDSELECT.
   SELECT kbetr FROM konv INTO vspl4 WHERE knumv = header-knumv AND kposn = item-ebelp
   AND  kschl = 'ZBRL'.
   ENDSELECT.
*******************End - new code added on 14.01.2009******************
  ENDLOOP.
  LOOP AT item.
    item-rate  = item-rate + vspl + vspl1.
*******************Begin - new code added on 14.01.2009******************
    item-rate1 = item-rate1 + vspl2.
    item-rate2 = item-rate2 + vspl3.
    item-rate3 = item-rate3 + vspl4.
********************End - new code added on 14.01.2009*******************
    MODIFY item INDEX sy-tabix TRANSPORTING rate.
*******************Begin -11`` new code added on 14.01.2009******************
    MODIFY item INDEX sy-tabix TRANSPORTING rate1.
    MODIFY item INDEX sy-tabix TRANSPORTING rate2.
    MODIFY item INDEX sy-tabix TRANSPORTING rate3.
*********************End - new code added on 14.01.2009******************
  ENDLOOP.
PLZ PROIVDE ME GUIDLINES HOW TO SOLVE THIS PROBLEM .
Edited by: ricx .s on Jan 19, 2009 10:16 AM
Edited by: Vijay Babu Dudla on Jan 19, 2009 5:22 AM

Hello,
Why are you looping at the same internal table so many times, you could probably perform everything within one loop instead.
DATA : vspl LIKE konv-kbetr.
DATA : vspl1 LIKE konv-kbetr.
DATA : vkwert LIKE konv-kwert.
DATA: VSPL2 LIKE KONV-kbetr. "ZING COST
DATA: VSPL3 LIKE KONV-kbetr. "ZGRD COST
DATA: VSPL4 LIKE KONV-kbetr. "ZBDL COST
field-symbols <fs>.
LOOP AT item assigning <fs>.
SELECT kbetr FROM konv INTO <fs>-rate WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
MODIFY item.
ENDSELECT.
SELECT kwert FROM konv INTO vkwert WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
ENDSELECT.
ENDLOOP.
CLEAR : vspl , vspl1 , vspl2 , vspl3 , vspl4.
SELECT kbetr FROM konv INTO vspl WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZCOM'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl1 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZBR1'.
ENDSELECT.
*******************Begin - new code added on 14.01.2009******************
SELECT kbetr FROM konv INTO vspl2 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZING'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl3 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZGRD'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl4 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZBRL'.
ENDSELECT.
*******************End - new code added on 14.01.2009******************
<fs>-rate = <fs>-rate + vspl + vspl1.
*******************Begin - new code added on 14.01.2009******************
<fs>-rate1 = item-rate1 + vspl2.
<fs>-rate2 = item-rate2 + vspl3.
<fs>-rate3 = item-rate3 + vspl4.
ENDLOOP.
Also, use field-symbols and use loop at itab assigning addition so that you can directly change the contents of the table without using modify statment.
regards,
Advait

Similar Messages

  • Has anyone one else had problems redeeming the code for the free onetime download of Star Trek 2009 Movie?

    Has anyone one else had problems redeeming the code for the free onetime download of the Star Trek 2009 Movie?

    dawnfromcabot wrote:
    ITUNES HAS CHARGED MY DEBIT CARD $99.99 FOR GLOBAL WAR RIOT-SOME GAME I DID NOT KNOW WAS LOADED ON MY OTHER PHONE; HOWEVER, WHEN I PULLED UP THIS APP TO SEE EXACTLY WHAT IT WAS WAS I SURPRISED TO SEE I COULD DOWNLOAD IT FOR 'FREE'. I HAVE CONTACTED ITUNES THROUGH THIS REDICULOUSLY CHICKEN SH_T SYSTEM THEY USE SO THEY DO NOT ACTUALLY HAVE TO HEAR HOW UPSET A PERSON IS NOW THAT THEY CANNOT BUY FOOD FOR THEIR CHILDREN BECAUSE OF A MISTAKE MADE ON ITUNES PART.  I DID RECEIVE AN EMAILED RESPONSE FROM STEPHANIE WHO ADVISED THIS WAS PUCHARED ON A PHONE THAT HAS PURCHASED DOWNLOADS IN THE PAST. I WONDER IF SHE THOUGHT TO LOOK AT MY ENTIRE DOWNLOAD HISTORY AND DISCOVER THAT NOTHING HAS EVER BEEN PURCHASED ON MY ITUNE ACCOUNT IN THE AMOUNT REMOTELY CLOSE TO WHAT THEY ARE CHARGING ME NOW.  THAT IS BECAUSE I DO TRY TO MONITOR THIS ACCOUNT AND OBVIOUSLY THIS LAST PURCHASE WAS DONE WITHOUT MY KNOWLEDGE UNTIL I CHECKED MY ONLINE BANKING ACCOUNT, WHICH I DO EVERY DAY.  TO MAKE MATTERS WORSE THE APP STATES IT IS FREE TO INSTALL WHEN YOU PULL IT UP SO NO ONE HAS CLARIFIED TO MY WHERE THE $99.99 COMES INTO PLAY.  I WILL NOT DROP THIS UNTIL MY BACK ACCOUNT HAS BEEN PROPERERLY CREDITED IN THE SAME TIME FRAME IT TOOK YOU TO TAKE MY MONEY. I WILL LAUNCH A COMPLAINT WITH EVERY POSSIBLE ENTITY IN THE ITUNES COMPANY AND BUSINESSES OUTSIDE THAT REGULATE THEIR BUSINESS UNTIL THIS HAS RESOLVED IN MY FAVOR AS I AM THE ONE WHO HAS BEEN VICTIMIZED BY A COMPANY I INVITED INTO MY TELEPHONE NETWORK IN GOOD FAITH!!!!!!!!!!!!
    Reading that is giving me a headache, how about normal type.

  • Streamlining the code for the button group with individual links and rollover imgs

    I am looking for a solution to streamline the code for the array of 20+  buttons located inside the scroll pane.
    I know I can make an array if all the buttons would have a unified code executable change, i.e. they would become larger and brighter.
    My problem is that each button represents an product image in the lights off stage, then of rollover it is a lights on stage so I have to import two images in the on and off stage and play around with the opacity.
    Additional problem is that each button has to ling to a different label.
    My question is: is it possible to unify the code if buttons have that much individuality or I have to make each one of them as in the example below.
    // makes a hand cursor appear over a mc acting as a button for all the buttons inside the scrollpnaeBckgrnd_mc.scrollpaneBckgrnd_btns_mc.
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.buttonMode = true;
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.useHandCursor = true;
    ///////////////INDIVIDUAL BUTTONS
              MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte _btn.FloraLyte_ON.alpha = 0;
                        var  FloraLyte_btn_Tween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLyte_btn.FloraLyte_ON, .5, {alpha:1, paused:true});
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler_FloraLyte_btn);
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler_FloraLyte_btn);
            MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte_btn. addEventListener(MouseEvent.CLICK, onClick_floralytePopUp);
                      function onClick_floralytePopUp(event:MouseEvent) :void {
                                            gotoAndPlay("floralytepp");
    function overHandler_FloraLyte_btn(e:MouseEvent):void{
             FloraLyte_btn_Tween.play();
             trace("you rolled over me");
    function outHandler_FloraLyte_btn(e:MouseEvent):void{
             FloraLyte_btn_Tween.reverse();
             trace("you rolled off me");
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_btn .FloraLytell_ON.alpha = 0;
                        var  myTween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLytell_btn.FloraLytell_ON, .5, {alpha:1, paused:true});
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler);
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler);
            MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_bt n.addEventListener(MouseEvent.CLICK, onClick_floralytellPopUp);
                      function onClick_floralytellPopUp(event:MouseEvent) :void {
                                            gotoAndPlay("floralyte2pp");
              function overHandler(e:MouseEvent):void{
             myTween.play();
             trace("you rolled over me");
              function outHandler(e:MouseEvent):void{
             myTween.reverse();
             trace("you rolled off me");

    as ned suggested, plan your flow and code into it. here is one example:
    var buttonArray = [someButton, someOtherButton, aDifferentButton];
    for(var i = 0; i < buttonArray.length; i++){
         //get reference to county movieclip
         var mc = buttonArray[i];
         //then add listeners
         mc.addEventListener(MouseEvent.ROLL_OVER, overMe);
    function overMe(e:MouseEvent){
         var mc = e.target;
         switch(mc){
              case: someButton:
                       someOtherButton:   doThis();
                                                     break;
              case: aDifferentButton:     doThat();
                                                     break;
              default:                            //do nothing;
                                                     break;
    function doThis(){
         trace("do this")
    function doThat(){
         trace("do that")

  • I request the code for the exchange of Mac OS X Mountain Lion, on 25 July and still I do not get the validation email, what should I do? :/

    request the code for the exchange of Mac OS X Mountain Lion, on 25 July and still I do not get the validation email, what should I do?
    ANYBODY HELP ME!!

    same problem here.....
    anyone can help?

  • I scratched the label off on a £25 gift card and it removed the code. How can I get the code for the card?

    I scratched the label off on a £25 gift card and it removed the code. How can I get the code for the card?

    Click here and request assistance. Gift cards are usually if not always final sale because it would be easy enough for someone dishonest to abuse returns or replacements of them.
    (58640)

  • Where is the code for the collapse button in the default SAP iview layout?

    I need to eliminate the collapse/restore button displayed on each iView tray. I was looking at the default layout component (com.sap.portal.layouts.default) but I could not find the code for the tray.  The code for "FullWidth.jsp" (this file that implements the "FullWidth" component) is below:
    <%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibHtmlb" prefix="hbj" %>
    <%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>
    <lyt:template>
        <hbj:content id="myContext" >
            <hbj:page title="Portal Page">
                <lyt:container id="column1"  />
            </hbj:page>
        </hbj:content>
    </lyt:template>
    as you can see, there is no reference to the tray tags.
    note: I am familiar with how to create a new iView tray using the new Layout Tag Library (from blog below)
    EFP: Layout Tag Library
    , but I want am not interested in this approach... All I want is to modify the EXISTING tray.

    Hi,
    may be it's helpful for you.
    http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark- textarea-control-in-flex-4/
    Regards
    -Bechar

  • How to add add the code for the MouseEvent.CLICK event

    Could anyone help me who is a beginner please?
    I'd like to know step by step how to do the following
    instruction.
    I am trying to add a link to my flash.
    I drew a shape on the stage, select it and transform it to
    movie clip (hit F8 or right-click on it and select "Convert to
    symbol" from the popup menu or use the main menu: Modify ->
    Convert to symbol). I resized it as the same size as my stage, then
    make it transparent.
    Then I am supposed to do the following in order to create a
    link.
    "add the code for the MouseEvent.CLICK event that would open
    a url using the navigateToURL() function."
    But I just don't know how to. Could anyone tell me step by
    step approach please?
    Thanks in advance.

    Yes, click the frame where you have the button on stage and
    open the actions panel. paste the script in, and make sure whatever
    instance name you gave the button, you plug into the script. Also,
    the function declaration should be like so:
    function callFunction(e:MouseEvent):void{ <-- 'e' can be
    anything you want, it could be 'kfjeiwajfkd' for that
    matter.

  • 500px give to me and redeem 24 code but i can't find the code for the activation of adobe cc

    500px give to me and redeem 24 code but i can't find the code for the activation of adobe cc

    Hi Ntinos,
    Normally you just need to go to https://creative.adobe.com/redeem and sign in with your Adobe ID to activate the code. The address you gave to 500px for registration and payment has to match that of your Adobe ID.
    Hope that helps,
    - Dave

  • How do I obtain the code for the $50.00 reduction for lightroom from Lexar?

    I recently purchased 2 - Lexar 300 16GB Compact Flash cards which included in the box notificationthat I would receive $50.00 off my purchase of Lightroom 3. I am unable to locate the Code.
    Your help appreciated.
    JB
    [email protected]

    Thanks for your reply, but I am not sure where to locate the message page or where, exactly, to send this. I appreciate your help.
    Message
    Oct 23, 2010 6:54 PM
    How do I obtain the code for the $50.00 reduction for lightroom from Lexar?
    I recently purchased 2 - Lexar 300 16GB Compact Flash cards which included in the box notificationthat I would receive $50.00 off my purchase of Lightroom 3. I am unable to locate the Code.
    Your help appreciated.
    JB7000
    [email protected]

  • Where is the code for the  contentBackgroundColor  in the spark textArea

    Where is the code for the  contentBackgroundColor  in the spark textArea, I can't seem to locate it anywhere but you can set the contentBackgroundColor in the <s:TextArea tag

    Hi,
    may be it's helpful for you.
    http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark- textarea-control-in-flex-4/
    Regards
    -Bechar

  • P.O. with different Tax codes for each line item.

    Hi
    I would like to know how the IV has been done for the P.O. with differnt tax codes for each line item. Since in MIRO at header level we can select only one tax code.

    Hi
    Raju,
    It means we can post only one invoice at time i.e.for line item same taxcode is there.
    e.g. If line item 10 has tax code A1, 20 has A2 then on header i can only select either A1 or A2 tax code & post invoice of that line item.

  • How to get the texts for each line item for Sales order in a smartform

    I'm createing a smart form in which i need to display certain texts for each line item of a sales order. How can i get those??
    I'm trying with the table STXH and FM read_text... but i'm not clear how and what i'm getting... can anybody pls help me.....

    Hi There,
    But then i will be getting only the value. i want to link that against the particular material of the Purchase Order.
    Like for ex:
    PO No.  Material Code        Line Item        Basic        Excise       Tax       Inv Value
    0000001 5000251                010               100           16         4.64      120.64
    0000001 5000252                020               200           32         9.28      241.28
    Can u help me on this?
    Regards,
    Jitesh

  • Who has the code for the mpegconverta

    I have adobe premiere pro, I've edited it and want to burn it but it tells me I need an activation code for the MPEGconverta but nobody seems to know it at adobe ?

    I don't think "MPEGconverta" is an Adobe product.
    If you think it is part of Premiere Pro, then please ask in that forum.  This is the Flash Player forum.

  • Fi document: different tax code for each line item

    Dear All,
    Our FI department needs to post FI documents by uploading the list of line items. For each line item (even when they have the same g/l account) tax code may be different from 0 to 10%. Also the tax code needs to be entered in EUR not in %. So for example they may need to post the folowing document:
              PstKey   Account    Amount     Tax amt
    001     21          Vendor       95 EUR     Tax amount 5 EUR
    002     50          GRIR          100 EUR
    003     21          Vendor       90 EUR     Tax amount 10 EUR
    004     50          GRIR          100 EUR
    At the moment users have to post it manually. Tax rate cannot be restricted to allow tax from 0 to 10%.
    Can you please advice what would be the best approach for them to make it? Providing they do want to upload the document not enter the items manually..
    Thanks a lot in advance for your help!

    Hi,
    are there some messages during this process? Upload this list in foreground batch input execution. Verify if in stop point displays any messagem. If it is the case, go to OBA5 to change its status.
    Let me know results.
    regards

  • How to configure Two Tax Codes for single line item in work order

    Hi All,
    Please do Review the below scenario and tell me how to solve it.
    A) Certified Work Done Gross Bill Amt      100,000      
    Total Work Done Value      100,000      
    Less : Labour & Like Charges @ 30 % on Rs 100,000 =  30,000      
    Vat applicable Amount =      70,000      
    Add VAT @12.5%  Chargeable on Taxable Turnover of Rs. 70,000.00     = 8750
    Total Bill Value = 108750
    Service Tax @ 12.36% on 33% Value of Rs. 100000     = 4079
    G.Bill Amt = 112829
    Total Amt Due for Payment = 112829

    HI,  There is a possible solution for this scenario.
    1. Create 2 tax codes for VAT and SERVICE Tax at 12.5% and 12.36% respectively
    2. While posting the Invoice (TRX - FB60) following steps need to be followed.
    3. Amount has to be split into two line items
    4. Ist Line Item should have the Vat amount + 70000/- and select relevant tax code that was
        created for 12.5%
    5. Similarly 2nd Line Item should have Service Tax amount + 30000/- and select relevant tax code that    
        was created for 12.36%.
    Hope this would meet your requirement. If the solution is okay, kindly indicate the points.
    Regards
    K.Sanjai Babu

Maybe you are looking for

  • How do I import an Iphoto Project (book) directly into Aperture 2?

    I have a book that I did as a project in iPhoto '08 that I would like to import directly into Aperture 2 and "redo" the book using Aperture's new features. Although I imported my iPhoto library I don't seem to have this project in Aperture and when I

  • No "Submit to SAP" button, the submit button offered doesn't work

    Hello everyone, I am working with the interactive forms and I have tried going through the PDF about how to use an RFC with the interactive forms.  During the tutorial, they say to add a button called "Submit to SAP", but I don't have one.  I have gr

  • T5-2 ILOM authentication via Active Directory

    Hello, We are trying to leverage AD to authenticate our ILOMs. However I am seeing the following when I set the method to None (server authentication) (ActDir) ServerUserAuth - Error 0, failed to validate user group access We have a group defined and

  • Error during backup process

    Hi, Our system on a daily basis creates a backup of Sql Server 2008 database. It is using "backup database {0} to disk='{1}'" command. It works for years now, but recently a problem occurred. On our system side the following exception is thrown: Syst

  • Illustrator Scripting Indesign Scripting

    Can someone explain why the javascript in Illustrator is so crippled compared to the javascript in Indesign? Example: In Indesign you can connect to http using the Socket, but illustrator does not even have that. There are a number of things like tha