‎2007 Mar 08 1:38 PM
Hi all,
i am trying to upload text file to sap by using BDC method.
i am getting following message.
field MEPO1211-MENGE(1) INPUT VALUE IS LONGER THAN SCREEN FILED.
PLEASE ADVISE...
‎2007 Mar 08 1:39 PM
‎2007 Mar 08 1:39 PM
In the intrenal table that is getting filled by the upload funhction module, declare the MENGE field as a character type instead of MENGE type.
Regards,
Ravi
‎2007 Mar 08 1:40 PM
Hi,
the content for that field may be more than the field length so check the field length and accordingly give thevalue in the text file and upload./
regards,
sreevani
‎2007 Mar 08 1:40 PM
Hi,
Check the Qty field length in the internal table and on the screen. It should be 13 char length.
There is some mismatch between the file data and the field declared in Internal table.Correct it and run again.
Regards,
Anji
‎2007 Mar 08 1:58 PM
I HAVE TRIED ALL THESE STILL DOESN'T WORK
FORM DATA_SELECTION .
DATA : L_MENGE(13) TYPE C.
OPEN DATASET P_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
DO.
READ DATASET P_FILE INTO WA_ITAB.
IF SY-SUBRC = 0.
SPLIT WA_ITAB AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB INTO ITAB-WERKS
ITAB-MATNR
ITAB-EKGRP
ITAB-LIFNR
ITAB-EVERS
L_MENGE.
ITAB-MENGE = L_MENGE.
APPEND ITAB.
CLEAR ITAB.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET P_FILE.
ENDFORM. " DATA_SELECTION
*SCREEN
PERFORM BDC_FIELD USING 'MEPO1211-MENGE(13)'
ITAB-MENGE.
PERFORM BDC_FIELD USING 'DYN_6000-LIST'
' 1'.
‎2007 Mar 08 2:03 PM
In the code where you are building the BDCDATA table. You need to pass this field another way. Usually, I like to declare another varialbe, called BDC_QTY and move the value to this field. Then use this BDC_QTY field in the PERFORM statement
data: BDC_QTY(10) type c.
bdc_qty = itab-menge.
perform bdc_field using 'EKPO-MENGE'
BDC_QTY.Regards,
Rich Heilman
‎2007 Mar 08 3:35 PM
Hi Vandana,
Its simple. Just pass the MENGE value to a character field of length 17 and then pass this character field to the BDC.
Hope this helps. Please reward suitably.
Regards,
Ganesh