| Delimiter for BDC Program
I use (tab and ,) delimeter for bdc but I could not upload data from
note pad to sap.
As you mentioned that you have used ( tab & , ) this is wrong you
have to use TAB OR , (comma) .
Use , (comma). While executing bdc you have to mention delimiter
factor at bdc screen.
Nitin
Can anybody tell me, if we are using excel sheet as a data provider
for BDC Program, then how to define a delimiter so that my BDC programe
should automatically split the field.
You either save the excel sheet as Tab delimited file or .csv file.
and declare your internal table to get the corresponding the contents from
the file. Then when its tab delimited or .csv, SPLIT the contents
into respective fields.
Here is a sample for CSV file :
*declaration of internal tables.
DATA : BEGIN OF IT_DUMMY OCCURS 0,
TEXT(500),
END OF IT_DUMMY.
DATA : BEGIN OF IT_MAIN OCCURS 0,
MATNR LIKE RMMG1-MATNR,
"material selection to change
DISLS LIKE MARC-DISLS,
"lot size key
END OF IT_MAIN.
*uploading the input file***********************************************
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME
= INPUT
TABLES
DATA_TAB
= IT_DUMMY
EXCEPTIONS
CONVERSION_ERROR
= 1
INVALID_TABLE_WIDTH
= 2
INVALID_TYPE
= 3
NO_BATCH
= 4
UNKNOWN_ERROR
= 5
OTHERS
= 6.
*appending it_main by splitting the uploaded file
LOOP AT IT_DUMMY.
SPLIT IT_DUMMY AT ',' INTO
IT_MAIN-MATNR IT_MAIN-DISLS.
APPEND IT_MAIN.
ENDLOOP.
Prathap C
Related ABAP Topics:
Program to allows you to insert any Tab Delimited characters easily
Insert
a special Tab Delimited Character
Get help for your ABAP problems
Do you have a ABAP Question?
ABAP Books
ABAP Certification,
BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books
Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.sap-img.com
All the site contents are Copyright © www.sap-img.com
and the content authors. All rights reserved.
All product names are trademarks of their respective
companies. The site www.sap-img.com is in no way affiliated with
SAP AG.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
The content on this site may not be reproduced
or redistributed without the express written permission of
www.sap-img.com or the content authors.
|