Run an ABAP code from Notepad

Hello Experts,
I have created a standard ABAP code in SE38, one of my requirements is to be able to run codes that are stored in Notepad, I have used the READ DATA SET to read the contents of the Notepad, but how can I execute it?

HI
GOOD
TRY OUT THIS LOGICS
DATA FNAME(60) VALUE 'myfile'.
DATA: TEXT1(12) VALUE 'abcdefghijkl',
      TEXT2(5),
      LENG TYPE I.
OPEN DATASET FNAME FOR OUTPUT IN BINARY MODE.
TRANSFER TEXT1 TO FNAME.
CLOSE DATASET FNAME.
OPEN DATASET FNAME FOR INPUT IN BINARY MODE.
DO.
  READ DATASET FNAME INTO TEXT2 LENGTH LENG.
  WRITE: / SY-SUBRC, TEXT2, LENG.
  IF SY-SUBRC <> 0.
    EXIT.
  ENDIF.
ENDDO.
CLOSE DATASET FNAME.
DATA FNAME(60) VALUE 'myfile'.
DATA: TEXT1(4) VALUE '1234    ',
      TEXT2(8) VALUE '12345678',
      TEXT3(2),
      LENG TYPE I.
OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.
   TRANSFER: TEXT1 TO FNAME,
             TEXT2 TO FNAME.
CLOSE DATASET FNAME.
OPEN DATASET FNAME FOR INPUT IN TEXT MODE.
   DO 2 TIMES.
      READ DATASET FNAME INTO TEXT3 LENGTH LENG.
      WRITE: / TEXT3, LENG.
   ENDDO.
CLOSE DATASET FNAME.
thanks
mrutyun

