ABAP OO Code in routines

Hi,
     Is BI 7.0 supports normal ABAP code and OO ABAP Code?
  r we need to write only OO ABAP code in routines

PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line  -
DATA:   ...
DATA: I_WBS_ELEMT LIKE /BIC/AZPS_O0100 OCCURS 0 WITH HEADER LINE.
DATA: /BIC/ZZUSR1 TYPE /BIC/AZPS_O0100-/BIC/ZZUSR1.
$$ end of global - insert your declaration only before this line   -
OOPs Code
FORM compute_data_field
  TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
  USING    COMM_STRUCTURE LIKE /BIC/CS0PROJECT_ATTR
           RECORD_NO LIKE SY-TABIX
           RECORD_ALL LIKE SY-TABIX
           SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
  CHANGING RESULT LIKE /BI0/MPROJECT-/BIC/ZZUSR1
           RETURNCODE LIKE SY-SUBRC
           ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
ABAP Code
SELECT SINGLE /BIC/ZZUSR1 FROM /BIC/AZPS_O0100 INTO I_WBS_ELEMT
    WHERE WBS_ELEMT = COMM_STRUCTURE-PROJECT.
IF SY-SUBRC = 0.
      RESULT = I_WBS_ELEMT.
ELSE.
      RESULT = ''.
ENDIF.

