Routine basics....

Hi friends,
                Can anybody explore about the basics terms (structure, monitor etc...) in the following sample. I have the basic knowledge of ABAP reports. Plz also tell me the functionality of the sample routine. What is it doing?
Routine for Actual Finish Execution Time Operation
$*$ begin of routine - insert your code only below this line        -
  Data:
    l_s_error_log    type rssm_s_errorlog_int,
    TRAN_STRUCTURE   type tys_SC_1__RULE_110,
    l_subrc          type sy-tabix,
    l_abort          type sy-tabix,
    ls_monitor       TYPE rsmonitor,
    ls_monitor_recno TYPE rsmonitors.
REFRESH:
  monitor,
  monitor_recno.
Migrated transfer rule call
  MOVE-CORRESPONDING SOURCE_FIELDS to TRAN_STRUCTURE.
  Perform compute_ACT_FIN_EK
    USING
      SOURCE_FIELDS-record
      TRAN_STRUCTURE
    CHANGING
      RESULT
      l_subrc
      l_abort.
*-- Convert Messages in Transformation format
    LOOP AT G_T_ERRORLOG INTO l_s_error_log.
      move-CORRESPONDING l_s_error_log to MONITOR_REC.
      append monitor_rec to MONITOR.
    ENDLOOP.
    IF l_subrc <> 0.
      RAISE EXCEPTION TYPE cx_rsrout_skip_val.
    ENDIF.
    IF l_abort <> 0.
      RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
    ENDIF.
$$ end of routine - insert your code only before this line         -
FORM compute_ACT_FIN_EK
   USING
     RECORD_NO      type sy-tabix
     TRAN_STRUCTURE type tys_SC_1__RULE_110
   CHANGING
    RESULT         TYPE tys_TG_1_full-ACT_FIN_EK
    RETURNCODE     LIKE sy-subrc
    ABORT          LIKE sy-subrc
  RAISING
    cx_sy_arithmetic_error
    cx_sy_conversion_error.
IF TRAN_STRUCTURE-ROCANCEL = ' '.
    RESULT = TRAN_STRUCTURE-IEDD.
ELSE.
    RESULT = - TRAN_STRUCTURE-IEDD.
ENDIF.
Return code <> 0 means skip whole data package !!!
  ABORT = 0.
ENDFORM.                    "ACT_FIN_EK

Can anybody explain