Similar Messages

  • Debugging ABAP Code From Within WebDynpro

    Hi experts,
    I would like to check whether i can debug ABAP code from within webdynpro if i m using a remote J2EE server.
    So netweaver development studio is on my machine
    J2ee server is on a remote machine
    R/3 is also on another remote machine
    Thanks.
    Rgds,
    Daniel

    Hi Daniel,
    One thing note here is
    "You have debugging authorization in the ABAP Workbench in the relevant system.
    Since debugging in the ABAP system via load balancing is not supported, you must reconfigure your JCO destinations so that the calls take place on a dedicated ABAP application server. For Web Dynpro, this is done in the Web Dynpro Content Administrator. In the destination maintenance, specify Single Server Connection as the Destination Type ".
    Other than that ideally it works with j2ee and abap on diff systems.
    Regards
    Ayyapparaj

  • Q: ABAP code from db to memory decreases performance?

    Hi Gurus,
    We have a problem with some ABAP code (a start routine in a BI load). Basically the situation is: we had some code that builds a hierarchy (and inserts into hierarchy table) based on an attribute load, which worked fine but was to slow.
    As we do not need the hierarchy anymore we changed the code to only build the hierarchy in memory (the reason why we need it at all is because building this is the only way we can ensure to load the right records in the attribute load) and now, it is sloweru2026.which we do not understand.
    In general we have replaced:
    SELECT SINGLE * FROM /BIC/HZTVFKORG INTO nodelast
      WHERE nodeid = lastnode2.
    With:
      READ TABLE VirtHierarchy INTO nodelast
        WITH KEY nodeid = lastnode2.
    And replaced:
      UPDATE /BIC/HZTVFKORG FROM nodelast.
    With:
      MODIFY TABLE VirtHierarchy FROM nodelast.
    And replaced:
      INSERT INTO /BIC/HZTVFKORG VALUES node.
    With:
      APPEND node TO VirtHierarchy.
    As we see it, this should increase the performance of the start routine and the load (it takes several hours for just 50000 records), but it is actually running slower now...
    Does anybody have any idea about why this is not improving performance?
    Thank you in advance,
    Mikael

    Dear Mikael Kilaker,
    There are few reason:
    1. Data overload in memory.
    , if you try to execute
    SELECT SINGLE * FROM /BIC/HZTVFKORG INTO nodelast
    WHERE nodeid = lastnode2.
    With:
    READ TABLE VirtHierarchy INTO nodelast
    WITH KEY nodeid = lastnode2.
    And replaced:
    UPDATE /BIC/HZTVFKORG FROM nodelast.
    With:
    MODIFY TABLE VirtHierarchy FROM nodelast.
    And replaced:
    INSERT INTO /BIC/HZTVFKORG VALUES node.
    With:
    APPEND node TO VirtHierarchy.
    inside any loop conditions, this approach will make the system slow because it will load entire table into memory then system still need to cater space for selected value thus make system not really effective when you execute large volume of data.
    2. Unsorted data.
    It is really great practice if you sort nodelast. It is extra steps but the effect greatly decreased response time when system manipulating sorted data in the internal table.
    3. Use binary search in READ table.
    Try to use this code
    READ TABLE VirtHierarchy INTO nodelast
    WITH KEY nodeid = lastnode2 BINARY SEARCH.
    this practice also will increase performance when you execute large data inside internal table.
    Do reward points if this helps you

  • Debugging ABAP Code From Within Webdynpro Application

    Hello Experts,
    We use ABAP RFC Function in Our Java Webdynpro application, We need to debug the parameters pass from the webdynpro application to the ABAP Function.
    In order to do that we:
    1. Defined a JCO connection with "Single Server Connection" as the Destination Type.
    2. We have loged on to the relevant system and client using SAP GUI with the same user that run the webdynpro application.
    3. We have activate the external debugging in se80 Utilities -> Settings
    4. We have set an HTTP (external) breakpoint in the ABAP code,
    As mentioned in the article:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e9a9d90-0201-0010-478e-991dbea73a30
    However, we recieve a dump in the R3 system:
    RFC_DEBUGGING_NO_DIALOG_USER
    ShrtText
    RFC debugging is only possible with dialog user
    What happened?
    You attempted to debug a program by RFC. However, in this destination
    there is a user whose user type permits communication without dialog.
    This means, for example, that debugging with a system user is not
    possible.
    What can you do?
    Restart the program and take note of the following:
    You can do one of the following:
    1. You can change the user listed in the RFC destination and enter a
    dialog user.
    2. In the target system of RFC you can change the user type of the user
    listed in the RFC destination to 'dialog'.
    3. You can avoid this runtime error by omitting the RFC debugging.
    If in the ABAP debugger the statement cursor points to the statement
    (CALL FUNCTION ... DESTINATION), you must choose the function
    'Execute'.
    We checked and the user we use is defined as dialog in SU01 and the user that the webdynpro use to call the functio is the same user as was logged in.
    What else should we do?
    Thanks,
    Eyal

    Hello Eyal,
    You mentioned the following..
    1. Defined a JCO connection with "Single Server Connection" as the Destination Type. 2. We have loged on to the relevant system and client using SAP GUI with the same user that run the webdynpro application.*<---The system that you logged into is your source system*
    3. We have activate the external debugging in se80 Utilities -> Settings
    4. We have set an HTTP (external) breakpoint in the ABAP code,
    and the name of the system defined in the RFC connection will be your target system.
    As per the response (dump error message) in this target system you need to have a dialog user.
    And this dialog user needs to be defined in the RFC destination that is being used to connect to the target system.
    Regards,
    Siddhesh

  • How to Stop at Source System's Abap Code from BI Infopackage Trigger

    Hi Experts,
    I have enahanced 2 fields to some standard data source, that fields data is comiong fine to RSA3 in Source system.
    i am not getting 2 fields data to BI  PSA, but that 2 fields data  i am getting at in RSA3 Tcode  source system.
    i have tried all the ways to get data to BI PSA, but no luck.
    so, while running infopacke from BI i need to stop  at  Source System's Abap code where i have wriiten the code for those 2 fields.
    so, please any  one can explain, how to stop at source system's Abap Code once i  trigger infopackage from BI.
    Regards,
    Nagaraju K.

    Hi,
    which data source on your working?
    master data or transaction data
    enter the TCODE- CMOD
    choose the project
    select the funciton exit - EXIT_SAPLRSAP_001 - Transaction data
                                        EXIT_SAPLRSAP_002 - master data attr
                                        EXIT_SAPLRSAP_003 - mster data text
                                        EXIT_SAPLRSAP_004 - master data hier.
    choose the include program - ZXRSAU01.
    go to source code tab -> go to change mode -> find the code will start form here
    EX- : when " ZLIS_13_VDITM
    if not required don't put break-point .
    just comment it code.
    Thanks,
    Phani.

  • Calling ABAP Code From BSP

    Hello all,
    I dont have much idea of BSP ans would like to have some inputs from you all.
    I would like to know that can I call ABAP transaction from BSP page ?
    I have got a set of column entries just as an ALV column on my BSP page and I would like to provide hotspot or double click functionality so that for each of the entries in the table , the BSP page navigates to ABAP tcode and back to BSP page.Is this functionality possible?
    any help would highly be appreciated.
    Regards
    Amruta

    Hi Amruta ,
    You can't call an R/3 transaction directly from BSP.
    But you can achieve all the functionalities it does .
    for ex ..if an r/3 transaction is a report , u hav to code in BSP editor .u can call function modules from BSP .
    But one thing u hav to concern is ,,in BSP Apllication logic is seperatd from Business logic .
    U hav to move all your results into an itab / params and display that inside HTML tables .
    Start ur journey from here .......
    http://help.sap.com/saphelp_erp2004/helpdata/en/e6/e23fd8c47e11d4ad320000e83539c3/frameset.htm
    All the best .
    Regards,
    J

  • Move ABAP code from Z-namespace to other namespace

    Hello,
    I wonder how one can move custom ABAP code that was created in the Z-namespace to a NEW namespace, that was just created upon a confirmed "request namespace". The Z-namespace ABAP code is developed to work in SAP ERP.
    I have learned that you need the developer key of an SAP ERP installation to move ABAP code to the new namespace.
    Now, if a third party is performing this namespace move, what kind of developer key do they need? Can one give them the developer key of the created namespace or do they need THEIR OWN developer keys?

    Hello Rob,
    Thanks for the reply . I would not be deleting the objects from the sap namespace as I would need to do a double maintenance in both (customer as well as the sap namespace). However , if I have some code that gets generated and want  to have it in both my namespaces , would this(just copying it) be the best way ?
    Thanks,
    ~Vj

  • Not able to remove the ABAP code from Transformation

    Hello Experts,
    We have transformation for DSO in that for one infoobject, field routine is written, Break Point is hard coded there and it's move to production. Now we are trying to remove that break point from development and then move it production.
    we are doing following activity to remove the break point.
    1. Open the transformation.
    2. Open the field routine.
    3. Going to ABAP code in field  routine.
    4. Remove the hard coded Break Point from ABAP code.
    5. Saving the code.
    6. It's taking to again filed routine window.
    7. We close the window and activate the transformation.
    8. When again check the ABAP code in field routine then it shows hard coded Break Point again.
    9. Not able to remove the hard coded break point.
    Can anyone know how to do this.
    Help will be appreciated.
    Thanks

    Hi,
    As pointed above, after point 6 don't simply close the window but click on Transfer Value and then activate your transformation. Refresh the system and check again.
    Regards,
    Arminder

  • Debuggng ABAP code from  Portal ?

    Hi ,
    We are enhancing a portal Application ( EP 7.0) which points to the R/3 4.6 c in Backend . This Application  has customised views .  I want to debug  the ABP CODE and see   R/3 logic .
    1) How can  I see the RFC Function modules or Business objjects where logic pertaining to a I view is coded?
    2)How Can I stop at R/3 while processing in the portal , so that I can debug ?
    Thanks in Advance ,
    Dharma .

    There are 2 steps involved in external debugging:
    1. Setting up the external debugging in R3:
    GOTO se37
    From the main menu goto
    Utilities->settings
    Under settings goto:
    ABAP Editor->debugging
    Under debugging subscreen you will get option of external debugging, make sure your user ID is mentioned (Please make sure you login to the portal with the same ID as mentioned here)  and put a checkbox for "IP Matching".
    2. Puting an external breakpoint in ABAP Code:
    Now, you put a external breakpoint in your RFC FM which is getting called from the portal. Now your external debugging is set and once you click on the specific button on portal it will give you the debugging screen the moment it touches the ABAP code in R3.
    Regards,
    Raman.

  • Running the Java Code from Batch File

    Hi All,
    I have run a code sucessfully in Eclipse and it uses Logging API from Java
    When i try running the same program from batch file it throws error
    java.io.IOException: Couldn't get lock for log\Properties_Log_16Sep2009_150229
    at java.util.logging.FileHandler.openFiles(Unknown Source)
    at java.util.logging.FileHandler.<init>(Unknown Source)
    at com.adidas.SPM.LogMessage.<init>(LogMessage.java:26)
    at com.adidas.SPM.MainApplication.initialize(MainApplication.java:51)
    at com.adidas.SPM.MainApplication.main(MainApplication.java:102)
    I am working on a windows systems the folder log has all the permission i have provided with all
    Not sure why the code runs like this
    The batch file is like below
    set CURR_DIR=%CD%
    cd %CURR_DIR%\bin
    %CURR_DIR%\jre6\bin\java -classpath .;%CURR_DIR%\lib\FirstProject.jar com.test.MainApplication
    echo %ERRORLEVEL% The Error Level
    echo SUCCESS
    GOTO END
    :END
    pause
    Rgds
    Aditya

    Vikash.SunJava wrote:
    According to me the problem is that there are many instances trying to access the same property file. Nothing wrong with that since they only are reading it.
    The best way to do is that create a schedular in Windows that runs at some predefined interval (say 1 minute).Huh?
    >
    What will happen is if your program runs for more than a minute even then the new process will not start until old process is autaomatically killed. Please do not check this option if you want the program to exit normally.
    If the Task is still running stop at this time
    O_o

  • Again Issue with installing php 5.3.0 and accessing ABAP code from php

    I have the following initial set up:
    1.Downloaded u201CApache Friends XAMPP (Basis Package) version 1.7.2u201D.
    With this I got :
    Apache 2.2.12 (IPV6 enabled)
    MySQL 5.1.37 (Community Server) with PBXT engine 1.0.08-rc
    PHP 5.3.0 + PEAR (PEAR, Mail_Mime, MDB2, Zend)
    2.Installed the above XAMPP package.
    3.created a local test.php file and placed in htdocs folder
    3.Started the Apache server and executed the test.php file from u201Chttp://localhost/test.phpu201D. it runs absolutely fine. I can see the output in my browser. (just did an "Hello world" coding)
    4.Now I downloaded the SAPRFC (saprfc-1.4.1.All.zip)  package.
    5.In this, I got u201Cphp_saprfc_530.dllu201D which I added to my extension file where all the other dll files are present.
    6.Then I opened the u201Cphp.iniu201D file and added the above saprfc dll file to the extension directory   as u201Cextension=php_saprfc_530.dllu201D.
    7.Now I installed u201Cvcredist_x86.exeu201D.
    8.Finally I started the apache server afresh. I get the following message and the apache server is started.
    "PHP StartUp: saprfc: Unable to initialize module
      Module compiled with build ID=API20090626,TS
      PHP compiled with build ID=API20090626,TS,VC6
      These options need to match"
    i have SAPGUI installed on my PC.
    details of SAPGUI is
    release: final release 710
    file version: 7100.4.15.1047
    build: 1108370
    patch level: 15
    hotfix : 1
    Somebody please help me solve this.
    Thanks in advance,
    Pramod
    Edited by: PramodShankar B on Dec 11, 2009 11:53 AM
    Edited by: PramodShankar B on Dec 11, 2009 11:56 AM

    Pramod:
    I'm not sure which version do you need...but I would recommend you some trial an error...download the package 1.4 (All zip versions and try to find the one that suits you)...that's what I did for my PHP 5.2.4 because both PHP and the SAPRfc must have been compiled with exact the same ID.
    Greetings,
    Blag.

  • How can i export my custom abap code from one SAP system to another

    is there a way to export my custom code to any other SAP system.
    not the same client or server. say for ex: i develop a code in my system remotely and want to provide the same for my client to export into their system.
    maybe same versions but diff systems.
    is there a way to save as binary file or something?
    pls advice.
    thanks

    Hello,
    Yes u can do it.
    In SE38 give ur report name and click display.
    Now u will see ur code.
    In the MENU follow the path:
    Utilities-->More Utilities --> Upload/Download --> Download.
    Now ur report can downloaded to any format of file.
    Ask ur client to upload ur report in the similar fashion..
    Cheers,
    Vasanth

  • Execute ABAP code from within SAPScript code

    http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm

    Hi
    Do u have any question??? or are you trying to give suggestion???
    If u have query how to call a report in script here is ur answer
    The Form :
    /:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
    /:USING &EKKO-EBELN&
    /:CHANGING &CDECENT&
    /:ENDPERFORM
    The report :
    ZKRPMM_PERFORM_Z1MEDRUCK.
    DATA : BEGIN OF it_input_table OCCURS 10.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_input_table.
    * déclaration de la table output_table contenant les
    variables exportées
    DATA : BEGIN OF it_output_table OCCURS 0.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_output_table.
    DATA : w_ebeln LIKE ekko-ebeln,
    * w_vbeln LIKE vbak-vbeln,
    w_zcdffa LIKE vbak-zcdffa.
    * FORM CDE_CENT
    FORM cde_cent TABLES input output.
    it_input_table[] = input[].
    it_output_table[] = output[].
    READ TABLE it_input_table INDEX 1.
    MOVE it_input_table-value TO w_ebeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = w_ebeln
    IMPORTING
    output = w_ebeln.
    SELECT SINGLE zcdffa FROM ekko
    INTO w_zcdffa
    WHERE ebeln = w_ebeln.
    it_output_table-name = 'CDECENT'.
    MOVE w_zcdffa TO it_output_table-value.
    MODIFY it_output_table INDEX 1.
    output[] = it_output_table[].
    ENDFORM.
    Reward all helpfull anwers
    Regards
    Pavan

  • Debug ABAP code in InfoPackage

    Hi friends,
    How i can debug a ABAP code from a variable selection in Infopackage?
    Thanks,
    EA

    I guess you would have figured it out - but for the use of people who might chance upon this post while searching ...
    to debug the ABAP code in an Infopackage - you need to run it in dialog mode ( Start Data Load Immediately ) and not in background. This is because background processes cannot be debugged.

  • ABAP Store ABAP code locally  on the disk

    Hello
       I have a question, how download the Web dynpro ABAP code from the SAP System.
    Could You give me a hint how to save code locally on the disk?
    Regards
    Wojtek

    I started from http://code.google.com/p/saplink/ .
    Then in http://code.google.com/p/saplink/wiki/pluginList I found the plug-in for ABAP Web Dynpro.
    It still in ALPHA status and to be honest I got trouble installing it (in fact there is the note:  But WDA plugin requires SAPlink 0.1.3 or greater).
    You should get it running because I can see the nugg file.
    Eventually ask navigate to the http://code.google.com/p/saplink/issues/list and the other pages of http://code.google.com/p/saplink.
    Sergio