Similar Messages

  • ABAP source code is written "by hand" or automatically?

    Hi all,
    I would like to modify the report "Open Items - Vendor Due Date Forecast" created by T. S_ALR_87012084. 
    With SE93 i found the name of the program RFKOFW00, which are referring to the T. S_ALR_87012084. T. S_ALR_87012084. (Parameter: D_SREPOVARI-REPORT = RFKOFW00) and with SE38 i have seen the ABAP source code of the program RFKOFW00.
    My questions are:
    1) The ABAP  source code of the program RFKOFW00 is written "by hand", or automatically by one of the SAP tools, for example Report Painter/Writer, SAP queryu2026..? It seems to me that it is written "by hand". Is this true?
    2) In general, how can i tell if a SAP ABAP program is written "by hand" or automatically by one of SAP tools? I know that one way to understand is that source code, written by hand is more clear.
    Is there a way to understand, more accurate, more secure?
    Thanks in advance
    Serena

    Hi ,
    if the code is automatically created, there will be a comment line in the beginning of the code which says
    Generated function module for ..........
    Please do not modify or copy this function module
    Regards

  • Function Module to get ABAP source code for a specific version

    Hi all
    Is there a function module that I can use to get the source code of another function module at a specific version?
    For example, can I call a function module passing in "FM_NAME" and "FM_VERSION" and have it return the lines of code associated with that object?
    Thanks in advance.
    Stuart

    Thanks guys
    That's incredibly helpful! I have one more question that I just thought of last night...
    Is there a way to hook into the code activation process? I want to be able to take a snapshot of the ABAP source code at each point when it is activated for use in another system, but need to be able to intercept this event and get the source code at that point in time.
    Any ideas?
    Thanks!

  • ABAP proxy code using internal table

    Hi XI guru's,
    Good Afternoon,
    My Scenario is ABAP Proxy to file using ztable.
    i am getting data from Sap R/3 data base as Ztable. using this Ztable i have to write ABAP Proxy code. I generated ABAP Proxy and mentioned all below.Please send me ABAP Proxy code using this details. This is very urgent. Please help me.
    ABAP proxy class:   zco_mioa_tata
    structure              :   zmt_tata
    structure                :   zdt_tata
    structure                :   zdt_tata_employee
    Table                :   zdt_tata_employee_tab
    Ztable                :   zcnu_proxy_table
    outbound structure:
    mt_tata
        employee
    thanks and regards
    sai

    Sai,
    I guess this will help you.
    1. Proxies can be a server proxy or client proxy. In our scenarios we require proxies to send or upload the data from/into SAP system.
    2. One more thing proxies can be used if your WAS &#8805; 6.2.
    3. Use Tcode SPROXY into R/3 system for proxy use.
    4. To send the data from R/3 system we use OUTBOUND PROXY. In Outbound proxy you will simply write an abap code to fetch the data from R/3 tables and then send it to XI. Below is the sample code to send the data from R/3 to XI.
    REPORT zblog_abap_proxy.
    DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
    CREATE OBJECT prxy.
    DATA it TYPE zblogemp_profile_msg.
    TRY.
    it-emp_profile_msg-emp_name = 'Sarvesh'.
    it-emp_profile_msg-empno = '01212'.
    it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
    CALL METHOD prxy->execute_asynchronous
    EXPORTING
    output = it.
    commit work.
    CATCH cx_ai_system_fault .
    DATA fault TYPE REF TO cx_ai_system_fault .
    CREATE OBJECT fault.
    WRITE :/ fault->errortext.
    ENDTRY.
    Receiver adapter configurations should be done in the integration directory and the necessary sender/receiver binding should be appropriately configured. We need not do any sender adapter configurations as we are using proxies.
    5. To receive data into R/3 system we use INBOUND PROXY. In this case data is picked up by XI and send it to R/3 system via XI adapter into proxy class. Inside the inbound proxy we careate an internal table to take the data from XI and then simply by using the ABAP code we update the data inot R/3 table. BAPI can also be used inside the proxy to update the data into r/3.
    I hope this will clear few doubts in proxy.
    Just go through these links:
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
    ABAP Server Proxies By Siva Maranani
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    /people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    File to R/3 via ABAP Proxy with good example
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
    Generating java proxies..
    /people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy
    /people/rashmi.ramalingam2/blog/2005/06/25/an-illustration-of-java-server-proxy
    Synchronous Proxies:
    Outbound Synchronous Proxy
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-%2bpurchase%2border%2bsend
    Inbound Synchronous Proxy
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2binbound%2bprogram%2b-%2bsales%2border%2bcreation
    Regards,
    Sarvesh

  • Abap mapping code

    Hi friends
    I am new to Abap mapping PLZ can any one helpme on abap mapping code
    with Source structure and target structure
    Message was edited by:
            Viswanadh Vadde

    Hi !!
    refer the below links
    BAP Mapping is used whenever you explicitly need to build your output XML structure . Its entirely depends on your call which approach you want to adopt i.e. JAVA mapping or ABAP mapping as in both the cases you need to explicitly build the output structure . ABAP Mapping however creates a DOM tree in the memory . Therefore it can be a performance issue whenever your source structure is complex . In case you need an idea of how to go about ABAP mapping here is a link which you can refer
    http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
    Also ABAP mappings have the handicap that they are separated from usual development in Repository. Additional there is more (ABAP, DOM) experience required as for example for XSLT or graphical mapping (my point of view). So they are used for special reasons like access to ABAP stack (transparent tables!).
    Refer to following SDN Demo which explains the need and how to do the ABAP mapping.
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken] [original link is broken] [original link is broken]
    Comparing Performance of Mapping Programs
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    ABAP Mapping Blogs
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    How to Use ABAP Mapping
    https://wwwn.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    Some more
    ABAP Mapping
    I suggest you also go through these links to know more on ABAP Mapping:
    https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    /people/r.eijpe/blog
    ABAP Mapping Vs Java Mapping.
    Re: Message Mapping of type ABAP Class not being shown
    Refer to following SDN Demo which explains the need and how to do the ABAP mapping.
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken] [original link is broken] [original link is broken]
    This document will help you to create ABAP Mapping.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    why Abap Mapping and how to acheive it
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken] [original link is broken] [original link is broken]
    <b>Pls reward if useful</b>

  • Debugging ABAP Proxy code

    Hi,
    I have problem in ABAP Proxy. When i upload a XML and test the ABAP Proxy code it is working fine, but when i trigger the change from sender, its updating the wrong value in the database.
    I checked the incoming and the converted XML, everything is correct and there is no prob in the XI.
    Please tell me is there any way to debug the ABAP Proxy during the actual proccessing i,e. when the change is triggered from the sender.
    Thanks and Regards,
    Arunsri

    I've had the same problem before...everything seemed fine but the xml was not updating the desired values - you have 2 choices - 1. Enable the debugging, but if you have a high volume scenario, then it may cause some issues. Also, I am not sure if you plan to do this in production - as you know, debugging in production is a big No-No.
    Option 2 is to just take the stream and store it as a file in the OS. This is what we followed and we were able to figure out the issue with the xml. Make sure you write it in such a way that you can turn it off immediately. In our case, it worked fine for all suppliers but one and this one supplier was sending a double spaced character in between, which was causing the issue.
    Regards,
    Srini

  • How to retrieve Hidden ABAP program code

    Hi All,
    If a ABAP Source code is hidden by some special charaters or some other report.
    is there any way to retrieve the same.
    thanks
    Alexander

    Which release are you on and what is the name of the program?
    You first should find out how the code was hidden, and (possibly) why it was hidden (from you). Try to display the code from the ABAP Editor in the debugger. What is sy-subrc?
    Look in the attributes of the code (and it's package / transport request => go to the development system if applicable) and find out who is the author and released the transport and did the QA checks.
    Ask that person.
    If it is a $tmp program, then you will need to break it open or ask SAP to do it for you.
    Cheers,
    Julius

  • Double Click Navigation with ABAP Source Codes of Reports On ABAP Workbench

    Hi,
    i have a problem about double click on abap source code on abap workbench. double clicking doesn't work after first double clicked on abap codes. that is going to row of first double clicking.
    did anyone have the same problem? can somebody help me please?
    thanks.

    Nurullah RÜSTEM wrote:
    > isn't there any radical solution to solve this problem?
    > these are very kill-time
    You feel
    Source Code Editor --> Utilities --> Update Navigation Index
    is not radical & kill-time.
    Can you please define "radical" & "kill-time" ?
    BR,
    Suhas

  • How to find unused ABAP custom code?

    Hi,
    how can I identify the unused ABAP custom code  outside of  the SAP Solution Manager?
    Thanks in advance.
    Nora

    Like a Google for ABAP, the Salt Code Ferret app provides incredibly fast searching of custom ABAP programs or modified standard SAP programs across all your SAP systems. Sniffing out specific pieces of code, Code Ferret is a huge timesaver in locating multiple instances of potentially conflicting code, code errors, or code that developers want to access or replicate. www.saltapps.com
    Try Salt free for 90 days – it’s a suite of eight virtual appliances running on VMware or Hyper-V for understanding what’s happening in SAP systems and across SAP landscapes.

  • ABAP source code to connect to third party systems using web service calls?

    Hi all,
              can any one provide an example ABAP source code to connect to third party systems using web service calls? The base system is CRM.

    Do you want to call a web service in a remote system, or do you want to provide a web service?
    If you want to call a web service you should create a proxy object via SE80. Open your development package, right click on the tree entry and choose: Create -> Enterprise Service / Web Service -> Proxy Object and provide the needed information (including the WSDL description file). You may then use the proxy object to call the web service (if the connection and everything else works right).
    See [http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm]

  • Abap Mapinng Code

    Hi friends
    I am new to Abap mapping PLZ can any one help me on abap mapping code with Source structure and target structure

    hi
    u can refer this link ...there is an example code written...refer that ..it might help u ..
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4

  • Observer Design Pattern: Looking for redesign ABAP OO code example

    Hello folks,
    I am looking for an example for ABAP OO code that has been redesigned by applying the Observer Design Pattern. I would be very interested in both the code before as well as the code after the pattern is being applied.
    Thanks in advance and kind regards, Alex

    Observer can be implemented using the EVENTS.
    I had recently implemented the observer at one of my client's place. I had screen with so many ALVs. One ALV was kind of editable and other were just showing the information of the current row as well as some total information. So, initially I started with the Main ALV and SUB(1 and 2) for other ALVs. Now, when I need to refresh my ALVs based on the main ALV data, I had to explicitly update the data of the each Sub ALV. The code was kind of static and requirement was not yet fixed.
    Later on we need to add one more ALV on the same screen. It was easy to change the existing method where I was doing the explicit refresh of each ALV. But I thought of using the Events.
    I created an event REFRESH_DETAILS for main ALV. so, when data gets changed (which I was catching by DATA_CHANGED event of ALV), I raise the event.
      RAISE EVENT REFRESH_DETAILS
        exporting new_data = it_Data.
    In Sub ALVs, I created the event handler method to handle the event REFRESH_DETAILS of the main ALV.
      methods: handle_refresh_details
          for event REFRESH_DETAILS of ZCL_MAIN_ALV.
    I also had to register the Handler.
      SET HANDLER me->handle_refresh_details FOR ALL INSTANCES.
    I'll soon write a post on my [ABAP Help blog|http://help-abap.zevolving.com/] with all the details.
    Regards,
    Naimesh Patel

  • BEX Query to ABAP Transaction Code

    Hi,
    RRI from BEX Query to ABAP Transaction Code When I Right clivk and select GOTO on my Delivery order
    say 120012 It shd directly go into tht particular DO The transaction code is vl33n
    but when i give ABAP Transaction as reciever object it only goes to the initial screen of query where we manually need to give the DO Number It does not show the DO 120012 directly
    thx,
    amar

    Hi Amar
    Try doing Assigning Infoobject to R/3 field in Assignment details RSBBS transaction:
    Check below thread for explaination
    Re: RRI -  Selection was not Restrcited
    Ravi

  • ABAP mapping code in XI or SAP

    Hi All,
             Where do I need to write the ABAP mapping code, in XI or SAP. CAn it be written at either of them and used in interface mapping?
    Regards,
    XIer

    Hi,
    These are some of the weblogs which they have used ABAP mapping. In all of them they have used it in XI only. Also I have never seen the way you have mentioned.
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    /people/rahul.nawale2/blog/2006/11/01/dynamically-sending-a-mail-to-the-po-creator-using-xslt-abap-mapping
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    Regards,
    ---Satish

  • ABAP SUDOKU code

    Hi plzz can anybody plzz send me the ABAP SUDOKU code (executable) plzz its very urgent plzzzz..
    points will be rewarded ...

    Hello,
    Go to these: [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2bsolution%2bto%2bmedium%2band%2blow%2bcomplex%2bsudoku%2bpuzzles] and [https://wiki.sdn.sap.com/wiki/display/Community/ABAP+Games] to get more games!
    Regards,

Maybe you are looking for