CE_CONVERSION in ABAP AMDP method

Hi,
I'm trying to get some knowledge about the usage of the AMDP procedures in the business suite on HANA. I've been trying to create a simple example where i convert a currency from one to another using and AMDP procedure and the CE_CONVERSION.
However i gives me an SQL script error and i can't figure out why.
My source code can be found here: abap_source_code - Pastebin.com
I hope someone can give me a hand
Message was edited by: Tom Flanagan

Hi Sagar,
Thanks so much for your help, i'm have gotten it to work, however i would like to use this method a bit more strategically.
I have an input table with the values
in_amount
out_amount
source_unit
target_unit
ref_date
i use these in my conversion function, however i can't seem to get the data into the out_amount column.
I have tried different methods such as specifying the input as an output as well. as i found in this documentation
CE_CONVERSION - SAP HANA SQLScript Reference - SAP Library
However it still isn't working, can you see what i am missing?
This is the source code for the method.
    PRICES = select id as id, in_amount as in_amount, out_amount as out_amount, source_unit as source_unit, target_unit as target_unit, ref_date as ref_date from :demo_prices;
    et_amount = select * from :demo_prices;
      lt_uom_std_conv  = CE_CONVERSION(:PRICES, [family = 'currency',
      method = 'ERP',
      client = '900',
      conversion_type = 'M',
      steps              = 'shift,convert,shift_back',
      target_unit_column = target_unit,
      source_unit_column = source_unit,
      reference_date_column = ref_date,
      output = 'input,passed_through' ],
      [in_amount as out_amount]);
        et_amount = select id as id, in_amount as in_amount, out_amount as out_amount, source_unit as source_unit, target_unit as target_unit, ref_Date as ref_date from :lt_uom_std_conv;

