BDC-PROBLEM IN CURRENCY FIELD LOAD

Hi,
This is my BDC CODE to CAll tansaction F-39..
REPORT  YSA.
DATA C_F39     LIKE TSTC-TCODE           VALUE 'F-39'.
DATA:  T_BDCDATA TYPE STANDARD TABLE OF BDCDATA     WITH HEADER LINE.
DATA:  h_bdcdata  TYPE STANDARD TABLE OF BDCDATA     WITH HEADER LINE.
DATA C_VAR(25) TYPE C .
DATA G_ASSIGN(19) TYPE X.
DATA : BEGIN OF ITAB OCCURS 0,
       ZBETRG LIKE RF05A-SUZAL,
       ZVBEL2 LIKE BSEG-VBEL2,
       END OF ITAB.
DATA : BEGIN OF ITAB2 OCCURS 0,
       ZBETRG(19) TYPE C ,
       ZVBEL2  LIKE BSEG-VBEL2,
       END OF ITAB2.
DATA COUNT(2) TYPE C.
select Z_PAY_AMT Z_VBELN into ITAB from ZWCSM_PAYMENTS where Z_CUSTOMER
= '0000116153' and Z_PREPAY = 'X' .
APPEND ITAB.
endselect.
*CLEAR SU.
*Loop at zvalue.
su = SU + zvalue-zamt .
*endloop.
CLEAR ITAB2.
LOOP AT ITAB.
MOVE-corresponding ITAB TO ITAB2.
APPEND ITAB2.
ENDLOOP.
perform bdc_dynpro      using 'SAPMF05A' '0115'.
perform bdc_field       using 'BDC_CURSOR' 'RF05A-NEWKO'.
perform bdc_field       using 'BDC_OKCODE' '/00'.
perform bdc_field       using 'BKPF-BLDAT' '30.06.2006'.
perform bdc_field       using 'BKPF-BLART' 'DA'.
perform bdc_field       using 'BKPF-BUKRS' 'US10'.
perform bdc_field       using 'BKPF-BUDAT' '05.07.2006'.
perform bdc_field       using 'BKPF-MONAT' '7'.
perform bdc_field       using 'BKPF-WAERS' 'USD'.
perform bdc_field       using 'RF05A-NEWKO' '116153'.
perform bdc_field       using 'BSEG-REBZG'  ' '.
perform bdc_dynpro      using 'SAPMF05A' '1703'.
*perform bdc_field       using 'BDC_CURSOR' 'RF05A-BETRG'.
*perform bdc_field       using 'BDC_OKCODE' 'RW'.
*perform bdc_field       using 'RF05A-ABPOS' '1'.
*CLEAR ITAB.
*REFRESH ITAB.
*ITAB-ZBETRG = '0,11'.
*ITAB-zvbel2 = '0000001458'.
*APPEND itab.
*ITAB-ZBETRG = '38'.
*ITAB-zvbel2 = '0000001459'.
*APPEND itab.
*DELETE ADJACENT DUPLICATES FROM ITAB.
LOOP AT ITAB . "WHERE zvbel2 = '0000001459'.
COUNT = COUNT + 1.
IF itab-zvbel2 = '0000001467'.
*G_ASSIGN = ITAB-ZBETRG.
CONCATENATE 'RF05A-BETRG(' COUNT ')' INTO C_VAR.
CONDENSE C_VAR.
perform bdc_field      using C_VAR
                             ITAB-ZBETRG.
ENDIF.
ENDLOOP.
perform bdc_dynpro      using 'SAPMF05A' '1703'.
perform bdc_field       using 'BDC_CURSOR' 'RF05A-BETRG'.
perform bdc_field       using 'BDC_OKCODE' '=BU'.
perform bdc_field       using 'RF05A-ABPOS' '1'.
CALL TRANSACTION C_f39 USING t_bdcdata.
FORM bdc_dynpro USING program dynpro.
  CLEAR h_bdcdata.
  h_bdcdata-program  = program.
  h_bdcdata-dynpro   = dynpro.
  h_bdcdata-dynbegin = 'X'.
  APPEND h_bdcdata TO t_bdcdata.
ENDFORM.                    "BDC_DYNPRO
FORM bdc_field USING fnam fval.
  CLEAR h_bdcdata.
  h_bdcdata-fnam = fnam.
  write fval to h_bdcdata-fval.
h_bdcdata-fval = fval.
  APPEND h_bdcdata TO t_bdcdata.