Similar Messages

  • New routine

    hi,
    I need to write a new routine, Basic price + VAT *10% / 365 * no. of days in payment terms.
    Here value of no. of days is not picking up, field name is ZTERM.
    Any suggestions.
    vandana

    Hi,
    The no of days will not be picked up during the pricing, you will only get the payment term. You can get the no of days from the table T052 for the payment terms.
    Regards,
    Murali

  • Calibrating my monitor wigh 10.2.8

    I have been trying to calibrate my monitor using my old coal-fired OS of 10.2.8.
    I go through the steps under the "Display" memu in the system profile. I get finished and save the profile under a new name. However I can not get the new profile to take. I hilight the new profile than close the window. When I reopen the window it has reverted back to the "Generic RGB profile" How do I get my new profile to take hold and stay.
    Thanks

    You may have to be sure the computer is properly maintained; and things such as
    'repair disk permissions' in Disk Utility are run on occasion. The user settings may
    be subject to corruption if proper steps are not continuously taken to safeguard
    how the system works. And it works best if a preventative maintenance regimen is
    always used.
    You could also try booting the computer up from the Installer disc and run that version
    of Disk Utility (not the installer, but it does appear in a menu beneath Installer; and
    the menu is available in a drop-down menu without running the Installer itself) and have
    Disk Utility do a few tasks; then restart so as to have the computer run from the hard
    disk drive version of the system, and not the reduced Jaguar system on the Installer.
    You can have Disk Utility, from boot disc, run 'repair disk' & also 'repair disk permissions.'
    Most user setting oddities can often be related back to user account permission issues;
    and some of these possibilities were improved in later OS X versions; so Panther is way
    superior to Jaguar, and Tiger is a few leaps past Panther. Depending on the hardware
    and the level of upgrade already present in the computer, Tiger can be a great investment
    as would the investment in RAM and a larger, faster hard disk drive with fast buffer.
    Jaguar Troubleshooting: http://www.macattorney.com/tutorial.html
    Panther solutions: http://www.macattorney.com/panther.html
    Appears you posted the same question three times, btw.
    There are a few hints and tips across the combined total
    of the two links above. A later operating system would be
    a better answer; after performing routine basic maintenance.
    Good luck & happy computing!

  • Java application hangs on I/O

    Hello,
    Could use some help as I've been racking my brain and going crazy. I have a Java application who's sole purpose in life is to monitor a QFS file system for when it goes bad. This main process kicks off a thread(we'll call it thread A) which lives indefinitely. This thread wakes up every so often and kicks off a thread to write a file, and then a thread to read that file back in, and then a thread to delete that file. Thread A has no interaction back to the main process but does monitor each of it's subthreads. This process works great for all testing that you can do, like unmounting the file system and pulling network cables etc. The problem lies when the QFS servers start doing their server not responding routine(basically a real failure and not a purposely inflicted one. What happens is that the whole Java application hangs. The main process, and the parent thread(thread A) all grind to a hault. From the command line anything you try to do in that file system also hangs but you can ctrl-c out of it(like a ls or cd to it. I have been experimenting with all the ways I can think of to fix this, like thread.interupt(), using Runtime.exec instead of I/O objects and trying to control the Process object, and I've tried exposing the FileInputStream and FileOutputStream objects in order to call close() on them. I've been reading that the interupt() method doesn't work for all intense purposes and that the latter method I tried is the way to do it, although, these postings say that that doesn't necessarily always work on Linux. Unfortunately, I am running this application on a Solaris 10 X86 platform which has a lot of similarities to Linux and am experiencing this not working. Has anybody had to do anything like this or handle cases like this that could maybe point me in the direction that they were successful in?
    Thanks

    Just to verify you are not, in any way, using external apps via something like exec() right?
    So the blocking processes are read, write and delete?
    And you are sure that you are in fact calling interrupt on all of the relevant threads?
    Presuming yes than given that you have already demonstrated that you can't interrupt them it doesn't matter much what you do in java it isn't going to work. So look for a different solution.
    One possibility, spin up a seperate java app that does the actual work. Create a socket server, obviously seperate from other threads to manage. It verifies that the app is still working and allows the caller to shut it down - via system.exit().
    Then you have a management app that starts that app and when needed you tell it to shut down and then restart it.

  • Generate an output on change of delivery

    With  config we can generate a output when a new delievery iscreated, but how to generate a output when a change takes place in the delivery or any item is deleted from the delivery.
    Thanks in advance.

    Hi,
    You can assign delivery program and Form routine in "Change Output" section in General tab of output type configuration to record the changes made in delivery.  After making this setting when ever you change something in delivery change messge /change output will be generated.  In the form routine basically you code what changes do you want to track and send as change output.
    I did this change recently so it was on top of my mind
    Regards,
    Rajan

  • Database constraints and Struts ADF

    I have a struts ADF project and wish to pick up unique constraint violations from the database(only the database)
    How and where to i trap these violations

    The toy store demo has two java classes called
    toystoreDBtransactionfactory & toystoreDBtransactionimpl.
    These are used to overide the default functionality of
    DBtransaction and DBtransactionimpl. The configuration
    manager (right click your bc4j application module) allows you to set the database transactionfactory class to the overriden classes. The toystore routines basically capture the databse constraints and reformat the messag einto something more meaningful.
    When i run the bc4j tester the changed routines function correctly for example when doing an insert.
    With a struts jsp program a similar insert doesn't trigger the changed routines so i just get the database error comiing back to the screen.

  • Easiest way to access CCP parameters

    Hello,
    Current situation:
    I have installed dozens of application all of the same structure:
    PC+Windows XP+Labview 8.2 runtime (soon Labview 2011). Connection to ECU via Kvaser USB or PCI products. Application built using Kvaser supplied Labview routines (basically read CAN Message ID, write CAN Message ID). Those application allows to access ECU CAN items in read/write. No problem.
    http://digital.ni.com/public.nsf/allkb/2649769104D8B6AD862573FA0020416C
    Present need:
    There is now a demand to upgrade all application so that they start to check 3 additional parameters: ECU hardware version, ECU software version, ECU dataset (calib version). I have been told that those parameters are accessible via CCP. The only experience I have with CCP is what I read on the Kvaser and NI website.
    Questions:
    1/ I would like to understand what I need to add to my applications to fullfil this need
    2/ If I want to keep my Kvaser hardware already installed what do I need to purchase (from NI?). Will the "NI ECU Measurement and Calibration Toolkit" help me or is it bould to NI (and Vector) hardware and hence will not recognize my Kvaser devices?
    3/ If I want to keep my Kvaser hardware already in place, am I able to program the necessary Labview code using Kvaser read CAN / write CAN low level routines? How do I do that? Is there example available where I could just change the very low level routines and replace by the ones from Kvaser?
    I am sorry to be so general in my questions, this is my first exposure to CCP and I still do not understand why those 3 parameters that I am looking for must be accessed differently than all others process parameters that I already have access to using simple CAN read item and CAN write item routines.
    Thanks a lot
    Christophe

    Hello Christophe,
    I've often used CCP protocole to read and write in ECU when I can't do it via KWP or UDS.
    Basicaly CCP is not so complicated. It's just a matter of send and receive frames on two distinct CAN IDs.
    You can find some documentation on the net about it.
    In your case, to read some parameters you can use the following commands:
    CONNECT
        GET_SEED ( needed if security access is enable )
        SEND_KEY (idem)
    SHORT_UPLOAD
    I have some code in Labwindow cvi if you are interessed.
    If you want I can send you the CCP protocol documentation in pdf format.
    Regards
    B. Williot

  • How to access basic cube data as part of update rule routine?

    Dear colleagues:
    I am developing a routine as part of the update rule to define a characteristic value to feed an infocube. However, I need to peek up a data that is available on another infoprovider, in this case a basic cube.
    So far, I have done that by peeking up data form ODS as part of the update routine, but this is the first time I need to peek up a data from a basic cube.
    <b>Does that works the same way as ODS?</b>
    Best regards
    Waldemar

    Hi Krzysztof Konitz:
    I have posted an inquire about getting that from the PSA. By mistake I have posted that once before your reply and another after that. Then I red you reply.
    However, you replay solved the problem.
    Best regards
    Waldemar

  • Can we create routine for PO excise duty should calculate at basic amount

    Dear All,
    can we create routine for Purchase order excise duty should calculate at basic amount not after discounted value.
    actually at per current  scenario  system is calculating excise duty after discount base amount, but
    we want to write a routine/scenario excise duty should calculate at basic value not after discount value.
    Regards
    chandrashekar

    Hi,
    In my opinion you have two alternatives to resolve your problem:
    1. To customize some special solution for this; this can be made by adding a new pricing condition similar with the VAT pricing condition (let's call it ZMWS); this pricing condition should be as absolute value and accepted as manual in the document / pricing procedure
    2. Something similar to your solution (I have used this for some customer) to have in the credit memo two lines, one with VAT and one without VAT; the one without VAT should have a negative price = price from the line with VAT.
    For this second solution I would recommend you to have two different special materials "DUMMY" materials, lets say "DUMMY without VAT" and "DUMMY with VAT"
    BR,
    Valentin

  • SAP Basis basics and routine

    I currently work as a business consultant on SAP systems for a number of clients and I wanted to share some pointers.
    Tracking and troubleshooting, then vice versa; This is a general rule of thumb to follow never do one without the other.
    First Identify the problem or request and make an action plan you will use to get the result. Documenting and generalizing processes.
    Protection of customer data and routine backups are key to ensuring that you have a failsafe.
    create a list of task and map out your day before you even look at tickets or request so that you can efficiently fill the gaps with tickets you create from issues that you find on your on. it's best to look for issues rather than to wait for them.
    Identify, Rectify, and Simplify.  

    Hi,
    Please repost as blog or document not as discussion. Thanks for sharing your points.
    Thanks & Regards,
    Nagarajan

  • Basic question

    Hello, i have a basic question. if i have defined 2 fields in a cube or a dso:
    Name Quantity
    and from the external flat file i get some characters for my quantity field. would my load fail?  for standard dso and for write optimized?
    NOTE: quantity field is a keyfigure defined as numeric.
    and the load coming in has "VIKPATEL" for Quantity field and not numbers.
    thanks

    Hi Vik,
    Yes, the load will fail.
    May be you coud first load this data into BW (into PSA) and set both fields as characters fields. Then you can create DSO, do transformation from this PSA to the DSO, and put your logic as to what do you want to do with those Quantity that is not number (e.g. convert to 0, or 'Not assgined', etc).
    You can use transfer rule, or a clean up ABAP code in the start routine.
    Hope this helps.

  • Need a routine

    hi all
    technically this isnt a java question but as ur all great help when it comes to problem solving i thought id ask anyway.
    Basically i need a routine for automatically determining a battle outcome in a calculated combat arena for a game im making (www.3202ad.com)
    i need to know (just the pseudo code will be fine) the way to do the loop for the attack structure.
    ill explain what i want and ive even prepared a diargram of how i want it to go :)
    what i want is this. A number of players all enter an arena, then i need to loop through these players and in turn each player automatically attacks another player until there are no players left (i already have done the attack code so dont worry about that)
    basically lets say there are 4 players in the arena, my initial idea was to have
    loop until only 1 player is left
    player 1 attacks player 2, then p3, then p4.
    then player 2 attacks p3,p4,1
    p3 a p4, p1, p2
    p4 a p1, p2, p3
    if a player is killed in this attack then they are not attacked as they are no longer in the running. The loop goes again until there is only 1 player left.
    This isnt very fair though as if ur player 1 then u either kill everyone first go or u get wiped out straight away. what i want is a code structure for something like this
    p1 attacks p2, p2 attacks p3, p3 attacks p4, p4 attacks p1
    p1 a p3, p2 a p4, p3 a p1, p4 a p2
    p1 a p4, p2 a p1, p3 a p2, p4 a p3
    this then allows each player to get an attack in with each loop but i also need to take into consideration if the player is destroyed so if p1 is destroyed after the first wave then it would go like this maybe
    (second wave) p2 a p4, p3 a p2, p4 a p2. p2 gets attacked twice now though, hmm maybe thats just gonna be the way it has to be unless u can think of a solution.
    anyway here is my lovely diagram to show it :p
    <img src="http://www.sysdia.net/pattern.gif">
    if that doesnt work then goto
    http://www.sysdia.net/pattern.gif
    Ok so this is my pseudo code for my basic attack
    lovely eh ;)
    anyway so what i would just love is someone to help me in figuring out how to come up with the theory for it (im sure its easy, im thinking bubble sort methods for some reason, something i remember from a long time ago)
    so for my first idea the code would be
    while user count>1
    loop user array (stores all users)
    with user
    user is in arena
    get all users into new array (exclude current user from first array)
    other user is in arena
    attack (this user, other user)
    by the way when a user is killed (this is done in the attack bit, they will no longer be in the arena so they will be skipped).
    anyway thats for my original idea, any ideas for my more fairer way, or even a better way?
    oh and the game is done in php and mysql if thats any help but as i say pseudo code is fine :)

    Aaaand here it is in Java:class Player {
      int _id = -1;
      public Player(int id) {
        _id = id;
      public void attack(Player victim) {
        System.out.println(this +" vs. " + victim);
      public String toString() {
        return "p" + _id;
    public class AttackAlgorithm {
      public static void main(String[] args) {
        int numAttackers = 4;
        Player[] p = new Player[numAttackers];
        for (int j=0; j<numAttackers; j++) { p[j] = new Player(j+1); }
        int start = 1;
        int timesThruLoop = 0;
        while (timesThruLoop++ < numAttackers - 1) { // For 4 atks, loop 3 times
          for (int attacker = 0; attacker < numAttackers; attacker++) {
            p[attacker].attack(p[start++ % numAttackers]);
          start++; // move progression up by 1
    }It produces the following attack sequence:
    p1 vs. p2
    p2 vs. p3
    p3 vs. p4
    p4 vs. p1
    p1 vs. p3
    p2 vs. p4
    p3 vs. p1
    p4 vs. p2
    p1 vs. p4
    p2 vs. p1
    p3 vs. p2
    p4 vs. p3
    Does this answer your need?
    Grant

  • Can you help me understand this sentence about Maser data/routine?

    Hi,
    I read the following statement from this forum:
    “… if u add an attribute to master data and that field is not getting populated from source system and you want to get it populated dynamically we can write look up code in routine such as getting data from some other master data table.”
    1. Can you clarify what this sentence really mean? Any examples?
    2. Why is it that in some cases when you modify master data, you don’t have to write a routine to populate it with data but in some cases you do?
    e.g. in the quote it says, if the attribute is not getting populated, why will it in some cases and others not?
    3. Please explain in particular “..to get it populated dynamically we can write look up code in routine..”
    4. Any hints on writing a look up code? Any example?
    Thanks

    Hi Amanda,
    I would understand the sentence you stated as related to load of TRANSACTION DATA (not populating the MASTER DATA) -- and aTripple k example (a good one) shows me that s/he treat it similarly.
    When you are retreiving a lot of data from the transaction system (R/3) you may really not getting values of some infoobjects. However, if the infoobject is an attribute of another infoobject which value we have in incoming data, we may get the value of the attribute from master data of main (basic) infoobject. For this you either may use the mentioned functional module (must be accessable through SE37 t-code) or write a lookup routine.
    Here (in the text itself and in the threads linked):
    Re: Look up at master data in  update routine 
    you may see examples of lookup routine and usage of that FM RSAU_READ_MASTER_DATA.
    Hope this helps.

  • Special chs in DSO expert routine

    Hello All,
    Data is being pulled from Transfer order DSO to GR DSO. The transformation uses a expert routine which pulls a field 'Requisitiner' from another DSO i.e. Purchase DSO.
    This expert routine brings invalid characters i.e. the field value which is in small letters.
    If I delete the request in GR DSO, I cannot edit the PSA and get the correct data, because basically the incorrect entries are coming from the expert routine.
    The real problem occurs when I try to activate data in GR DSO. The activation fails because of the requisitioner field value is in small letters.
    Do I have to make changes in the expert routine? OR is there another way to solve this.
    The loads are delta loads and requests from last 3-4 days have been failing to activate.
    Kindly inform.
    Regards,
    NK

    hi,
    use the ABAP statement convert to Upper case, or you can change the settings for the target infoobject (check the lowercase letter) in the Dev and transport it to the target system.
    Check with the users to see if they are ok with seeing lower case letters in the report, if yes then transporting the info object is a better option.
    regards,
    Arvind.

  • Populate new fields in DSO (DBTable) with ABAP routine

    Hi,
    I've added a couple of fields to a DSO. The DSO contains a large number of records (60m+) and I have a tight window to cutover so the activation time would be an issue if I use a loop transformation. Therefore, I am looking to populate the additional fields directly in the Active table using an ABAP routine.
    One of the fields is a key figure to be derived from an existing CHAR field so would need to apply some logic during update, such as IF <CHAR_FIELD> CA 'ABC'. <KYF_FIELD> = 1 etc.
    Aside from fairly basic Start Routines my ABAP is very poor so was wondering if anyone can help me with the syntax or, preferably some sample code to achieve this.
    Thanks in advance,
    Ad

    Hi,
       In transformation of the cube, choose routine  for char E.
       There you can assign value in RESULT field. Actually RESULT field is assigned to E, find the code below,
    *--  fill table "MONITOR" with values of structure "MONITOR_REC"
    *-   to make monitor entries
    ... "to cancel the update process
       raise exception type CX_RSROUT_ABORT.
    ... "to skip a record
       raise exception type CX_RSROUT_SKIP_RECORD.
    ... "to clear target fields
       raise exception type CX_RSROUT_SKIP_VAL.
      (* insert your abap code here to find the value of E*.)
         RESULT =                     * assign the value you got for E here.
    rgrs,
    v.sen

Maybe you are looking for

  • SQ02 SAP Query

    I'm using version 4.7 for a query using SQ02 with 3 table joins. The data is extracted correctly and displayed correctly. In the extras --> Code area of this infoset transaction I've added in a FM into END-OF-SELECTION (before list) coding area (alon

  • Very difficult migration from MS Access to Oracle with SQL Developer

    Dear Developers I have tried to used for one Project Oracle Sql Developer Migration from Access to Oracle (Application Express). Was about an evaluation if Oracle Express (with Application Express) or Mysql (with PHP) as target database. I am working

  • Hard disk not recognised - will not boot from cd & No FW Target Disk mode

    hi, some help would be greatly appreciated. Some time ago i was switching internal hard drives around and wound up with a kernel panic of some sort (see my previous posts). following on from this I have tried FW target disk mode with no success, and

  • Satellite L500-1ek - setup system always starts with 800x600

    I have new Satellite L500-1ek notebook with Windows 7. Whatever screen resolution I setup system always starts with 800x600. And not only after restart but even when I logout my profile and login again. More: I use also external monitor. I can have m

  • Touchpad Sync Flawed on so many levels...

    I have talked to support about most of these issues and they are confirmed, reproducable bugs. 1.  Google Calendar events added to touchpad device do not get sync'd to Google calendar.  I spent 1 hour adding 50 events for my coming year to my touchpa