Why we should use Macros if we have function Module

Why we should use Macros if we have function Module and what is the Advantage of Macros than function Module
Moderator Message: Interview-type questions are not allowed.
Edited by: kishan P on Oct 7, 2010 2:22 PM

Put it this way... if you have blueprints for a car you wouldn't want to produce only one car, would you? You would want to produce as many as needed. In another example, you don't want to be able to use only 1 window in Windows. Each window has common features but have different values. That's the purpose of non-static entities
However, there are instances that you want to have only one value for something. That's when you use static entities.
Get it? =)

Similar Messages

  • Why we should use Statis entities?

    If we can access Static entities directly without creating instances, then why we should use None-Static entities? None Static entities are occupying resources too.
    Is there any disadvantage of Static entities?

    Put it this way... if you have blueprints for a car you wouldn't want to produce only one car, would you? You would want to produce as many as needed. In another example, you don't want to be able to use only 1 window in Windows. Each window has common features but have different values. That's the purpose of non-static entities
    However, there are instances that you want to have only one value for something. That's when you use static entities.
    Get it? =)

  • Why I should use an iCloud mailbox?

    Hello there. I discovered that now I can use a @icloud.com mail address simply enabling it from my iCloud preference panel in OS X. I have created an email address, but I have some questions:
    What happens to my @icloud.com address if I don't use a Mac (or iPhone, iPad, etc.) anymore?
    Will my iCloud mail be available forever from icloud website or using IMAP configuration?
    What is the maximum space granted?
    The final question is: why I should use an iCloud mailbox instead (for example) of a Gmail one? All contributes will be greatly appreciated!

    1) Nothing
    2) Yes, as long as Apple keeps the service going
    3) 5Gb for free. More if you pay.
    4) It's up to you. iCloud email supports push notifications on iOS devices. That's about the only difference compared to any other IMAP email account. iCloud also syncs and backs up iOS devices.

  • Pls explain me the use and purpose of following Function modules

    pls explain me the use and purpose of following Function modules
    1. G_MAX_PERIOD_AND_OFFSET_GET
    2.  DEQUEUE_E_TABLE
    3. FI_COMPANY_CODE_CHECK
    4. G_PERIOD_GET
    5. alv_display_function
    6. G_SET_GET_ID_FROM_NAME
    thanks ,
    phyrose

    1. <b>G_MAX_PERIOD_AND_OFFSET_GET</b>
    For given No. of period & periods it gives the offset
    <b>2. DEQUEUE_E_TABLE</b>
    To Unlock the table records
    <b>3. FI_COMPANY_CODE_CHECK</b>
    To validate Company Code
    <b>
    4. G_PERIOD_GET</b>
    Returns no. of Posting period & Special period for give company code, posting date & ledger
    <b>5. alv_display_function</b> -
    No such FM exists
    <b>
    6. G_SET_GET_ID_FROM_NAME -</b> Use this module to derive the internal set Id from the name that appears on the user interface, for example, in order then to import the set (see the function group documentation).
    The function module first determines a candidate list of sets based on the set name and the class that might have been specified that could match the set name. The class can also be masked (e.g. 000+ for all FI-SL sets, including dynamic sets).

  • What type of input should be provided to the proxy function module HR_trv_credit_card_transaction

    Hello All,
    I am trying to configure the proxy for credit card transaction in Trip module,For this the standard proxy class is being used. I am not able to find out what should be the input to the function module Hr_trv_credit_Card_transaction. This relates to some  control structures.Does anybody has some idea on this.
    Many thanks
    Papiya

    Hello,
    The manual on page A-3 has some useful information. I am posting it below. Additionally, I found that the SCXI-1104 series use a two-pole RC Butterworth filter. As you'll see in the notes below the 10kHz cutoff is the -3dB point for the filters.
    Filters
    Cutoff frequency (?3 dB)
    SCXI-1104 ............... 2 Hz
    SCXI-1104C ............. 10 kHz
    NMR (60 Hz) ............ 40 dB (SCXI-1104)
    Step response (either gain)
    Accuracy SCXI-1104 SCXI-1104C
    To 0.1% 1 s 200 ms
    To 0.01% 10 s 1 ms
    Hope this helps,
    John N
    Applications Engineer
    National Instruments

  • Why we are going for OOALV insted of function modules ?

    Why we are going for OOALV insted of function modules. ?
    Its very easy to use function modules directly compared to OOALV.
    IS there any particular reasons or any advantanges of using ooalv
    Thanks & regards,
    hari priya

    Hi
    a) from abap coding point of view,
    alv list is done with Function modules,
    alv gris can also be done with FM,
    but can also be done using OO concepts.
    b) Alv grid (using oo concept) requires
    designing the screen layout .
    Hence, in one screen, we can show more
    then one alv grid
    (we cannot show more than
    one alv list on one screen)
    c) ALV grid uses ActiveX controls
    present on the Presentation Server.
    Hence, it consumes More Memory
    on the presentation server.
    d) ALV LIST is Display Only.
    Whereas
    ALV Grid Can Be made EDITABLE for entry purpose.
    e) In alv grid, these options are possible,
    but not in alv list.
    without horizontal lines
    without vertical lines
    without cell merging during sorts
    display total lines above the entries
    ALV LIST Can be coded using only FMs
    ALV GRID Can be coded using FMs and object oriented concepts
    ALV LIST Can be displayed hieraicharlly
    ALV GRID cannot be displayed hierarichally
    <b>Reward if usefull</b>

  • Can i  use Two DSO 's in Function module

    hi experts,
    Can i  use Two DSO 's in Function module  .That FM is used for Layout
    I actually  want to  fill one DSO Refering the Data in Another DSO.
    Regard
    Naresh.

    In the first way the DSO's are usually called shared libraries or DSO libraries and named libfoo.so or libfoo.so.1.2. They reside in a system directory (usually /usr/lib) and the link to the executable program is established at build-time by specifying -lfoo to the linker command. In the second way the DSO's are usually called shared objects or DSO files and can be named with an arbitrary extension

  • Any reason why I should use Safari on my PC

    I use Mozilla now. I now have an Iphone. Is there any reason why I should download and use Safari on my PC? I expect the functions will be different from IE or Mozilla or maybe better, but is it a good idea to download and use since I have an Iphone?

    It's pretty irrelevant, unless you really want to sync bookmarks from your computer to your iPhone (you could do that with IE as well, but not Firefox).

  • Use of text element in function module

    hi friends what is the use of text element i.e list headings, selection texts,text symbols in a function module. where a can see these things after giving some text into it and activated.
                                        kumar.

    hi
    <b>Text Symbols</b>
    A text symbol is a named data object that is generated when you start the program from the texts in the text pool of the ABAP program. It always has the data type c. Its field length is that of the text in the text pool.
    Text symbols, along with the program title, list headings, and selection texts, belong to the text elements of a program. Text elements allow you to create language-independent programs. Any text that the program sends to the screen can be stored as a text element in a text pool. Different text pools can be created for different languages. When a text element is changed or translated, there is no need to change the actual program code. Text elements in an ABAP program are stored in the ABAP Editor (see Text Element Maintenance).
    In the text pool, each text symbol is identified by a three-character ID. Text symbols have a content, an occupied length, and a maximum length.
    Examples for text symbols in an ABAP program:
    ID
    Contents
    Occupied length
    Maximum length
    010
    Text symbol 010
    15
    132
    030
    Text symbol 030
    15
    100
    AAA
    Text symbol AAA
    15
    15
    In the program, you can address text symbols using the following form:
    text-###
    This data object contains the text of the text symbol with ID ### in the logon language of the user. Its field length is the same as the maximum length of the text symbol. Unfilled characters are filled up with spaces. You can address text symbols anywhere in a program where it is also possible to address a variable.
    If there is no text symbol ### in the text pool for the logon language, the name text-### addresses the predefined data object space instead.
    You can also address text symbols as follows:
    ... 'textliteral'(###) ...
    If the text symbol ### exists in the text pool for the logon language, this is the same as using text-###. Otherwise, the literal 'textliteral' is used as the contents of the text symbol. This is only possible at positions in the program where a variable can occur. You can create a text symbol for any text literal by double-clicking the literal in the ABAP Editor and replacing the literal with the text symbol.
    You should use text symbols in your program whenever they need to be language-specific - for example, in a WRITEstatement.
    If you program a list whose layout depends on field lengths, you should be careful, since the field length of text symbols will be different in different languages. You should therefore set the maximum field length of the field symbol so that there is enough space to translate it into other languages. For example, the English word 'program' has seven letters, but its equivalent German translation 'Programm' has eight.
    The following example shows the use of text symbols in WRITE statements.
    SET BLANK LINES ON.
    WRITE:   text-010,
           / text-aaa,
           / text-020,
           / 'Default Text 030'(030),
           / 'Default Text 040'(040).
    If the text symbols of the above screen shots are linked to this program, the output looks as follows:
    Text symbols 020 and 040 have no text symbols. For text symbol 020, the system displays a space. This is only displayed in this case because the blank line suppression has been turned off (see Creating Blank Lines).
    regards
    ravish
    <b>plz reward if helpful</b>

  • Use of Logical Database in function module

    Hello Experts,
    Is there a way of using logical database and Get enent inside a function module.
    I am trying to create a RFC for HR module and need this badly. Any help would be highly appriciated.
    Thanks,
    Gregory fernando

    This fm will work fine with all LDBs including PNP
    Have you checked the fm documentation ?

  • Error 101 using fp_job_open, fp_job_close in a function module

    I have earlier made a program generating a pdf used for printing. Used fp_job_open -> Call function xxx -> fp_job_close. This program works fine.
    Now I want to make a function module to generate this pdf for higher reusability, but when I call my generated FM its return sy-subrc = 1 and sy-msgno = 101. As far as I have investigate this error means "Job already open".
    I tried to comment out the call to the fp_job_open and fp_job_close, but then I have no possibility to mark the ls_outputparams-getpdf = 'X' and ls_outputparams-nodialog = 'X'.
    Any ideas anyone?

    I am not sure if this is the right forum for this question. Maybe: ABAP Developmnet -> Form printing [Output Management; is more proper?

  • How to use select-options in the function module of import parameter ?

    Hi ...
       I have created a BAPI and tested in SWO1 tcode , by giving the single value for an company code ( BUKRS ) , it executed properly .
    Same thing is working after implementing in a program .
    so now it is working for fetching a single company code details .
    My requirement is : I want to use select-options in program as well as in function module IN IMPORT PARAMETER.
    Program :
    REPORT  ZTEST.
    TABLES : T001 , ZBAPI_STR .
    TYPES : BEGIN OF TY_ITEM  .
              INCLUDE STRUCTURE ZBAPI_STR .
    TYPES : END OF TY_ITEM .
    DATA :WA_ITEM TYPE TY_ITEM ,
          ITEM LIKE STANDARD TABLE OF WA_ITEM INITIAL SIZE 0 .
    PARAMETER : BUKRS TYPE ZBAPI_STR-BUKRS.
    call function 'ZBAPI_FMT001'
      exporting
        bukrs         =  BUKRS
    IMPORTING
      RETURN        =
      tables
        itemtab       = ITEM
    IF ITEM IS NOT INITIAL .
      LOOP AT ITEM INTO WA_ITEM .
        WRITE : / WA_ITEM-BUKRS , WA_ITEM-BUTXT , WA_ITEM-ORT01 , WA_ITEM-LAND1 .
      ENDLOOP.
    ENDIF.
    FUNCTION MODULE :
    FUNCTION ZBAPI_FMT001.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(BUKRS) TYPE  EFG_TAB_RANGES
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRET2
    *"  TABLES
    *"      ITEMTAB STRUCTURE  ZBAPI_STR
    SELECT BUKRS BUTXT ORT01 LAND1 FROM T001 INTO TABLE ITEMTAB WHERE BUKRS = BUKRS .
    ENDFUNCTION.
    Regards
    Deepa.

    I have given a similiar example which i did
    Declare a
    Table type:Z_TT_PONUM             
    Short text  :  Select options  PO Number
    in SE11 tcode with row type eg: Z_ST_PONUM
    create a structure (this will be the row type)
    Structure          Z_ST_PONUM            
    Short text         Select Options Field PO number
    Compenent  Compent type
    SIGN       BAPISIGN      Inclusion/exclusion criterion SIGN for range tables
    OPTION       BAPIOPTION      Selection operator OPTION for range tables
    LOW       EBELN                      Purchasing Document Number
    HIGH       EBELN                      Purchasing Document Number
    In the function module import
    give as
    I_PO_NUM     TYPE     Z_TT_PONUM     opt  pass value Select options  PO Number
    Hope this is exactly what you want to know.
    So you create a structure simliar to mine but the low an high whould be your component
    then a table type  and then include that in the BAPI.
    Then pass your select-option value to this BAPI when you call this BAPI in the program

  • Parallelization is not happening using asychnronous RFC in a function module

    A BW data source ZTEST
    has been created based on a function module ZTEST_FM to pull the
    data into BW system from R/3.
    (Have checked the parellel jobs running in SM66 transaction).
    Inside the function module, an RFC function
    module ZTEST_RFC1 has been called asynchronously to implement the parallelization
    to improve the data extraction time into BW system.
    Note: In this scenario asynchronous
    RFC is used to implement the parallel processing.
    The logic in the function module is as follows.
    Function module ZTEST_FM Logic:
    Fetch data from HRP1000 table into an internal table IT_HRP1000 for
    OTYPE = ‘TN’.
    Loop at IT_HRP1000 into work area (WA).
    Call the RFC asynchronously by passing OBJID,OTYPE and ENDDA,
    Calculate SOBID which is the required output field from the RFC
    function module.
    Populate the results into final internal table E_T_DATA.
    The output structure contains the following fields.
    OBJID
    BEGDA
    ENDDA
    SOBID
    Could you please give us some suggestions, to implement the parellel processing using asychronous RFC in this scenario.
    Would appreciate your help.

    Your RFC call looks correct. For collecting the result you will need to code the callback routine Write_E_T_data. Inside the callback you can use the statement
    RECEIVE RESULTS FROM FUNCTION ZFHLS_EX_TNM_ACADEMY_RFC1 IMPORTING <parameter list>
    to retrieve the calculated result. For the declaration of the callback routine I recommend
    FORM Write_E_T_data USING iv_name TYPE c.
    The parameter iv_name containing the name of the RFC task turned out to be mandatory in my tests.

  • What is the difference using start condition and check function module

    what is the difference  between using start condition and check function module

    That's new to me, I thought a start condition was evaluated before the workflow started, and thus now workflow work item is available. That's why I think the only situation in which start conditions/check functions can't be used, is when the availability of a workflow log for investigation of exactly what stopped the workflow is a requirement.
    I suppose the <a href="http://help.sap.com/saphelp_46c/helpdata/en/4c/86bf43feca11d2a64f0060087a79ea/frameset.htm">SAP documentation</a> is in need of an update.

  • Where-Used List: Modifying SAP standard function module

    Hi,
    We have decided to modify SAP standard function module SD_SCHEDULING. But before that, we need to understand what impact this modification will have in the system. We will also estimate the risks with this modification.
    Therefore, I have taken Where-Used List for this function module. We are aware that this list is not comprehensive.
    Do you know any other way we could use to understand better what impacts this kind of modification may have? My colleagues say that this is the only way.
    Thanks in advance for your help.
    Regards,
    Jarmo Tuominen

    Hi Jarmo,
    Try this
    1). Goto Se16 and check the contents of table 'CROSS'.
    2). Enter 'F' in the first selection screen field
    3). In the NAME field enter the Function module SD_SCHEDULING and execute.
    4). The list will give you where all the FM has been used.
    Kindly note this is almost the same as doing a where used list. The where used list will only work correctly if the 'Update Navigation Index' works correctly in your system. So just to ensure the result of your where used list you can follow the above steps. This does not require the Update Navigation Index.
    Hope this helps
    Cheers
    VJ

Maybe you are looking for