Code example for ZXAFAU02

i need a code example for user exit. EXIT_SAPLAFAR_002.

*data: con_afameth_za like t090-afamet value 'ZA',
     con_afameth_zb like t090-afamet value 'ZB',
     con_afameth_zc like t090-afamet value 'ZC',
     con_afameth_zd like t090-afamet value 'ZD',
DATA: CON_AFAMETH_ZA(2) VALUE 'ZA',
      CON_AFAMETH_ZB(2) VALUE 'ZB',
      CON_AFAMETH_ZC(2) VALUE 'ZC',
      CON_AFAMETH_ZD(2) VALUE 'ZD',
      L_AFABTR TYPE F.
E_AKTIV = 'X'.
E_AFABTR = 0.
DATA: STRDATE(10) TYPE C ,
      START_PERIOD TYPE I .
DATA: SUMDEPRE_PERIOD TYPE I ,
      BALDEPRE_PERIOD TYPE I .
DATA: FYPLANDEPOD LIKE ANLC-NAFAP ,
      TRUEPLANDEPOD LIKE ANLC-NAFAP ,
      NETBOOKVALUE LIKE ANLC-KANSW ,
      APCVALUE LIKE ANLC-KANSW ,
      ACCMDEPR LIKE ANLC-KNAFA ,
      DEPMONTH LIKE ANLC-PSTBEG .
TABLES: ANLC ,
        ANLA ,
        ANLB .
DATA: FIRSTYEAR(4) TYPE C ,
      CURRENTYEAR(4) TYPE C .
DATA: ACQYEAR(4) TYPE C ,
      ACQMONTH LIKE ANLA-ZUPER .
CURRENTYEAR = SY-DATUM+0(4) .
LOOP AT T_ANLC WHERE AFABE = I_AFABE .
**Deprecation amont is : apc * n / (n+1) / all period .
**At first phase of changeover .
CLEAR: STRDATE , START_PERIOD , CURRENTYEAR ,
       FYPLANDEPOD , TRUEPLANDEPOD , NETBOOKVALUE .
CLEAR: ANLC , APCVALUE .
     STRDATE = I_ANLB-AFABG .
     START_PERIOD = STRDATE+4(2) .
     FIRSTYEAR = STRDATE+0(4) .
     CURRENTYEAR = SY-DATUM+0(4) .
     SELECT SINGLE * FROM ANLC WHERE BUKRS = T_ANLC-BUKRS
                           AND ANLN1 = T_ANLC-ANLN1
                           AND ANLN2 = T_ANLC-ANLN2 .
     IF SY-SUBRC = 0 .
        APCVALUE =  ANLC-KANSW + ANLC-ANSWL .
        ACCMDEPR =  ANLC-KNAFA + ANLC-NAFAG .
        IF FIRSTYEAR = CURRENTYEAR .
           DEPMONTH =  ANLC-PSTEND - ANLC-PSTBEG .
        ELSE .
           DEPMONTH = ANLC-PSTEND - ANLC-PSTBEG + 1 .
        ENDIF.
     ENDIF .
    IF APCVALUE GT 0 .
     FYPLANDEPOD = ( APCVALUE - I_ANLB-SCHRW ) /
                 ( I_ANLB-NDJAR * 12 + I_ANLB-NDPER  ) * DEPMONTH .
       E_AFABTR = FYPLANDEPOD .
    ENDIF.
   EXIT.
ENDLOOP.