ENDFORM.                    "BDC_FIELD
Whenever i run this transaction intial screen in filled values correctly, in the continuous when i press enter goes to next screen, in this screen i am getting error as
"FIELD RF05A-BETRG(2) input value is longer than screen field"...
How can i solve this error???
Help needed.....
Thanks,

Hi,
DATA bdc_qty(10) TYPE C.
LOOP AT ITAB . "WHERE zvbel2 = '0000001459'.
COUNT = COUNT + 1.
IF itab-zvbel2 = '0000001467'.
bdc_qty = ITAB-ZBETRG.
*translate G_ASSIGN using '.'.
*translate G_ASSIGN using ','.
*condense G_ASSIGN no-gaps.
CONCATENATE 'RF05A-BETRG(' COUNT ')' INTO C_VAR.
CONDENSE C_VAR.
perform bdc_field       using 'BDC_CURSOR' C_VAR.
perform bdc_field      using C_VAR
                             bdc_qty.
ENDIF.
ENDLOOP.
Still getting error as "Enter a numberic value" while run BDC load in Second screen of trnasaction F-39?????????????

Similar Messages

  • Problem with currency  field in smart form

    hi
    friends ..
    i had problem with currency field in smartform iam printing 5 currecny
    fields after the main window .But not getting printed on right way gets printed down from the given mesaurement and i get lot of gap betwen the
    each fields for ex.
    33,260.00
    120.00
    0.00
    0.00
    0.00
    i thought the the problem is with space .so iwanted to condense it but cannot as it is currency field so move into character fields .but the user want out put in currency format like 22,60.20 if i  get the value in char variable i get 2260.20 which i dont want .
    so pls help me how to condense or shift left and print the currency field on right place.
    regards
    answers will be rewarded points.

    hi,
    this is a normal problem u can avoid this by moveing these currencu value to a character field then print the char field us ing condece... &var(C)&..
    eve if not solve the problem use the TEMPLATE node..
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • Problem of currency field in ALV grid

    Hi,
       Actually I am working on ALV gird editables. I have passed the CURR 17,2 type to the i_fcat table. But when I am trying to edit a new value to this field with a new value. i.e. '12345' it takes its value as '123.45'. and whenever I am entering a value '123.45' it gives error message that decimals 0 place. I am not able to make out this problem.
         Even while I am doing get_cell_value, I am getting its returning 0.00 as e_value.
          Any help in this regard will be helpful to me...
    regards,
    Brijesh Patel

    Hi Brijesh,
    Are you using the FM "REUSE_ALV_GRID_DISPLAY" to populate field catalogue? if so, define this in your field catalogue for that particular field.
    g_t_fieldcat-CFIELDNAME = 'X'
    where <b>g_t_fieldcat</b> is your custom defined field catalogue. CFIELDNAME here refers to that column in the field catalogue as currency field and SAP automatically adjusts the decimal places.
    Hope this helps and let me know if you need more details.
    Regards,
    Vicky
    PS: Award points if helpful

  • Problem in Currency field in Abap Query

    hi.
         I have created an additional field for storing the currency type.
         Based on some calculations i want to store the currency type into this additonal field.But the problem is that the currency field is not getting displayed in the report though i am getting the currency type in the additional field when i check it while debugging. Can anyone help me out...

    Vimal,
      Is it ABAP Query problem(SQ01).If yes, then
      In tcode SQ02(Infotype)>press extras button(F5)>In right side you will find 4 tabstrip buttons.Press on Extras--> create variable with same type of currency.
    goto Field group button--> add this field to field groups.
    In record processing event after your calculations assign your value of cuurncy to this new variable.
    In tcode SQ01-->enter query name >F6>F6>F6>select your new varaible
    >Press on basic list button(shift+F4)>left side you will find additional fields Node From there select your new field-->Save come back and execute the query.Now  you will find your variable.
    Don't forget ot reward if useful....

  • Very urgent : Problem in currency field while downloading file from excel.

    I downloaded a excel file to my ABAP program.It contains a currency field which has comma in it. When i do operations on the currency field it says unable to interpret the number.Can anybody help me on this.
    Message was edited by:
            Bharath Srinivas
    Message was edited by:
            Bharath Srinivas

    Hi,
    Try this. In ur excel right click on that column wher u have the currency, go to format cells and there uncheck the box which shows 'Show tousands (,) seperator).That shud solve the problem.
    Thanks
    Vasudha

  • Problem on currency fields

    Hello all,
    I want to display currency fields in a report based on opportunities on analytics (fields revenue and expected revenue).
    At level society, currency is euro.
    I have english and french peoples working on OCOD: so currency for french people is euro and currency for english people is GBP.
    When I launch the report for french people, fields revenue and expected revenue are ok, but they are empty for english people when revenue is not empty on OCOD!
    With my admistrator user I could see value of currency fields revenue but in euro (because my user is french).
    Is anyone have the same problem and is there a solution ?
    Thanks for help!
    Marc

    Hi Marc,
    maybe this could help you...
    http://dl.dropbox.com/u/7022318/How%20to%20create%20a%20report%20with%20multi%20currencies.docx
    Thanks,
    Royston

  • Problem with currency fields in alv while editing

    hi guys,
    while creating the editable fields and saving the data in database i have problem with currency(price fields),
    when iam entering 10000 it is storing as 100.00 in database but
    i want to store it as 10,000.00
    can any one help me ....
    it is urgent
    thanks..

    When populating the fieldcatalog for ur currency amount field then
    populate these additional fields with currency key and table name where this key field belongs.
             cfieldname     type slis_fieldname, " field with currency unit
             ctabname       type slis_tabname,   " and table
    May be then it will solve ur prob.
    Regards,
    Joy.

  • Problem with Currency Field?

    Hello Friends,
    I have a currency fields in a Screen, When it's value is null, It is showing me as SPACE. But My requirement is to display 0.00. How can I do this? Please do the favour needful.
    Thanks & Regards
    Sathish Kumar.

    Hi Satish,
    You must have declared the field as CHAR locally...
    just declare it like ..
    DATA : var type <some Currency filed from dictionary>
    This will work,
    Reward points if helpful,
    Regards,
    Tejas

  • Problem with currency field on screens

    hai gurus i am using currency field on screen , when i am trying to display 0.0 value on the screen it showing blank , how to display the value zero on the screen
    thanx in advance
    afzal

    Only solution is hard code it...
    DATA : dummy type char4 value '0.00'.
    IF currency EQ 0.
    WRITE : dummy RIGHT-JUSTIFIED.
    ENDIF.
    Message was edited by:
            Perez C
    Message was edited by:
            Perez C

  • Problem in currency field

    Hello All,
      I am moving an amount value to a field that is of currency type using write statment.But i cannot use write statment for currency fields.I tried using currency 'EUR' also but it is giving the same error.
    write : gs_outtab-rmwwr_out to lv_rmwwr_out currency 'EUR',
    Error : LV_RMWWR_OUT must be a character type.
    How to remove this error?
    Thanks,
    Rakesh.

    Hello,
    With WRITE stmt you cannot use CURR type elements. Do an F1.
    You need some workaround.
    BR,
    Suhas

  • Problem with currency fields

    Hi,
    My international settings are set to Turkish locale. I created a spreadsheet and defined a column as currency. Turkish currency symbol is YTL. When I want to make calculations using cells on that column, I get "+The operator "*" expects a number but the cell contains string+" error. Numbers doesn't understand that YTL is the currency symbol and prohibits any calculation. If I change the locale to U.S.A, and define the same column as currency, i can make calculations on this column. Does anyone has the same problem with different locale?
    Thanks
    Bilgehan

    Hello
    Glad to give you the ability to work flawlessly.
    I will report to Apple because the behaviour is really foolish.
    If I enter System Prefs to select Turkish as used language, the currency is displayed as
    If with this setting I enter Numbers, type 123 and apply the currency format, the cell displays
    TRY is the official ISO 4217 symbol but it's not the system setting and it is not treated as a currency symbol so the cell is treated as a string.
    If I enter the Inspector and select "livre turque (TL)"
    the cell is treated as a number.
    Funny isn't it.
    Yvan KOENIG (from FRANCE vendredi 8 février 2008 14:33:53)

  • Problem in currency field in medruck

    Hi all,
                        I am having problem in medruck form wherein when I am giving very high order value it is not giving the full spelling of the amount. so what should I do.
    For small values entire spelling is comming in print layout
    but for 1,234,567,890 has to be spelled as
    One Billion Two Hndred Thirty Fou Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety but it is showig as
    One Billion Two Hndred Thirty Fou Million Five Hundred Sixty Seven Thousand Ei
    only in o/p
    what might be the reason can any body suggest me......
    I used FM spell_amout and trasferred the value to structure Out_pAr of ITCSY
    whe I am returnig value in perform it is showing like this...
                                                                           thanks in advance
                                                                                    Ravi

    Problem is in your SAp script variable cannot hold more than 79 characters,
    Do like this,
    variable1 = "One Billion Two Hndred Thirty Fou Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety"
    Note variable1 lenght = 150
    var1 = variable1+0(79).   "var1 Lenght 79
    var2 = variable1+79(79)  "var2  Lenght 79
    Print var1 and var 2 in your SAP script.
    Reward points to all useful answers.
    Regards,
    SaiRam

  • Problem Loading Currency Field

    Hi All,
    I am not able to populate the currency field from Source using DTP when loading ODS 0CRM_OPPH. All the fields are populating except the Currency field and its a direct mapping in the transformation from source. Can someone let me know what is the issue with this?
    Thanks,
    Raj

    Hi Raj,
        In case you did the mapping correct and there are no routines that might clear the currency field in your update or transfer rules you can additionally transfer the currencies from the source system. Goto rsa1->source systems. Right click on your source system and choose transfer global settings. This will allow you to transfer currencies, exchange rates ... from source to BW. Try this and let us know the restult.
        Additionally use transaction listcube and display the records from there, check if there is a currency assigned to the keyfigure for each record.
      SUre this link helps to solve your problem.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/462fe790-0201-0010-3ca4-adfd89e4f9f2
    Thanks
    Varun

  • Problem with currency and quantity field

    Hi,
    I have done a couple of BDC and watched that if some currency or quantity field is there and i want to run the BDC the particular currency/quantity field will not populate the value inspite of i have declared the same table field that it refers to in the screen in the internal table.
        But, if i declare a character string in the internal field having same length as the screen field it will populate at run time. Why so?
    Regards
    Sandeep

    Hi,
    Even i have experienced the same problem many a times and use a character string as a work around to solve it.
    I guess one reason for it is for the currency and quantity fields, the actual defined length and the output length are different with output length being 3 or 4 bytes greater than that of actual lenght and also the fact that these fields are always right justified. hence some bytes of the field is getting truncated which the system does not allow and discards the whole value.
    regards,
    Mahesh

  • Problem in currency and quantity field

    Hi,
    I have done a couple of BDC and watched that if some currency or quantity field is there and i want to run the BDC the particular currency/quantity field will not populate the value inspite of i have declared the same table field that it refers to in the screen in the internal table.
    But, if i declare a character string in the internal field having same length as the screen field it will populate at run time. Why so?
    Regards
    Sandeep

    Hi Sandeep,
    This is a common problem, when carrying out BDC.
    For example, while recording you met with the 2 fields --> MSEG-DMBTR (Curr) and MSEG-MENGE(Quantity).
    Go to SE11 --> MSEG --> Search for DMBTR --> Double click on the Data Element i.e. DMBTR --> Double Click on the domain WERTZ --> You can see under the block Output Characteristics : Output Length = 16.
    While declaring the TYPES Structure, make it CHAR(16).
    Similarly for MENGE --> Data Element : MENGE_D --> Domain : MENGE13 --> Output Length = 17.
    Make it CHAR(17).
    Consider this technique as the Rule-of-Thumb while doing BDC.
    Regards,
    Abir
    Don't forget to award points *

