Sitemap

Amicuk Programming Answers

Doubt about the flow...

-0001-11-30   Views:0

Advertisement

HI all i have the following piece of code, please explain me how the logic works..   LOOP AT T_BAL INTO V_H_BALANCES.     MOVE V_H_BALANCES TO V_TEMP_BALANCES.     AT END OF MATNR.       SUM.       MOVE V_H_BALANCES-KSPEM TO V_TEMP_BALANCES-KSPEM.   

HI all
i have the following piece of code, please explain me how the logic works..
  LOOP AT T_BAL INTO V_H_BALANCES.
    MOVE V_H_BALANCES TO V_TEMP_BALANCES.
    AT END OF MATNR.
      SUM.
      MOVE V_H_BALANCES-KSPEM TO V_TEMP_BALANCES-KSPEM.
      MOVE V_H_BALANCES-SPEME TO V_TEMP_BALANCES-SPEME.
      MOVE V_H_BALANCES-BOTH_QTY TO V_TEMP_BALANCES-BOTH_QTY.
      APPEND V_TEMP_BALANCES TO T_TEMP_BALANCES.
    ENDAT.
    CLEAR V_H_BALANCES.
  ENDLOOP.
and my T_BAL internal table contains these feilds.
TYPES: BEGIN OF TY_BAL,
       WERKS TYPE MARD-WERKS,
       MATNR TYPE MARD-MATNR,
       LGORT TYPE MARD-LGORT,
       SPEME TYPE MARD-SPEME,  " Owned Blocked
       KSPEM TYPE MARD-KSPEM,  " Consigned Blocked
       MEINH TYPE MARM-MEINH,
       MAKTX TYPE MAKT-MAKTX,
       MATKL TYPE MARA-MATKL,
       MVGR4 TYPE MVKE-MVGR4,
       PRAT2 TYPE MVKE-PRAT2,
       COST  TYPE MBEW-VMSAL,
       STPRS  TYPE MBEW-VMSAL,
       PEINH TYPE MBEW-PEINH,
       PH_MATNR TYPE MVKE-MATNR,
       MENGE(16) TYPE P DECIMALS 0, "STPO-MENGE,
       TOT_SPEME(16) TYPE P DECIMALS 0, "MARD-SPEME,
       TOT_KSPEM(16) TYPE P DECIMALS 0, "MARD-KSPEM,
       BOTH_QTY(16) TYPE P DECIMALS 0, "MARD-SPEME,  "SPEME & KSPEM
       END OF TY_BAL.
thanks in advance.

The replay answer
Advertisement
Hi,
In this piece of code, the developer is trying to do the following:
- Loop at every record of the internal table(T_BAL) and get it into  a work area (V_H_BALANCES ).
- Mode the field contents of the work area(V_H_BALANCES ) into another work area (V_TEMP_BALANCES).
- Then for every change of MATNR field he is adding all the numeric fields.
- Then transfering all the fields ( i.e. added fields ) in to another work area (V_TEMP_BALANCES) .
- Adding this new set of record( added values ) from one internal table ( V_TEMP_BALANCES)to the other internal table (T_TEMP_BALANCES).
The result would be somthing as :
Old Internal table(T_BAL):
werks matnr   lgort
0001  screw1 20
0001  screw1 30
0001  screw2 10
0001  screw2  20
Then after you run this piece of code then, the contents of the new interna table (T_TEMP_BALANCES) would be :
werks matnr   lgort
0001  screw1 50
0001  screw2 30
Hope that makes the picture a lil clear.
Award points if founf useful.
Best Regards.
Ashish Singhal.

Go to See the other 2 answers

Doubt in Cash flow Statement Query

Category:DefaultRelease time:2015-10-11Views:130

Hi all,     In FI module i am trying to create query 'Cash flow statement' using infocube 0figl_c01. For 'cash inflow' i restricted to debit postings for G/L account char. with two account number (200602 & 200611 as given by finance dept.) But the va[More]

Doubt about the flow...

Category:DefaultRelease time:-0001-11-30Views:130

HI all i have the following piece of code, please explain me how the logic works..   LOOP AT T_BAL INTO V_H_BALANCES.     MOVE V_H_BALANCES TO V_TEMP_BALANCES.     AT END OF MATNR.       SUM.       MOVE V_H_BALANCES-KSPEM TO V_TEMP_BALANCES-KSPEM.   [More]

BDOC message flow and its architecture

Category:DefaultRelease time:2015-10-11Views:130

Hi Expert, It can be a simple question but i have a doubt regarding the flow of messages using SAP CRM middleware. The scenario is like: 1. Message flows from ECC to CRM through a BDoc. (It can be opposite way also) 2. The BDoc fails in CRM due to so[More]

How to extract the actual cash flows into the needed cash flow structure ba

