Regarding Other Pattern In ABAP Editior

Hi,
I have one doubt in ABAP. In ABAP editior we can call fuction module through pattern push button.Same way there i find other Pattern button also. So i want know what is purpose of other pattern and where we have create ? what is the Transaction?Kindly Help to me.
Thanks & Regards,
Ramya

other pattern is used for  template purpose. u can create ur own templates there.
goto  utilities->ptrn->edit pattern and  create a new pattern
template means something like this
$$*________________________________________
FORMS name  start  with FS_
$$*________________________________________

Similar Messages

  • How to implement Strategy pattern in ABAP Objects?

    Hello,
    I have a problem where I need to implement different algorithms, depending on the type of input. Example: I have to calculate a Present Value, sometimes with payments in advance, sometimes payment in arrear.
    From documentation and to enhance my ABAP Objects skills, I would like to implement the strategy pattern. It sounds the right solution for the problem.
    Hence I need some help in implementing this pattern in OO. I have some basic OO skills, but still learning.
    Has somebody already implemented this pattern in ABAP OO and can give me some input. Or is there any documentation how to implement it?
    Thanks and regards,
    Tapio

    Keshav has already outlined required logic, so let me fulfill his answer with a snippet
    An Interface
    INTERFACE lif_payment.
      METHODS pay CHANGING c_val TYPE p.
    ENDINTERFACE.
    Payment implementations
    CLASS lcl_payment_1 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                 
    CLASS lcl_payment_2 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                   
    CLASS lcl_payment_1 IMPLEMENTATION.
      METHOD pay.
        "do something with c_val i.e.
        c_val = c_val - 10.
      ENDMETHOD.                   
    ENDCLASS.                  
    CLASS lcl_payment_2 IMPLEMENTATION.
      METHOD pay.
        "do something else with c_val i.e.
        c_val = c_val + 10.
      ENDMETHOD.  
    Main class which uses strategy pattern
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        "during main object creation you pass which payment you want to use for this object
        METHODS constructor IMPORTING ir_payment TYPE REF TO lif_payment.
        "later on you can change this dynamicaly
        METHODS set_payment IMPORTING ir_payment TYPE REF TO lif_payment.
        METHODS show_payment_val.
        METHODS pay.
      PRIVATE SECTION.
        DATA payment_value TYPE p.
        "reference to your interface whcih you will be working with
        "polimorphically
        DATA mr_payment TYPE REF TO lif_payment.
    ENDCLASS.                  
    CLASS lcl_main IMPLEMENTATION.
      METHOD constructor.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD set_payment.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD show_payment_val.
        WRITE /: 'Payment value is now ', me->payment_value.
      ENDMETHOD.                  
      "hide fact that you are using composition to access pay method
      METHOD pay.
        mr_payment->pay( CHANGING c_val = payment_value ).
      ENDMETHOD.                   ENDCLASS.                  
    Client application
    PARAMETERS pa_pay TYPE c. "1 - first payment, 2 - second
    DATA gr_main TYPE REF TO lcl_main.
    DATA gr_payment TYPE REF TO lif_payment.
    START-OF-SELECTION.
      "client application (which uses stategy pattern)
      CASE pa_pay.
        WHEN 1.
          "create first type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_1.
        WHEN 2.
          "create second type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_2.
      ENDCASE.
      "pass payment type to main object
      CREATE OBJECT gr_main
        EXPORTING
          ir_payment = gr_payment.
      gr_main->show_payment_val( ).
      "now client doesn't know which object it is working with
      gr_main->pay( ).
      gr_main->show_payment_val( ).
      "you can also use set_payment method to set payment type dynamically
      "client would see no change
      if pa_pay = 1.
        "now create different payment to set it dynamically
        CREATE OBJECT gr_payment TYPE lcl_payment_2.
        gr_main->set_payment( gr_payment ).
        gr_main->pay( ).
        gr_main->show_payment_val( ).
      endif.
    Regads
    Marcin

  • Implementing DAO Pattern in ABAP

    This discussion implement DAO pattern asked the question of how to develop a DAO pattern in ABAP but i'd like to go a little deeper.
    The only answer given suggested the following design pattern:
    I don't have an coded example here, but isn't it sufficient for this pattern  to build an interface with some get- and set-methods? This interface can be implemented by several classes with different data retrieval logic. Then a static factory-method could do the job to decide during runtime which actual class is instantiated, returning the interface.
    Can anyone give an abstract description of this implementation relative to an SAP module (How would one approach this implementation in MM, PM, FICO, HR)
    Can anyone see any issues in this design?
    Can anyone provide an alternate design?
    Are we missing any steps?
    Together we can build a solid abap DAO everyone can use.

    I started to read about DAO pattern some days ago and found this great blog post:
    ABAP Unit Tests without database dependency - DAO concept
    I am starting to implement unit test in my developments and DAO pattern seems to be a clever choice.
    Regards,
    Felipe

  • Design Pattern and ABAP Objects

    Hello Friends,
    I would like to know, if ABAP Objects can be used to do pattern oriented programming ?
    For example GANG of four has provided almost more then 30 design pattern ( MVC, singelton, Obserable, FACADE,,,etc) can we implement patterns using ABAP ??
    Many thanks
    Haider Syed

    Hi,
    Take a look at the following site:
    http://patternshare.org/
    It has all the basic patterns from the GOF and a lot more. I can recommend the ones from Martin Fowler but be sure you start with the ones from the GOF.
    All patterns are described by using UML so it's very easy to translate them into ABAP OO code.
    Regarding your other question. For the observer pattern I used an interface which the SAP had already created if_cm_observer and created my own abstract observable class. The observable class is nearly a 100% copy of the java.util. one
    regards
    Thomas

  • Is abap thread safe? Some question in Singleton pattern in ABAP

    Hi Grus,
    I have a very basic question but really make me headache...
    Recently I am learning the design pattern in ABAP and as you know in JAVA there is a key word "Synchronized" to keep thread safe. But in ABAP, I didn't find any key words like that. So does that mean ABAP is always a single thread language? And I found that there is a way looks like "CALL FUNCTION Remotefunction STARTING NEW TASK Taskname DESTINATION dest" to make multi-thread works. As you can see it use the destination, so does that mean actually the function module is always executed in a remote system, and in every system, it is always single thread?
    Could you help me on the question? Thanks a lot, grus
    And here comes up to my mind another question...It's a little bit mad but I think it may works....What if I set every attribute and method as static in the singleton class...Since as you can see it is already a singleton so every attribute in it should be only one piece. So then I don't even need to implement a get_instance( ) method to return the instance. Just call "class_name=>some_method( )" directly then singleton is achieved...What do you think?
    BR,
    Steve

    Steve,
    I've the same question, few days ago I tried to use the singleton in ABAP. In Java programming is possible to use the same reference in two sessions or programs, sharing attributes, methods and all data, but I could not do in ABAP.
    In my test I created a program with one global class using the singleton pattern, so I expected that when I run my program and see the reference returned after the get_instance method it should be equal to the same program run in another session, but the ABAP will create a new reference and instantiate again.
    So I deduced that the only way to share it between sessions in ABAP is using the ABAP Shared Memory Objects.
    I can be wrong, but I think that ABAP use a thread by user session (Each window) and we can't change it.
    Best regards.

  • Design Patterns in ABAP.

    Hi,
    I want to know about the Design Patterns in ABAP.
    Regards,
    Sourav

    hi sourdi
    Below are the list of Design pattern in abap .
    Singleton: ensuring single class instantiation
    Adapter: making class interfaces compatible
    Factory: encapsulating object creation
    MVC: decoupling business logic from the view
    Facade: providing a simplified interface
    Composite: treating individual objects and compositions uniformly
    Decorator: forming a dynamic chain of components to be used as one by the client
    regards
    chinnaiya P

  • Is it possible to call a class method using pattern in ABAP editor.

    Hi,
         Is it possible to call a class method using pattern in ABAP editor.
    Thank U for Ur time.
    Cheers,
    Sam

    Yes,
    Click patterns.
    Then choose Abap objects patterns.
    Click on the Tick
    It will give a new screen
    Here Give the name of the class first.
    Then the object (instance of the calss)
    And finally the method ..
    it will give you the pattern
    Hope this helps.

  • Workbench pattern feature - Other Pattern

    Hi there,
    does anybody know how to create a specific pattern to be used with the "Pattern" feature in abap workbench?
    Thank you

    Hi,
    Try this way
    1.se38>change>Utilities -> More Utilities -> Edit Pattern -> Create Pattern
    2.Enter the name of the pattern and press enter
    3.After enterting your pattern and press SAVE
    4.For apply this pattern in your program, press Pattern -> Other patterns
      and enter your pattern name.

  • Setting up custom patterns in Other Patterns

    Hi Experts,
                      Where can I  set up my own custom pattern so that its inserted into my report when I give the corresponding name in the other patterns button?Is there any thread for the same...which explains the steps.
    Thanks and Regds
    Abhi
    Edited by: abhishek singh on Jul 28, 2009 12:09 PM

    Hi Abhisek,
    If you want to create your own patterns, you can follow this step:
    menu utilities --> more utilities --> edit pattern --> create pattern.
    Type in the code you want to use as a pattern.
    Save it and back out.
    Now once you create it there, you should be able to enter in the "Other Pattern" field.
    Hope it will help you.
    Thanks,
    Sarita Singh Rathour

  • Regarding Server patterns

    HI guys,
    Could you guys tellme what are the Merits and demerits in installing SAP/DB in different pattern as follows
    1) SAP/DB in one box
    2) ABAP/DB in one box and JAVA/DB in another box
    3) Installing all instances(CI/DI etc) seperately
    Have any document related to this..explaining about this
    regards
    Chandra

    thanks

  • Can you install a java add-in to a database other than the abap database?

    When doing a java add-in installation into an ABAP stack, is it possible to put the java into it's own database, not just a different schema in the same database?  If so, do you know where in the installation process it lets you do this?  Thanks.

    Hi Rick,
    No its not possible.
    For addin installation procedure, you have to follow the installation guide of the particular release.
    Regards,
    Debasis.

  • How to run others applications with abap commands

    Is there a mothed that can use it to run an application with abap statement?
    for example: how to open a text file in program with abap command?
    thank you very much.

    CALL FUNCTION '<b>WS_EXECUTE'</b>
    EXPORTING
      DOCUMENT                 = ' '
      CD                       = ' '
       <b>COMMANDLINE</b>              = ''
      INFORM                   = ' '
      <b> PROGRAM                 </b> = 'NOTEPAD'
      STAT                     = ' '
      WINID                    = ' '
      OSMAC_SCRIPT             = ' '
      OSMAC_CREATOR            = ' '
      WIN16_EXT                = ' '
      EXEC_RC                  = ' '
    IMPORTING
      RBUFF                    =
    EXCEPTIONS
      FRONTEND_ERROR           = 1
      NO_BATCH                 = 2
      PROG_NOT_FOUND           = 3
      ILLEGAL_OPTION           = 4
      GUI_REFUSE_EXECUTE       = 5
      OTHERS                   = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Here...
    In the <b>CommandLine</b> you can give the path where the file is located like for Example
    C:\Test\Hello.txt.
    In the <b>Program</b> you need to give the application that you want to open that file.
    if helpful reward points...
    Regards,
    Vivekananda Varma Dandu

  • Regarding BADI's in ABAP

    Hi,
    Can anybody tell me What is meant BY <b>BADI's</b>!
    Also what are the main diffrences between <b>User-Exits and BADI's</b>!
    Can anybody explain me wether any diffrent types of <b>BADI's</b> are available!
    Can anybody provide me documentation with the examples
    for <b>BADI's</b>.
    If anybody is having good material on the same please post it.
    (or)
    Please send the material to
    My Personnal Mail id : <b>[email protected]</b>
    Thanks in advanace.
    Thanks & Regards,
    Rayeez.

    I.What is Badi?
    1.New SAP enhancement technique
    2.To accommodate user requirements not available / too specific to be included in the SAP standard Program
    3.Based on ABAP Objects – It has Interfaces & Methods
    4.Guaranteed 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
    II.BAdi & Customer-Exit
    1.Though different enhancement technique, BAdi has following distinct features
    -Uses Object oriented approach
    -Two parts - Definition and its Implementation - definition can either be SAP provided or user may also create it
    -no longer assumes a two-system infrastructure (SAP and customers)
    -allows multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like)
    3.BAdi – where to find
    1.Look for BAdi in IMG and in component hierarchy (using transaction SE18)
    2.Create own implementation of the add-in (complete coding for Methods) and activate
    3.Enhancement's active components are called at runtime.
    BAdi Definition (SE18)1.To include Business Add-Ins in the program
    - Define an interface for the enhancement in the SAP menu under Tools-> ABAP Workbench -> Utilities -> Business Add-Ins -> Definition (transaction SE18)
    -Call the interface at the appropriate point in application program
    -Customers can then select the add-in and implement it according to their needs
    BAdi Implementation (SE19)
    1.ABAP Workbench ->Utilities -> Business Add-Ins -> Implementation (transaction SE19)
    2.Find the suitable Business Add-Ins present in system (Use IMG or Component hierarchy)
    3.Use Add-Ins Documentation to understand functionality & to decide
    4.Implement the Add-Ins
    -a class is created with the same interface
    -Finalize coding for the method
    5.Implementations are discrete transport objects and lie within the namespace of the person or organization implementing them
    check the SAP help link on BADI's
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    /people/sergey.korolev/blog/2005/03/14/the-time-for-me-to-have-a-badi-of-my-own
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ef6c0507-0701-0010-7395-e526c68bbc4e
    Thanks & Regards,

  • Regarding parallel queries in ABAP same as in oracle 10g

    Hi,
       Is there any way we can write parallel queries in ABAP, in the same way we do in oracle 10g.Kindly see below;
    alter table emp parallel (degree 4);
    select degree from user_tables where table_name = 'EMP';
    select count(*) from emp;
    alter table emp noparallel;
    SELECT /*+ PARALLEL(emp,4) / COUNT()
    FROM emp;
    The idea here is to distribute the load of select query in multiple CPUs for load balancing & performance improvement.
    Kindly advise.
    Thanks:
    Gaurav

    Hi,
    >    Is there any way we can write parallel queries in ABAP, in the same way we do in oracle 10g.
    sure. Since it is just a hint...
    SELECT *
      FROM t100 INTO TABLE it100
      %_HINTS ORACLE 'PARALLEL(T100,4)'.
    will give you such an execution plan for example:
    SELECT STATEMENT ( Estimated Costs = 651 , Estimated #Rows = 924.308 )
           4 PX COORDINATOR
               3 PX SEND QC (RANDOM) :TQ10000
                 ( Estim. Costs = 651 , Estim. #Rows = 924.308 )
                 Estim. CPU-Costs = 33.377.789 Estim. IO-Costs = 646
                   2 PX BLOCK ITERATOR
                     ( Estim. Costs = 651 , Estim. #Rows = 924.308 )
                     Estim. CPU-Costs = 33.377.789 Estim. IO-Costs = 646
                       1 TABLE ACCESS FULL T100
                         ( Estim. Costs = 651 , Estim. #Rows = 924.308 )
                         Estim. CPU-Costs = 33.377.789 Estim. IO-Costs = 646
    PX = Parallel eXecution...
    But be sure that you know what you do with the parallel execution option... it is not scalable.... .
    Kind regards,
    Hermann

  • Regarding the Authorization in ABAP-HR

    Hi all,
        I want to know about the Authorizations in the ABAP-HR. If any body is having any material regarding the can you plz share with me...
    thanks in advance,
    Suresh

    Hi Kutam,
    Chk these Links....
    Can i have the list of infotypes .
    abap hr
    http://www.asug.com/client_files/Calendar/Upload/HR_STRUCTURAL_AUTHORIZATIONS.ppt
    Reward Points if Useful
    All the Best
    Gokul

Maybe you are looking for

  • PC with ATI X1900 Graphics card - Can't drive my 23" Apple display

    I recently assembled new PC with A8N-SLI mobo and ATI X1900 All-in-Wonder card (with DVI-I out) driving a new Apple Cinema 23" display. I've not been able to get the display to come up on boot except for a few occasions when I disconnect and reconnec

  • W2k Designer 6i release 2 and Linux 8.1.7

    It seems that the Designer 6i is specificly designed for Oracle 8i 8.1.6 and Not 8.1.7 which is the version that I have up and running. is there any work arounds that will allow me co connect to the Linux 8.1.7 with out haveing to install(multihome)

  • TM Status - 0

    If you use Time Management Status '0' and the client is maintaining the abcence quotas, abcenses, attendences, in time infotypes. then the when you are running the payroll, is the time data is integrated with payroll? like absences, attendances, leav

  • Rules in Mavericks: Disappeared!!

    I've been having problems with rules for sometime but this is now then end of the road. I've set up the required rule and its sort of fine for a day, it then disappears totally from the list. The only rule visible is The Apple rule. I've sent feedbac

  • Problem in loading images in JSP

    Hi My JSP page is loading few gif images. I am running tomcat 4 connected to apache 1.3.22 using MOD_WEBAPP connector. My JSP file loads perfectly alright when I load it directly from tomcat server that is port 8080. But when I load it from apache th