cancel
Showing results for 
Search instead for 
Did you mean: 

Which function module sets the zero stock check indicator?

01-14-2014 4:21 PM
gunnar_humpert Explorer
4434 views 14 comments
0 Likes
SAP Managed Tags
Subscribe


Hi SAP gurus,

I want to know, which function module is setting the zero stock check indicator during the creation of the transfer order (TC LT04). When a zero stock check has to be executed, the field LTAP-KZNKO is set to X (zero stock check yes) and the field LTAP-NULKO is set to 1 (zero stock check to be carried out (system)).

I'm not an ABAP developer, but I've tried to debug LT04 and similar programs with no result.

Please help. I'm looking forward to hearing from you

Best regards,

Gunnar

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Likes

Hi Gunnar

This is a Standard SAP functionality and is set in config.

You need to tick or untick the zero stock check field. This will the either when ticked create a zero stock check and inform you that the system is about to do this when you create a TO manualy, or no zero stock check will be created when it is unticked.

You do this on the storage type.

There are two places that you can check

Check the following paths.

SPRO --> Logistics Execution --> Warehouse Management --> Master  data --> Define Storage type

SPRO --> Logistics Execution --> Warehouse Management --> Activities --> Physical Inventory --> Define Types per Storage Type

Select the source storage type. The system creates the zero stock count at the source storage type as soon as the last stock is removed.

Hope this helps

Regards

gunnar_humpert
Explorer
0 Likes

Hi Quinten,

the zero stock check only works, if you have 1 transfer order for a storage bin. It doesn't work, when you have more than 1 transfer orders to the same bin. See also my first reply to Matthias. Works as designed....SAP is doing a static bin check, while I want to run a dynamic bin check.

Best regards,

Gunnar

former_member198492
Contributor
0 Likes

Hi Gunnar

You need to untick a box in SPRO

SPRO --> Logistics Execution --> Warehouse Management --> Activities --> Physical Inventory --> Define Types per Storage Type

Find the storage type affected and remove the tick in the column Zero CKln

This will remove the requirement for Zero stock check when generating the TO

Regards

Darren

gunnar_humpert
Explorer
0 Likes

Hi Darren,

thanks for your answer. There is a little misunderstanding. We want to use the zero stock check. The reason why I’m asking for the name of the function module is that we want to use the function module in an own developed program.

The zero stock check is not triggered, when there is more than 1 transfer order for the same bin. Therefore we want to run our own logic for zero stock check before the confirmation of the transfer order. In case a zero stock check has to be executed, we want to call the function module and update the fields LTAP-KZNKO and LTAP_NULKO.

See also LT12 - not possible to run zero stock check for further details.

Best regards,

Gunnar

JL23
Active Contributor
0 Likes

There is a function module called: ZERO_CHECK

But this does not update anything

Just goto SE11

enter table LTAP and click the icon for Where-used

on the pop-up deselect all and select just the function module and search.

if you want search by a certain field, then click display after you entered LTAP in SE11.

Select the field and click the icon Where-used.

Former Member
0 Likes

Hi Gunnar,

I don't think there is a stand alone FM to update it. Setting these LTAP fields are integral part of WM kernel during TO creation.

There are good reasons why SAP does not set it if more then one open LTAP are created.

Imagine the 1st LTAP is executed e.g. by RF picker and the item is confirmed.

Is the bin then physically empty? No, the picker forced to do a zero check. As a result the picker provides a qty found on the bin but this is only the qty blocked by the 2nd LTAP removed later.

Or what should happen, if you decide to set zero check just for one item to avoid this but exactly this item is cancelled. Then no zero check is done at all.

Did you consider using dynamic cycle counting to avoid this ?

Best regards,

Matthias

gunnar_humpert
Explorer
0 Likes

Hi Matthias,

thanks for your reply.

We’ve considered the use of dynamic cycle counting, but it doesn’t solve our problem.

I do understand why SAP deactivates their zero stock check, when there is more than 1 transfer order for the same bin. See also my thread LT12 - not possible to run zero stock check. This makes sense, when you are making a static zero bin check during the creation of the transfer order. We are using mobile devices, which are mounted on our trucks, so we want to run a dynamic bin check just before the confirmation of the transfer order. The user is standing in front of the bin, so the user can easily check, if the bin is empty or not. I've made some tests, and it is possible to run a dynamic bin check.

We are not using LM* transaction codes, because they are not covering our needs. We are using our own report for our mobile devices. My plan is to add a dynamic bin check to the coding, and then run it just before the user is confirming the transfer order. We are using LT12 for the confirmation. If the conditions are fulfilled, the report should run the function module, which is updating LTAP, and then the pop up for empty bin check will be triggered in LT12.

You can run a manual empty bin check in LT11, but our transfer orders are created via an interface (PP-WM interface. E.g. transfer orders triggered by Kanban), and you should not use LT11 for confirmation of these kind of transfer orders. You can do it, but you get a warning telling you that the transfer order should be confirmed by the external system.


You can ignore the warning and run a manual empty bin check, and confirm the transfer order.

As you can see, I can do it via LT11, but I don't know the consequence of ignoring the warning. You can also select the empty bin check in LT12, but it is not active.

I've tried several scenarios like…

  • Zero stock check activated. Confirmation of TO (LTAP-KZNKO and LTAP-NULKO are blank)
  • Zero stock check activated. Confirmation of TO (LTAP-KZNKO=X and LTAP-NULKO=1)
  • Zero stock check deactivated. Confirmation of TO (LTAP-KZNKO and LTAP-NULKO are blank)
  • Zero stock check deactivated. Confirmation of TO (LTAP-KZNKO=X and LTAP-NULKO=1).

