Problem in modifying the code using work area concept

Hi,
I am working on a code in which i am on the code in which i am using the modify statement but it is not giving the right output.
here's d code:-
LOOP AT T_ITPO5 INTO W_ITPO5.
        LOOP AT T_ITPO4 INTO W_ITPO4 WHERE AUFNR = W_ITPO5-AUFNR.
       LOOP AT T_ITPO4 INTO W_ITPO4 FROM WV_INDEX.
         IF W_ITPO4-AUFNR EQ W_ITPO5-AUFNR.
         IF ITPO4-NTGEW <> 0 .
            CALL FUNCTION 'ZGET_ITEM_WEIGHT'
              EXPORTING
                P_BUID   = W_ITPO4-WERKS
                P_ITEMID = W_ITPO4-MATNR
                P_QTY    = 1
                P_UOM    = W_ITPO4-MEINS
                P_UOM1   = 'KG'
              IMPORTING
                P_RETVAL = W_ITPO4-WTKG.
            TOTWT1 = W_ITPO4-WTKG * W_ITPO4-MENGE.
         IF W_ITPO4-BWART = '261'.
          W_ITPO5-I_QTY = W_ITPO5-I_QTY + TOTWT1.
         ELSEIF W_ITPO4-BWART = '101' OR W_ITPO4-BWART = '531'.
          W_ITPO5-I_QTY = W_ITPO5-I_QTY - TOTWT1.
         ENDIF.
       ENDLOOP.
         MODIFY T_ITPO5 INDEX SY-TABIX FROM W_ITPO5.
       MODIFY T_ITPO5 FROM W_ITPO5 TRANSPORTING AUFNR.
   ENDLOOP.
     WRITE: / 'PRD.NO       ITEM DESCRIPTION                               WIP(KGS)'.
    ULINE.
    LOOP AT T_ITPO5 INTO W_ITPO5.
      READ TABLE T_ITPO1 INTO W_ITPO1 WITH KEY AUFNR = W_ITPO5-AUFNR.
      SELECT SINGLE MAKTG FROM MAKT INTO W_ITPO5-ITEMDESC WHERE MATNR = W_ITPO1-MATNR.
      if sy-subrc = 0 .
      WRITE: / W_ITPO5-AUFNR,W_ITPO5-ITEMDESC,W_ITPO5-I_QTY.
      TOT_QTY = TOT_QTY + W_ITPO5-I_QTY.
      else.
      write 'Unsuccessful'.
      endif.
    ENDLOOP.
    ULINE.
    FORMAT COLOR 3.
    WRITE: / 'GTOTAL',55 TOT_QTY.
    FORMAT COLOR OFF.
plzz provide me guidelines to solve this problem.

here's d code;-
TYPES: BEGIN OF ITPO1,
       AUFNR TYPE AFPO-AUFNR,      "Order Number
       PSMNG TYPE AFPO-PSMNG,      "Order item quantity
       WEMNG TYPE AFPO-WEMNG,      "Quantity of goods received for the order item
       DWERK TYPE AFPO-DWERK,      "Plant
       MATNR LIKE AFPO-MATNR,      "Item Id
       END OF ITPO1.
DECLARATION FOR AUFM TABLE
TYPES: BEGIN OF ITPO4,
       AUFNR TYPE AUFM-AUFNR,      "Order Number
       BWART TYPE AUFM-BWART,      "Movement Type (Inventory Management)
       MENGE TYPE AUFM-MENGE,      "Quantity
       MEINS TYPE AUFM-MEINS,      "Base Unit of Measure
       BLDAT TYPE AUFM-BLDAT,      "Document Date in Document
       WERKS TYPE AUFM-WERKS,      "Plant
       MATNR TYPE AUFM-MATNR,      "Material Number
       NTGEW TYPE MARA-NTGEW,      "Net Weight
       WTKG  TYPE MARA-NTGEW,
       END OF ITPO4,
       BEGIN OF ITPO5 ,
       AUFNR TYPE AUFM-AUFNR,
       MENGE TYPE AUFM-MENGE,
       I_QTY TYPE AUFM-MENGE,
       ITEMDESC LIKE MAKT-MAKTG,
       END OF ITPO5.
    WORK AREA AND INTERNAL TABLE DECLARATION
