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

lsmw-upload table dat

Former Member
0 Likes
1,309

how i can upload table formated data from flatfile to SAP

data in flat file

EX: XK01- bank details of vendor

country bank code account no

DE,IN 120210,125635 568956,9875652

DE 25689 56986

how i can upload table formated data from flatfile to SAP

data in flat file

EX: XK01- bank details of vendor

country bank code account no

DE,IN 120210,125635 568956,9875652

DE 25689 56986

9 REPLIES 9
Read only

Former Member
0 Likes
1,128

Hello abaper,

look at this code:

<b>PROGRAM SAPMZTST.

DATA: FLENGTH TYPE I.

DATA: TAB(80) OCCURS 5 WITH HEADER LINE.

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

CODEPAGE = 'IBM'

FILENAME = 'd:\temp\mytext.txt'

FILETYPE = 'ASC'

IMPORTING

FILELENGTH = FLENGTH

TABLES

DATA_TAB = TAB

EXCEPTIONS

CONVERSION_ERROR = 1

FILE_OPEN_ERROR = 2

FILE_READ_ERROR = 3

INVALID_TABLE_WIDTH = 4

INVALID_TYPE = 5.

WRITE: 'SY-SUBRC:', SY-SUBRC,

/ 'Length :', FLENGTH.

SKIP.

LOOP AT TAB.

WRITE: / TAB.

ENDLOOP.</b>

The structure for tab must be the same that bank details for vendor.

Regards.

Read only

0 Likes
1,128

hi OLANO NAVARRO

i am not asking using function module WS_upload..

u have given the code whiuch is used in BDC.

but i need in LSMW how we can upload

Read only

0 Likes
1,128

hi.

U can upload using LSMW.

1) Transaction code LSMW.

2) First do the recording with one record.

3) Then create source structure.

4) define fields in source structure in sequence as in ur text file.

5) map recording fields and source structure fields.

6)define path of source text file.

7) upload from file.

😎 convert records uploaded.

9) create sesson.

10) run session.

hope u got idea.

Read only

0 Likes
1,128

Hi,

Using LSMW, data can be uploaded to the desired SAP table.

There are certain steps to be executed to do so. In this , I am telling you to do the uploading using LSMW and Batch Input Session .

Steps :

1.T-code for this is LSMW .

2.Create Project and subproject.

3.Maintain Object Attributes.

4.Maintain Source Structures

5.Maintain Source Fields

6.Maintain Structure Relations

7.Maintain Field Mapping and Conversion Rules

8.Maintain Fixed Values, Translations, User-Defined Routines

9.Specify Files ( Flat Files )

10.Assign Files ( to check for the correct assignment of files to the source structure you created in step 4 )

11. Read Data

12. Display Read Data ( optional)

13. Convert Data

14. Display Convert data(optional)

15. Create Batch Input Session

16.Run Batch Input Session

once you execute these steps, you should check the SAP Table for the data. This is to verify that the data has been correctly loaded to the table . The step is called Reconcillation.

Regards,

Kunal.

Note : do let me know if you want explanation of any of the steps in details.

Read only

0 Likes
1,128

i think my problem is not clear to every body

by following 16 steps i am trying to upload data for transaction xk01.

in xk01 there is a table provided for bank details with three fields country, bank id,account no

i am facing the problem in mapping...if it field is field ..we can assign easily bcoz one to one..

when we go for table how we can do

file content

first column: country is given as DE,IN,DE ()saparated by comma) must be entered into bankl(01),bankl(02),bankl(03)

the no of entries for a vendor r not constant..

Read only

0 Likes
1,128

Dear All,

I have problem in uploading my vendor data through LSMW. Can anyone give me the detail procedure of uploading vendor data, detail documentation (throuugh recording)?

The error message is given below:

Batch Input Interface for Vendors

FB012 Session 1 : Special character for 'empty field' is /

FB007 Session 1 session name OBJECT_ZXK01 was opened

FB109 Trans. 1 : Transaction mk01 is not supported

FB016 ... Last header record ...

FB014 ... BLF00-STYPE 1

FB014 ... BLF00-TCODE mk01

FB014 ... BLF00-LIFNR VAG1A0001

FB014 ... BLF00-BUKRS BDZH

FB014 ... BLF00-EKORG BDCP

FB014 ... BLF00-KTOKK VAG1

FB013 ....Editing was terminated

With best regards,

Md. Zakirul Haque

Read only

0 Likes
1,128

I also encountered these messages. can you please give me the solution for this kind of encountered problem?

what should be missing in this upload?

Read only

Former Member
0 Likes
1,128

Hi,

Go to LSMW tcode, Create a project,sub-project and an object. Create an recording for the tcode. Then there are 14 steps to be followed in LSMW.

Then while coming to sprcify file, you have to give the format of the file...It will aks u for options.You can select tab separated file and proceed further..

Read only

Former Member
0 Likes
1,128

Hi,

You have to decide your Data Transfer mehtod first. Can use either.

1)LSMW

2)CATT

3)BDC

LSMW is the easiest and good option. As far as I see your data its bascially for vendor creation.

For LSMW tutorials just searc this forum with keywords 'LSMW tutorials'.

This Batch Input Program in LSMW will suit you probably.

<b>Standard Batch/Direct Input</b> 
                                                
Object               0040   
Method               0001               
Program Name         RFBIKR00                   
Program Type         B   Batch Input

Regards,

<b>AS</b>