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

BDC ERROR

Former Member
0 Likes
929

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...

7 REPLIES 7
Read only

Former Member
0 Likes
838

in the screen design increase the length of the menge field.

Read only

Former Member
0 Likes
838

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

Read only

Former Member
0 Likes
838

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

Read only

Former Member
0 Likes
838

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

Read only

Former Member
0 Likes
838

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'.

Read only

0 Likes
838

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

Read only

Former Member
0 Likes
838

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