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 generated program has syntax error

Former Member
0 Likes
4,789

hello guys,

when user runs Convert Data step,the LSMW goes to DUMP.

the dump has program /1CADMC/SAP_LSMW_CONV

i opened the program from se38..

the syntax error is due to a field not declared.

1)do we directly change this program?

2)how can one know the generated program name of any LSMW

3)in another such program we have error on this line

  • End of transaction

IF fg_skip_rec EQ 'X'.

*write errors file - header

TRANSFER poheader TO skip_file_head.

the error is with transfer statment,saying poheader has non C fields ..

in decalration of poheader their is field of type i

poheader is the source structure of this LSMW

but the generated program has an extra field apart from fields in source structure.

how to correct this error.

1 ACCEPTED SOLUTION
Read only

Former Member
2,379

hello guys,

>

> when user runs Convert Data step,the LSMW goes to DUMP.

> the dump has program /1CADMC/SAP_LSMW_CONV

> i opened the program from se38..

> the syntax error is due to a field not declared.

> 1)do we directly change this program?

>

> 2)how can one know the generated program name of any LSMW

Prabhu>execute the step:convert data: from that selection screen>system>status>program.

> 3)in another such program we have error on this line

> * End of transaction

> IF fg_skip_rec EQ 'X'.

>

> *write errors file - header

> TRANSFER poheader TO skip_file_head.

Prabhu-->you need to do the sytax check in step:Mapping and conversion rule , there itself , you will get the syytax errors if any

> the error is with transfer statment,saying poheader has non C fields ..

> in decalration of poheader their is field of type i

>

> poheader is the source structure of this LSMW

> but the generated program has an extra field apart from fields in source structure.

>

> how to correct this error.

5 REPLIES 5
Read only

ThomasZloch
Active Contributor
0 Likes
2,379

Never change the generated program directly. You can look at the generated code and find out the program name via LSMW step "display conversion program", you might have to add this step to your personal menu.

Almost always, such syntax errors are caused by additional, custom declarations and coding inside the mapping rules. Investigate these and change as needed to avoid the syntax errors. Speak to the creator of the mapping rules if in doubt.

Thomas

Read only

Former Member
2,380

hello guys,

>

> when user runs Convert Data step,the LSMW goes to DUMP.

> the dump has program /1CADMC/SAP_LSMW_CONV

> i opened the program from se38..

> the syntax error is due to a field not declared.

> 1)do we directly change this program?

>

> 2)how can one know the generated program name of any LSMW

Prabhu>execute the step:convert data: from that selection screen>system>status>program.

> 3)in another such program we have error on this line

> * End of transaction

> IF fg_skip_rec EQ 'X'.

>

> *write errors file - header

> TRANSFER poheader TO skip_file_head.

Prabhu-->you need to do the sytax check in step:Mapping and conversion rule , there itself , you will get the syytax errors if any

> the error is with transfer statment,saying poheader has non C fields ..

> in decalration of poheader their is field of type i

>

> poheader is the source structure of this LSMW

> but the generated program has an extra field apart from fields in source structure.

>

> how to correct this error.

Read only

0 Likes
2,379

thank you,

I could now solve the errors succesfully.

thanks to thomas too.

Edited by: kumar gaurav on Oct 14, 2011 10:13 PM

Read only

madhu_vadlamani
Active Contributor
0 Likes
2,379

Hi Kumar,

when user runs Convert Data step,the LSMW goes to DUMP.

the dump has program /1CADMC/SAP_LSMW_CONV

i opened the program from se38..

the syntax error is due to a field not declared.

1)do we directly change this program?

NO

2)how can one know the generated program name of any LSMW

In your dump please check the program name.

3)in another such program we have error on this line

  • End of transaction

IF fg_skip_rec EQ 'X'.

Did you change anything manually.

*write errors file - header

TRANSFER poheader TO skip_file_head.

the error is with transfer statment,saying poheader has non C fields

in decalration of poheader their is field of type i

Please change that into c with specific length.

Regards

Madhu.

Read only

Former Member
0 Likes
2,379

Hi Kumar,

it seems, you or somebody in your company has added a field to CI_EKKODB, which has not character format.

This may cause issues in

- LSMW

- BAPI

We had a similar problem in a BAPI this week, when a programmer added a field to CI_EKKODB. This caused many dumps by a unicode check, although we have no unicode system.

Best way is to replace the non characeter field with a character field.

In LSMW you have a workaround to remove the flag Unicode check active in the program attributes by a program, if you have no unicode system. But your PO BAPIs may still fail, too.

Regards,

Klaus