cancel
Showing results for 
Search instead for 
Did you mean: 

BDC INPUT FILE ISSUE

Former Member
0 Kudos
130

hI! ALL...

when i am trying toe xecute the BDC program ive wirtten , i am getting the foll. error for two of the fields..

input value is longer than the screen field.

other fields are getting populated correct.

please let me know what i have to change?

thanks.

karthi.

View Entire Topic
Former Member
0 Kudos

There is very little information as to what your program is doing. There are a couple of things you can check for. Do you have any quantity fields that you are filling? In that case, you may be passing the value in external format whereas the input field cannot accommodate it. Also, do you have any date fields? You may passing the date in external format like DD-MM-YYYY where the input field may have been defined as DATE type and it requires the date to be in YYYYMMDD format.

Run your BDC in 'E' mode and see where you encounter the error. Once you know which field it is, then you will be able to rectify it.

Srinivas

Former Member
0 Kudos

the 2 fields i am getting such a message are

quantity field MENGE ( data type is quan) in structure RK70L

currency field LPREIS (data type is curr) in strucutre RK70L

the transaction is CK74N.

also for the last field i am populating, it, the cost element field, its gettin populated right but there's always this hash mark at the end.

for eg, 9300001# or 9425678# whatever the cost element value is plus the # mark.

this field is KSTAR in structure RK70L and data type is CHAR.

the input file is TAB delimited.

please let me know if this is more helpful than my previous message.

thanks.

-sri.

Former Member
0 Kudos

Hi

The best way to transfer the data to BDC structure is to try to transfer them in the same format you would use if you run your transaction on-line.

You can usually to do that using WRITE command.

You should know the unit and currency of field quan and curr so:

WRITE T_FILE-MENGE UNIT <UNIT> TO BDCDATA-VALUE.

and

WRITE T_FILE-LPREIS CURRENCY <CURRENCY>

TO BDCDATA-VALUE.

If you don't know these data you can find out them from master data table:

<UNIT> = MARA-MEINS.

<CURRENCY> is probably the currency of the country of your company.

  1. is the symbol to indicate the end of record of file.

You shouldn't see it.

How do you open your file?

Max

Former Member
0 Kudos

I think you are getting an additional tab at the end of the field which is why you are seeing this hash sign. Remove the tab character, you should be fine. As far as the quantity and the price fields are concerned, you have to go to this screen field of CK74N, enter a number in it to figure out what is the maximum value allowed for that field.

Also your input values may be having some thousand seperators. You have to remove them.

Srinivas

Former Member
0 Kudos

hi! again.

the input file is a tab delimited input file in basic text format.

usually created using excel and saved as tab delimited.

the file is not opened using any function module. there's no way we can do it at our company cuz we have custom defined tables and includes to find the path to the file and the name. they wanna carry on the same thing.

but the hash mark at the end stays. dont kow how i can get rid of it.

please help me out.

i am using the character data types to move the value to the quantity field and the currency field. its not givin me any problem but let me know the pitfalls in doin it. also the 2 fields appear shifted totally to the left on the field tabs. clarify this one too please.

usually its all right justified right??

thanks.

-sri.

Former Member
0 Kudos

<i>> hi! again.

>

> the input file is a tab delimited input file in basic

> text format.

> usually created using excel and saved as tab

> delimited.

> the file is not opened using any function module.</i>

Then how is the file read in the program and moved into internal table?

<i>> i am using the character data types to move the value

> to the quantity field and the currency field. its not

> givin me any problem but let me know the pitfalls in

> doin it. </i>

Not a problem as long as you don't have any formatting characters in the quantity/currency fields. By that I mean a value like '12345.67' is valid whereas '12,345.67' is invalid. Also make sure that the length is appropriate.

<i>>also the 2 fields appear shifted totally to

> the left on the field tabs. clarify this one too

> please. usually its all right justified right?? </i>

Even though numbers are right-justified in excel, they should be right-justified when you are loading into your internal table. A value ' 123.67' is wrong input for a quantity field.

> thanks.

> -sri.

Former Member
0 Kudos

let me add one mroe thing..

actually the hash mark that appears is a hard return on the text file.

got to get rid of the hard return.

please let me know how i can do it?

thanks.

karthi.

Former Member
0 Kudos

therea re ready made includes here.

we just add that to our bdc program and get the file name and location. they have a logic behind it . didnt go thru that much since they said its automatic and i dont have to do anything.

so you mean to say what i am getting is wrong about eh fields getting populated left-justified?

let me show you again, please confirm.

*************************

*234 *

*************************

the fields get populated like this.

anyways let me have ur suggestions.

also my parsing code looks like this..

split wa_string AT CON_TAB INTO tcost_rec-material

tcost_rec-plant

tcost_rec-cost_var

tcost_rec-quantity

tcost_rec-total

tcost_rec-long_text

tcost_rec-cost_compo

tcost_rec-cost_elem.

move-corresponding tcost_rec to cost_rec.

let me know what i have to add at the end to get rid of the hard return from the last field.

thanks again.

-sri.

Former Member
0 Kudos

Try adding an additional dummy field at the end of your cost_rec. Ignore any value in that field for your processing. See how the internal table looks now in debugging after adding this field.