2007 Jan 02 2:20 PM
Hi,
In Amount field (ITAB-WRBTR)
In the File Amount field (ITAB-WRBTR) format like this <b>5,500.00</b> it will goes to Error table
OR
In the File Amount field (ITAB-WRBTR) Format like this<b> 5500</b> it will goes to SAP (BDC - SESSION)
In the File Amount field (ITAB-WRBTR) format like this <b>5.500,00</b> it will goes to SAP (BDC - SESSION)
I want validate this Amount Field
please send the sample code for this
I look forward to your reply
Thanks & Regards
SEK
Hi,
In Amount field (ITAB-WRBTR)
In the File Amount field (ITAB-WRBTR) format like this <b>5,500.00</b> it will goes to Error table
OR
In the File Amount field (ITAB-WRBTR) Format like this<b> 5500</b> it will goes to SAP (BDC - SESSION)
In the File Amount field (ITAB-WRBTR) format like this <b>5.500,00</b> it will goes to SAP (BDC - SESSION)
I want validate this Amount Field
please send the sample code for this
I look forward to your reply
Thanks & Regards
SEK
2007 Jan 02 2:38 PM
2007 Jan 02 2:38 PM
Find the field length.
subtract two from the length and
Check like this
wrbtr_temp+0(L) = ',' "L = subtracted length
then do the process required.
give error message or replace it with '.'
By
Yuvaram
2007 Jan 02 2:41 PM
Hi,
you must use:
1) char-field for bdc
2) dec-field for validation in your program
A.
2007 Jan 02 2:49 PM
Dear Raja,
Always remember this thumb rule while carrying out BDC Programming.
In your case, lets consider the field WRBTR. You want to use field in your BDC Programming.
Goto SE11 --> Enter the Table where the field WRBTR lies --> Search for the field
WRBTR ---> Goto the Data Element of the field ... for example its the same as the field name i.e. WRBTR ---> Double Click on it -
> Goto the Domain : WERT7 --->
You'll find the Output length to be 16.
So, always declare the field WRBTR in your TYPES Structure as CHAR(16).
Regards,
Abir
***********************************
Don't forget to award Points *
2007 Jan 02 3:04 PM
Hi Raja,
use an CHAR-Field and try this:
DATA: WRBTR(12).
*
DATA: FDPOS_K LIKE SY-FDPOS.
DATA: FDPOS_P LIKE SY-FDPOS.
WRBTR = '5.000,00'.
*
SEARCH WRBTR FOR ','.
IF SY-SUBRC = 0. FDPOS_K = SY-FDPOS. ENDIF.
*
SEARCH WRBTR FOR '...'.
IF SY-SUBRC = 0. FDPOS_P = SY-FDPOS. ENDIF.
*
IF FDPOS_P > FDPOS_K.
WRITE: / FDPOS_P, FDPOS_K, 'ERROR'.
ELSE.
WRITE: / FDPOS_P, FDPOS_K, 'WITHOUT ERROR'.
ENDIF.
*
Regards, Dieter
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |