‎2008 Nov 20 3:50 PM
Hi Experts,
I am tryng to execute a BDC in background, when I am trying to place amount in the amount filed I am getting an error ' Formatting error in the field ANBZ-NAFAV ; input should be in the form ___.___.___.__~,___V'.
what could be the probable wrong witht his?
Sujatha
‎2008 Nov 20 3:56 PM
Hi
Use WRITE statament in order to transfer the value in the right format:
DATA: CHAR_VALUE(20) TYPE C.
ANBZ-NAFAV
WRITE ANBZ-NAFAV CURRENCY ANBZ-WAERS TO CHAR_VALUE.So transfer the CHAR_VALUE to BDC table
Max
‎2008 Nov 20 3:56 PM
Hi
Use WRITE statament in order to transfer the value in the right format:
DATA: CHAR_VALUE(20) TYPE C.
ANBZ-NAFAV
WRITE ANBZ-NAFAV CURRENCY ANBZ-WAERS TO CHAR_VALUE.So transfer the CHAR_VALUE to BDC table
Max
‎2008 Nov 20 4:17 PM
Hi,
thanks for the reply,
I have done whatever yu said, but when I execute the following code with respect that field, the properties of 'fval' field are appying to that, FVAL field length is 132, as the field is P type, its getting right justified.
and when its placed in the screen fields, it saying 'Field ANBZ-NAFAV. input value is longer than screen field'
FORM bdc_field USING fnam fval.
IF fval <> nodata.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM.
-Sujatha
‎2008 Nov 20 4:20 PM
Try to condence the value or shift the value deleting leading spaces.
Hope it helps.
Thanks,
Jayant
‎2008 Nov 23 5:12 AM
Hi Jayant,
I have done this,
but when it is moved to Packed field, we cant apply condense function on it, so the problem is here.
-Sujatha
‎2008 Nov 23 7:14 AM
Hi Guys,
My issue is solved....for your information, I am posting the solution here,
I have left justified the currnecy field content & appended the value to the BDCDATA table. this solved my prroblem.
Pls find the same in bold letters
FORM bdc_field USING fnam fval.
IF fval <> nodata.
CLEAR bdcdata.
IF fnam = 'ANBZ-NAFAV'. " The currency field
bdcdata-fnam = fnam.
WRITE : fval TO bdcdata-fval LEFT-JUSTIFIED.
write: p_value to i_bdc-fval left-justified.
ELSE.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
ENDIF.
APPEND bdcdata.
ENDIF.
ENDFORM.
Thanks for all your support
-Sujatha
Edited by: Sujatha Reddy on Nov 23, 2008 8:14 AM
‎2008 Nov 20 3:58 PM
Move the currency field to Character field using Write statement and pass it.