URGENT: Custom Defined Macro

I developed the following macro: MAXL> create macro MIS2000.'@ISMBRSUBSTRING'(single,single,single) as 2> '@ISMBR(@MEMBER(@SUBSTRING(@CURRMBR (@@1),@@2,@@3)))' 3> spec '@ISMBRSUBSTRING(dimName,StartPosition,EndPosition)' 4> comment 'verifies if the substring of a current member in the specified dimension is a current member in another dimension'; We have a dimension "Year" with members 1999, 2000, 2001, 2002, 2003... and a dimension "Planversion" with members 2000_01, 2001_02,... 2001_12, 2002_01, ...So I use the CDM in a member formula as follows:IF(@ISMBRSUBSTRING(Planversion,0,4)) ....ELSE ....ENDIFI would like to check out if the current member in the year dimension equals the first 4 letters of the current member in the dimension "Planversion" and use this in an IF statement.When I used this macro in a member formula the application crashed immediately. Is there anything wrong with my macro? Or is there another way to get the desired result.I would need urgent help as I do need a solution by monday (next data load).Your help is highly appreciated. Gerald PS We use Essbase 6.14

It would have been easier if you had tried to do it. Just for fun... did you even try before asking.. I guess, since you are asking, you did not try. I kind of find it lame that people ask questions before even taking 2 mins to try it out.
Macros can be used in business rules but not calc scripts.

