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

Function Module HUINV_DOCUMENT_COUNTING

wolfgang_mller
Discoverer
0 Likes
1,567

Hello everybody,

has someone ever used the function module HUINV_DOCUMENT_COUNTING ?

According to the documentation, it can be used in own count transactions for the inventory of handling units.

In my report the processing of the function module is working apparently well. It returns with sy-subrc = 0 and a message saying that all inventory positions had been prcessed completely.

But I can't see any processed data in the tables HUINV_HDR or HUINV_ITEM

I expect e.g. the columns HUEXIST or QUANTITY updated with the processed data, but the inventory documnet are still in the initial state.

Counting positions with the dialog HUINV03 is working, I can see the entered data in HUINV_ITEM.

Has anyone a hint for me ?

Thank you very much for help,

Wolfgang

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
955

Hi,

Check this include LHU_INVUXX..

this might help you.....

4 REPLIES 4
Read only

Former Member
0 Likes
956

Hi,

Check this include LHU_INVUXX..

this might help you.....

Read only

wolfgang_mller
Discoverer
0 Likes
955

Hi Avinash,

thank you for your answer. Unfortunately this didn't help yet.

LHU_INVUXX contains a collection of function modules, related to handling unit inventory.

Some of them are used within the processing of HUINV_DOCUMENT_COUNTING

What I would need is a sample of the usage of HUINV_DOCUMENT_COUNTING.

I suspect that there is no update of the inventory document data structures, because of inappropriate / missing values in the input data structure of the function module when called in my report. It may be as well, that there has to be taken further action to update the HUINV... tables.

But this function module seems not to be used in any standard programm, nor could I find any documentation about the usage of HUINV_DOCUMENT_COUNTING

Has someone any other idea ?

Thank you very much,

Wolfgang Müller

Read only

0 Likes
955

Hi all,

maybe we have found the solution.

Using this FM needs an explicit COMMIT WORK after return to the calling program.

I will do some more testing.

Would have been nice, if this was mentioned in the documentation.

Best wishes,

Wolfgang Müller

Read only

0 Likes
955

I know that this is an old thread, but here is more information about the FM HUINV_DOCUMENT_COUNTING. If you run this FM you definitely need a commit work after you run it. Also, if you are going to run the FM multiple times in the same Z program, you need to run HUINV_DOCUMENT_SELECT prior. If not, the second time you will get an error that the update failed. The reason for this is that there are internal tables that need to be filled prior to running HUINV_DOCUMENT_COUNTING. Also, each inventory document must run by itself. if it has more than one line item, than fill it_counted_items with as much as you need to update. But, only one inventory document can be run at once.