Modify existing program

Hello friends,
Can we modify any existing SAP program.
I heard we need Access key? is it true ?
What is the difference between Access key and developer key?

You have to get access key to modify the standard SAP programs. However you can use BADIs, Exits to make some enhancements or modifications.
BADIs are explained as below:
Business Add-Ins
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
• In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
• In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
DEFINING THE BADI
1) execute Tcode SE18.
2) Specify a definition Name : ZBADI_SPFLI
3) Press create
4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
multiple use.
5) Choose the interface tab
6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
7) Dbl clk on interface name to start class builder . specify a method name (name,
level, desc).
Method level desc
Linese;ection instance methos some desc
8) place the cursor on the method name desc its parameters to define the interface.
Parameter type refe field desc
I_carrid import spfli-carrid some
I_connid import spefi-connid some
9) save , check and activate…adapter class proposed by system is
ZCL_IM_IM_LINESEL is genereated.
IMPLEMENTATION OF BADI DEFINITION
1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
2) Specify aname for implementation ZIM_LINESEL
3) Specify short desc.
4) Choose interface tab. System proposes a name fo the implementation class.
ZCL_IM_IMLINESEL which is already generarted.
5) Specify short desc for method
6) Dbl clk on method to insert code..(check the code in “AAA”).
7) Save , check and activate the code.
Some useful URL
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for “BBB” sample program.
“AAA”
data : wa_flights type sflight,
it_flights type table of sflight.
format color col_heading.
write:/ 'Flight info of:', i_carrid, i_connid.
format color col_normal.
select * from sflight
into corresponding fields of table it_flights
where carrid = i_carrid
and connid = i_connid.
loop at it_flights into wa_flights.
write:/ wa_flights-fldate,
wa_flights-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
“BBB”
*& Report ZBADI_TEST *
REPORT ZBADI_TEST .
tables: spfli.
data: wa_spfli type spfli,
it_spfli type table of spfli with key carrid connid.
*Initialise the object of the interface.
data: exit_ref type ref to ZCL_IM_IM_LINESEL,
exit_ref1 type ref to ZIF_EX_BADISPFLI1.
selection-screen begin of block b1.
select-options: s_carr for spfli-carrid.
selection-screen end of block b1.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli.
Customer User Exits:
Customer Exit is a hook and also we have to add our own functionality so we have to write the code in include file and activate that project in CMOD.
Whereas in User Exit ,we are writing the code in SAP namespace. So am thinking that its no need to create project and activating that project for user exit. Is it right? For User Exit also we have to create project please clarify me
User Exits:
User exits allow you to add additional functions to the SAP standard.
Programs with user exits contain subroutine calls at certain points in their syntax that are identified by the prefix USEREXIT. The actual user exits are located in an include that has been assigned to a module pool. This is where customers can include any changes (enhancements) that they want to make to the system. These includes are always processed during program flow.
Advantage: In principle, customers can modify anything they want that is found in the include (tables, structures, and so forth).
Disadvantage: SAP cannot check the individual enhancements themselves which often leads to errors in the enhancement process.
User exits (Function module exits) are exits developed by SAP. The exit is implemented as a call to a function module. The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
Customer exits are not available for all programs and screens found in the SAP System. You can only use customer exits if they already exist in the SAP System.
Customer Exit
SAP creates customer exits for specific programs, screens, and menus within standard applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
If you want to enhance the functionality of your SAP System, you should take advantage of the exits available in standard applications. There are two main reasons why you should use exits rather than modifying SAP software yourself. Add-ons attached to exits have the advantage that:
• They do not affect standard SAP source code
When you add new functionality to your SAP System using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.
• They do not affect software updates
When you add new functionality to your SAP System using SAP’s exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects’ names ensure that they will not be affected by any changes or new additions to the standard software package.
Customer exits are not available for all programs and screens found in the SAP System. You can only use customer exits if they already exist in the SAP System. You can find more information about locating applications with pre-defined exits in Locating Applications that have Exits

