Difference between defun and Rule

Hi all,
Does anyone know the difference between <defun> and <Rule>? Can <defun> be used to generate a library of methods.. the only thing I think is you have to include the form with all these defun's to call any of those functions.
Would be nice if <defun> uses the same methodology as most programming languages... local variables are stored on stack, have higher precedence than global variables, their value is lost once the function returns, etc.... This is not the case in <Rule> where it can access the variables in the workflow which calls the rules! + localScope=false is the default value, etc.
Any other differences? (also validate if the differences I mentioned are correct).
Thanks,
Adi.

Jayant,
The Implementation Rule is we write required SQL codes and Business rule is more Description about what is the Implementation rule is about. Lets say for an Example CASE WHEN COLUMN='ID' THEN 1 ELSE NULL END so the Business rule can write some thing like this - To check for column value if value is ID then populate as 1 else populate Null.
Hope this answers your question. If in case you worrying about or thinking should i need to write in Business rule i would say dont worry about it.
Let me know if you are looking for more information.

Similar Messages

  • Difference between roles and rules

    Hi,
        I like to know the difference between the roles and rules from basic..
    Pls do  the needful.

    Rules tells the object identification of the standard task.Many workflow systems allow for escalation rules to be built into the process, ie when a manager does not action a task it gets escalated via the workflow to another manager. If the escalation time frame is set to 5 days, you need to ensure your tests take this into account and the result might be longer test cycles.
    Tasks can be assigned to an organizational unit but the strength of the workflow system is to enable business rules which select users <b>according to the data being processed</b>. For example, you might have one group of users associated with one quality notification type. The workflow can be configured to query the QM module directly to determine the users. You can define fallbacks using the default role associated with a task and allow agents to be specified on the fly by a supervisor.
    Using workflow, one can manage various tasks or steps to be executed by different users (based on users or roles).An action can be assigned to user or to a role.The routing mechanism for work items uses roles and organizational assignments to determine who receives which work item.roles can be assigned to users while creating organization structure in ppoce.
    hope this information helps
    Neerja

  • Differences between LSMW and BDC

    Hi All
    Please can you give me the few points about the differences between LSMW and BDC?
    Awaiting for your Responce
    Praveen

    Hai Check with the following document
    GOOD
    THERE IS THREE TYPE OF METHOD IN BDC
    BDC SESSION
    CALL TRANSACTION
    CALL DIALOG
    What is BDC or batch input
    The Batch Input is a SAP technic that allows automating the input in transactions. It lies on a BDC (Batch Data Commands) scenario.
    BDC functions:
    · BDC_OPEN_GROUP : Opens a session group
    · BDC_CLOSE_GROUP : Closes a session
    · BDC_INSERT : Insert a BDC scenario in the session
    · The ABAP statement "CALL TRANSACTION" is also called to run directly a transaction from its BDC table.
    It runs the program RSBDCSUB in order to launch automatically the session. The session management is done through the transaction code SM35.
    The object itself is maintanable through the transaction SE24.
    BDC methods:
    Method
    Description
    Parameters
    OPEN_SESSION
    Opens a session
    SUBRC (Return Code – 0 OK)
    SESSIONNAME (Session to be created)
    CLOSE_SESSION
    Closes a session
    None
    RESET_BDCDATA
    Resets the BDC Internal Table...
    None. Normally, for internal purpose…
    BDC_DYNPRO
    Handles a new screen
    PROGNAME (Name of the program)
    DYNPRONR (Screen Number)
    BDC_FIELD
    Puts a value on the screen
    FIELDNAME (Name of the field)
    FIELDVALUE (Value to be passed)
    CONSTRUCTOR
    Constructor - Initializes NO_DATA
    NODATA (No data character). The constructor is called automatically when the object is created.
    RUN_SESSION
    Launches a session with RSBDCBTC
    None
    CALL_TRANSACTION
    Calls a transaction with the current BDC Data
    MODE (Display Mode)
    UPDATE (Update Mode)
    TCODE (Transaction to be called)
    BDC_INSERT
    Inserts the BDC scenario in the session
    TCODE (Transaction to be called)
    BDC techniques used in programs:
    1) Building a BDC table and calling a transaction,
    2) Building a session and a set of BDC scenarios and keeping the session available in SM35,
    3) Building a session and lauching the transaction right after closing the session.
    BDC using Call Transaction
    BDC using Call transaction involves calling an SAP transaction in back ground from within the ABAP
    program. The process involves building an Internal BDC table containing the screen information needed to
    execute the required transaction and then passing this to the Call transaction command (See code example).
    The full procedure for creating a BDC program is as follows:
    What is the difference between batch input and call transaction in BDC?
    Session method.
    1) synchronous processing.
    2) can tranfer large amount of data.
    3) processing is slower.
    4) error log is created
    5) data is not updated until session is processed.
    Call transaction.
    1) asynchronous processing
    2) can transfer small amount of data
    3) processing is faster.
    4) errors need to be handled explicitly
    5) data is updated automatically
    BATINPUT/DIRECT INPUT
    A: Batch-inputs can not be used to fill the "delivery due list" screen because it is not a dynpro. This is a standard SAP report. A SAP report (check with "System -> Status") may be called using SUBMIT sentence with the appropriate options . It is preferred to call a report than create a Batch-input program.
    GO THROUGH THIS LINK
    http://www.guidancetech.com/people/holland/sap/abap/zzsni001.htm
    The LSM Workbench is an SAP R/3 based tool that supports the one-time or periodic transfer of data from non-SAP systems ("legacy systems") to SAP systems.
    The LSM Workbench helps you to organize your data migration project and guides you through the process by using a clear sequence of steps.
    The most common conversion rules are predefined. Reusable conversion rules assure consistent data conversion for different data objects.
    LSMW vs DX Workbench
    The LSM Workbench covers the following steps:
    Read the legacy data from one or several files (e.g. spreadsheet tables, sequential files).
    Convert the data from source format to target format.
    Import the data using standard interfaces (Batch Input, Direct Input, BAPI, IDoc).
    Experiences made in successful implementation projects have shown that using the LSM Workbench significantly contributes to accelerating data migration.
    SAP provides this tool along with documentation to customers and partners free of charge.
    Users of the LSM Workbench receive the usual support via SAP Net - R/3 Frontend (component BC-SRV-DX-LSM).
    Releases:
    Version 1.7.2 of the LSM Workbench ("LSMW 1.7.2") available
    Attention : LSMW 1.7.2 requires an SAP R/3 system with SAP R/3 4.0 or SAP R/3 4.5.
    Version 1.8.0 of the LSM Workbench (1.21mb) ("LSMW 1.8.0") available
    Attention : LSMW 1.8.0 requires an SAP R/3 system with SAP R/3 4.6.
    Version 3.0 of the LSM Workbench (1.89mb) ("LSMW 3.0") available for Web Application Server 6.10
    Attention : LSMW 3.0 requires a SAP WAS 6.10. Functionality of version 1.7.2 and 3.0 are identical !
    Version 4.0 of the LSM Workbench ("LSMW 4.0") integrated in Web Application Server 6.20
    Attention : LSMW 4.0 is an integrated part of SAP WAS 6.20.
    Thanks & regards
    Sreenivasulu P
    Message was edited by: Sreenivasulu Ponnadi

  • Differences between trigger and Integrity Constraints

    waht are the differences between trigger and Integrity Constraints

    waht are the differences between trigger and Integrity ConstraintsConstraints are to be preferred:
    "Declarative Ease
    Define integrity constraints using SQL statements. When you define or alter a table, no additional programming is required. The SQL statements are easy to write and eliminate programming errors. Oracle controls their functionality. For these reasons, declarative integrity constraints are preferable to application code and database triggers. The declarative approach is also better than using stored procedures, because the stored procedure solution to data integrity controls data access, but integrity constraints do not eliminate the flexibility of ad hoc data access.
    Centralized Rules
    Integrity constraints are defined for tables (not an application) and are stored in the data dictionary. Any data entered by any application must adhere to the same integrity constraints associated with the table. By moving business rules from application code to centralized integrity constraints, the tables of a database are guaranteed to contain valid data, no matter which database application manipulates the information. Stored procedures cannot provide the same advantage of centralized rules stored with a table. Database triggers can provide this benefit, but the complexity of implementation is far greater than the declarative approach used for integrity constraints."
    More:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/data_int.htm#sthref2976

  • Differences between BDC and LSMW

    Hello SAP Gurus,
    Kindly let me know the various differences between BDC and LSMW.
    Also, please tell me the STEPS of the CUT-OVER PLANNING (Shifting of Data from the Legacy System to the SAP System). Here, the "Data" means which data? Please explain in details.
    Looking for your early feedback.
    Regards,
    Kaushik.

    Hi,
    BDC- It is Batch data communication. Its used for data conversion from legacy system to SAP system. Only technical people can do it. Tcode is SHDB.
    LSMW- It is legacy system migration workbench. Its also used for data conversion from legacy system to SAP system. But it is role of functional consultant. 
    There are 14 steps in LSMW. As soon as you complete the one step, automatically it will go to next step.
    In general you can use LSMW. But if you want to transfer more than 40,000 data, then it is not possible in LSMW. That time you can take help of BDC.
    Cutover strategy depends upon how the organizations design their data load strategies. Normally, you decide the sequence of Data loads for Configuration  settings, Master data, Transaction data which follows whom and then you make a copy of the system as a  Production system a day before and after checking the successful data loads, you go-live 100% or partial again  depending upon organizational setup and policies.
    Cutover planning is highly site specific. There's no thumb rule. The stock data as on the date of going live should be correctly entered. But stock being a highly dynamic quantity, the strategy for loading should be crystal clear. Then you have to load all the back dated transaction on the stock. Some stock comes into your plant/storage location as return and some stock is actually delivered to your customer through sales orders of various kinds. 
    Please refer this link,
    [PP Cut over activity|http://www.sap-img.com/production/pp-questions-answers.htm]
    Regards,
    R.Brahmankar

  • Difference between RP_PROVIDE_FROM_LAST and RP-PROVIDE-FROM-LAST

    Can anyone tell me the difference between RP_PROVIDE_FROM_LAST and RP-PROVIDE-FROM-LAST?  Both the macros are same difference is with underscore(_) and hiphen(-).  Both are working fine for the functionality without any difference.  Then why there are two macros for a single functionality?

    Just providing the links are considered as link farming ( which are against the rules of the forums ), the links would be removed for the following reasons:
    1) If a link is provided( not many ) , then you must point out the explanation in it
    2) If the links were easily searchable by the OP
    3) If the links just direct you to sap documentation
    4) If the reply consists only bunch of link references.
    I think the 3rd & 4th point made your post to be deleted.
    There are no links which states the differences between these two Macro's. Mod's are doing their right job, please join them and make this forum clean
    Kesav

  • Exact difference between VOimpl and VORowimpl and EO.

    Can anybody tell me whats the exact difference between
    VOimpl and VORowimpl and EO.
    Thanks

    Entity Object :BC4J entity objects encapsulate the business rules (validations, actions and so on) associated with a row in a database table, view, synonym or snapshot.
    View Object : (ViewImpl)
    In the simplest terms, a BC4J view object encapsulates a database query and provides iteration over and access to the view rows in its result set.
    View Row : ViewRowImpl :
    Represents a single row in a view object.
    For more Details see OA Developer Guide.
    Thanks

  • Differences between archiving and inactivating a qualitative lookup within the Data Admin toolkit.

    Hi,
    Can you please let me know what could be the difference between archiving and Inactivating the Qualitative Lookup in Data Admin Tool Kit.
    Thanks,
    Rohini M

    When you inactive or archive something it is no longer available for selection.   The difference between inactive and archive is that inactive items will still appear available for searching purposes while archive items will not.  
    So lets say you have the following:
    List A
       - Item 1
       - Item 2
    List Items
    If you were to inactivate Item 1, end users would no longer see it available for selection when using the qualitative extended attribute.  However when they search for specs based on the extended attribute they would still be able to select Item 1 so they could find objects that used that value. If you were to archive Item 1, end users should no longer see it available for selection anywhere - including searching.
    Lists
    If you were to inactive or archive the entire List A, you would no longer see it available for selection when setting up qualitative lookup extended attributes.   I don't think there is anywhere you can search for extended attributes by lookup list currently out of the box so these would act similar.  If there was a place to search for extended attributes by lookup list then it would follow the same rules as above.

  • Keen to know difference between oks_k_headers_b and okc_k_headers_b

    Want to know difference between oks_k_headers_b and okc_k_headers_b .
    It would be appreciable if anyone tell me that why these two different tables provided by oracle though they carry similar records.
    Also which one is suitable to take while writing the query related to service contract module.
    Regards,
    Javed Khan

    user7199962 wrote:
    Want to know difference between oks_k_headers_b and okc_k_headers_b .
    It would be appreciable if anyone tell me that why these two different tables provided by oracle though they carry similar records.
    Also which one is suitable to take while writing the query related to service contract module.
    Regards,
    Javed KhanTABLE: OKS.OKS_K_HEADERS_B
    http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=OKS_K_HEADERS_B&c_owner=OKS&c_type=TABLE
    TABLE: OKC.OKC_K_HEADERS_B
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=OKC_K_HEADERS_B&c_owner=OKC&c_type=TABLE
    Where Is Commitment, Purchase Order and Credit Card Information Stored in the Service Contracts Tables? [ID 459982.1]
    Service Contracts Release 12 Migration [ID 372469.1]
    Service Contracts 11.5.10 Rules Migration [ID 265048.1]
    Thanks,
    Hussein

  • Difference between validation and susbstittution with tcodes

    hi all can any body tell me about difference between validation and susbstittution with tcodes
    regars
    sravya

    Hi,
    Settting up the FI Validations
    You can use additional validation to supplement the existing SAP logic to fit you into your businness needs.
    For e.g. to allow postings from company code 0001 to business area AA only.
    GGB0 - To maintain the validations
    Validation - Enter a validation name e.g. VBUS
    Applicaion Area - SAP module e.g. FI
    Calling Point - Dependent upon the application area that is selected.
    0001 - Document Header - validate enteries at document header, e.g BKPF table
    0002 - Line Items - check line item entris within a document, e.g. BSEG table
    0003 - Complete Document - check settings for the whole documents.
    e.g. Validation step 001
    Allowed company code '0001' to post to business area AA only. 'FI00' checks that line item is from FI.
    If checks failed, the error message number 14 is displayed to stop the transaction.
    Prerequisite
    <BSEG> $BUKRS = '0001' AND
    <BKPF> $GLVOR = 'FI00'
    Check
    <BSEG> $GSBER = 'AA'
    Message
    Type E No. 14 - Business Area not allowed for company 0001
    Output fields 1 - BSEG - GSBER 2 - BSEG - BUKRS
    3 - 4
    OB28 - Define Validations for Posting
    CC CallPnt Validation Description Activtn Level
    0001 2 VBUS Business Area Validation 1
    Activtn Level - 0 - Not Active 1 - Activated 2 - Activated for all except batch input
    GGB4 - Manage the activation of all validations in the SAP system.
    Validations, Substitutions, and Rules
    Purpose
    With the validations and substitutions software, you can validate and/or substitute data at the time of entry in the FI-SL System and other SAP Systems.
    Implementation Considerations
    You do not need to change the standard system to customize your validations and substitutions. For each installation, you can define exactly which validations and substitutions are necessary to ensure the integrity of your data.
    Features
    Validation
    In the SAP System, almost all input values are validated by a program or against tables or master files. Since some types of validations cannot be standardized, you can use FI-SL's validations program to create validations for your system.
    With validations, you can check values and combinations of values as they are being entered in the SAP environment. Validation rules are stored in the Rule Manager; as data is entered, the Integration Manager validates the data against the validation rules stored in the Rule Manager. Because data is validated before it is posted, only valid information enters the FI-SL System.
    You define validation rules using Boolean logic. When you define a validation rule, the system checks the validation rule to ensure that it is syntactically correct.
    You can also define the result of breaking the validation rule. For instance, you can specify that a message is issued but the user can continue processing. You can also force the user to correct the error before processing can continue.
    For more information, see Validation or What Are Validations?. For more information on using validations, see Creating a Validation. For more information on Boolean Logic, see Introduction to Boolean Logic.
    Substitution
    Substitution rules are stored in the Rule Manager. When data is entered in the system, it is substituted by the Integration Manager. The Integration Manager calls the Rule Manager. Substitution occurs before the data is posted to the FI-SL databases.
    You define substitution rules using Boolean logic. When you define a substitution rule, the system checks the substitution rule to ensure that it is syntactically correct.
    For more information, see Substitution or What Are Substitutions?. For more information on using substitutions, see Creating a Substitution. For more information on Boolean Logic, see Introduction to Boolean Logic.
    Rules
    A rule is a Boolean expression that you can use as a condition, as a check, or in another rule. Rules enable you to refer to frequently used Boolean statements simply by specifying the rule name.
    The FI-SL Integration Manager uses Boolean logic. When you use Boolean logic and syntax, you can:
    Validate data
    Substitute data
    Select ledgers for posting
    Transfer substitution data to a rollup ledger
    Select report data
    The Rule Manager stores the Boolean rules used to analyze data. The Integration Manager calls the Rule Manager and determines whether entered data should be used. If a Boolean statement is true, an action is taken; if a statement is false, no action is taken.
    Boolean logic is used in the following FI-SL modules:
    Validation
    Substitution
    Ledger selection
    Report Writer
    Rollups
    To use Boolean Logic in one of the functions listed, you create statements that are used as formulas in the FI-SL System. For more information on using Boolean Logic, see Introduction to Boolean Logic or Boolean Logic Statements and Rules.

  • DIFFERENCE BETWEEN ASSESSMENT AND DISTRIBUTION

    Dear Friends,
    What is the main difference between Assesment and Distribution?
    Thanks in advances.

    Hello,
    Please follow the forum rules
    1. No capital letters
    2. Search before posting
    DISTRIBUTION =========== Distribution was created for transfer primary costs from a sender cost center to receiving controlling objects. During distribution, only cost centers or business process can be used as sender. A distribution receiver can be a cost center, WBS element, internal order, cost object, or a business process. You can restrict the number of receiver categories in customizing. Primary Postings (such as, energy costs) are collected on a cost center, and allocated at the end of the period by means of the user-defined key. You can only distribute primary costs. During this process, the original cost element remains the same. Line items are posted for the sender as well as for the receiver, enabling the allocation to be recorded exactly. You can reverse distributions as often as required. You use the Cycle-Segment method to define sender-receiver relationships. PERIODIC REPOSTING ================= Differences between periodic reposting and distribution are due to information content and performance. For periodic reposting, no separate credit record is written on the sender for the cost element in the summary report. Instead, the totals record for the cost element is reduced on the debit side, which means that the original debit amount can no longer be checked there (u201Cunclean creditu201D). However, during distribution, the system writes a totals record for the credit (u201Cclean creditu201D). The information on the receiver is the same for periodic reposting and distribution (u201Cclean debitu201D). Compared with periodic reposting, during distribution, the system also updates the partner in the totals record for the sender. This means that the partner can be displayed in the information system on the totals record level. As fewer totals records are written during periodic reposting, performance is better than during distribution. ASSESSMENT =========== Assessment was created to transfer primary and secondary costs from a sender cost center to receiving controlling objects. During assessment, cost center or business processes can be used as senders. The receivers for an assessment can be a cost center, WBS element, internal order, cost object, or a business process. You can restrict the number of receiver categories in customizing. Primary and secondary posting are allocated at the end of the period by the user-defined key. During assessment, the original cost elements are summarized into assessment cost elements (secondary cost element category = 42). As the system writes fewer total records, the assessment has a better performance than periodic reposting and distribution. The system does not display the original cost elements in the receivers. Therefore, assessment is useful if the cost drilldown for the receiver is not important. Similar to distribution, the partner is updated in the totals record during distribution You can reverse assessments as often as required. You use the Cycle-Segment method to define sender-receiver relationships. Regards, Ravi

  • Difference between Appropriation and Proportion?- HFM

    Dear Professionals,
    I am new to HFM, I have a query regarding Value dimension.
    What is the difference between Appropriation and Proportion?
    If possible give me simple examples..
    Help me out
    Thanks
    Sarath

    Allocation is a subroutine in rules, and also a general concept of taking amounts from one place and spreading them using some method to other places. Proportion is a specific value dimension member which stores non-eliminated data after consolidation rules have been executed. Combine that with Elimination data and any adjustments from [Contribution Adjs] and that's the amount the child contributes to the parent entity.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Difference between 'setup' and 'configuration' in Oracle Apps

    Hi,
    Thank in advance.
    I want to know Difference between 'setup' and 'configuration'(Oracle Apps ). Could you provide the details with an example, please?
    Regards,
    Raghavendra Rao

    Business Requirement:-
    ===============
    A company may want to allow all of its employees to make purchases up to $10 without having such purchases approved. Another company may have a business rule that each employee’s approval limit depends on his or her position within the organization.
    Question:-
    =======
    How to reach the above requirement?
    Is it thorugh configuration or setup?
    It must be through configuration and not set up.
    Set up is something like one time.. Configuration can be changed depends on your business needs.
    Like if your company wants to increases the limit from 10 to 100$, then change in configuration is needed.
    Hope you got the answer.. if you want more explanation, please be specific....

  • What is the difference between earnings and allowances

    Hi
    Currently I am working as a payroll functional for Indian Legislation.What is the main difference between earnings and allowances? Is there any rule to classify any element as earning or allowance?

    Earnings
    Represents payments made to an employee other than perquisites and allowances.
    Allowance
    Represents the allowances that are paid to an employee, for example, conveyance allowance and house rent allowance.
    The element creation wizards setup a lot of this stuff for you. Check out the following Oracle Support article for more information on Indian payroll setup:     
    Oracle Human Resources (HRMS) for India Supplement (Doc ID 297146.1)

  • Difference between element and identity based version

    Can anybody tell me the difference between elment and identity based version of the Object with any example? which classes implement them?

    Hunky322 wrote:
    At first it struck me as odd, given how List, Set, and Map define equals, but the part the OP left off clears it up a bit: "..because element-based equality is not always well-defined for queues with the same elements but different ordering properties."This lineSo, you're saying you don't understand the following?
    >
    Queue implementations generally do not define element-based versions of the equals and hashCode methods but instead inherit the identity-based versions from Object because element-based equality is not always well-defined for queues with the same elements but different ordering properties.
    >
    Okay, here's the deal.
    For a List, equals() is true if both Lists contain the same objects and in the same order. That's pretty straightforward, and it makes sense.
    For a Set, equals() is true if both Sets contain the same objects. Order is not considered because Sets are not generally ordered. Again, this it straightforward.
    So, you might think that Queue might define equals in a similar fashion--either if both Queues contain all the same elements, or if they contain all the same elements in the same order. However, this doesn't really work very well. Since ordering is an important part of a Queue, the ordering should be considered for equality. However, unlike Lists, two different Queues containing the same objects might define ordering differently. One might be a FIFO and the other might be a PriorityQueue, so how do you compare those two queues for equality?
    There are no clear-cut rules for equality between two arbitrary Queues, so the Queue interface does not define an equals method that's related to the contents of the Queues.

Maybe you are looking for