cancel
Showing results for 
Search instead for 
Did you mean: 

Error while uploading data in SAP (me01)using LSMW

Former Member
0 Kudos

Hi All,

I am using LSMW for the first time.

I am trying to upload data to the Source List transaction (me01) using batch input recording. I created a new recording through LSMW itself. My source structure consists of 5 fields:

<b>MATNR C(18)

WERKS C(4)

VDATU N(8)

BDATU N(8)

LIFNR C(10)

EKORG C(10)</b>

Now the problem is when i try to convert the data, it gives me an error saying

"For type "C",a maximum length specification of 65535 is allowed."

I have noticed that unlike Direct Input method,

using batch input does not give any fields in "Maintain Field Mapping & Conversion Rules". So even if I have my fields in my source structure ,there are no fields to which I can map them to.

I don't know that is how it is when we go with batch input.

My file contain data in following order:

DANGEROUS GOODS,ABBY,20060801,20060831,30010,TEST

Pls help me to solve this problem.

Accepted Solutions (1)

Accepted Solutions (1)

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Swapna!

You get such an error message, when define a constant and forget the second ':

g_werks = '1000.  "wrong
g_werks = '1000'.  "correct

In general: a batch input recording can have fixed values and some variables. You need to define, which fields you like to fill with a variable. Go to the overview of the recordings, open the recording in change mode and assign some variable names to the according batch lines.

<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/76/a05b69e8a411d1b400006094b944c8/frameset.htm">Editing batch input recordings</a>

Follow the help for the following steps of structure assignments.

Regards,

Christian

Former Member
0 Kudos

Hi Christian,

Thanks a lot for your quick reply. I did exactly wht was mentioned in the link you specified. It did solve my first problem - I can view the fields in "Display Mapping and Conversion" wherein I can map my source structure fields to.

But still I get the same error in now in a different line with the same message.

It automatically generates a program and an include but it seem to not exist when cheked through ABAP Program (SE38). So cant debug it to know where exactly the problem is!!

Thanks a lot.

Waiting for your reply.

Thanks,

Swapna

Pls help me to solve this too.

christian_wohlfahrt
Active Contributor
0 Kudos

Hi Swapna,

nice to hear you picked up the necessary steps so quick.

For the error: if nothing else will help: just create a new object, start from the beginning and use the recording again. If this won't help too, make a complete new project...

It's difficult to get this generated stuff with SE38, true. So let's follow a guess: you have some coding, where you defined a value directly or you have somewhere a constant assignment in a wrong way.

The own form routines are visible cross-object -> maybe someone else made a mistake outside your current object.

But in general this error does not occur -> look at all place you maintained something.

Regards,

Christian

Former Member
0 Kudos

Hi Christian,

Will try your suggestions and update you accordingly.

Thanks again.

Regards,

Swapna

Former Member
0 Kudos

Hi Christian,

I tried recreating a new object and doing all the necessary steps but when i click on <b>Convert data</b>, it gives me the same message.

I have noticed that the <b>VDATU</b> and <b>BDATU</b> fields have datatype <b>DATS</b> in dictionary whereas while creating these fields in LSMW, i had to use DDMY type out of all the available options as there was no DATS type.

I assume that could be a problem, though not sure.

Can you confirm whether i am thinking in the rite direction?

Thanks,

Swapna

Answers (2)

Answers (2)

Former Member
0 Kudos

using LSMW for uploading data, you must have the date in the format "ddmmyyyy"

not like the ABAP program please check that and reply

Former Member
0 Kudos

If your still hunting for the solution, I encountered the same problem in 4.6C with an LSMW that use a recording.

Solution: Edit the recording with a dummy entry (set a default for a field). Re-Generated the conversion program. Remove dummy entry from recording.

That worked for me.

Andre