Similar Messages

  • I need code example for server act as client and vice versa

    Hi all,
    I want code example for performing both server and clients using RMI. I mean Server will act as client and client will act as server. So a single program will act as both client and server .
    Please give example, it will helpful to complete my project. I am struggling in this stage. Its like peer to peer action.
    Thanks & Regards
    R.Ragupathi

    1. The tutorial shows you how to do cleint/server.
    2. Search on the topic "callback" to see how cleint and server roles can be reversed.

  • C# Code Example for Configuring SQL 2005 Reporting Services?

    I have found the MSDN articles describing the classes, public methods, etc. for configuring SQL Server 2005 Reporting Services via WMI. I need to initially configure them and just do this:
    - Report Server Virtual Directory
    - Windows Service Identity
    - Web Service Identity
    - Database Setup
    - Email Settings
    - Execution Account
    Is there a C# code example that already exists putting together all of this? I didn't want to reinvent the wheel if I didn't need to.
    -Ed

    Jin,
    Thanks so much! This is great! Your work is awesome!
    I have a couple of issues that came up...
    1) CreateVirtualDirectory.vbs creates the virtual directory for the Report Server just fine. Now how do I distinguish a script to create the virtual directory for the Report Manager?
    2) I decided to go ahead and use what you did for scripting CreateApplicationPool (using http://msdn.microsoft.com/en-us/library/ms155349(SQL.90).aspx). I found the syntax is wrong here when I kept getting an error, so I put PowerShell on the server and pulled the following info:
    Name       : CreateApplicationPool
    MemberType : Method
    Definition : System.Management.ManagementBaseObject CreateApplicationPool(System.String Name, System.Boolean UseBuiltIn
                 Account, System.String Account, System.String Password)
    However, I'd like to use "NT Authority\NetworkService" or "Network Service" as the account (which is an option for the Builtin accounts when I us RSConfigTool.exe). This is the syntax I used:
    objInParam.Properties_.Item(
    "Name") = "ReportServer"
    objInParam.Properties_.Item("UseBuiltInAccount") = true
    objInParam.Properties_.Item("Account") = "NT Authority\NetworkService"
    objInParam.Properties_.Item("Password") = ""
    But I always get an error with a negative number for the HRESULT.
    Any ideas?-Ed

  • Need code example for dynamicly changing UI Propertey

    Hello,
    Can someone show me a simple code example that does the following:
    A view which contains a button and a label.
    Each press on the button changes the color (or other visible property) of the label.
    But note: Don't bind the property to the Context for that, I want to do it through the doModifyView method.

    hi Roy Cohen,
    I think u r not looking for the visibility property they have mentioned.
    I think u r looking for a procedure to change the way the element looks..is it..
    The problem is if u want any change to be visible when the button is pressed u can only change the length or the width.There is no option to change the semantic color or whatever.
    To change the size u can try this code
    IWDInputField in = (IWDInputField)view.getElement("<element name>");
    in.setWidth(some value which is set when the button is pressed);
    Is this wat u r looking for?
    Jus mention it if there is something  else.
    Regards
    Bharathwaj

  • Are there any good code examples for displaying preview images in the storefront?

    I can gather other info using folio.xxx, but can not find any good examples to use for preview images.  Tried folio.getPreviewImage() with no success.  Oh, I should mention it is version 2.  Plenty of examples for version 1.
    Perhaps if I get a little more specific.
    I am calling up the folios via:
           adobeDPS.libraryService.folioMap.addedSignal.add(function(folios) {
                for (var i = 0; i < folios.length; i++) {
                    addFolio(folios[i]);
            }, this);
    This eventually works into a function where I am gathering and displaying folio data:
         var productId = folio.productId;
        var html  = "<div id='" + productId + "'>";
            html +=     "<a href='#'><img class='shadow' width='120' src='' border=0 /></a>";
            html +=     "<br /><span class='bold'>" + folio.title + "</span>";
            html += "</div>";
        this.$el = $(html);
    folio.title works fine to pull up the title, but I can no longer use folio.getPreviewURL in v2.  What code should I be using to set the src to the preview image?
    Thanks

    Have you looked at the default implementations of the library?
    In FolioItemView's render function, there is a function(follow the nested functions!):
    setTimeout(function(){ scope.loadPreviewImage() }, 100);
    It references this function (this doesn't copy well):
    loadPreviewImage: function() {
    if (this.el.parentElement) {
    var transaction = this.folio.getPreviewImage(135, 180, true);
    transaction.completedSignal.addOnce(this.getPreviewImageHandler, this);
    Going deeper, into the getPreviewImageHandler function is where you see the url value..
    if (transaction.state == adobeDPS.transactionManager.transactionStates.FINISHED && transaction.previewImageURL != null) {
                                  this.$el.find(".folio-thumb").attr("src", transaction.previewImageURL);
    Within the example is also code for supplying a preview when the Adobe API is not available:
    (Within the render function)
    var json = this.model.toJSON();
    $folioThumb.attr("src", json.libraryPreviewUrl);
    If you're making any changes to where the preview is displayed, you can just swap out the class ".folio-thumb" to whatever the class (or id) is of the element you're wanting to render the preview in.

  • Code example for virtual list view control

    I'm writing a client (C++) application to access an LDAP directory (that supports virtual lists), and I'm trying to make use of the virtual list view control to "page" my results. However, I'm having trouble getting the code to work correctly. Can anyone provide a C++ code example?
    Thanks in advance.

    I think I've found my problem with writing this code.
    Unless I'm mistaken, the Netscape SDK for C appears to be incomplete. After an LDAP search operation, I believe there should be a way to parse the virtual list response control for a context id. Then, I would return this context id to the directory server in subsequent Virtual List View controls (which I'd send via LDAP search calls). However, the concept of context id in VLV search controls doesn't appear to exist in the Netscape SDK for C.

  • Need code example for LDAP update

    Hello,
    I know how to preform an LDAP search using the package javax.naming.directory.DirContext.
    Can someone show me how do I do an update to a certain record at the LDAP ?
    Can this update be with the search already (such as in SQL) or should I search the relevant item first and than update it? In any case, a code example will be very helpful here...

    Roy
    Personally I would use the UME APIs to update the user instead of connecting to the LDAP directly. There are many reason for this
    1) The UME will work if you decide to change your user store
    2) Connection pooling is already taken care of
    3) Its using standard product functionality instead
    I hope this helps (and sways) your decision
    Darrell

  • Is there any code example for "Web Survey"?

    Hi buddies,
    In the standard SRM Web Survey scenario, the experts submit questionnaire online. But our custmer want it offline.
    So we use offline Adobe Forms, the problem is after we get the data by uploading the offline PDF, how we put the data into the standard Web Survey. Is there any function moudle , BAPI, class for this purpose?  Is there any code example?
    Thanks!
    Hao

    I have tried to write some report using pch logical database and successed.
    在报表自身中,从 GET OBJEC 点,作为规定,数据库驱动程序将文件 PLOG 中的选定的选择恢复为规定的并检查权限。
    指令 TABLES 中结构声明是前提。若除了结构 OBJEC,还定义结构 GDSTR,则将结构评估的参数添加到标准选择屏幕。这可以通过评估路径进行结构评估。
    REPORT  ZPHC_TEST.
    TABLES : objec.
    infotypes: 1000.
    INITIALIZATION.
    START-OF-SELECTION.
    get objec.
    WRITE : p1000-objid.
    end-of-SELECTION.

  • Code example for "chain locking" ?

    Guys, could anyone give a code example of chain locking with reasoning why we could need this technique?
    "Chain locking" mentioned here .
    Thanks.

    I suggest you search for examples using google, the examples should make it clear why you would use it.

  • Code Example for Scaling Images

    I have pictures captured from the iPhone Camera which I would like to scale:
    1. to Thumbnail Size
    2. to Medium size 200 x 200 pixels.
    Can anyone help me with a code example to do this?

    Let me answer my own Question:
    see
    http://discussions.apple.com/message.jspa?messageID=7276709#7276709

  • I need a code example for an action listener for a jcheckbox using matisse

    I am trying to make it so that when some body clicks a jcheckbox it will put a figure into a jtextfield. Because I am using matisse I need to know the code for the action listener and I need to know quickly as well so I don't have time to look it up with searches etc.
    Can anbody provide me with some example code please.

    I thought that as you are all more experienced than I am that you would know where to look and as you would have already been to all of the sites you would have been able to save me a lot of time looking for the best one. I didn't mean to insult you sorry, I knew that I would be looking for a long time and hoped that some one could help speed that up for me.
    Any way I have obviously annoyed you in that thread earlier this week. I know that you are all pee'd at me and don't believe me and that is fine. I have learnt every thing that I need to learn and would like to thank you for your help although I think that your language in your last post was not very pleasant, but that is ok.
    I don't want to continue posting any more. But thank you for your help.

  • Where to find the source code examples for a carousel JavaFX

    All references to the HOW-TO JavaFX lead to www.javafx.com
    and forwarded to the
    http://www.oracle.com/technetwork/java/javafx/overview/index.html,
    and there is no such examples. Who knows where they are

    Download Samples from
    => http://www.oracle.com/technetwork/java/javafx/downloads/index.html
    The Display Shelf example is a inside the Ensemble sample and is what you are looking for.
    Build and run from the downloaded sample source or run online from
    => http://www.oracle.com/technetwork/java/javafx/samples/index.html
    Choose Samples | Graphics | Display Shelf
    From there you can either Save Netbeans Project or Copy Source.
    If there are broken or misleading documentation references, email the list of pages containing the broken links and what they link to: [email protected]

  • Is there any code example for LDB PCH

    I always write report using logical database 'PNP' and 'PNPCE',  which make it very easy to have code for HR master data.
    The 'PCH' is for OM data, is there any method, like using "PNP", can make program for OM easier?
    Many thx, if any help.

    I have tried to write some report using pch logical database and successed.
    在报表自身中,从 GET OBJEC 点,作为规定,数据库驱动程序将文件 PLOG 中的选定的选择恢复为规定的并检查权限。
    指令 TABLES 中结构声明是前提。若除了结构 OBJEC,还定义结构 GDSTR,则将结构评估的参数添加到标准选择屏幕。这可以通过评估路径进行结构评估。
    REPORT  ZPHC_TEST.
    TABLES : objec.
    infotypes: 1000.
    INITIALIZATION.
    START-OF-SELECTION.
    get objec.
    WRITE : p1000-objid.
    end-of-SELECTION.

  • Vision OCR code examples for C++ or Delphi (Codegear)

    1) What is the right board for my following question ?  :
    2) I need sampe code for using the NI Vision OCR libraries. I will have to use Embarcadero Codegear C++ Builder or Delphi.
    Where can I get this or similar information ?
    Thanks in advance !

    Hello,
    I mean the discussion board, because my topic does not really fits.
    >> You just need NI Vision to programm OCR in C or C++.
    This sounds very easy, but I find no right documentation, how to integrate the
    DLL (means usage of implemented functions) or use OCR in any other way in
    my code.
    Is there any doc, that's really useful to me ?
    Thanks, Arnd

  • Need code example for StringTokenizer to hashmap...

    I am creating a rolodex with name, phone, address, city, state. The data will be saved to a delimited file. When the app begins I have to read the file to get the records into memory. My GUI will list the names. The user should be able to click on one of the names to open a dialog box in which all the fields will appear and wil be editable.
    I need some assistance with design...
    I think I should use BufferedReader and StringTokenizer for reading the file in. Then perhaps store the records in a hashmap(need help with that - Is hashmap the thing to use? Maybe arraylist instead? How do i do it?) The records should be stored sorted by name in memory and in the file. Next, I figure I can show the names using a table and hide the other columns, when a cell is clicked I can pop up the dialog box with all the goodies in it. When I save it should be to memory, how do I do that? Then when the app closes I will write out using PrintWriter.
    There are other things going on, buttons, listeners, etc. but the basic design is what I need advice on. Any ideas are welcome and appreciated!

    From the name to get the record, clearly you need a effecient lookup mechnism.
    HashMap does hash lookup, that is right, but HashMap does NOT do ordering.
    TreeMap does binary lookup, TreeMap also does ordering.
    There you go the basic design.
    --lichu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • FI org i.e. business area and profit center

    I have one company code with 2 business lines (Product A and Product B) There are 3 location in India. So which one is better? Products as business area and location as a profit center or Location as a business area or product as profit center. Pleas

  • Field Value in ME51N Transaction

    Hi Gurus. I need assign from EBAN table one value, to field value in Item 'Valuation'  (tabstrip vauation) in the data of the position. Is this possible ?? Thank You for yours helps.

  • Can I Create Chapters Separately in iBooks Author and Merge Into a Single iBook?

    In a print page layout package like InDesign, chapters of a book can be created separately and then merged into one book file. Is it possible to do that to create an iBook in iBooks Author? Thank you.

  • DVR620KU vcr to dvd recording

    After following the directions to record from vcr tape to dvd I get a red circle with a slash across it.  I've tried a different dvd disc (+R8x and -R16x).  I don't know why it can't record.

  • How do i fix error -1 in final cut pro?

    Everything was working fine until i did the last update. Now it won't let me export. I've tried everything. Changed settings, checked prevent App Nap. Any other suggestions???