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: 

Getting prompted for OK_Code in LSMW and LSMW changes not working

Former Member
0 Kudos

I am simply creating a test LSMW to see how it works. I am using a recording.

I have many materials that have already been added to a plant into a main storage location and my goal is to add an additional storage location in this plant to all of these materials.

When I do the recording, it asks me for the transaction, which I am using MMSC. I enter an item number and a plant. On the next screen I add the additional storage location, hit enter, then click on save. At this point I am taken our of the recording. All of this seems fine to me. If I go into MMSC afterwards, the new storage location that I added in the recording is in there as expected an all appears fine.

Then I specify the fields, mappings, etc. This all appears correct to me. I create the input file etc.

When I run the Batch Input Session I am prompted twice for an OK code. It is a simple one line prompt and the OK code value is already in there and it appears as if it simply wants me to click the green check (as if to confirm the OK code). After doing this twice it exits. However, when I go into MMSC, I do not see my new storage location added.

What am I doing wrong? Input file appears correct and in fact from my perspective, it all looks to be set up correctly. Just gettting prompted and it does not add my values. This is the first one of these I have done which is why I am doing this. I want to know how to do it.

All help appreciated.

3 REPLIES 3

Former Member
0 Kudos

Hello Richard,

I would suggest the following points to revisit.

1. After saving, Use Default ALL in the LSMW screen.

2. Check the field sequence in the file with field sequence in the source structure.

3. Check in the background mode/error mode & see the behavior of the application.

4. If nothing works; write a small BDC program with 'CALL TRANSACTION'.

Regards,

Tanmoy

0 Kudos

Thanks, Tanmoy.

Please bear with me as I am new in this area.

Where do you specify "Default ALL" in the LSMW screen and what will this do for me?

I feel the sequences are correct.

I see where I can check background mode, what will this do for me?

I may in fact try the BDC method. I simply want to make sure that I can create an LSMW first successfully. Then I will move to creating some kind of BDC.

In looking at other persons LSMW, I see he specified some of his OK codes to UPDT. Mine defaulted to /00 after the recording. Could this be why my program isn't actually making the update even after I answer the OK_CODE prompts?

I do not see in an LSMW where I can actually change the values of the OK_CODES. I can only change the values of the input fields.

0 Kudos

Where do you specify "Default ALL" in the LSMW screen and what will this do for me?

It is found in the recording screen;  it helps in mapping correctly.

---------------------------------------------------------------------------------------------------------------------------

I see where I can check background mode, what will this do for me?

During execution 'Run Batch Input Session' step you get several options to run in foreground or error mode or background mode.

----------------------------------------------------------------------------------------------------------------------------

In looking at other persons LSMW, I see he specified some of his OK codes to UPDT. Mine defaulted to /00 after the recording?

That might be a specific ok code & it does not mean that it will work for you. I would suggest you to generate a fresh recording.

-----------------------------------------------------------------------------------------------------------------------------

When I run the Batch Input Session I am prompted twice for an OK code. It is a simple one line prompt and the OK code value is already in there and it appears as if it simply wants me to click the green check (as if to confirm the OK code).

Did this appear during the recording?

-----------------------------------------------------------------------------------------------------------------------------

Regards,

Tanmoy