Similar Messages

  • How to modify existing concurrent program

    I want to edit and modify existing pl/sql concurrent program.
    what are the steps required to do this?

    Hi,
    Pls keep in mind that modifying standard programs is not advisable. You will get SPAU (http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/61ec66e33611d1954b0000e82de14a/frameset.htm) when you upgrade your SAP system. Try to make an own version and include as much as possible from the standard program.
    Eddy

  • Problem in modifying existing records in dbtab

    Hi Experts,
    I am doing a report where I have created two dbtab's , one for data getting saved and
    other for fetching data and modifying exsiting records..
    For eg - let ZABC be the table where I need to insert or update records and ZXYZ is the table where
    I need to fetch and modify existing records.
    Now my probelm is :
    In case of inserting new records (multiple records ) into my dbtab ( ZABC ) its working ,
    but modifying existing records in another dbtab (ZXYZ ) its not wroking !! plz advice !!
    If my select querry for modifying exsiting records is:
    SELECT *  FROM ZXYZ  INTO TABLE ITAB WHERE MATNR EQ S_MATNR.
    *****then its inserting a newline along with the existing records.
    but when my querry is,
    SELECT single *  FROM ZXYZ  WHERE MATNR EQ S_MATNR.
    then its modifying the existing records, but only the first record.
    Loop at itab.
    if sy-tabix  = 1.
    zabc-matnr = matnr.
    zabc-idnrk  = idnrk.
    zabc-budat = s_budat.
    zabc-menge = menge1.
    ZXYZ-menge = ZABC-Menge + MENGE1.
    ZXYZ-BALC  = ZXYZ-Menge   -   MENGE1.
    ELSEIF sy-tabix  = 2.
    zabc-matnr = matnr.
    zabc-idnrk  = idnrk.
    zabc-budat = s_budat.
    zabc-menge = menge2.
    ZXYZ-menge = ZABC-Menge + MENGE2.
    ZXYZ-BALC  = ZXYZ-Menge  -  MENGE2.
    ELSEIF sy-tabix  = 3.
    zabc-matnr = matnr.
    zabc-idnrk  = idnrk.
    zabc-budat = s_budat.
    zabc-menge = menge3.
    ZXYZ-menge = ZABC-Menge + MENGE3.
    ZXYZ-BALC  = ZXYZ-Menge   -  MENGE3.
    ENDIF.
    INSERT ZABC.
    IF SY-SUBRC EQ 0.
    MODIFY ZXYZ.
            IF SY-SUBRC = 0.
              MESSAGE : I002 WITH 'RECORD CREATED'.
                ENDIF.
    ENDIF.
    Please advice
    Karthik
    Edited by: Karthik R on Aug 24, 2009 9:42 PM

    Hi,
    This is because in the second case you are not selecting records into an internal table.
    As a result only the first record which satisfies the where condition is fetched.
    Check if the program goes into the loop when you write second select query.
    KR Jaideep,

  • How to modify existing code of SQVI report?

    Hi Expert,
       There is a SQVI report which has already been created but we need to change the one for new requirement.
    is there any way to modify existing code for new requirement?
    Can we edit in abap workbench?
    Thanks & Regards
    Savita

    Savita,
    You can not modify SQVI system generated code. You need to go to SAVI change mode and make modifications. If your requirement is a sort of additional fields or inserting come code into the program , then SQVI is not the choice. You need to use Infoset Queries (SQ03, SQ02, Sq01).
    KJogeswaraRao

  • Modify existing rebate condition and exclusion

    Hi
    We are rebate agreements for customers. Currently I want to modify rebate condition in one of rebate agreement.
    Scenario: let us June 10th 2010 onwards, the rebate % is 3% for Profit center 'xxxx' & customer 'yyyy' instead of 1%. And 3% needs to accrued on billing docs going forward. How to set up this.
    I tried to modify existing rebate condition using VBo2 as follows: went into rebate agreement using VBo2, changed rebate % for condition record with effective from 06/11/2010 and Saved.  problem when I ran VBOF program, system posted reversal accrual for old rebate condition 1%. Old condition record validity from 01/01/2009 Valid to 12/31/2011.
    I have one more question. We want to set up rebate condition for all materials exclude some of them. we have thousands of materials for which we need to calculate rebates. but we want to exclude some materials in the rebate agreement. How to set up such exclus
    any ideas really appreciated
    thnx

    The key of your condition table (the one supporting your condition record in the agreement) is evidently Profit Center / Customer.  So for any combination of profit center and customer, you can maintain a rate and validity period. 
    You are attempting to maintain two separate records having the same key.  As you have experienced, the system does not allow it.
    The simple solution is to expire that rebate agreement and start a new one with the updated validity period and conditions.
    As for excluding certain materials, you need a more detailed key in your condition table.  Something else from the material master seems appropriateu2014Commission Group for example.  Maintain commissionable materials in group 01 and non-commissionable ones in group 02.  Then a key combination of Commission Group / Profit Center / Customer  would work well for you.
    Regards,
    Ken

  • Modify existing Message

    Hi all,
    I need to change text/html part of message which I have in mail format. How to do this easily without loosing other parts of message?
    Or maybe you know some better way to create kind of simple proxy for SMTP which would add and replace some text in HTML part of email?
    So far I am reading message from plain stream of mail text representation (got it from Subethamail SMTP server) into JavaMail Message object. I had problem, when my changes to message were not reflected - I posted question on http://stackoverflow.com/questions/7674775/how-to-modify-existing-java-mail-mimemessage-body-parts/ and solved this one by calling message.saveChanges();
    The issue is that when I call message.saveChanges() headers seams to be lost - especially those around Content Type and Charset.
    My code looks like this:
    public void resend(InputStream data) throws Exception {
            Transport transport = mailSession.getTransport();
            MimeMessage message = new MimeMessage(mailSession, data);
            Object content = message.getContent();
            if (MimeMultipart.class.isAssignableFrom(content.getClass())) {
                MimeMultipart mimeMultipart = (MimeMultipart) content;
                for (int i = 0; i < mimeMultipart.getCount(); i++) {
                    MimeBodyPart bodyPart = (MimeBodyPart) mimeMultipart.getBodyPart(i);
                    if (bodyPart.getContentType().startsWith("text/plain")) {
                        String cnt = updateContent((String) bodyPart.getContent());
                        System.out.println("ContentType = " + bodyPart.getContentType());
                        System.out.println("Content = " + cnt);
                        String contentType = bodyPart.getContentType();
                        System.out.println("Updating content type to = " + contentType);
                        bodyPart.setContent(cnt, contentType);
                    } else if (bodyPart.getContentType().startsWith("text/html")) {
                        String cnt = updateContent((String) bodyPart.getContent());
                        System.out.println("ContentType = " + bodyPart.getContentType());
                        System.out.println("Content = " + cnt);
                        String contentType = bodyPart.getContentType();
                        System.out.println("Updating content type to = " + contentType);
                        bodyPart.setContent(cnt, contentType);
            } else {
                String cnt = updateContent((String) message.getContent());
                System.out.println("ContentType = " + message.getContentType());
                System.out.println("Content = " + cnt);
                String contentType = message.getContentType();
                System.out.println("Updating content type to = " + contentType);
                message.setContent(cnt, contentType);
            message.saveChanges();
    }Mark on Stackoverflow suggested that problem is in bodyPart.setContent(cnt, contentType); call...
    Hope that makes sense for you... and you will be able to help me...
    Thanks in advance
    Konrad
    Edited by: 890134 on 2011-10-07 08:29

    JavaMail wasn't really design to support "editing" of existing messages.
    That's caused some problems over the years and I've had to fix a number
    of bugs in this area. The current version (1.4.4) definitely works better
    than older versions, but I won't be surprised if there are still bugs.
    Even so, your code is making a number of invalid assumptions about the
    structure of messages. I would suggest looking at the msgshow.java
    demo program. It includes code that visits all the parts of a message.
    It should be straightforward to extend that code to detect the parts you
    want to modify and to change the content of those parts using the
    setContent (or setText) method.
    If it's still not working for you, provide more detail about what you're doing,
    including a same message. (Send the details to me at [email protected]
    if you prefer.)

  • FNDLOAD doesnt modify concurrent program definition

    Hi Here is what I do.
    Using FNDLOAD to move concurrent programs from Development to UAT instance. Here are steps to recreate
    1.) Use FNDLOAD to DOWNLOAD concurrent program definition from development instance.
    FNDLOAD apps/apps@instance 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct PROGRAM_XXXX.ldt PROGRAM APPLICATION_SHORT_NAME="XXAPP" CONCURRENT_PROGRAM_NAME="XXPROGRAM"
    2.) Use FNDLOAD to UPLOAD concurrent program definition to UAT instance. ( Brand new concurrent program)
    FNDLOAD apps/apps@instance 0 Y UPLOAD $FND_TOP/12.0.0/patch/115/import/afcpprog.lct PROGRAM_XXXX.ldt
    3.) Everything work fine, concurrent program gets migrated to UAT instance when moved first time.
    4.) Make change to concurrent program in Development instance, change like add new parameters or modify existing parameters.
    5.) Use same cammand as in step 1 to download the cocnurrent program definition again.
    6.) Use same commanad as in step 2 to upload the concurrent program definition. The command workd fine and there are no errors but the changes made to the concurrent programs are not reflected in UAT instance.
    I verified the LDT file was correct, newly created parameters were present in the new ldt file.
    Thanks
    Manu

    lev12d is the test instance.
    I meant if I use the ldt file to load in same instance where it was downloaded from, it works. Only when ldt from test instance is taken to UAT instance for loading, it doesn't work.
    1.) lev12d istance - program with 5 parameters, fndload to creat ldt i.e. ldt has 5 params.
    2.) lev12d instance - Delete two parameters and save - only 3 params left in lev12d instance conc program definition.
    3.) Use ldt created in step 1 to load the parameters, it works, after FNDLOAD UPLOAD conc prog in lev12d has 5 params in application.
    Same ldt created in step 1 ( with 5 params) when moved to UAT instance where conc prog has 3 params, after FNDLOAD UPLOAD the conc prog still has 3 params, it did not add new parameters.
    Let me know if it makes sense, any help or direction is highly appreciated.
    Thanks
    Manu

  • How do I find the ports a pre existing program used in DAQ?

    Hi all, 
    I am setting up a laser displacement sensor and trying to utilize a pre existing program that was created by graduate students before me. There are 4 wires coming from the laser displacement sensor that need to be connected to the DAQ but we have no information telling us where these wires are supposed to attach to the DAQ in order to run the pre existing program correctly. 
    Is there any way that we could figure this out? 
    Thank you for your help,
    mccutchen12c

    James, 
    Thank you for your help! Yes, we have looked at a couple different methods on how to tell if the information had been programmed by the previous grad students and we haven't had any success in finding that information. So I believe you are right in assuming its not documented.. We will do a better job of documenting for future grad students after us. 
    I have attached our code. Any insight you could give would be greatly appreciated!
    We have an Acuity AR200-6 laser displacement sensor with green, yellow, black and a wire that isn't wrapped that all lead to the serial port in the back of the computer and ground. We then have white, blue, orange and brown wires that do not have a location.. We did some research and the are as follows:
    white: laser disable
    blue: buttons disable
    orange: voltage output
    brown: voltage RTN
    We are starting to wonder if we are just not supposed to use the DAQ.. Can you confirm the connection is solely through a serial port? 
    Cheers, 
    Carley

  • How we modify print program in script

    hi gurus.
    how we modify print program in script, please tell elaborately.

    Hi ..
    first of all ... u have to check which is the print program for the given layout...
    how u can find out is ... in NACE transaction... for certain o/p type .. there will be configuration done against the layout .. i mean for the particular layout .. a print program wud be assigned.
    another way to find out the print program is thru table TNAPR..
    once u find out the print program.. make sure u have to make changes in the print program .. i  mean once u decide "for the requirement u have to make changes to the print program.
    Reward points if it is useful.
    Thanks,
    Manjunath MS

  • How to modify existing enhancement?

    I have requirement which require to modify existing enhancement.
    What are the steps involved to modify enhancement?
    thanks

    Hi,
    Check
    https://www.sdn.sap.com/irj/sdn/nw-development?rid=/webcontent/uuid/2342e1f3-0b01-0010-a186-fdd404884050#section19
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/3f6d016d0711d396a50004ac96334b/frameset.htm
    Edited by: Neenu Jose on Nov 18, 2008 7:48 AM

  • How to modify standard programs

    HI FRIENDS..........
    is there any way to modify standard programs.....

    Hi Suresh,
    in the past it was necessary to modify standard programs. Today SAP offers lots of possibilities to modify programs without doing what SAP calls MODIFICATION.
    Have a look at the <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm">Enhancement Framework</a>, especially the different <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/70/63da4023a28631e10000000a1550b0/content.htm">Enhancement Technologies</a>
    If you do not understand everything, don't worry: Nobody does but it gives you some hints.
    Let us know why and where you think about modification. I'm convinced there are many nice solutions on hand.
    Regards,
    Clemens

  • CC&B - development environment misses custom modified COBOL programs

    Hi,
    I’m trying to set up a CC&B 2.3 environment on my laptop to do some java development for a client.
    CC&B 2.3 is connected to my client’s database and is running on my “localhost:6500”.
    I can log on to that envirnment; however, because my client has a lot of custom modified COBOL programs – User Exits and Algorithms - my environment crashes whenever it tries to load a COBOL program, which is not in my local library.
    Will I need to download all my client’s CM programs into my installation?
    Any suggestions greatly appreciated.
    HFR

    can you paste the logs here?

  • If I already Own LR 5 and Elements 12, how will my subscription to Photoshop CC effect my existing programs?

    If I already Own LR 5 and Elements 12, how will my subscription to Photoshop CC effect my existing programs?

    No effect on your existing licenses,if you cancel your subscription some day ,you can use your licenses .

  • Upgrading to Leopard and Existing Programs

    Hi All,
    I am currently running Mac OS X 10.4.11 and I was thinking about upgrading to Leopard. However, I want to know if some of the existing programs that I currently use would remain on my computer. In particular, I currently use VMWare Fusion to run Windows XP. Within Windows XP, I have Office 2007 which I use very heavily for school. Will these programs still remain in working order after installing Leopard.
    Thanks in Advance
    Anthony

    these particular programs should work just fine in leopard.
    in general, the following is the safest way to upgrade make a bootable clone of your current tiger system using CCCloner or Superduper. (You'll need an external drive for that). upgrade the clone to leopard and see if everything works ok. if it does, you can upgrade your main drive.

  • Can I modify standard program RFASLD20?

    Hello experts,
    I Get the modification option when I try to change the program RFASLD20.  Can I modify the program? 
    I actually need to change the program at the FM FI_PAYM_FILE_OPEN , to add the Code page (unicode system).
    Cheers,
    Balaji

    Hi Balaji,
    I've never had a problem with the modification assistant not working. To modify a standard SAP report, you need a modification key from OSS. You should always use the modification assistant to record your amendments. Think carefully about whether there is another way of acheiving what you want -- perhaps using SUBMIT...EXPORTING LIST TO MEMORY, a couple of standard reports, and then merging them into yours.
    You could copy the standard report, and modify the copy, but then you put yourself outside of SAP's maintenance and bug-fix track -- you might end up having to re-copy to incorporate new features. I'd always recommend modification over copying.
    Thats all i can suggest........
    Let me know if you need some help.
    Manas M.

Maybe you are looking for