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
My emails no longer show up unless I go to the mail app manually. Never had a problem before this. Help! I have shut off phone I have tried to change the time for how long the mail will show up but nothing is workingDo you mean you don't get notified [More]
Hi, I am using Airport Extreme together with Airport express (to extend the Wifi signal). When I connect my MBP, MBA or my PC to the Wifi network it takes (in 90% of cases roughly) quite a long time - even up to 20mins - to get stable Internet connec [More]
Hi, I have a question regarding navigation within a pop-up window. The pop-up window is generated as below, the component usage is defined in the runtime repository for the main window. lo_contracts_popup     = comp_controller->window_manager->creat [More]
Dell Latitude D630 laptop w/Windows 7 Ultimate 32 bit. Running Production Premium CS4. PPro runs great except that any time I click out of it, even for the simplest function, like adjusting volume from the taskbar, PPro crashes. I previously ran CS3 [More]
Is it still possible to attach sticky notes to a pdf file? Which Adobe product do I need to do this?Both Acrobat and Reader 10/11 can, and previous versions of Reader can if the document is enabled to allow it. Mobile versions of Reader can too.Read [More]
Such a dumb basic question.  New mac user, huge learning curve. Could transfer photos in my sleep on my pc. Cant use the usual drag and drop motions here. Do NOT want to load my new mac with thousands of pics (im a photographer) I JUST want to transf [More]
My Apple TV 2 cannot connect to my computer all of a sudden. They both have the latest software updated, I can access all except it won't link to the library on my computer. I have done the signal strength test all fine. Any ideas?T141, try a reboot [More]
I have a Mac OSX 10.5.8 that wont accept the updated browsers out there. I need a older version. Is there ANYWAY to get one ???Since you have a PowerPC and not Intel hardware you can use the third-party TenFourFox. http://www.floodgap.com/software/te [More]
Hi ALL,    I need to access logical database PSJ and tables are PROJ and PRPS_R. The queries are 1. I need to fetch PROFIT CENTER (PRCTR) from PROJ 2. I need to fetch COST CENTER (FKSTL) from PRPS_R.    Based on this PROJ-PRCTR from selection screen [More]
Hi,      Can anyone explain me on adding the result columns in the resultField tab while creating a query, I don't understand the actual link between the bundle, resourceid and values that we give as a search criteria while looking up the result colu [More]