Amount field badi

Hi,
When i am assinging the value '0' for amount filed in badi i am getting the error "Data objects in a Unicode program are not convertible". Actually i have to fill the keyfigure amount with value '0' using badi.
Compute method code.
assign component P_KYF_AMT_GLO of structure C_S_DATA to <f_amount>.
<f_amount> = 0.
Key figure is amount field with data type 'CURR' - Currency field stored as DEC.
Variable currency field Unit/Currency is '0CRM_COCURR'.
Any help will be highly appreciated.
Thanks for your reply.

Hi,
I tried the same in the following way
INITIALIZE   (Method of BADI)
FIELD-SYMBOLS:
        <l_s_sfk>     TYPE rrkg_s_sfk,
        <l_s_sfc>     TYPE rrkg_s_sfc .
READ TABLE i_th_sfk ASSIGNING <l_s_sfk> WITH KEY kyfnm = 'KYF_AMT_GLO'.
p_alias_KYF_AMT_GLO = <l_s_sfk>-value_returnnm.
COMPUTE (Method of BADI)
FIELD-SYMBOLS: <f_amount>. TYPE ANY,
assign component p_alias_KYF_AMT_GLO of structure C_S_DATA to <f_amount>.
<f_amount> = 0.
Try this, might be helpful for u as well.
regards
rajesh