…but I'm not able to select the zero stock check in LT12.

Basically I have 3 questions:

      1. Is it possible to update LTAP-KZKNO and LTAP-NULKO after the creation of a transfer order?
      2. If it is not possible to update LTAP-KZKNO and LTAP-NULKO after the creation of a transfer order, how can I run a manual empty bin check in LT12?
      3. What is the consequence of confirming a transfer order via LT11 and ignore the warning regarding the confirmation of the external system?

We are using 2-step confirmation. The picking is done by a user and not a robot (external system). The confirmation of the transfer is done by our shopfloor system (external system), which is sending an IDoc. From my point of view, it should be possible to confirm the pick via LT11, while the confirmation of the transfer will be
confirmed via IDoc (LT12).

Best regards,

Gunnar

Former Member
0 Likes

Hello Gunnar,

thanks for your explanations. Many points to discuss in this area 😉

To answer your questions first ...

1) yes, you can update LTAP after creation (we did that also in older SAP releases in rare conditions)

2) obsolete, you should be able to do the bin zero bin check then after 1)
(if no other checks are implemented during confirmation to avoid it again)

3) As far as I understood, the picker confirms the 1st step (pick) in LT11 and the external system (in production) the 2nd (transport) by a WMTOCO. This is ok and has no consequences if you don't use LM* transactions.

The popup of zero bin checks comes up during TO confirmation (enter/save), it is no seperate business process which you can start before or after a confirmation.

I think the popup should come up in LT11 and LT12 if the LTAP requests it. Sometimes the grey menu entry gets only active if you are in one specific detail screen which can differ in LT12 and LT11. But nevertheless, during SAVE, it should come up by itself or the process itself does not match.

Best regards,

Matthias

gunnar_humpert
Explorer
0 Likes

Hi Matthias,

thanks for your answer.

1) How can you update LTAP after the creation? I was looking at different user/customer exits, and I only found the customer exit MWMTO001. When I read the documentation, I could see that it could only be used to update a Y or Z table but not LTAP.

3) You understood it in the right way. So if 1 doesn't work, I will go for this solution

I don't want to trigger the pop up for zero bin check before or after the confirmation. I want run a dynamic bin check just before the execution of LT12. When the check is positive, then I want YWM001 (the name of our LM-transaction) to update LTAP. When this is done, the pop-up for the zero bin check will be triggered in a standard way.

Best regards,

Gunnar

gunnar_humpert
Explorer
0 Likes

Hi Matthias,

could you please tell me, how we can update LTAP after the creation of a transfer order?

Best regards,

Gunnar

Former Member
0 Likes

Hi Gunnar,

the exit is ok to use but i'ts not possible to update LTAP (in memory or on DB) in there directly. As this exit is executed in UPD task at end of in memory TO creation, the data of TO is NOT written to DB at this stage, so a UPDATE ltap SET field=... WHERE lgnum= AND tanum will not work.

You need a own function module also capable of running in UPD task which is called in this exit with the TO number. This FM executed after the SAP TO creation can do the UPDATE on DB mentioned before

Best regards,

Matthias

gunnar_humpert
Explorer
0 Likes

Hi Matthias,

thanks for you answer.

I must admit, I'm a little bit confused. According to the documentation for the enhancement MWMTO001 it is not possible to update LTAP or LTAK. You can only update own data fields.

"...All database changes due to the transfer order

have already been performed. The transfer order is created.

With this user exit, you can update your own tables or trigger follow-up

actions. Although changes made to table T_LTAP_VB do not have any

effect, they should still not be made..."

I don't want to update own tables, but I want to trigger follow up actions like the empty bin check. I can't find the function module, which is doing the empty bin check, and I can't trigger it in the std. way, because I can't update the relevant LTAP fields.

You wrote:

"...To answer your questions first ...

1) yes, you can update LTAP after creation (we did that also in older SAP releases in rare conditions)..."

How did you update LTAP? Were you using the enhancement MWMTO001?

Best regards,

Gunnar

Former Member
0 Likes

Hi Gunnar,

the user exit is not directly usable to update anything on LTAP (neither in memory nor on database) exactly as SAP said.

The analogy of my suggested solution would be:

1) create a TO with SAP standard

2) go to SE16, edit table LTAP and change the field you like

3) save it

The solution does the same, the TO is created on DB without the flag set and the user exit implementation does a delayed database update to set the flag after TO was created.

Nothing more and nothing less.

As said, you can use SE16 to achive the same effect without user exit coding.

Please remember that zero bin check is NOT a seperate independent business process which you can execute at any time YOU like.

It is executed during the TO confirmation code by WM itself and only if WM thinks it's possible.

As mentioned before, it is not possible to do a (independent) zero bin check before TO confirmation.

If your user with RF mobile is at a bin because he has to pick something (has an open TO), user have to confirm the TO with 100% difference on LGTYP999, then zero stock check might be executed.

If user has nothing to do before a bin (no open TO) but he likes to do a "zero bin check", you need a physical inventory document for this bin.

If more than one TO is open from same source bin, all this above will not work in standard as described before.

You may rethink your request and how to solve it.

Best regards,

Matthias

gunnar_humpert
Explorer
0 Likes

Hi Matthias,

thanks for your answer.

I don't know if this is a rule, which only exists in my company, or if this a SAP rule, but we are not allowed in any way to update or manipulate std SAP tables with transaction codes like SE16 or SM31. If I would do it (I can't), then I could start to look for a new job in a new company...

Thanks for your time and help, but I will try to find a different solution to solve our problem

Best regards,

Gunnar