Similar Messages

  • How to read the hierarchy data from the same table using loop in AMDP method

    Hi All,
    We have a requirement to get the top partner from BUT050 table.
    Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
    Example:
    For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
    For partner 3523(BUT050-PARTNER1)  there is partner 4544 (BUT050-PARTNER2) last level .
    so in this case for the partner 1234 the Top parent is 4544 .
    I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
    Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
    IV_Parent is the input partner and ev_top_parent is the output value.
    AMDP Procedure Method:
        DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
        DECLARE found INT := 1;
              iv_partner1 =  SELECT partner1 FROM but050
                              WHERE partner2 = iv_partner
                              AND reltyp = :iv_hierarchy
                              AND date_to >=  :lv_date
                              AND date_from <= :lv_date;
         WHILE found <> 0  do
           select partner1 into ev_top_parent from :iv_partner1;
                           iv_partner1 =  SELECT partner1 FROM but050
                           WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
                           AND reltyp = 'ZBP004'
                           AND date_to >= :lv_date
                           AND date_from <= :lv_date;
           select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
        END WHILE;
    This method is working fine, but here it is only taking one single partner and getting the top parent as output.
    Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
    Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
    Thanks.
    Regards,
    Laxman.P

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • ABAP OO Method

    Greeting Gurus,
    I am working with the Purchasing cube and I have come accross a routing that PERFORMs LOC_CURR_CONVERT.  I need to convert this to a ABAP OO Method.  I find it difficult to find any information on this.  Does anybody have any suggestions?
    I am on SP8, waiting on SP10.
    Does SAP have a method name that replaces this ABAP Routine?  Or do I need to code myself?  Is there any handy documentation (I found HOW To... Routines within Transformations already, however, not explicity to Methods.)
    Kind Regards,
    Alex

    Hi KJ,
    I have executed the steps already on the document you gave me.  I am on the "further edit the transformation manually" step.  Since I am on SP8, my guess, is that it is not giving me the "proposal" of migrating the PERFORM call to a FUNCTION call.
    Please see the following post, where Rohan also is experiencing the same problem in SP8.  Re: How to convert  old Abap routine in to ABAP OO in 2004s
    My guess is I need a comperable FUNCTION call to that of the old LOC_CURR_CONVERT.

  • ABAP OO method on Task - won't execute in background

    I've been trying to get workflow with ABAP OO methods up and running on our 6.20 system.  I've followed Jocelyn's blog series and the associated white paper, and can get the DISPLAY method working for her example ZCL_PLANT class.
    I can't seem to get a task working with the static CREATEINSTANCE method, however.  The method works fine (tested in SE24), but when I create an associated task and test it in SWUS, the log shows the status of the work item as Ready, with my name as the Agent.
    I've flagged the task as synchronous and background - is there anything else I should be doing?
    Thanks in advance,
    Andrew

    Hi Andrew,
    Check your Synchronous and Background parameters on the Task again, activate your WF again and start a new workflow.
    This should definitely work and not have you as an agent. But sometimes it can be a bit stubborn if you e.g. stay in the same transaction and make changes in another session. Always go back to the main Easy Access menu before testing changes.
    Cheers,
    Mike

  • ON COMMIT ABAP CLASS METHOD

    Hi Friends,
    Can i execute and abap oo method on commit work.
    similiar to perform form on commit.
    thanx

    Hi Kaushik!
    This should be possible, but with a little bit different approach:
    You can implement an event handler for the commit event. Then you have to register this method for the commit event. Have a look at program SAPMSSY0. In routines %_before_commit, %_commit and %_after_commit you will find some events, e.g.
    * Raise event 'Commit Requested' for Object Manager
      CALL METHOD cl_os_transaction_end_notifier=>raise_commit_requested.
    , for which you might like to register your method.
    Regards,
    Christian

  • ABAP OOP method in Workflow task 6.20

    Hello all!
    In the following blog /people/jocelyn.dart/blog/2006/07/25/using-abap-oo-methods-in-workflow-tasks it is mentionned that to enable OOP methods for workflow tasks on 6.20 one needs to run report SWF_CATID.
    I'm currently on a customer system 6.20 ABAP SP50 and this report simply does not exist. Is this report appearing in a later support pack or is this not available until 6.40 as I belived....
    Any advise on how to enable this on an above system is highly appriciated!
    Regards
    Martin Jonsson

    Hi,
    Check this Report - RSWF_CATID.
    Regards,
    Surjith

  • ABAP class method with dialogue

    Hi all,
    I want to use a ABAP class method within a Workflow definition with user interaction. The SAP help says, that is possible, but I couldn't find a way, to mark the method as "with dialogue".
    For BOR-objects there is a checkbox in the details for the method definition. Can anybody tell me, how it can be done?
    Thanks in advance
    Nick

    Hi Nicolas,
      When you create the Task with the ABAP OO Method, you can select it as "Background Processing" else it will be a "Dialog Process".
    If you notice here, "Background Processing" checkbox will be editable if ABAP OO Method is used, whereas in case of Business Objects it directly comes from method definition.
    Reward points if useful.

  • Function module or ABAP-OO method to start DTP via Coding

    Hello experts,
    is there any function module or ABAP-OO-method, which I can use to start DTP's via ABAP-Coding (e.g. in my own programm)? I know there are FM's to start, change, delete, etc. InfoPackges. Are there any functions like them also available for DTP's?
    Kind regards,
    André

    Hello Andre,
    [Re: CL_RSBK_DTP - How to use...]
    I've tested and it works fine!
    Regards,
    William

  • How The ABAP Proxy method gets triggered

    Hi All,
    I have created a ABAP Proxy for inbound interface.For this interface the data is coming from XI system.So i am writing the logic to read the XI data into an internal table and am populating the same data into a BAPI.
    So my question is,once the XI system sends the data, Will this ABAP Proxy Method automatically gets trigger or Do we need to make any settings?
    Please Help me As early as possible.
    Thanks in advance
    Regards
    Srinivas Kodukula

    Hi srinivas,
    Refer the below points for the configuration needed at R/3 side:
    1. Create a HTTP connection in the business system using transaction SM59
    2. Configuration Business system as local Integration Engine in SXMB_ADM
    3. Connection between Business System and System Landscape Directory. For this check the RFC destinations LCRSAPRFC and SAPSLDAPI
    4. Maintaining the SAP J2EE Connection Parameters for LCRSAPRFC and SAPSLDAPI in SAP J2EE engine
    5. Maintain SLD access details in Transaction SLDAPICUST
    Regards,
    Kiran Bobbala

  • How would YOU retype these old XM08 types for use in an ABAP OO method?

    The XM08 function group has the following type declarations:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr LIKE drseg_cr    OCCURS 0,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    TYPES: mmcr_tdrseg TYPE mmcr_drseg OCCURS 0,
    TYPES: BEGIN OF mmcr_drseg.
            INCLUDE STRUCTURE drseg.
    TYPES: cr LIKE drseg_cr OCCURS 0,
           co TYPE mmcr_drseg_co OCCURS 0,
           sm LIKE drseg_sm OCCURS 0,
           charact TYPE rbcharact_instance OCCURS 3,
                                           "instances of characteristics
           uebgmat  TYPE matnr,
           uebrblgp TYPE rblgp,
           selkz_db TYPE selkz,
           rblgp_old TYPE rblgp,           "rblgp before aggregation
           END OF mmcr_drseg.
    How would YOU redeclare these types so that they work in an ABAP Objects class?  
    Some of the "fixes" are easy, like replacing "LIKE" with "TYPE:".
    But what about the "INCLUDE STRUCTURE" and the "occurs 0" specifications?
    The reason I'm asking this is that I have to call a method from ZXM08U16 and I'd like to be able to pass this method exactly what XXM08U16 gets from SAP, i.e. the table E_TDRSEG of type  MMCR_TDRSEG

    David,
    I wonder it can be directly in ABAP (I would like to hear opinions from others as well!), I needed to use Data Dictionary as well:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr TYPE z_tt_drseg_cr,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    z_tt_drseg_cr is a table type created in SE11, based on structure drseg_cr.
    the way to create internal table and work area, based on the above:
    DATA : gt_... TYPE TABLE OF mmcr_drseg_co.
    DATA : gw_... TYPE mmcr_drseg_co.
    hope this helps some
    ec
    UPDATE : Rich is right, it is possible to do it only in ABAP with the DEFAULT KEY addition.

  • Call an URL with ABAP program (Method POST)

    Hi everyone,
      I need to call an URL for example "www.google.com?q=hello" with ABAP using POST method.
      Like the FM "Call_Browser", but my variable q=hello need to be passed with POST method.
    Any idea ?
    Thanks.

    here is one example I use from abap to call a web browser ITS solution with a project number, I guess you can adapt the it for your purpose?
          check <data>-pspid is not initial.
          concatenate gv_pfs_link
                      'zpfs2?~okcode=PROJ_SEL&zpspid=<###>&sel_action=X'
          into lv_url.
          replace '<###>' with <data>-pspid into lv_url.
          condense lv_url no-gaps.
          cl_gui_frontend_services=>execute(
            exporting document = lv_url ).

  • ABAP OO: methods as method params, method chains

    Hello all,
    I am currently developing quite much ABAP OO and wonder if this is possible, because I got compilation errors.
    a) Methods as method params w/o temp vars:
    I have a method whose parameter shall be the return value (let s say a string) shall be the parameter:
    document->set_owner( owner = person->get_name( ) ).
    This throws an error and I have to code this instead
    data: owner type String.
    ownerString = person->get_owner( ).
    document->set_owner( owner = ownerString ).
    ... so I have always a temp variable which is getting MUCH overhead when having such stuff often...
    Am I doing wrong or is this impossible in ABAP OO? ...am used to do such things in all other languages I know... mean, that methods can be params of other methods.
    b) "chaining of methods"
    Is this possible somehow?:
    data: tmp type String.
    tmp = employee->get_orgUnit( )->get_name( ).
    Calling one level (the get_OrgUnit() method) works fine, but an immediate call to the second level ( get_name() method) fails and I have to code this:
    data: tmp     type String,
          orgUnit type ZOrgUnit.
    orgUnit = employee->get_orgUnit( ).
    tmp = orgUnit->get_name( ).
    This also very annoying to have so much temporary help variables on the way.
    Is there any help for me?
    Thank you for any hints and reagrds,
    Timo

    Hi Timo,
    as Richard's reply says it's impossible in ABAP-OO. The nature of this language is ABAP not OO
    Only helpful for you, could be the returning parameter. It's very useful in conditional expressions like
    if m1->a() = '2'.
    A preferred parameter to avoid writing parameter names like
    m1->b( '2' ).
    All other useful stuff of method or parameter chaining, and so on is NOT possible. Sorry.

  • HR ABAP - Generic method or function to create a PD object & Relat (IT1001)

    Hi,
    This question is related to HR Abap .
    Do we have a generic class method or function module which can be used to create any PD object(O,S,C,...) and relationships (A008, A003, 007,...)between these objects .(not RH_INSERT_INFTY) . It should also trigger change pointers .
    And also do we have a decoupled or generic infotype(1000,1001,1002,....) classes in PD side also similar to PA infotype classes(CL_HRPA_INFOTYPE_0002, CL_HRPA_INFOTYPE_0008,....) . It should also trigger change pointers .
    Thanks in advance

    Generic function to create infotypes 1000 and 1001 is RH_INSERT_OBJECTS
    Classes are CL_HRBAS_INFTY_1000, CL_HRBAS_INFTY_1001, etc

  • Calling ABAP class methods from JAVA application

    Hi All,
    I want to fetch ITS related information (SITSPMON Tcode) in my JAVA application. But i didnt find much BAPIs for the same. While debugging I came accross few class methods with help of which I can get the required information. So is there any way we can call and execute methods of ABAP classes through java application?
    for e.g. I want to call GET_VERSION method of CL_ITSP_UTIL class.
    Thanks,
    Arati.

    Hi,
    Yes, as per my knowledge the only way to interact is using BAPI exposed as RFCs. So try to invoke those class methods in one CUSTOM BAPI and expose that BAPI as RFC and consume that RFC to get those details.
    Regards,
    Charan

  • How can i write code in Inbound ABAP proxy method

    Hi,
    All
    Iam doing server proxy ascenario
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    i have done
    steps:
    1:I have done inbound  proxy interface in xi
    2:i have created a inbound abap proxy in my SAP WEB AS6.4 using SPROXY.
    3:I need to write code in Z11_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS method
    if i double click on that method it is not opening how can I write code.

    Hi,
    You have to goto the class
    <b>ZCL</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS not
    <b>Z11</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS
    Check on the third step.
    Regards
    Vijaya