Category:DefaultRelease time:-0001-11-30Views:130

Hi Experts,    I've doubt on Cash flow.    My requirement is extraction of actual cash flow  into needed cash flow     structure based on SAP Liquidity calculation module. I am new to this SAP liqudity planning module. so i need some documentation re[More]

[solved] Mount/unmount extremely slow (relatively)

Category:DefaultRelease time:-0001-11-30Views:130

When I first installed my system, mounting and unmounting took a relatively unnoticeable amount of time.  Now, mounting a single volume takes about a minute or more per volume, even for tmpfs volumes.  I don't seem to see any other performance proble[More]

Objective settings

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I am working on appraisal wherein i need expert help. Our requirements is: T otal number of columns in the form is 7 1.Criterion group [job knowledge, skills & behaviour,...] 2.Criteria  [ eg. within job knowledge - employee has complete job know[More]

Process Chain Flow doubt

Category:DefaultRelease time:-0001-11-30Views:130

Hi, There is a process chain of flow start>Infopackage>DTP>ActivateDSO_->InfoPackage1>DTP1>ActivateDSO1_ Only doubt starts where it is underlined. why the infopackage1 has been linked after the Activate DSO eventhough no dependency for D[More]

Doubts about checkings in FLOWS for a DataObject.

Category:DefaultRelease time:-0001-11-30Views:130

Hi to all. If I have a DO with 3 methos, getlist, getldetail and modify. Getlist returns one register . For that register, getdetail returns 2 children. The method modify, modifies the two children in R3. If I create o modify o delete the key registe[More]

Some doubts on UCCE CVP comprehansive call flow.

Category:DefaultRelease time:-0001-11-30Views:130

hi, What is the configuration on CVP that forwards call to ICM. as i am not able to find any configuration in OAMP or CVP that target to ICM. the flow is as follows- VG-CUSP-CVP-VRUPG-ICM-CCMPG-CUCM Thanks and Regards- PKHi, There is no much configur[More]

Work Flow Doubt

Category:DefaultRelease time:-0001-11-30Views:130

Hi Experts, I have a custom business object(An extension of the standard one BUS2012). Say I have a method abc. I have defined some importing parameters for this method. To get the data from the workflow container, i have used the following statement[More]

Doubts about security, work flow and BPF

Category:DefaultRelease time:-0001-11-30Views:130

Hi Anybody can tell me a resume about how to do this next problem below? I suppose that with BPF, have 2 tasks(A,B). And A has 2 subtasks (A1,A2). For example: A1 is used to introduce information                     A2 is used to apply business rules[More]

Hot
I found the "Invert Colors" option under Settings > General > Accessibility, and like it a lot. It provides enhanced readability. The problem is that it inverts all colors, even for apps. So when I view a web page in Safari, all the colors [More]
I have a problem. I know very little about the computer. There is no OS 9 Classic in my hard disc. My computer came to me with no discs. I'm trying to install a printer, and a camera. They ask for OS 9 Classic, saying it's not in the computer. I was [More]
When I create a form in InDesign CS6 and import it into Acrobat X Pro, and then Export as PDF, when you fill in the form, nothing shows or prints, but the data is there when you click on the field. So... I delete the form fields from InDesign and rec [More]
I cannot download Mavericks on my mac book pro. I cleaned it with Onyx, repared the permissions, gave my id in App store, which was recognized, deactivated my Intego Antivirus, no way. It works on a mac mini with snow leopard, but it does'nt put the [More]
I installed both 10.1.4 and 11.0.08 updates this week and now I can't use the Digital "Sign" document feature.  It's been completely removed.  Need it back. Please help..  Can't sign or add text to any pdf document. Even when security properties [More]
My current workflow includes heavy usage of Expose, Spaces, and iOS's Application Switcher. I've installed a number of "helpful" apps in the last couple of days, and the behavior of the application switcher has strangely (and very frustratingly) [More]
n the middle of looking through some pictures, my iphone 4 screen turned white and is now not turning off or on. What's the best thing to do?Try doing a hard reset - by holding the 'Power' button on the top and the 'Home' button simultaneously!Read o [More]
Hi all, The screeen on my 3GS is completely un-responsive at the very bottom of the screen - for about half a centimetre from the bottom ( near the home button).  As a result I can't, for example, swap from letters to numbers on the keyboard when it [More]
Hi All, I have some custom fields in PA0002 table. So i extended HRMD_A06 and in user-exits i am populating custom fields. Out bound side everything is OK. But it is giving 51 error in inbound side. Probelm with read_namtb subroutine. it is chking th [More]
I am using an APD with DataTarget as a file on the application server.  When I execute the APD, only the first 512 characters of each results row are written to the file.  I have checked the SAP documentation on APD, but did not find any limitation w [More]