Maybe you are looking for

  • Mac OS 10.4 QuickTime Pro purchased, registered, then "nothing"

    Today I purchased QuickTime Pro 7 for Mac OS X online. I have placed the correct information into the preferences/registration area and verified inside of the QuickTime 7.0.1 preference registration area. The Pro features are not visible (as in "noth

  • Unable to create the protocol specific B2B message

    Hi, I recently created fresh new configurations on 10g Oracle B2B on a windows server. When i try to post an outbound ebxml 2.0 message, it fails with the below error: Description: Unable to create the protocol specific B2B message StackTrace: Error

  • Nokia Lumia 1520 Model Question

    Hello All, i just purchased a Nokia Lumia 1520 from Ebay. The seller advertised it as RM-940. How do i know if it is RM-940 and not RM-937 or RM-938? Is there any way i can find this information from settings or other option? Regards, SG

  • Can't download cover art

    No matter how mainstream the album is, iTunes fails to fetch its cover art. In fact, when I right click on an album and click on "show on iTunes store", it just says "No results for Massive Attack Mezzanine Angel", for example. FWIW, I -am- connected

  • Question about ADF BC security

    Frank: I was looking at Xtanto's inquiries and your response and this brought up something. I was under the impression that you can use the database to store userid and user information. However, passwords, roles etc have to be defined in system-jazn