Maybe you are looking for

  • WD Elements external hard drive getting 1 drive to work with 10.4 and 10.5

    I have a WD 2TB Elements new drive ready to start using. Anyone know the tricks to be able to get this drive to work right with 10.4 Power PC AND 10.5 Mac Pro? I have another WD drive (same type, the "Elements") and it won't copy most files that were

  • F110 critical issues

    HI We  had a problem in  current  payment run and all details attached below for your reference . step by step my problem.... 1)     On 30th-Apr-2010 ,  Business run the payment run for 44 vendors 2)  One posting order created out of 44 vendors u2026

  • IWeb, Joomla, Expression Web 2.0...sooooo confused

    Hi all, First I am new to website development...king of the newbies I had my website done and the guy used Joomla (open source). So I have been playing with it and it seems pretty straightforward. I then had lunch with a friend and he said he did his

  • Unable to view inactive Activities

    My client is on 8.81 PL06 and they are unable to view inactive activities.  I am able to find the activities in the DB, but whether by report, by customer, or my activities, I can't pull them up.  Is this normal and if so, how might I reverse it?

  • {E2883E8F-472F-4FB0-9522-AC9BF37916A7} damaged file, how can I get good working flash and shockwave?

    Hi, I have been researching these forums for too long!  I cannot find an answer that resolves my problem.  I too had the damaged file and 3 empty java files.  I deleted them.  I searched for the gp.ocx and gp.inf.  I did not find the ocx but found an