DATA : W_ITPO1 TYPE ITPO1,
       W_ITPO4 TYPE ITPO4,
       W_ITPO5 TYPE ITPO5,
       T_ITPO1 TYPE ITPO1 OCCURS 0,
       T_ITPO4 TYPE ITPO4 OCCURS 0,
       T_ITPO5 TYPE ITPO5 OCCURS 0.
VARIABLES
DATA: TOTWT1 LIKE AUFM-MENGE,
      TOT_QTY LIKE AUFM-MENGE.
PARAMETERS N SELECT-OPTIONS
PARAMETERS: PLANT LIKE AFPO-DWERK.
SELECT-OPTIONS: PO_DATE FOR AFKO-GSTRP.
    LOOP AT T_ITPO5 INTO W_ITPO5.
        LOOP AT T_ITPO4 INTO W_ITPO4 WHERE AUFNR = W_ITPO5-AUFNR.
            CALL FUNCTION 'ZGET_ITEM_WEIGHT'
              EXPORTING
                P_BUID   = W_ITPO4-WERKS
                P_ITEMID = W_ITPO4-MATNR
                P_QTY    = 1
                P_UOM    = W_ITPO4-MEINS
                P_UOM1   = 'KG'
              IMPORTING
                P_RETVAL = W_ITPO4-WTKG.
            TOTWT1 = W_ITPO4-WTKG * W_ITPO4-MENGE.
         IF W_ITPO4-BWART = '261'.
          W_ITPO5-I_QTY = W_ITPO5-I_QTY + TOTWT1.
         ELSEIF W_ITPO4-BWART = '101' OR W_ITPO4-BWART = '531'.
          W_ITPO5-I_QTY = W_ITPO5-I_QTY - TOTWT1.
         ENDIF.
       ENDLOOP.
         MODIFY T_ITPO5 INDEX SY-TABIX FROM W_ITPO5.
       MODIFY T_ITPO5 FROM W_ITPO5 TRANSPORTING AUFNR.
   ENDLOOP.
     WRITE: / 'PRD.NO       ITEM DESCRIPTION                               WIP(KGS)'.
    ULINE.
    LOOP AT T_ITPO5 INTO W_ITPO5.
      READ TABLE T_ITPO1 INTO W_ITPO1 WITH KEY AUFNR = W_ITPO5-AUFNR.
      SELECT SINGLE MAKTG FROM MAKT INTO W_ITPO5-ITEMDESC WHERE MATNR = W_ITPO1-MATNR.
      if sy-subrc = 0 .
      WRITE: / W_ITPO5-AUFNR,W_ITPO5-ITEMDESC,W_ITPO5-I_QTY.
      TOT_QTY = TOT_QTY + W_ITPO5-I_QTY.
      else.
      write 'Unsuccessful'.
      endif.
    ENDLOOP.
    ULINE.
    FORMAT COLOR 3.
    WRITE: / 'GTOTAL',55 TOT_QTY.
    FORMAT COLOR OFF.
I want to have output that the production order is displayed along with the deficit quantity. but using this concept it shows only production order no. and qty 0.