Maybe you are looking for

  • My bookmarks/tabs wont open properly

    A few days ago my bookmarks were working just fine (i have several) I opened them by clicking the "open all tabs" option and they opened correctly. But I logged on my computer today and did the same process but they wont open, the tabs are all there

  • Adobe Reader for Android to work with dynamic XML PDF forms?

    Any possibility that Reader for Android will ever work with dynamic XML PDF forms created by Abobe Acrobat Pro?

  • Aperture 3.0.2 or Keynote 5.0.3 Bug:  Sharing Media

    I was replacing a graphic in Keynote '09, sharing media from both iPhoto and Aperture. There was an image I wanted to use from Aperture. When I looked at it, I discovered the image was crooked, so I straightened it in Aperture. When I tried to bring

  • Smartfilter Transaction Logs on CE

    Hi I'm having real problems getting a CE running ACNS 5.1.5.2 to export the CE logs for CYFIN to report on. Its creating the HTTP logs but only exporting the tftp logs and couple of others so I know the ftp server is working. I've tried it from the C

  • How to load the XML file to BW3.5

    Hi Gurus, i am following the steps for extracting the data from XML to 3.5 following the steps in the HOWTOSENDXMLDATATOBW.doc. i have a doubt at the 22 nd Point where in the document given that jump to point 26 for 3.5 version. But where we need to