Similar Messages

  • BADI used for updation of Amount fields for transaction CL24N

    Hi All,
    Badi's used for the transaction CL24N . Since need to update amount field ZPO_AMOUNT , ZPO_AMOUNT_GBP in the trsaction for a particular Realease strategy
    Thanks,
    Narasimha.

    Hi,
      There are 4 User-Exits and 2 Badis present for that transaction. Check whether it is useful.
    Enhancement/ Business Add-in            Description
    Enhancement
    CLCLRS01                                Additional Fields on the Result Screen
    CLCLRS02                                Fill the Additional Fields on the Result Screen
    CLFM0003                                Call Up After Check of Assigned Characteristic Values
    CLMMD001                                Selection of Objects for Mass Processing
    Business Add-in
    CACL_CHARACTER_INPUT                    Value Assgmt Screen: Set Ready-For-Input Status for Chars
    CACL_VALUE_CHANGE                       Change/Check User Input Before Syntax Check
    Hope this will help.
    Regards,
    Swarna Munukoti.

  • Dispute case Amount Fields in Local Currency

    Is it possible to have dispute case amount fields available in local currency instead of document currency?

    You can add new fields to the Dispute case (attributes) - therefore it is possible.
    It is not there as standard - however you can add the fields to the UDMCASEATTR00 table - define how they are populated via a BAdI - and then add the new fields into you case attribute profile.

  • Purchase order -  disable amount field

    Hi,
          In PO, i want the field in Condition Tab - Amount field   should be only for output . ie the amount should be picked up from info record pricing procedure. should i take access and in attributes of that field make it input not possible or there is another way.
    Regards,

    Hi,
    Check the BADi ME_PROCESS_PO_CUST.
    Read the documentation on the method FIELDSELECTION_ITEM .
    Regards,
    Ankur Parab

  • User defined function to check the NULL and 0.00 value in a Amount field

    Hi Experts,
    I have one scenario in which i have amount field in Data type.
    I have to create one UDF which will do the following thing.
    1. If the amount field is Null it should throw an exception in mapping.
    2.If the amount field is 0.00 it should throw an exception in mapping.
    3. For all other cases it should pass the amount value to the target.
    Can anyone provide me the code For this UDF.
    Thanks in advance.

    Hi,
      You can add this logic to the UDF. Here var1 is the input string.
    java.math.BigDecimal b=new java.math.BigDecimal(var1);
              if(b.compareTo(new java.math.BigDecimal("0.00"))<=0)
                   //write your logic for values less equal to zero
    One small request, if you think your question has been answered, properly and correctly, could you please kindly if possible close down this thread. It helps people who look for solutions to similar problem.
    regards
    Anupam

  • DIsplaying WRBTR (AMOUNT FIELD)WITHOUT  DECIMAL PLACES

    Dear all,
    I am facing a problem in displaying amount field  in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
    How can I do it in a alv report if I have only one output amount field?
    thanks
    Ranjan.

    Hi chittaramjan,
    1. use this kind of funda (just copy paste in new program)
    Important things
    a) one extra field in internal table
      declared in the same exact fashion
    waers LIKE tcurc-waers,
    b) Populate this field
    c) REST THE System will take care
       (based upon country settings)
    2.
    REPORT abc.
    TYPE-POOLS : slis.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA  : BEGIN OF itab OCCURS 0,
            f1  LIKE P0008-BET01,
            waers LIKE tcurc-waers,
            END OF itab.
    START-OF-SELECTION.
      itab-f1 = '-4.15'.
      itab-waers = 'KRW'.
      APPEND itab.
      itab-f1 = '4.68'.
      itab-waers = 'GBP'.
      APPEND itab.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name     = sy-repid
          i_internal_tabname = 'ITAB'
          i_inclname         = sy-repid
        CHANGING
          ct_fieldcat        = alvfc.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-repid
          it_fieldcat             = alvfc
        TABLES
          t_outtab                = itab
        EXCEPTIONS
          OTHERS                  = 2.
    regards,
    amit m

  • Error in Report: Next to amount field i could see 'ERROR' word in report

    Guys,
    Problem in Report: Next to amount field i could see 'ERROR' word in report
    Eg: Invoice Amount  : "1200ERROR"  it should be like "$1200".
    Pls help where do i need to check.
    Thanks

    Ajeet wrote :
    Hi,
    It can heppens if all the records getting aggregated in the report are of different currencies and not belonging to one currency.
    Do a currency conversion for the key figures and make them all with same currency.
    See if the records in the cube for the selection which you have given in the report gives you records with different currency and if it is true then as above said.
    Thanks
    AJeet
    Are you sure ???
    The mixed unit values will be displayed as * (by default unless its changed).
    ERR comes if unit is not maintained.

  • Length of amount field in New GL at the document entry

    Hi,
    1) At present I am working on ECC 6, EhP 4 with New GL Activated & Old GL "Not deactivated" (i.e deactivate update of Classic General Ledger GLT0 not done).
    2) The total table (FAGLFLEXT) & Line item table (FAGLFLEXA) field in new GL has amount field length as 23 digit.
    3) When I am trying to enter any FI Document in SAP, using transaction code F-02 or FB60 etc, the length of amount field is coming as 13 digit. I am not able to enter higher value
    Question:-
    a) Is the above issue due to "non-deactivation" of "Old GL"? As per my understanding, it is not, but wanted your opinion.
    b) Is there any configuration which needs to be done to increase the length of the amount field at transaction level?
    Thanking you in advance
    Santosh Agarwal

    a) Is the above issue due to "non-deactivation" of "Old GL"? As per my understanding, it is not, but wanted your opinion.
    No, it is not.
    b) Is there any configuration which needs to be done to increase the length of the amount field at transaction level?
    No, there isn't.  The field length that is appearing during document entry is really dictated by the data type of fields such as DMBTR, WRBTR in table BSEG; which is CURR (13,2).  Although the GL view (FAGLFLEX* tables) have longer length, the limitation in entry view (BSEG, etc.) stays as 13,2.

  • How to maintain the amount field format after GUI_DOWNLOAD

    Hi everyone.
    I have this problem on my object.
    The format of field ERFMG in table AUFM is 3.921,569.
    After I SELECT it INTO an internal table it becomes like this 3921.569
    I would display this internal table in ALV and its ok. Its format is 3.921,569 The format is also not changed when I download it into an excel file using LIST -> EXPORT -> LOCAL FILE -> SPREADSHEET.
    However my program should automatically download to local if the user tick a checkbox in the selection-screen. It will use function module GUI_DOWNLOAD. When this is used, the format of ERFMG changes to 3921.569 again, since it is using my declared internal table.
    How will I use GUI_DOWNLOAD without changing the format of amount fields like ERFMG? What are my other options to do this?
    The Decimal Notation in my User Profile is already set to 1.234.567,89
    Thank you in advance.

    Hi Cris,
    To get the output in the user format for the decimals, try the following code.
    data: wg_dec(7) type p decimals 2.
    data: wg_dcp type usr01-dcpfm.
    data: wg_dec_str(10) type c.
    wg_dec = '111135.67'.
    select single dcpfm from usr01
            into wg_dcp
           where bname = sy-uname.
    move wg_dec to wg_dec_str.
    if wg_dcp ne 'X'.
      replace all occurrences of '.' in wg_dec_str with ',' .
    endif .
    write:/ wg_dec, wg_dec_str.
    I dont feel there is any other option where you can change the decimals format as per the user profile.
    While giving the output of decimal values in a list, the system automatically displays it in the profile set by the user.
    This code will help you to set the decimal value as '.' or ',' as per the user profile.
    Note: It wont add the unit separator for hundreds and thousands. Again you have to do that manually.
    Hope this proves of some help to you.
    Regards,
    Pulkit

  • How to roll up Amount field upto Input Criteria Posting period

    Hi All,
              I have a requirement to create a FI Budget report where the User will give the Posting Period as the input criteria, and based on the entered Posting period, 2 amount fields, "Original Budget" & "Current Month" need to get derived by looking at another amount field called “actual”, by rolling up the Amounts up to the entered Posting period.
    For example, the user gives input as Posting period = 06, which is December because Fiscal year starts from July here. And my Cube has an amount field "Actual" which displays amount for each posting period. Therefore when posting period = 06, then the "Actual" amount value for months July (PP = 01) through December (PP = 06) should be rolled up i.e added and displayed in the "Original Budget field". The “Current month” should only display the amount for the input criteria month.
    How can I do that, any suggestions please?
    Thanks!!

    Hi Sam,
             Is there any way i could do it without the SAP Exit? If yes, how? If no, can u specify in the document you sent, which code i could use as reference for my requirement?
    Thanks

  • Error when displaying amount field in HTMLB Tableview

    Hi all,
       I am displaying some 'X' table in HTMLB Tableview and it has one amount field.But reference(currency) field of that amount field is in other table . I know it gives the error.
    Please tell me there is any other way to resolve this problem with out adding reference(currency)field in the same table?
    Thanks and Regards ,
    Harikrishna .

    Hi Hari,
    But reference(currency) field of that amount field is in other table . I know it gives the error.
    It will not give any error , you can use the currency key field of other table or structure .
    Alternatively you can use  predifined type DEC instaed of CURR  .
    Regards,
    Anubhav

  • Amount field is not populating properly

    Expert's,
    Here is an issue where one of the amount field not populating properly.For some opportunities the amount field will be just displyed as'0' but for some opprtunities the amount field is displaying as'$0'.The data we are pulling is from CRM.
    Thanks in advance.
    vasu.

    Hi,
    looks like extenstion of your last thread
    did you already have a look in data in cube?just to make sure,try to display cube's data using List cube transaction .Take this amount field,corresponding Currency Key,and you rmost impotant characteristics...and check whether all records are having entry in 'currency' column?

  • DOWN PAYMENT AMOUNT FIELD NEEDS TO BE NOT MODIFIABLE IN PAYMENT REQUEST

    Hi
    In SAP, when Down Payment is called through Payment Request, the "amount" field will be changeable mode.
    My client requirement is that, the amount field should be in "not modifiable" status.
    Is there anyway that we can do this...using EXIT or something....
    Thanks in advance...
    Srikanth M

    Hi,
    system will not allow to change the Vendor line item.
    F-47 Down pyamnet request 10000
    f-48  you need to select the above request
           and enter the 10000 in bank gl line.
    you cannot change the vendor line while f-48.
    i hope will clearify your issue.
    reg
    Mmadhu M

  • Payment check amount field

    Hi;
    I've already made a Z for payment check and works fine, but we have notice something when preview the checks in the spool, some checks in the amount (in numbers) field "*****999,999.99" sometimes it´s moves like this:
    1) example                                    "......******999,999.99"
    2) example                              ".............******99,999.99"
    3) example                                   "....******999.99"
    and so....
    in DEV we made a lot of test printing in paper the payment check an worked fine, but the problem is in QAS.
    How can i get that the amount doesn´t move in the sapscript...?
    Thanks on advance,
    David Fúnez
    Tegucigalpa, Honduras
    Edited by: David Funez on Feb 23, 2012 9:27 PM
    Edited by: David Funez on Feb 23, 2012 9:27 PM

    Hi David,
        create a SIGN aligned tab for that amount field. The tab is nothing but the position in the form from where the printing of that particular field should start.
    This should solve your problem.
    Please revert if you still face any problems.
    Regards,
    Praveenkumar T.

  • How to deactivate withholding tax base amount field

    Dear Experts,
    My in client is using the extended withholding tax with setting Define Formulas for calculating withholding tax, my client feel that the tax base amount field is open and user may accidentally input the wrong amount there thus can anyone tell me how to deactivate this tax base amount field?
    thank you

    Dear,
    Go into Withholding tax type under SPRO>Financial Accounting Global Settings>Withholding Tax>Extended Withholding Tax>Calculation>Withholding Tax Type.
    While maintaining the Withholding Tax type you have selected "W/tax base manual" under the control data. Just don't select that option then your requirement will be met.
    There are other options also like Manual W/tax amt. which you might want to go for.
    Regards,
    Chintan Joshi.

Maybe you are looking for

  • Dúvida quanto a sincronização de e-mail POP3 iPhone 4S = MacBook Pro

    Prezados, Tenho um MacBook Pro e iPhone 4S. Gostaria da ajuda para configurar o iPhone para receber e-mails do Terra/UOL (POP3) e depois sincronizar ou transferir estes e-mails "descarregados" no iPhone para o MacBook (uso no MacBook o mail da própri

  • Problem with application server shutdown when connecting

    Hi Friends, I am new to J2EE applications. I developed a web application that uses jxl and mysql for reading excel sheets. The host I am working on is supposed to be the server. The application I am running is working absolutely fine, by creating a d

  • Unable to sending a mail using odisend mail

    Hi, i have a need to send a mail using odi send mail, i am using gmail server getting to send a mail, but it getting error like this com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. d19sm1563829ibh.8      at c

  • Auto tone and auto WB

    How often do you use these two features, and do you find them accurate?  I have LR5, and I've found that sometimes they work better than others.  The auto white balance setting seems to work fairly well most of the time.  On the other hand, auto tone

  • Migrating EBS R12 from Solaris 9 to Solaris 10

    Hi Did anyone tried migrating EBS R12 from Solaris 9 to Solaris 10? Regards