Similar Messages

  • URGENT--Custom Defined Macro Problem.

    Can u pls . explain what does ELSE;@@1-@' means in following.( pointed by<<---????????????). The macro is correct & working fine but I am unable to decode it fully.create or replace macro 'EEF'.'@MMOV'(ANY) as 'IF(@ISMBR(JAN));IF(@ISMBR(FY06,FY07,FY08,FY09));@@1-@PRIOR(@@1->DEC,1,@CHILDREN(Years));ELSE;@@1-@@1->BegBalance;ENDIF;ELSE;@@1-@' <<---????????????spec 'Calc Month Movement on Account'comment 'Valid for FY04 thru FY09 : BegBalance input to FY04 :Requires modification (or use of SubsVars) for later year BegBalance'Regards

    Turns out this problem can be resolved by the proper JDK settings.
    I was using JDK 1.6 to compile my code (as its a pain to find and download the 1.5 JDK). Essbase uses a 1.5 JVM.
    The following errors can be resolved by the proper javac settings:
    Java Virtual Machine error
    Wrong java method specification
    Here is the new javac line I used with JDK 1.6:
    javac -target 5 CalcFunc.java

  • Using Custom Defined Macro

    Hi
    I am trying to use the function *@ISUDA* in a custom defined Macro and call the Macro from a Calcscript.
    Macro is as follows:-
    create macro 'APPLICATIONAME' .'@macrofunc'(optional) as
    IF (@ISUDA("Account","UDAstring"))
    @SUM(1,2);
    ELSE     
    @SUM(4,2);
    ENDIF
    Calcscript is as follows:-
    SET UPDATECALC OFF;
    FIX(...)
    "Member"
    "A/c member"= @macrofunc ();
    ENDFIX
    Error given is as follows:-
    Error: 1200336 Error compiling formula for [Member] (line 8): [(] without [)]

    create macro 'APPLICATIONAME' .'@macrofunc'(optional) as
    You should try adding account name to the macro itself. I have not use macro as a return type but only as repeatable piece of code. Also, macros are used only with business rules but not calculation scripts
    IF (@ISUDA("Account","UDAstring"))
    "A/c member"= @SUM(1,2);
    ELSE     
    "A/c member" = @SUM(4,2);
    ENDIF
    Calcscript is as follows:-
    SET UPDATECALC OFF;
    FIX(...)
    %macrofunc ();
    ENDFI

  • @Prior and Custom Defined Macros

    Hello all,In planning applications, year and months are in seperate dimensions. For this reason, it is very hard to use @prior function when you go several months backwards. For example if you are in Feb 2004 and you need to go back 5 months, you need to go prior in Years dimension too.I have seen a custom defined macro for a similar calculation, but i wasn't able to rewrite it to my needs. Has anyone done a similar calculation??

    There is new function in version 6.5.1 called @XRANGE. This function does what you are looking to do. There is not a lot of documentation on this particular function however. For instance it is not in the Tech reference.The function takes as two members (single or cross-dimensional) and returns a member range.The function is primarily used for working with Time and Scenario dimensions instead of creating a dimension that combines the two.Basically the @XRANGE function allows you to store your months in a Time dimension and your years in a seperate Scenario dimension, but still do calculations as if you had set up a fiscal year cross over model.The syntax is @XRANGE(mbrName, mbrName)Hope that helps.

  • Error while creating Custom Defined Functions in Essbase

    <p>Hi All,<br>I am trying to create CDF(Custom Defined Functions) in Essbase. Iwant to create a function which take list of child member andreturn the first child. For this, i have created a java file called"ChildAccess.java" which contains the following code:<br>public class ChildAccess<br>{<br>public static char GetFirstMember(char [] members)<br>{<br>return members[0];<br>}<br>}<br>I have compiled and made jar file called"ChildAccess.jar" and pasted it at"ARBORPATH/java/udf". Then i restarted the Essbase Serverand run the following MaxL command to register the function<br>create or replace function '@ChildAccess' as<br>'ChildAccess.GetFirstMember'<br>spec '@ChildAccess(memberRange)'<br>comment 'adds list of input members'.<br>Till here i am not getting any error but when i am using thisfunction in my calc script as given below<br><br>FIX(@ChildAccess(@CHILDREN("Abc")))<br><br>it gives the following error<br>"Error:1200414 Error parsing formula for [FIX STATEMENT]<br>(line 2)"argument[1] may not have size[6] in function[@CHILDREN]"<br>NOTE: The SIZE[6] is giving the no. of child in member"ABC".<br><br>Thanks in Advance<br>Arpit</p>

    If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

  • How to create 'custom defined color' in the palette (Oracle 6i Form Buidl)?

    I'm new to Oracle 6i and urgently need to edit a colour scheme used on an existing set of Forms in Forms Builder.
    I can see how to select colors from the default palette but cannot find a way to edit the 8 spaces kept in the palette for 'custom defined colors'.
    Thanks in advance.

    Have you tried with something as
    IF  DBMS_ERROR_CODE IN (-20001)  then
    message ('what_you_want');for example in ON_ERROR trigger?

  • Custom Defined Fields Not Flowing to SUS

    Hi,
    Ours is MM-XI-SUS scenario.All the custom defined fields are flowing from MM to XI.But not from XI to SUS.
    We have done SPROXY also in SUS.
    Is there any mapping between XI -SUS which needs to be done?
    Please advise.
    Regards,
    Manu

    Hi,
    For User-defined fields in SUS
    Please refer to these SAP OSS notes ->
    Note 762984 - SRM40-SUS: Implementation of customer enhancement fields
    Note 458591 - User-defined fields: Preparation and use
    Note 672960 - User-defined fields 2
    Note 1035416 - Customer fields are not displayed in change mode
    Note 822424 - CUF. Customer fields cannot be changed in the bid
    Note 809630 - Customer field in bid invitation and bid - How does it work?
    Note 809628 - Table like customer fields from bid invitation in bid
    Note 798731 - Bid: Bid Inv. Customer fields not visible
    Please refer to these links for details ->
    Re: How to change the field name in SUS
    SUS Web Template Query
    Re: SC header CUF ?
    Re: MAP USer SRM defined fields in backend for PO
    Re: HI SRM experts...
    Custom fields to a Bid Invitation
    Addition of custom fields in Contract and mapping it with the fields in SRM
    urgent help request - How to add custom fields to  header BID.
    Re: Add custom fields to Contract Transaction in SRM 4.0
    Custom Fields
    custom fields in Carry out sourcing screen..
    Custom Fields Not Display In Basic Data In SRM 5.5 Server..
    SC : Extended  Search on Header Customer field
    Re: customer field in 3rd step of shopping cart
    Adding fields in shopping cart
    Custom Field in the header of Shopping Cart
    BR,
    Disha.
    Pls  reward points for useful answers.

  • I am planning to create custom defined  DSO Object & Info cube

    Hi ,
                     i am planning to create custom defined  DSO Object & Info cube.what ratio i can calculate what is the keyfields & what are the data fields in DSO.How can i calculate.
                     2. how can i create  suitable dimensions, suitable characterstics  for dimensions.what ratio i can decide.
    Thanks,
    chandu.

    Hi Diego Garu,
                               Thanks for your fast response.i
    VBELN     VBAP     2LIS_11_VAITM                                              0DOC_NUMBER
    POSNR     VBAP     2LIS_11_VAITM                                                0S_ORD_ITEM
    KUNNR     VBAK     2LIS_11_VAHDR                                                 0SOLD_TO
    VBELN     VBRP     2LIS_13_VDITM                                                    0BILL_NUM
    FKDAT     VBRK     2LIS_13_VDHDR                                                 0BILL_DATE
    INCO1     VBRK     2LIS_13_VDHDR(INCO1FieldNot Available in Data Source)     0INCOTERMS
    ZTERM     VBRK     2LIS_13_VDHDR(Payment terms field Not Available in Data Source)                                                                                0UCPYTERMS
    NETWR     VBRP     2LIS_13_VDITM                                                           0NETVAL_INV.
                                           here data is coming from the multible tables.that why i am planning to create custom defined data source based on view. here how can i calucate dso is suitable or cube is suitable.
    suppose dso is suitable how can i decide which on is the data field and which one is the key field.
                                        how can i decide how many dimensions are needed here.and which chara are suitable for that dimensions.
    Thanks ,
    chandu.

  • How to get custom defined messages in WAD

    Hi
    can you please help me how to get customized error messages in WAD.
    While I'm executing in RSRT the customer exit variable throws error message saying that 'No Sales orders exist for this Sold_To Party' but when I execute same query using Bex WAD, then no error message throwing for me for given sold_to party. I tried with all options as given in below code, but WAD gives me system error that "No values found for the customer exit variable 'Zxxxx'. Please help me in this regard. Should I do any settings in WAD to get custom defined messages. Kindly let me know
    my code is as below
    I_STEP = 2.
    CASE i_vnam.
    WHEN 'Custome exit variable'.
    IF sy-subrc = 0.
    ELSE.
                   MESSAGE e060(/bmc/bw).  "No Authorization exist
                    g_errflag1 = 'X'.
                   exit.
                   CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
                      EXPORTING
                        i_class  = '/bmc/bw'
                        i_type   = c_e                                    "'E'
                        i_number = '061'
                        i_msgv2  = l_msgv2.
                         RAISE NO_REPLACEMENT.
                    l_s_range-low = g_soldto.
              l_s_range-sign = c_sign_i.
              l_s_range-opt  = c_range_opt_eq.
              APPEND l_s_range TO e_t_range.
    ENDIF.
    I_STEP = 3.
      READ TABLE i_t_var_range INTO w_s_var_range
                  WITH KEY vnam = 'customer exit variabel'.
      IF sy-subrc = 0.
    Check the flag and throw message 'No Sales orders'.
        IF g_errflag1 = 'X'.
          l_msgv1     = 'No Sales orders'.
    Call the FM to populate message
          CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
            EXPORTING
              i_class  = c_r9
              i_type   = c_e                                    "'E'
              i_number = c_000
              i_msgv1  = l_msgv1
            EXCEPTIONS
              dummy    = 0
              OTHERS   = 0.
         CALL FUNCTION 'RRMS_MESSAGES_SHOW'.
         CALL FUNCTION 'RRMS_MESSAGES_DELETE'.
          RAISE NO_REPLACEMENT..
        ENDIF.
    Thanks & Regards
    silu

    Hi
    Custom Messages WAD

  • Internal Error in reading a Table of Oracle custom-defined objects.

    Hi,
    We are running into an Oracle internal error when trying to extract data from an OUT parameter of a stored procedure. The OUT parameter is of the type TABLE of Oracle custom-defined OBJECT.
    Any help on this issue will be greatly appreciated.
    Thanks, in advance,
    OraNew
    Program:
    package test;
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Types;
    import java.util.ArrayList;
    import java.util.List;
    import oracle.sql.ARRAY;
    import oracle.sql.STRUCT;
    import src.vo.ProfileBank;
    public class TestOracle {
    * @param args
    public static void main(String[] args) {
    try{
    Connection con = getConnection();
    ResultSet rsBalance = null;
    CallableStatement cs =
    con.prepareCall("{ CALL acr_profiles.get_profile_bank( ?, ?, ?)}");
    cs.setLong(1, new Long(133).longValue());
    cs.setLong(2, new Long(29032).longValue());
    cs.registerOutParameter(3,Types.ARRAY,"ACR_USER." + "ACR_PROF_BANK_TAB");
    cs.execute();
    ARRAY array = (oracle.sql.ARRAY) cs.getObject(3);
    System.out.println("length: "+ array.length());
    System.out.println("isConvertible: " + array.isConvertibleTo(Object.class));
    System.out.println("isInline: " + array.isInline());
    rsBalance = array.getResultSet();
    showResultSet(rsBalance);
    } catch (Exception sql){
    System.out.println("Exception "+ sql);
    public static void showResultSet (ResultSet rs) throws SQLException
    System.out.println("ResultSet = "+ rs.toString());
    List profileBanks = new ArrayList();
    while (rs != null && rs.next()) {
    STRUCT struct = (STRUCT)rs.getObject (2); //getting the Internal Error on this line.
    Object[] attribs = struct.getAttributes();
    System.out.println("Bank Alias Id"+ (java.math.BigDecimal) attribs[0]);
    System.out.println("Bank Name"+ (String)attribs[1]);
    System.out.println("Bank set flag "+ (String) attribs[2]);
    ProfileBank pBank = new ProfileBank();
    pBank.setBankAliasId(new Integer(((java.math.BigDecimal) attribs[0]).intValue()));
    pBank.setBankName((String) attribs[1]);
    pBank.setSelBankFlag((String) attribs[2]);
    profileBanks.add(pBank);
    public static Connection getConnection() throws ClassNotFoundException, SQLException {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Driver loaded");
    // establish a connection
    Connection conn = DriverManager
    .getConnection(
    "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.3.11.201)(Port=1521)) (CONNECT_DATA=(SERVICE_NAME= aada.a.al)))",
    "acr_user", "acr_user");
    System.out.println("Database connected");
    return conn;
    Console Output:
    Driver loaded
    Database connected
    length: 2
    isConvertible: false
    isInline: true
    ResultSet = oracle.jdbc.driver.ArrayDataResultSet@1f3aa07
    Exception java.sql.SQLException: Internal Error
    Partial Stacktrace obtained from the Eclipse Debug window:
    oracle.jdbc.driver.DatabaseError.throwSqlException(int) line: 292
    oracle.jdbc.oracore.OracleTypeCOLLECTION.initCollElemTypeName() line: 1192
    oracle.jdbc.oracore.OracleTypeCOLLECTION.getAttributeType(int) line: 1225
    oracle.jdbc.oracore.OracleTypeADT(oracle.jdbc.oracore.OracleNamedType).getFullName(boolean) line: 119
    oracle.jdbc.oracore.OracleTypeADT(oracle.jdbc.oracore.OracleNamedType).getFullName() line: 93
    oracle.sql.StructDescriptor(oracle.sql.TypeDescriptor).initSQLName() line: 497
    oracle.sql.StructDescriptor(oracle.sql.TypeDescriptor).getName() line: 392
    oracle.sql.StructDescriptor.getClass(java.util.Map) line: 2003
    oracle.sql.STRUCT.toJdbc(java.util.Map) line: 983
    oracle.jdbc.driver.ArrayDataResultSet.getObject(int, java.util.Map) line: 1379
    oracle.jdbc.driver.ArrayDataResultSet.getObject(int) line: 1198
    test.TestOracle.showResultSet(java.sql.ResultSet) line: 53
    test.TestOracle.main(java.lang.String[]) line: 38
    Environment:
    Database: Oracle 10g (10.2.0.3)
    JDBC Drivers: version 10.2.0.3 (ojdbc14, orai18n)
    Database Server: HP-UX
    Client machine: Windows XP
    <end of thread>

    hi Thom,
    most error relating to table DOKTL are caused by misconfigured network card.
    if this is a "home" system, install a loopback adapter from Microsoft and use IP address 127.0.0.1 and also check "hosts" file for inconsistency. do not use the IP adddress provided by your ISP as it may change.

  • Custom defined FM for purchase price determination

    Hi all,
       can anybody help me with the problem below..
      In IS-retail im assigning a custom defined function module for purchase price determination (MM42 -> sales view -> PP det. seq - 06).
    example FM for which is WV_EXAMPLE_01.
      but in the import parameter (structure KALP) im not getting the vendor number eventhough it is specified in the screen..
      I need vendor number along with material(which im getting) to calculate purchase price..
      Can anyone tell me wat the problem is and a solution for it.
      Thanks in advance.

    Hi ,
    In VKP5 calculation,Purchase price Schema is pulled from Purchase price determination sequence.
    In PP Determination sequence we can give PP schema based on PP determination type.
    If the PP type is A,system will fetch the PP Schema from Standard schema maintained in MM.
    Regards,
    Krish

  • How to use custom defined tags in uix in jdevloper 10g production

    can any one give me sample application for how to work with custom defined tags in uix with jedevloper 10g production
    thanks Venkat

    Hi Venkat,
    Maybe the reason for no one answering is because of lack of information in your post? What are you trying to do? Are you using JSP or UIX XML? Have you checked the online jdeveloper documentation? Have you checked the doc available in the JDeveloper release? Before we have more information we can't help you. Sorry
    Thanks,
    Jonas
    JDev Team

  • F4 help for a customer defined field added as structure enhancement

    I am trying to get the F4 help on a customer defined field added as structure enhancement. This can be achieved by programming the "F4IF_INT_TABLE_VALUE_REQUEST" (as I have data in an internal table) in the Process On Value-Request event. The problem is because it is a customer field addition as structure enhancement. I am not sure where I should put this code segment to make it work. Any help would be highly appreciated.

    Could you create a search help and attach that to the data element of your field, and then populate the data using code in the function exit of your search help if it cannot be directly read from a table or view?
    This would remove your code from the SAP dialog program.  The only mod you may need to make is to add / flag the search help on the screen field.
    Andrew

  • Custom defined BAPI s

    Hi Friends,
    Normally we use SAP Defined BAPI'S  in our programs, but why we need to use Custom DEFINED BAPI'S ? Is there any reason ?
    thanks and regards
    Vijaya
    Points for sure

    Hi Friends,
    Normally we use SAP Defined BAPI'S  in our programs, but why we need to use Custom DEFINED BAPI'S ? Is there any reason ?
    thanks and regards
    Vijaya
    Points for sure

  • How to create IDOC for customer defined table

    hi,
    How to create IDOC for customer defined table Records and how to send this IDOC to target system.
      what message type will be used and on receiving system how to post these records.
      thankx.
      pillac.

    Hi,
    You need to create a custom message type and custom IDOC type for this with whatever fields you want send. You need to create segments (WE30), IDOC type (WE30), Message types (WE81) and assign the message type to the IDOC type (WE82).
    You will have trigger the IDOC using a Report or something after doing the partner profile settings.
    Similary in the target system also, you will have do all the settings.
    Take a look the links to find out what settings needs to be done.
    http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappro.com/downloads/OneClientDistribution.pdf
    Regards,
    Ravi
    Note : Please mark the helpful answers and close the thread if the issue is resolved.

Maybe you are looking for

  • ITEM DETAILS: CONFIGURATION  in sales order

    Dear  guru, In the sale order if we want to see the variant configuration details for a particular line item then after selecting the line item we press the ITEM DETAILS: CONFIGURATION icon. Once we press this icon then the system will take us to a d

  • WLC 5508 (ver 7.2) and ISE 1.1.2

    Ciao, I found this interesting article: Dynamic VLAN Assignment with RADIUS Server and Wireless LAN Controller Configuration Example http://www.cisco.com/en/US/tech/tk722/tk809/technologies_configuration_example09186a008076317c.shtml And I'm wonderin

  • Problems with planning function in Web Application Designer in 2004s

    Hi All, I have a problem in WAD 2004s with planning function. I created a web template that includes a query. It runs on the enterprise portal, and I can edit this query. The problem is: I don't know how to save this edited query, because when I use

  • Service Tax program

    Hi As per service tax rules, service tax needs to be paid to government only when th amount is received from customer. So at the time of booking invoice, credit must go to service tax interim account and not service tax payable account. Similarly in

  • How to make Multi line checkbox text

    Hi guys, I have a req of displaying text for a checkbox as mutiline. for eg: my text to be displayed for the checkbox is "ALL u201CAPPLICABLEu201D GOODS IN THIS SHIPMENT ARE BEING EXPORTED UNDER THE OPEN GENERAL EXPORT LICENCE   (OIL & GAS EXPLORATIO