Similar Messages

  • Any problem if we use Business area concept other than Profit Centr

    Hi,
    what are the problems and difficulties if we use Business area concept other than Profit Center.
    Kindly give me brief deatils,,,will assign points
    thanks
    Sap Guru
    kischowdary*gmail.com

    Hi:
    Business area will not be supported by SAP in the future
    The problem of splitting of account balance is more pertinent in case of tax accounts.
    In month end procedures, there are big problem in reconciliation.
    Not Efficient  in Reporting.
    SAP Recommends Profit Center Accounting instead of Business area
    Please let me know if you need more information.
    Assign points if useful.
    Regards
    MSReddy

  • Flash Builder doesn't rebuild the project everytime I modify the code

    Hi,
    Flash Builder doesn't rebuild the project everytime I modify the code.
    I find myself chasing ghosts when trying to debug my project. Flash Builder 4.0 doesn't rebuild my project after every change I make.
    The "Project - Build Automatically" is of course selected. To make sure the problem is real I ran "Project - Build All" several times. Nothing helped.
    For example, I am using a boolean constant to select different code in an if block. Even if I change the value of the boolean, When I debug the code, I see that the constant's value doesn't change. Only If I log out login again, FB will rebuild my code.
    This happens too many times and it is very confusing to debug, when you don't know if the result now is with or without your changes.
    It also affects the following:
    - breakpoints that are set or disabled are not taken into account and the debugger will skip them even if they are set or stop on them if they are disabled.
    - the debugger stops the debug on empty lines, if those lines previously contained code.
    - When I comment out the declaration of variables. Eclipse doesn't recognize them and doesn't show any hint on them when you hold the CTRL key and hover over, but while in debug mode, when you hover over the variable instance, its shows a value for it.
    Thanks for your help.
    Bye,
    RaamEE-IL

    The problem is with the SDK settings selected for the Compiler.
    Try going to 'Project' > 'Properties' > 'ActionScript Compiler'.
    Now, in the 'Flex SDK section', try changing the SDK. Click on 'Apply'.
    This will force FB to rebuild all settings for the project.
    You can try again. FB should now have started compiling with latest code changes again.
    Please Note: This is not a permanent fix though!
    In case the problem re-occurs, you'll need to again perform the steps mentioned above to get FB back on track.

  • Debugging a smartform without modifying the code ?

    Hi all, please forgive my noobyness but it's the first time I'm working on smartforms...
    Basically; I have a smartform that prints out a pdf showing all the entries of a purchase order, but there's a thing that I have to correct... The price amount for position is not correct, because it doesn't contains an extra amount, let's call this quantity "limit", that is a specific property of each row in the order.
    Problem: I'm not that good to find in the code the exact point in which the price for a row is calculated, or better.... I thought I found it, did a little correction but without success.
    I'd like to debug exactly the pieces of code that are in the smartform, how to do it without modifying the code ? I've read something about hardcoding a break-point but I won't insert new code because I'm working on a pre-production machine and porting a CR is not as easy. Is there any way to debug without doing a mod on the code? Thanks in advance.

    Hi Matteo,
    it's quite simple.
    Found the Fm name of the SMARTFORM (Menu Utilities-> F.M. Name) (Something like
    /1BCDWB/SF00000015).
    Then go in SE37 transaction and put the FM founded and then display it.
    Go in the main info of the FM (tab. Propierties) and the double click on the main program.
    Then double click on the include that ends with *F01. There you will find all the code of your SF. Then you can put a breakpoint the piece of code that you want.
    This should be works.
    Let us know
    Bye
    Andrea

  • Implementing /modifying photoswipe code to work in Edge

    Hey all,
    I am trying to implement photoswipe (http://www.photoswipe.com/) into Edge, specifically linking it into a div, so that I can have pinch/zoom control over images within the div.  The problem I have is that I'm not JQuery savvy, so I just can't work out how to modify the code so that it works within Edge.  I've loaded the external JS files via yepnope, but I can't work out how to modify the code so that it targets a div created in edge, rather than the array it currently is trying to target?
    The code I found within one of the example html's is:
    (function(window, Util, PhotoSwipe){
                                  Util.Events.domReady(function(e){
                                            var instance;
                                            instance = PhotoSwipe.attach(
                                                                { url: 'images/full/001.jpg', caption: 'Image 001'},
                                                                { url: 'images/full/002.jpg', caption: 'Image 002'},
                                                                { url: 'images/full/003.jpg', caption: 'Image 003'},
                                                                { url: 'images/full/004.jpg', caption: 'Image 004'},
                                                                { url: 'images/full/005.jpg', caption: 'Image 005'},
                                                                { url: 'images/full/006.jpg', caption: 'Image 006'},
                                                                { url: 'images/full/007.jpg', caption: 'Image 007'},
                                                                { url: 'images/full/008.jpg', caption: 'Image 008'},
                                                                { url: 'images/full/009.jpg', caption: 'Image 009'},
                                                                { url: 'images/full/009.jpg', caption: 'Image 009'},
                                                                { url: 'images/full/010.jpg', caption: 'Image 010'},
                                                                { url: 'images/full/011.jpg', caption: 'Image 011'},
                                                                { url: 'images/full/012.jpg', caption: 'Image 012'},
                                                                { url: 'images/full/013.jpg', caption: 'Image 013'},
                                                                { url: 'images/full/014.jpg', caption: 'Image 014'},
                                                                { url: 'images/full/015.jpg', caption: 'Image 015'},
                                                                { url: 'images/full/016.jpg', caption: 'Image 016'},
                                                                { url: 'images/full/017.jpg', caption: 'Image 017'},
                                                                { url: 'images/full/018.jpg', caption: 'Image 018'}
                                                                target: window.document.querySelectorAll('#PhotoSwipeTarget')[0],
                                                                preventHide: true,
                                                                getImageSource: function(obj){
                                                                          return obj.url;
                                                                getImageCaption: function(obj){
                                                                          return obj.caption;
                                            instance.show(0);
                        }(window, window.Code.Util, window.Code.PhotoSwipe));
    I tried adding that into the yepnope init function, and modifying the "target" to pic up the div name, but it aint working.
    Anyone know what to do/change so that it functions the way I want it to?
    huge thanks to anyone who can offer some help
    R

    Hey Russ, can you post your work in progress files? This will make it easier for one of the friendly forum folk to help you out.

  • HT2729 I'm trying to download Ironman3 from digital copy plus. It say itunes is a provider, but the code doesnt work in the store. How do I download this movie?

    I'm trying to download Ironman3 from digital copy plus. It say itunes is a provider, but the code doesnt work in the store. How do I download this movie?

    Hello Jor_El,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Transferring or downloading an iTunes Digital Copy
    http://support.apple.com/kb/HT1539
    Open iTunes 9 or later.
    On the left side of the iTunes, click iTunes Store.
    In the upper-right corner of the iTunes Store window, click the Sign In button. If you are already signed in, skip to step 5.
    Sign in to the iTunes Store using your Apple ID.
    In the QUICK LINKS window in the right column of the iTunes Store, click Redeem.
    In the resulting screen, enter the 12-digit code printed on the insert included with your DVD or Blu Ray disc. Then, click Redeem.
    Best of luck,
    Mario

  • I have just updated to Yosemite, but now I can't get the custom shortkeys to work. In Mavericks I had no problem whatsoever, but now even after googeling and restart no solution. Does anyone have the problem? All the other shortcuts work!

    I have just updated to Yosemite, but now I can't get the custom short-keys to work.
    In Mavericks I had no problem whatsoever, but now even after googeling and restart no solution.
    Does anyone have the problem? All the other shortcuts work!

    Hi Thomas,
    I can confirm the problem you are hitting. The XML test trace does not get recognized at all, and it defaults to Eclipse's basic Open File behaviour. I am not sure if it's because the format definition is missing, or if it's because something prevents the trace type from being recognized. I will open a bug about it.
    Thanks for identifying this issue!
    In the meantime, if you'd like to experiment with XML analyses, you can also take a look at the example at https://github.com/tracecompass/xml-analysis-example .
    Cheers,
    Alex

  • ALV Report: How to pass the variable in Work area to the FM ? Please help !

    I want to pass the field in the work area which contains the floating point numbers to FM 'FLTP_CHAR_CONVERSION_FROM_SI'. This the correct FM, I have tested.
    If I specify the field with Tab name in FM , It says its not an internal table with header line.
    Please help me, How should can I proceed further and pass the field to FM and get it back in work area.
    And an other issue is I want to sum the particular field in the output.
    Is there a way to do using 'PF-STATUS', if so how ? or what is the alternative for this ?
    Please help me with my issues.
    I'm new to ALV reports.
    Thanks in Advance !

    Hi,
    For your FM issue, i think you are trying to pass the field in the FM as ITAB-field, while you should be taking the data in the work area first and then pass this work area in the FM as WA_ITAB-field.
    I hope this will resolve your prob.
    I mean loop at the table and take the values into work area, update the internal table with changed value. This way by the end of loop you will have all your fields converted.
    Please explain a little more about your second doubt, it is unclear(to me atleast).
    Edited by: DeepakNagar on Jul 28, 2011 6:08 PM

  • Problem to modify the field "location" in an AP on WCS

    Hello everybody,
    I have a problem to modify the field "location" in an access point on WCS.
    In fact, when i try to modify this field and then apply the modification, i have this error message :
    "Error(s): You must correct the following error(s) before proceeding:
    Error:Global Username and Password are not configured on the associated controller.  Please configure username and password on the associated controller before disabling 'Override Global Username Password'."
    I made the modification on Chrome and Firefox but I always have the error message.
    Nevertheless, i don't have this error message with other access points and other access points are configured without the option "Override Global Username Password".
    I'm obliged to make the modification directly in the controller and not in WCS.
    The problem is that i want to make the modification directly in WCS.
    Could you help me please ?
    Thank you in advance.

    When i make the modification directly in WCS, i have no problem, it syncs good.
    The version of WCS is 7.0.230.0.
    The version of the controller is 7.0.240.0 and the field recovery image version is 7.0.112.21.
    Version
    7.0.230.0
    Version
    7.0.230.0
    Version
    7.0.230.0

  • Issues with processing messages on one receive port causes problems on all the receive ports that are on the same handler

    Greetings,
    An integrator installed biztalk in our environment to process the hl7 message flow between their source application(s) and several receiving applications. We've had problems with this set-up for a while now because some receiving applications sometimes have
    problems processing the messages. Be it either because there's problems with the server that processes the messages of a certain port or because there's problems with the software/daemon/service that needs to process these messages.
    The main problem with this, is that the receiving end of this isn't under our control nor under control of the integrator, but when one receive port isn't processing their messages for a while it causes a problem with all the receive ports that are on the
    same handler. So other receive ports start noticing a slow-down of their incoming messages until after a while nothing gets through anymore.
    What is the best practice to prevent these kind of problems? Should we just create a handler for every receive port? Because that seems a bit overkill.
    Thanks in advance.

    What do you mean exactly with this question?
    "Can you provide some more detail like BizTalk the receiver? "
    The adapters are mainly file and MLLP, the MLLP adapters are already seperated from the file adapters (a handler for MLLP and a handler for file).
    The problem with all the receive ports is that when one receive port isn't processing its messages (usually caused by the software processing the messages) the other receive ports on the same handler receive their messages/files a lot slower. If for any
    reason the problem isn't fixed soon, the other receive ports on the same handler actually stop receiving any messages at all.
    Isolating the receive port that causes the problems like la Cour suggested can work, but next time it might be another port that experiences this issue. So we are looking for a way to make sure the whole message flow isn't hindered by one port (whichever
    port) that can't process its messages. Or rather by one receiving software that can't process its messages.

  • Alv -change the output without modify the code

    hi...............
    how can we  change the alv output without modifying the code .
    plz help me.

    hi satya vani ,
    use this code..after execution choose the button(ctrl+f8) then you can give the position and length of the output field..
    then it will automatically changed...
    report .
    TABLES:LFA1.
    SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    REGIO LIKE LFA1-REGIO,
    SORTL LIKE LFA1-SORTL,
    CFIELD(4) TYPE C,
    END OF ITAB.
    DATA:LINE TYPE I.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
    IN LIFNR.
    DESCRIBE TABLE ITAB LINES LINE.
    LOOP AT ITAB.
    IF SY-TABIX = LINE.
    ITAB-CFIELD = 'C410'.
    MODIFY ITAB.
    ENDIF.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-WINDOW_TITLEBAR = 'VENDORS DETAILS SCREEN'.
    LAYOUT-EDIT = 'X'.
    LAYOUT-info_fieldname = 'CFIELD'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    regards,
    venkat.

  • How do I change the phone number attached to my Icloud? All the codes and stuff are being sent to my old number.

    How do I change the phone number attached to my Icloud? All the codes and stuff are being sent to my old number.

    Hello Babyygrl23,
    Welcome to the Apple Support Communities!
    It sounds like your iCloud Apple ID has a phone number associated with it that you would like to update. If this is the case, after signing in to the linked website below, you will see a section on the left side of the screen labeled Phone Numbers. You can edit the phone number associated with that account from there. 
    Apple - My Apple ID
    Cheers,
    Joe

  • I have Lookout 6.5 running with Windows 7, the process has been running for about 2 months with no problems, but today the Citadel stopped working! I am having a hard time getting it started again, need help!

    I have Lookout 6.5 running with Windows 7, the process has been running for about 2 months with no problems, but today the Citadel stopped working!
    How could this have happened and what can I do to get it running again? 

    Didnt realize there was a response, late getting back to you.
    Save your process files outside of the NI progam directory (you should have external backups already right ).  THey should not be deleted.
    Any customizations to the lookout.ini and lookout.sec file may be lost.  
    Mike
    Forshock - Consult.Develop.Solve.

  • MODIFY THE code TO initialize this parameter

    Hi,I have created one procedure,which takes input as a array,for that I have defined number of varrays for holding values,but while testing the procedure i m getting some error like MODIFY THE code TO initialize this parameter.
    can somebody help me

    If it is common error no - then people can easily predit what went wrong in Oracle. I don't think - this is a very common error like 1403. So, it is mi view is that without checking the code - it is very difficult to say - what went wrong here.
    Regards.
    Satyaki De.

  • Error while running the code using jvm but its working fine with eclipse3.0

    Hi Everyone,
    I have a problem while building xml document.
    I have developed my java files using IBM Eclipse 3.0 and i had no problem while executing the files.
    But while i am trying to execute the same code in jdk/bin, xml document is not working..
    No error encountered while compiling but while executing when i try to print the xml string it just gives the root element name like [root : null]
    Can anyone suggest some solution?Its urgent please....

    since i didnt get any reply when i posted it at http://forum.java.sun.com/thread.jspa?threadID=723865
    i have posted my pbm in the forum.
    Anyways i never got a reply back for neither of my posts.

Maybe you are looking for

  • Is there a way to create a PRIVATE folder for some of my audiobooks?

    Hello, This might sound cheesy, but I would like to keep some of the audiobooks in my iTunes private and I'm wondering if there's a way of doing it? For example, can I create a second Audiobooks folder and keep there? Is there a way to make that fold

  • Embed fonts not available error (But they are available sysetm fonts)

    Hello! I tried to search and actually did found some answers regarding font problems, but they did not help. So I am explaining here my problem in hope that someone can help me. My company bought a HP Xeon X3450 @ 2.8Ghz. @Gb RAM DD3 1333 with Window

  • Printer Profiles Not Visible in LR4 Mac

    Hey guys, just checking to see if there is something I'm missing. Short version: My printer profiles are not showing up in the "choose profile" dialog in LR4. Long versioin: I'm trying to print an image from LR4 to my Xerox Phaser 8560 using a custom

  • Report Question - Multiple CSQ - Single Avg Queue Time?

    Multiple CSQ - Single Avg Queue Time? I haave multiple CSQs, and I'm able to get certain data like Service Level averaged for all of them becuase I can get the data from reports, but not so for Average QueueTime (time to answer) - anyone have ideas o

  • Effects Scroll motion

    Hi all; I am missing the Scroll Motion tab under the Effecrs button. I have installed Muse CC, no upgrades available, so its not that. Any ideas? Thanks Maarten