07-14-2008 7:25 AM
Hello friends,
I am working on bdc for outbound delivery i.e VL01N.
I need to identify the batches for every material.
I found that fm VB_BATCH_DETERMINATION is used to
determine batches in standard code.
If anyone has used this fm then please tell how to call this fm
i.e paramters needs to be passed.
Regards,
Vishal
08-27-2013 3:33 PM
Hi,
I can see it's been a while (5 YEARS SINCE YOUR QUESTION!!!), still I would like to respond as I had the same question, until I found somehow by trying and trying in the system.
What you are going to use will be the function module VB_BATCH_DETERMINATION .
You need to fill the following data (I just did it in SE37 testing it, the ABAPer will be using it in a Z program) :
I_KOMKH-MANDT = ‘100’
I_KOMKH-VBELN = LIKP-VBELN
I_KOMKH-POSNR = LIPS-POSNR
I_KOMKH-VKORG = LIKP-VKORG
I_KOMKH-VTWEG = LIPS-VTWEG
I_KOMKH-SPART = LIPS-SPART
I_KOMPH-MATNR = LIPS-MATNR
I_KOMPH-WERKS = LIPS-WERKS
I_KOMPH-LGORT = LIPS-LGORT
X_BDCOM-KAPPL = ‘V’
X_BDCOM-KALSM = LIKP-KALSM_CH
X_BDCOM-KNUMH = LIPS-KNUMH_CH
X_BDCOM-MENGE = LIPS-LFIMG
X_BDCOM-MEINS = LIPS-MEINS
X_BDCOM-MBDAT = LIPS-MBDAT
Hope it helps!!
09-13-2013 8:27 PM
Hi Canan,
Thanks very much for information. I was skeptical about using VB_BATCH_DETERMINATION function module. I debugged VL01n and standard SAP was populating so much of data.
Your reply was precise and very helpful.
I was using FM to determine whether batch entered by the user is valid for processing by verifying batch characteristics.
It can be achieved by populating additional parameters:
* Populate I_BDBATCH
lwa_bdbatch_i-matnr =LIPS-matnr.
lwa_bdbatch_i-charg = LIPS-charg.
lwa_bdbatch_i-werks = LIPS-werks.
lwa_bdbatch_i-lgort = LIPS-lgort.
lwa_bdbatch_i-bwtar = LIPS-bwtar.
lwa_bdbatch_i-menge = LIPS-lfimg.
lwa_bdbatch_i-meins = LIPS-meins.
APPEND lwa_bdbatch_i TO i_bdbatch.
Upon passing the paramaters in addition to one mentioned by Canan, e_bdbatch will be populated.
If e_bdbatch-subrc <> 00 for particular CHARG, then CHARG cannot be used for delivery creation as per batch setup rules.
Regards,
Joseph M
09-16-2013 7:39 AM
Hi Joseph,
Thank you very much for your response. VB_BATCH_DETERMINATION has been sufficient for me. However, I am having difficulty removing the entries in VBUV for incompletion. Same thing happens for the entries in VBUK/VBUP, the items seem incomplete in the table as well. Have you experienced anything like this? The lines come to the program selection everytime, though when I check through VL02N, the batches have been assigned and there shouldn't be any entry about incompleteness.