Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with amount in Background scheduling

Former Member
0 Likes
880

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
851

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

6 REPLIES 6
Read only

Former Member
0 Likes
852

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

Read only

0 Likes
851

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

Read only

0 Likes
851

Try to condence the value or shift the value deleting leading spaces.

Hope it helps.

Thanks,

Jayant

Read only

0 Likes
851

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

Read only

0 Likes
851

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

Read only

Former Member
0 Likes
851

Move the currency field to Character field using Write statement and pass it.