Application Development 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: 

BDC file issue

Former Member
0 Kudos
224

Friends 

Am uploading a  text file  which has been converted from excel  ,

but while uploading data  for PA30  its  not coming in  proper fields    pls have  a  look and share your input 

am attaching files

error  snap shot  is not coming less then 1 mb so  i can't upload here .

Regards

Meeta

6 REPLIES 6

Former Member
0 Kudos
117

Hi

When i  remove few of  forward slash  then few  errors  gone from pa30 screen in modify ,

but  should i  remove all the forward slash from file ?   everytime  user  converting  excel  into  text and the same type of file will get generated again ....   😞  file has attached  in above  post .

Regards

Meeta

0 Kudos
117

I assume that you have a layout of the file, containing the fieldnames by position, and the corresponding SAP fields to populate?

Why is the user converting to a text file?  The easiest (IMHO) way to transfer data in and out of SAP to desktop (or server-based) files is to convert the XLS or XLSX spreadsheet into a tab-delimited (.txt) file.  Then, you can search these forums for how to handle a tab-delimited file...but a tab-delimited file should, IMHO, be your first choice for transferring back and forth to Excel or desktop systems.

Otherwise, you could use the split command...as in:

Split your_data_row_name at '/'

into f1, f2, f3.......fn.  where f1, f2, f3, ... fn are structure-fieldnames.

research SPLIT keyword using your ABAP Help (F1).

gouravkumar64
Active Contributor
0 Kudos
117

Hi,

Simple IT IS, time of template creation.

Write your field name in row wise

then write the value of that field in side column.

No need to write FORWARD SLASH,ONLY WRITE VALUE.

After that time of converting to text,

select all then right click on that PASTE SPECIAL With transpose mode to a different sheet.

time of save into text save as tab delimited text file.

Otherwise In Note pad write your field name then use tab after every field name,after writing all fields (for 1 person)enter and in below column write all value using TAB and save .

Next time in mass recording case open with excel.

PROBLEM SOLVED .

Thanks

Gourav.

0 Kudos
117

Hi

here the problem is  user gave us  excel file only  inside that  there is option for  clicking button it will convert to  text fiel wher these  '/'  automatically get generated

and am getting the sense that the problem is with file only   .. because i tried  removing few of slases then few of errors  got closed . but  am not sure

till how long i can do like this  because its very old prog and  so am guessing that recording must have done properly  that time.

If any one has face such issue earlier pls  share your input

Regards

Meeta

0 Kudos
117

IF the position of '/' is fixed in all files generated, modify the internal table with additional fields (Char 1)for '/' and format the table within the program.

srivijay_dinnimath
Active Participant
0 Kudos
117

Hi Meeta,

first u create stucture to accept the data of that file, i.e.

begin of x,

abc(10000),

end of x.

begin of y,

var1(100),

var2(100),

....

endof y.

then use BDC FM as,

    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      FILENAME            = 'Ur file name'

      FILETYPE            = 'ASC'
      HAS_FIELD_SEPARATOR = '/'
    TABLES
      DATA_TAB            = x.

loop at x.

split x at '/' into y-var1

                       y-var2

                       .....

.

append y.

end loop.