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: 

LSMW : Maintain Field Mapping and Conversion Rules : Saves and generates program only if syntax error present

0 Kudos

Hi,

I created a LSMW to be used as a report for displaying data after upload.

Initially, by mistake, I had made a syntax error while writing ABAP code in  _GLOBAL_DATA_  block, under the Maintain Field Mapping and Conversion Rules .

After correcting the syntax, the new changes are saved on LSMW, but a new program is not generated with the new saved (error less) LSMW.

The only way to save any change in LSMW is if I wantedly make a syntax error in any of the code written.

It is strange that it saves the code when an error is present and does not save the code if no error is present.

Snap 1, shows there is no error (syntax error) in LSMW code.

Snap 2 shows that the correct version of LSMW is not saved and generated as per below screen shot.

Snap 3 shows a sysntax error wantedly in place, this time the snap 1 syntax issue dissapears.

Snap 4, new syntax error, and the old error is gone, new one is present.

Snap 5, new syntax error removed but it is not being saved by the LSMW to generate a coorect program.

Snap 6, proof of the removal of error is not saved and generated by the LSMW.

I tried generating the program after saving by having it as one of my processes by clicking on User Menu and checking the box for "Generate Conversion Program" but no luck in that way as well,

Please let me know, what the issue could be ?

Any help will be appreciated.

Would appreciate if you could look into this, I see quite a goo dnumber of posts on LSMW from you.

Regards,
Sayeed

1 ACCEPTED SOLUTION

JL23
Active Contributor
0 Kudos

This is too less info to replicate the case. At least I was not able to do it with the given info.

Whenever I click "Display Conversion program" it generates the program and shows me the actual version, no matter if goes through without error or has an syntax error.

You would need to explain if this happened directly in a LSMW object that you created yourself in this system or after a transport to this system.

You would further need to include each single mouse click to enable me to replicate the case, e.g. after removing abc from my mapping rules I clicked save, then back button, then ... when I double clicked "display conversion program" then I saw in the status that the program is generating....

Eventually the Action log (button above the LSMW menu) can give some details.

7 REPLIES 7

JL23
Active Contributor
0 Kudos

This is too less info to replicate the case. At least I was not able to do it with the given info.

Whenever I click "Display Conversion program" it generates the program and shows me the actual version, no matter if goes through without error or has an syntax error.

You would need to explain if this happened directly in a LSMW object that you created yourself in this system or after a transport to this system.

You would further need to include each single mouse click to enable me to replicate the case, e.g. after removing abc from my mapping rules I clicked save, then back button, then ... when I double clicked "display conversion program" then I saw in the status that the program is generating....

Eventually the Action log (button above the LSMW menu) can give some details.

raymond_giuseppi
Active Contributor
0 Kudos

In the LSMW menu : navigate to Extras, User Menu. Check box for Generate Read Program, Generate Conversion Program. Now you can force the regeneration of programs.

Regards,

Raymond

0 Kudos

,

Its true, I have worked on LSMW's a lot, but I am unable to replicate the scenario for any other LSMW.

This is a LSMW I have created myself, I am using Direct Input method Object 0020, Program Name RMDATIND.

But I am not using the structure by mapping with my inputs, I have used the object and program name as a dummy, to list the data uploaded in Material tables.

The steps you have followed are same as I have.

Snap below is the screenshot of my Action log

The last snap from my orignal post was the same as your suggestion, but it fails as the new changes have not been saved, and it tries to force regenration of the program but fails due to syntax issue.

Regards,

Sayeed

0 Kudos

Try an execution of /SAPDMC/SAP_LSMW_GENERATE_ALL to reset your project(s)

0 Kudos

Did try but the generation of program does not happen in that manner as well, even if it says it does, there is no change.

Attaching the LSMW and input file.

0 Kudos

I immediately see any of the changes I do in your LSMW object, and SAP is always generating, but there are other syntax errors which prevent me  from getting an executable program (beside of all the ZZ fields that are unknown in my system)

Why don't you program this as a normal report, you are using LSMW as a kind of Trojan. You are making the ground for even more restrictions which finally affect all of us who use LSMW as it should be.

0 Kudos

Thanks Jurgen for the response. You are right. And a program in development is already in place for this.

My systems from development to production transports are on freeze, hence this is only way as of now, though I am also making the higher managment understand a program needs to be transported for the same.