Executing order of routines in UpdateRule

Hi,
I'm just about to write some routines in my UpdateRule, In the routines I'll use some global variables that are set in the code. Now, my question is if the KFs or CHR-routines are run first when the UpdateRule is executed in the loading procedure?
Thankful for answers,
Best Regards
/Daniel
Thankful for answers,
Best Regards
/Daniel

My experience have been different... I have had two routines written for Characteristics lets say nr 1 and 10 (counting from above and down in the update rule).
In nr 1 the global variable ZINT is set to '100', in the routine for CHR nr 10 I can use ZINT's value ('100') in the code. Obviously the routine for CHR nr 1 is executed before nr 10. Now, my question is if I have one routine written for a KF and one for a CHR - which one is executed first.
Thanks for your thoughts
Best Regards
/Daniel

Similar Messages

  • Base price calculation in sales order using Routines.

    Dear all,
    I have a requirement related to usage of routine in pricing procedure. The requirement is as given below.
    A base price for a material is entered in the contract manually using a customized condition record.Later a sales order will be raised with reference to contract. now we need to bring the price entered in the contract to sales order after some calculations done using a customized "Z TABLE"
    We are trying to use routines to trigger to calculate the base price in the sales order.
    Please suggest what type of routine to be used in such cases(ex formula,pricing etc)
    Also please go through the below mentioned example for better understanding.
    Contract price : Quantity 3: base price 10,000 per day Total : 30,000 perday
    ZTABLE : number of days per month will be maintained in the table based on the working days.
    Sale Order : Quantity 1 : Month working days 23 total 2,30,000 (We need to calculate this total and display as base price in sales order)
    Please suggest how to address this using routines.

    Dear Mudigonda,
    As per your scenario you are creating sales order with reference to the contract and here in contract you are maintaining the manual price . that means the same manual price has to copy to sales order level then as per the calculation rule it will multiply with your Z table value .
    For this requirement you can make some changes in copy control from contract to sales order, here at item category level you have to change pricing type to 'B' so that what ever your manual price value will populate to sales order level after that due to calculation rule value will change .
    Regards,,
    C.B Reddy.

  • Syntax error  while executing Key Figure routine

    Hello,
    I am posting my question again, as I have not got any solution. Please help it will be really appreciated. Here's the description
    I am loading data from flatfile to an Infocube with 3 keyfigures: Sales Price , Sales Quantity, Sales Revune. Getting values for Sales Price and Salea Quantity  from flatfile and calculating for Sales Revunue IO_VB_REV using routine
    - I created Transformations, and under Rule Group: Standard Group box I have not mapped IO_VB_REV  any datasource field and see 'X' sign against the field.
    - In rules detail screen, I add two source fields of Rule , IO_VB_QU and IO_VB_PRC. I see IO_VB_REV already added under 'Target fields of Rule' section
    - I then add the only following line to routine
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU * SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    - Clicking on check button it gives no syntax error message. I save and exit back to Rule Details page.
    - For IO_VB_REV field If I select any of 2 options i.e. Fixed Unit or No conversion it gives me a dump. So I select 'from conversion' option. In that case I enter USD against 'Conversion Type' field. It gives me information box popup with 'Incorrect Input Message'
    - When check button hit on 'Rule Details' page, it gives me error message ' Syntax error in routine '
    Why is it giving me syntax error, inspite of the fact that I get 'no syntax error' message on routine page. Also why am I getting short dumps on changing Conversion Type

    Hi Olivier,
    I really thank you for ur efforts in helping me solving this problem. Below is complete description of KF defined,
    1. Created InfoObjects for Sales Quantity, Sales Price, Sales Revunue
    Definition of <b>Sales Quantity</b>
    Name: IO_VB_QU
    Type/Data Type : Quantity
    Data Type: QUAN - Quantity field, points to unit field with format UN
    Currency / unit of measure
    Unit / Currency: 0UNIT
    Definition of <b>Sales Price</b>
    Name: IO_VB_PRC
    Type/Data Type : Amount
    Data Type: CURR - Currency field, stored as DEC
    Currency / unit of measure
    Fixed Currency: USD
    Definition of <b>Sales Revunue</b>
    Name: IO_VB_REV
    Type/Data Type : Amount
    Data Type: CURR - Currency field, stored as DEC
    Currency / unit of measure
    Fixed Currency: USD
    2. As the data is being read from flatfile, created DataSource with fields for Sales ID, Sales Price, Sales Quantity. As I am reading unit for quantity from file (has values EA,BOX,CSE), I have a corresponding field UNIT in DataSource. No field for Sales Revunue.
    3. I use 'Create Transformation' functionality to automatically create transformations.
    4. Rule Details page of each of 3 KFs has following values
    <b>Rule Details page of Sales Quantity</b>
    Rule Type: Direct Assignment
    Aggregation : Summation
    Target Unit: 0UNIT
    Unit: from Source
    Source Unit: UNIT
    Source Fields of Rule: /BIC/IO_VB_QU, UNIT
    Target Fields of Rule: 0UNIT, IO_VB_QU
    <b>Rule Details page of Sales Price</b>
    Rule Type: Direct Assignment
    Aggregation : Maximum
    Fixed Target Currency : USD
    Currency: No Conversion
    Source Fields of Rule: /BIC/IO_VB_PRC
    Target Fields of Rule:  IO_VB_PRC
    <b>Rule Details page of Sales Revunue</b>
    Rule Type: Routine   
    Aggregation : Summation
    Fixed Target Currency : USD
    Currency: from Conversion
    Conversion Type: ??????.....(I entered USD it gives me Incorrect Input message)
    Source Fields of Rule: /BIC/IO_VB_PRC, /BIC/IO_VB_QU, UNIT
    Target Fields of Rule:  IO_VB_REV
    I have this line is the routine 
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *   SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC.
    Let me know if u need any other info......
    I really appreciate u trying  to help me
    Vidya

  • EBS execute order mutiple search string hit

    Hello,
    For different macthing purposes i have implemented several search strings.
    For example 1800#### and 206#####.
    Both work well, but sometime the note to payee information contains info that matches both search strings.
    Does the possibility exsist to 'rank' the action in case of multiple serach string matches?
    Greetings,
    Pascal

    I am not aware of any way to rank search strings.  My best advice is to find additional characters in the note to payee to help make the search strings more unique.  For example, the note to payees containing 1800#### that should hit the search string, might always have the same characters before or after the 1800#### - and those characters aren't in the note to payees that you don't the search string to hit on.  
    For example, the note to payees that should hit for 1800#### might have ABC 1800#### - and others have EFG 1800####.  You could create the search string as ABC 1800#### - and just map ABC to blank (space).  Then the items with EFG 1800#### won't hit the search string.
    If the static text is not right before or immediately after the 1800####, you can use ? in the search string to represent unknown characters.  Again, you would map ? to blank (space).  For example, if the note to payee one day might have ABCDE 12345 1800#### and then next day it has ABCDE 45678 1800#### - you could set up the search string as ABCDE???????1800#### - with ABCDE??????? all mapped to blank.  Instead of multiple ?'s, you can also use ?* to represent an unknown number of unknown characters.  For the previous example the search string would be ABCDE?1800#### with ABCDE? all mapped to blank.  The search string ABCDE?*1800#### will also work if the number of characters between ABCDE and 1800#### varies from day to day.  For example, it would also produce a hit for ABCDE vvv 1800#### and ABCD yyyy 1800####.
    All of my examples are for static characters prior to 1800#### - but the techniques will also work for static characters after 1800#### - or static characters before and after 1800####.
    Regards,
    Shannon
    Edited by: Shannon Moberg on Mar 28, 2011 9:36 AM

  • TS1424 Please do not refund my order of a book Executive Orders, by Tom Clancy. After waiting for the thoughtful refund, my Husband started to read the book and liked it, so he felt we should continue to pay for it. Just cannot trust what a Husband of 43

    My Husband started to read this book and then wanted me to keep it. Please continue to charge for the book. Thank you for agreeing to refund me for the error.

    Most of the people on these forums, including myself, are fellow users - you're not talking to iTunes Support here.
    If you have already contacted iTunes Support then do you have an email from them that you could reply to ? Or you can contact them again via the same process that you used previously

  • Output Control Routine for Order Confirmation

    Hi,
    I have a problem in sending out order confirmation when the customer have a credit block, no order confirmation is being sent.
    Checked on transaction NACE, the routine for Order Confirmation (Routine 2), returns a sy-subrc =4
    when  the credit block is set. What is the best way to correct this?
    Thanks,
    Catherine

    Create the new routine in VOFM->Requirement->Output Control. Make the required changes in routine source text and assign it to output procedure (NACE).
    Thank You,
    Ganesh

  • In which order operations will execute in Composit Operation by WCF-Custom adapter with SQLBindings?

    Suppose my Composite opertaion request schema is as below:
    <?xml version="1.0" encoding="utf-8" ?>
    <Request xmlns="http://[PROJECT_NAME].[COMPOSITE_SCHEMA_NAME]">
      <Insert xmlns="http://schemas.microsoft.com/Sql/2008/05/TableOp/[SCHEMA]/[TABLE_NAME]">
        <Rows>
          <[TABLE_NAME]>
            <[FIELD1_NAME]>[Value1]</[FIELD1_NAME]>
            <[FIELD2_NAME]>[Value1]</[FIELD2_NAME]>
          </[TABLE_NAME]>
        </Rows>
      </Insert>
      <[SP_NAME] xmlns="http://schemas.microsoft.com/Sql/2008/05/Procedures/[SCHEMA]" />
      <Delete xmlns="http://schemas.microsoft.com/Sql/2008/05/TableOp/[SCHEMA]/[TABLE_NAME]">
        <Rows>
          <[TABLE_NAME]>
            <[FIELD1_NAME]>[Value1]</[FIELD1_NAME]>
          </[TABLE_NAME]>
        </Rows>
      </Delete>
    </Request>
    Query is that in which order the requset message will be execute? Which one statement (Insert, SP or Delete) will execute first and
    Which one (Insert, SP or Delete) will execute in last?

    they will execute in the same order which you mentioned in the composite schema. Means they will execute order by nodes in the composite message
    have a look
    here , see below snap from that URL.
    in your case, the order will be
    1. INSERT
    2. SP
    3. Delete
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Purchase order thru E mail

    My client wants to send the Purchase oredr to Vendor thru E mail.So how to configure this.Also what is EDI.
    Pl. help urgently.
    Thanks

    hi,
    PO can be sent to using Outlook email or the Internal send within SAP.
    Message via E-Mail
    Use
    You can send purchasing documents to a vendor by e-mail.
    You can also send memos to an internal user from within the purchasing document, in which case the recipient can directly access the relevant document when processing the e-mail (executable mail).
    Prerequisites
    External Transmission
    Make the necessary Customizing settings
    The SAP system is configured for the transmission of external mails.
    The message determination facility has been set up in Customizing for Purchasing.
    You have defined a communication strategy in Customizing under Messages Output Control -> Message Types -> Define Message Types for <Purchasing Document> -> Maintain Message Types for <Purchasing Document> on the Default Values tab page, so that if no e-mail address can be found, for example, the system sends a fax.
    The following information is necessary:
    1.Data
    2.Value
    3.Comment
    Message type:
    Communication strategy
    E.g. NEU
    Choose a communication strategy or create a new one. Via the input help, you can branch to the maintenance function for communication strategies. Choose in the following window.
    Enter the necessary data on the Default Values tab page on the detail screen for the message type ().
    Processing routines
    Medium
    Program
    FORM routine
    5 (external transmission)
    SAPF06P (e.g. for PO)
    ENTRY_NEU
    The entries are identical to those of the print output.
    Partner roles
    E.g. external transmission/LF
    Maintain master data
    Message records must have been created through master data maintenance (Purchasing menu). (See Creating Message Records)
    Enter the necessary data u2013 for example, role LF (vendor), medium 5 (external transmission) and time spot 4 (send immediately upon saving).
    SAP recommends that you work with time spot 4, so that the e-mails generated are sent immediately.
    If you work with processing time spot 1 (send via periodically scheduled job), you must schedule the program RSNAST00 periodically for message output, so that messages are generated and e-mails sent.
    An e-mail address is stored in the vendor master record.
    An e-mail address is stored in the user master record.
    Please note that you must also maintain an e-mail address for user IDs with which batch-jobs are carried out.
    Internal Transmission
    Make the necessary Customizing settings:
    You have maintained the Customizing settings for Purchasing under Messages, Output Control -> Message Types ->Define Message Types for <Purchasing Document> -> Maintain Message Types for <Purchasing Document>.
    The following information is necessary:
    1.Data
    2.Value
    3.Comment
    Message type:
    Time-spot
    Transmission medium (output medium)
    Partner role
    E.g. MAIL
    E.g. 4 (send immediately upon saving)
    7 (SAPoffice)
    MP (mail partner)
    Enter the necessary data on the Default Values tab page on the detail screen for the message type ().
    Mail title and texts
    E.g. mail from purchase order
    Processing routines
    Medium
    Program
    FORM routine
    7 (SAPoffice)
    RSNASTSO
    SAPOFFICE_AUFRUF
    Partner roles
    E.g. SAPoffice/MP
    SAPoffice/LF
    Maintain master data
    Message records must have been created for the message type MAIL through master data maintenance (Purchasing menu). (See Creating Message Records)
    For more information on the internal and external transmission of e-mails, refer to the Basis documentation under Business Workplace (BC-SRV-GBT).
    Further information on external transmission is available in the Basis documentation under SAPconnect and in the section External Sending in the SAP System.
    Activities
    External Transmission
    If you have specified the processing time-spot 4 (send immediately upon saving), the system will immediately generate and transmit a message when you save the purchasing document.
    If you have specified the processing time-spot 1 (send via periodically scheduled job), you must initiate the output of e-mails manually.
    Result
    You see the documents generated in the SAP system under Office ->Work center -> Outbox -> Documents.
    Internal Transmission
    On the message screen of the Purchasing application (e.g. in the purchase order), enter the message type, the medium (SAPoffice) and the role (MP = mail partner).
    Choose Means of communication and enter your text on the following screen (<Purchasing document>: Send with note). Enter the useru2019s first and last names, for example, in the Recipient field.
    Executable mail
    If you wish to insert a transaction (because you want the recipient to view a purchase order, for example), choose Goto -> Execution parameters. Enter the necessary data, such as execution type (T = transaction), execution element (ME22N = Change Purchase Order), execution system, and the SET/GET parameters (BES for purchase order).
    Result
    If you have specified send immediately as the processing time-spot, the user will immediately receive a message or document when the purchase order is saved.
    The user can view the message sent to him or her via Office -> Work center -> Inbox.
    If the document in your inbox is an executable mail, you can click the right-hand mouse button and directly access the relevant purchase order, for example, via the menu thus displayed.
    Hope it works...
    Regards,
    Priyanka.P
    AWARD IF HELPFULL

  • Issue in sales order order import program

    Hi all,
    I need to create a Sales Order using interface tables.First I inserted the record into the interface table OE_HEADERS_IFACE_ALL.I populated necessary columns in it.
    Then I executed Order Import Concurrent program giving value of order source(which I created using order import source setup),order reference(which is origSysDocumentRef column value in the above said interface table).
    But the concurrent program is not picking up the records in the interface table and its output shows no order to process.As a result no record is inserted in the OE_ORDER_HEADERS_ALL table.
    I dont understand where the problem lies.Please help me out to solve the issue.
    Thanks,
    goutam

    Hi Sandeep Gandhi,
    Thanks for your reply.
    Now Order Import Concurrent program picks up the header records from the OE_HEADERS_IFACE_ALL interface table successfully for processing.
    But during the process some errors are raised, and the error_flag in the header interface table is set to 'Y'.
    I want to know where can i find those errors,so that I can correct them.
    Is there any error log tables that contains these errors occured during import?
    Or we have any other way to identify it?
    Please help me..
    Thanks,
    goutam

  • How to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller

    we are using VS 2013, I need to run multiple Coded UI Ordered Tests in parallel on different agents.
    My requirement :
    Example:   I have 40 Coded UI Test scripts in single solution/project. i want to run in different OS environments(example 5 OS ).  I have created 5 Ordered tests with the same 40 test cases. 
    I have one Controller machine and 5 test agent machines. Now I want my tests to be distributed in a way that every agent gets 1 Ordered test to execute. 
    Machine_C = Controller (Controls Machine_1,2,3,4,5)
    Machine_1 = Test Agent 1 (Should execute Ordered Test 1 (ex: OS - WIN 7) )
    Machine_2 = Test Agent 2 (Should execute Ordered Test 2 (ex:
    OS - WIN 8) )
    Machine_3 = Test Agent 3 (Should execute Ordered Test 3
    (ex: OS - WIN 2008 server)  )
    Machine_4 = Test Agent 4 (Should execute Ordered Test 4 (ex:
    OS - WIN 2012 server) )
    Machine_5 = Test Agent 5 (Should execute Ordered Test 5 (ex:
    OS - WIN 2003 server) )
    I have changed the  “MinimumTestsPerAgent” app setting value
    as '1' in controller’s configuration file (QTController.exe.config).
    When I run the Ordered tests from the test explorer all Test agent running with each Ordered test and showing the status as running. but with in the 5 Test Agents only 2 Agents executing the test cases remaining all 3 agents not executing the test cases but
    status showing as 'running' still for long time (exp: More then 3 hr) after that all so  its not responding. 
    I need to know how I can configure my controller or how I can tell it to execute these tests in parallel on different test agents. This will help me reducing the script execution time. 
     I am not sure what steps I am missing. 
    It will be of great help if someone can guide me how this can be achieved.
    -- > One more thing Can I Run one Coded UI Ordered Test on One Specific Test Agent?
    ex: Need to run ordered Test 1 in Win 7 OS (Test Agent 1) only.
    Thanks in Advance.

    Hi Divakar,
    Thank you for posting in MSDN forum.
    As far as I know, we cannot specify coded UI ordered test run on specific test agent. And it is mainly that test controller determine which coded UI ordered test assign to which test agent.
    Generally, I know that if we want to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller.
    We will need to change the MinimumTestsPerAgent property to 1 in the test controller configuration file (QTControllerConfig.exe.config) as you said.
    And then we will need to change the bucketSize number of tests/number of machines in the test settings.
    For more information about how to set this bucketSize value, please refer the following blog.
    http://blogs.msdn.com/b/aseemb/archive/2010/08/11/how-to-run-automated-tests-on-different-machines-in-parallel.aspx
    You can refer this Jack's suggestion to run your coded UI ordered test in lab Environment or load test.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/661e73da-5a08-4c9b-8e5a-fc08c5962783/run-different-codedui-tests-simultaneously-on-different-test-agents-from-a-single-test-controller?forum=vstest
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Routine,delta upload

    Hi experts,
    i am new to bw and sdn .
    can u answer for my questions ,i was asked in my interview.
    1)what is the scenario of start routine?
    2)how to generate a report for present year and previous three years?
    3)what is the mechanism behind  delta upload?
    thanks in advance
    regards
    krisna

    Hi Krishna,
    1) Start Routine - Start routine is executed prior to executing of transfer rules, so if there is any global variable to be used in all transfer rules then it is better to declare that in start routine.
    After start routine execution is over then transfer rules r executed.
    Start routine are at two levels
    1. update roule
    2. transfer rules
    start routine is processed once per data package load .For ex : you want to eliminate a set of records based on dome criteria you can do that with start routine . But update rules or transfer rules are processed once per data record where you can manipulate each single record .
    There is an internal table called data_package which will have all the data available for processing you can later store all the data in another internal table (you can declare) which can later be used in update rules .
    3) Delta Upload Mechanism - Regarding the Delta upload mechanism, it's simply the mechanism that helps updating only the changed data, and not the full update. The field 0RECORDMODE determines whether the records are added to or overwritten. It determines how a record is updated in the delta process: A blank character signifies an after image, ‘X’ a before image, ‘D’ deletes the record and ‘R’ means a reverse image.
    You can check following link for details.
    http://help.sap.com/saphelp_erp2004/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Regards,
    Ashish.

  • Sales Order Apporval issue

    Hi,
    In my Business Case for Printing Item i have to create a Sample Sales Order ( Order Type is ZSOR) based on that order i have to do sample production and delivery { No billing bcoz its free sample and also free of cost } once customer approves the material then customer will give the bulk Sales order { Order Type is ZBSO}
    How to Give link between to those two Sales order because at the time of creating the bulk sale order we have to take reference of sample sales order and  need approval
    how to solve the issue

    Hi,
    You can create authorization key
    create user status profile and assign authorization key
    Then assign status profile  to sales order type & item category
    Set this Status profile for Sample sales order now when your sampling process complete then authorized person will set status APPROVED FOR BULK ORDER PROCESS
    Then you can develop Copying requirements and assign in copy copy control
    When you take reference of sample sales order this routine will check weather approved status is set
    If yes will process if not will issue massage
    Kapil

  • Every delivery nos having same sales order should create single invoice.

    Hello All,
    My Business requirement is :
    For particular Order type if the deliveries belong to the same sales orders, then Routine allow creating Single invoice else it should spilt the invoice according the deliveries belonging to different sales orders.
    Before this routine is called i have to check conditions like 'delivery type' and sales area.
    So, I have copied routine FV60C001 , added conditions as per requirement. But how to code this requirement is my issue.
    Could anyone please suggest how to achieve this.
    Regards,
    Meena

    Hi,
    Check SAP Note 11162 - Invoice split criteria in billing document to seach other possible causes.
    Regards
    Eduardo

  • Executing subroutine after commit work, not on commit work

    Hi All,
    I want to execute my sub-routine after commit work, not on commit work.
    If any one have answer please mail me at  [email protected]

    Not sure if this helps you but this event is fired, when commit work is fired.
    Christian
    report test.
    class lcl_event_handler definition.
    public section.
        class-methods: on_commit_finished
             for event COMMIT_FINISHED
               of CL_OS_TRANSACTION_END_NOTIFIER.
    endclass.
    set handler lcl_event_handler=>on_commit_finished.
    commit work.
    class lcl_event_handler implementation.
    method on_commit_finished.
      break-point.
    endmethod.
    endclass.
    But check also oss note 704577

  • What is the url for executing PL/SQL

    what is the URL for 9i http pl/sql routines?
    http://machine:port/?????????
    thnx
    endre

    Hi endre,
    Are you looking for the URL for executing Oracle9i PSP routines?
    -shefali

Maybe you are looking for

  • Need a procedure to make minus query as output for 2 tables

    Can anybody help me to create a procedure so that I could get minus query of 2 table as a result. Requirement: I have two table 1- src_table_list ,2- tgt_table_list both tables have 2 columns : serial_no,table_name and 100 records each. and details m

  • Can I use Bluetooth headphones on G72?

    I have a G72 with bluetoth. When I access the bluetooth menu it only offers me to use it for file transfer, not connecting a device like headphones. Am I screwed or is there a solution?

  • No previews on import.

    Aperture 3.6, Mac os X 10.10.1 Some time age previews on import partly dissapeared. Trying to delete plist, completely remove aperture, creating new library. Nothing helped. Only some first images showing, other no. Check attached image. Photo system

  • FlexBuilder error - javaw.exe - No Disk - help!

    Hi I havejust installed Adobe Flex 3.0 - downloaded the trial version from Abobe.com. I have just build a small application, and whenver I try to turn it I get the following error: "javaw.exe - No Disk: "There is no disk in the drive. Please insert a

  • Expanded Metadata and Keywording Support

    I have been trying to work with Metadata and Keywording for photographs lately, and I have been a bit frustrated with how vague the subject is. I feel that the ability to find photos using a standardized controlled language is a very important topic