MANUAL CREATION OF BATCH NUMBER(EXTERNALLY) - NOT TO BE ALLOWED
MANUAL CREATION OF BATCH NUMBER(EXTERNALLY) - NOT TO BE ALLOWED while creation of Process Orders.
Hi,
Check t code OMCZ whether internal Batch no assignment is active or not.
From F1 help
In this step:
you activate internal batch number assignment
you define whether internal batch number assignment is allowed for goods receipts that have an account assignment
Standard settings
The standard version of the SAP system contains a predefined number range.
Further notes
Batch number assignment uses two function model exits with which you can define templates for batch numbers. You make the necessary settings in work step function module exits for internal batch number assignment.
The system checks whether the assigned batch number already exists in the system. Should the number already exist, the function is terminated.
When creating a client by copying another client, please note that internal number assignment is not active in the target client. You must activate it manually.
Regards
Anupam Sharma
Similar Messages
-
While creating PO using BAPI_PO_CREATE1 vendor batch number is not comming.
Hi Friends,
I am using BAPI " 'BAPI_PO_CREATE1' to create PO in my report.
The PO's are getting created but i the vendor batch number is not found in the PO.
Where as i am passing the vendor batch number.
bapimepoitem-vendrbatch = '2'.
bapimepoitemx-vendrbatch = 'X'.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = bapimepoheader
poheaderx = bapimepoheaderx
memory_uncomplete = 'X'
IMPORTING
exppurchaseorder = v_po_number
TABLES
return = bapiret2
poitem = bapimepoitem
poitemx = bapimepoitemx
poschedule = bapimeposchedule
poschedulex = bapimeposchedulx.
Commit the transaction
IF v_po_number NE space.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = bapiret2_c.
ENDIF.
Please reply urgently.
Thanks Regards,
Sandipan JenaHi
My answer is pure assumption.
Please check the following OSS notes
Note 758810 - BAPI_PO_CHANGE vendor batch and batch not visible
Note 1230268 - Field Vendor Batch never filled for PO BAPIs
Please take help from BASIS and SAP, before implementing the OSS note
Regards
Madhan D -
Hi Experts,
I have a probelm with the Transaction MIGO to restrict the ignore the batchnumber entered by the user.
If the user is not enter the batch number, then i can generated the new number by using the following 2 UE's
EXIT_SAPLV01Z_001 (ZXVBZU01) & EXIT_SAPLV01Z_002 (ZXVBZU02) and it is working fine.
If the user enters , then System first check that whether it is already exist in the Database . If it won't find then automatically it is considering the same number.Which needs to be stopped.
Any body has an idea about this requirement, to ignore the user entered value.
Actually, there are 2 more exists, EXIT_SAPLV01Z_011& EXIT_SAPLV01Z_012 there i can't change the value of the batch number.
Any suggestion or Any alternative way or Any idea Please......?
Warm Regards,
VijayHi,
I think you can restrict by using FM EXIT_SAPLV01Z_001, this i copied the FM documentation for your reference. Just read the FM documentation you will get an idea
You can restirict by using automatic generation using number ranges
<<Function module Documentation>>
Functionality
You can use this customer function call (CFC) to replace the standard number range (object, subobject, number range, and year) with one of your own. This is used subsequently to determine a new batch number.
Number assignment is carried out using the central number assignment.
The communication structure X_BNCOM contains the application data known up to this time. You can extend this structure in the DDIC using structure BNCOMZ.
Using the parameter CUST_NO_INTERNAL, you can suppress the number assignment function. Then you can either generate a batch number in function module EXIT_SAPLV01Z_002 using your own criteria or suppress the entire number assignment function.
Using the parameter MESSAGE_WHEN_AUTO, you can decide if a dialog box is to appear before a new number is assigned. This only happens during online processing.
Example
You can define internal batch number assignment according to your requirements via the enhancement SAPLV01Z with the exits EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002
SAP delivers a total of 6 examples for batch number assignment:
1. Copying the production order number to the batch number
2. Copying the sales order number to the batch number
3. Material-type-dependent batch number assignment
4. Material-number-dependent batch number assignment
5. Including the date in the batch number
6. Including the plant number in the batch number
For examples 1 and 2 you have to use the exits EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002.
For examples 3 and 4 you have to use the exit EXIT_SAPLV01Z_001.
For examples 5 and 6 you have to use the exitEXIT_SAPLV01Z_002.
For a detailed description of the examples, see below.
Prerequisites
1. Internal batch number assignment via the customer exit is activated:
To do this, in Customizing, choose Logistics general -> Batch management -> Batch number assignment -> Activate internal batch number assignment.
2. Maintaining the number range object
Two number range objects are provided for batch number assignment:
Standard number range for batch number assignment BATCH_CLT
Number range for material-type-dependent or material-number-dependent batch number assignment BATCH_MAT
Activities
1. Use the SAP enhancement SAPLV01Z:
a) In transaction CMOD, create either a new project or use an existing project.
b) Add the SAP enhancement SAPLV01Z to the project.
2. Copying the example code:
a) Choose Component.
b) Choose Change.
c) Choose:
EXIT_SAPLV01Z_001 for examples 1-4
EXIT_SAPLV01Z_002 for examples 1-2 and 5-6
d) Choose Edit -> Copy SAP source text.
The example code is copied to the relevant table in the function module exit.
e) To copy the example, remove the comment symbol before the include it pertains to.
3. Activate the project.
When you activate the project, the enhancement with the function module exits EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002 comes into effect.
Examples
Example 1
Copying the production order number to the batch number
When a batch is produced, the process order number or production order number is copied as the batch number. This type of assignment is only possible in connection with process orders or production orders.
Outwith an order, a number range is determined for batch number assignment. In this example, it is the standard number range BATCH_CLT.
If the order has not yet been saved (for example, when a number is assigned when the order is created), a temporary number is created. A message appears prompting you to save the order. The system then assigns an order number which is accepted as the batch number.
The system checks whether a batch already exists with this number. If this is the case, the system aborts internal batch number assignment with a corresponding error message.
Note:
In this example, note that the include LXVBZB21 in EXIT_SAPLV01Z_002 has to be activated at the same time, as actual batch numbers are not assigned until this is activated.
Example 2
Copying the sales order number to the batch number
If a batch number is assigned in connection with a sales order, the sales order number is accepted as the batch number.
If there are no sales orders, a number range object is defined with a number range from which the batch number is taken. If a batch already exists with this sales order number, the batch number is assigned externally.
Note:
In this example, note that the include LXVBZB22 in EXIT_SAPLV01Z_002 has to be activated at the same time before actual number assignment can take place.
Example 3
Material-type-dependent batch number assignment
In the number range object BATCH_MAT a separate sub-object is created for each material type. Note that the number range object is maintained accordingly or batch number assignment cannot take place.
For example, if the material "flour" belongs to raw materials, it is maintained in the sub-object ROH, and the batch number is taken from the same number range as the material "eggs" which also belongs to the raw materials group.
Example 4
Material-number-dependent batch number assignment
In material-number-dependent batch number assignment, materials that are handled in batches must be maintained in the table BNMAT, which specifies the assignment of the material to the number range.
If there is no assignment in the table, the system aborts batch number assignment. An error message appears informing you that batch number assignment is not possible and specifying the table that has to be maintained.
Each material number is assigned a number range object, a sub-object, and a number range in the table BNMAT. This is how each material receives its own batch number range.
The number range object BATCH_MAT is an example of this. The material numbers are divided into groups via their material type that match the sub-object. Each material number is then assigned its own number range by table BATCH_MAT. The number ranges used must be maintained in the number range object.
Examples 5 and 6
Including the date or plant number in the batch number
The number ranges for the batch numbers must be defined in a way that ensures that no characters are overwritten by the templates.
Parameters
X_BNCOM
CUST_NO_INTERNAL
NR_RANGE_NR
OBJECT
SUBOBJECT
TOYEAR
MESSAGE_WHEN_AUTO
MESSAGE_DONE
Exceptions
CANCELLED
Regardas
Krishna -
Batch number is not generating by the system at the time of Goods receipt
Dear All,
This is regarding Batch number that the system generates internaly at the time of Goods receipt,but the same is not generating the batch number.
I checked all the configs but i could not trace it out.Can any one help me to solve the issue.
Thanks in advance,
With Regards
VinodHi,
Follow the steps:
1.Field---VFDAT adn table-MCHA should be created as a charecter in CT04signed to a class in CL02N.
2.create MM01 and add the class to it in classification view.
3.In mm01 plt storage1 view give data for remainning shelf life and total shelf life and in purchasing view activate batch management.
4.OMJ5- activate SLED for your plant and mvt type 201.
5.opj2- set BD for your plant.
6.create sort sequence in cu70 and assign your charecteristic value to it.
7.create batch serch strategy in MBC1 for access sequence(plt/matrl/mvt typ) create a condition record.
8.Do a GR using 501 and enter SLED related details.(production date and exp date values)
Repeat the above step and enter diffrent values for SLED details.
So now two batches are created with SLED as the charecteristic.
9.Do a GI using 201 mvt tye in MB1A and enter * in batch field(system will determine the batch using the SLED value basedon the criteria(ascending or descending which was set in the sort rule.)
Reg,
Deepak. -
Invoice creation in batch jobas are not in sequence
Hello ,
I schedule two batch job with diffrent variant at the same time. When invoices are created in batch job there numbers are not in sequence. If I check creation time then Invoice creation time of Invoice number 2 is latter than invoice creation time of number5.
As per number range concept Invoice 2 should create before Invoice 5.
Why this is happening?
Regards
RDC>
> Thanks for the soon reply but here my legacy system is File it is having the fields like INV details and country key and customer details these details i want to send it to Target Ecc system based on the country .
Use File Adapter in sender side to read the data from Legacy System ,if the legacy system data format not XML then use File content conversion in Sender comuniction channel to convert in to XML.
> for exp: If the country is Us then create the vendor invoice in the Ecc system , if the country is IND then check whether the existed customer in the ECC system or not if Existed then those details update into one more legacy system .
>
You have to perfrom RFC Lookup in mapping level if the coiuntry is IND,anyway you are on PI7.11 so you can perform RFC llok to check the it is existed customer or not. search in sdn for RFC look up.
Finally use enhanced Receiver determination to determin receiver.
search in sdn you will get it hot to determine dthe receiver...everything..
the requirement not complex..
Regards,
Raj -
Bank manual entry the Group number is not displayed
Hi Friends,
Bank concepts T code FF68 screen in the group field I mention *. And posted the entire one. After that I went to OVERVIE
option and selected my bank. Here the issue is *if u mention GROUP field as a *. System automatically given the number*. But
here system not given any error.
So please anybody help me here.
Regards,
G G REDDY
Edited by: sachinreddy on Mar 8, 2011 12:52 PMDear Sachin,
Since is freely definable field you can enter what ever naming convention you want to give.
First make a convention what naming you should give to that group.
Then enter accordingly -
Batch Number is Not Found in the Report
Hi All
Iam posting items with batchno. in delivery document when iam posting the delivery document it asking for the selection criteria of item from different batches.there i selected the required items from the particular batch and posted the document. now i copied this delivery document into A/R invoice and posted the document. Now iwant to see the report preview of the invoice PLD.but it didnt show the batch report it shows the invoice defaulty.
If i posted the A/R invoice directly without any delivery document then iam getting the batch no. reports by using the system varialble in PLD
Is it possible to get the batchno report for the A/R invoice which is copied from delivery document in the A/R Invoice PLD
iam using 2007B Patch level:08
batches on every transactionHi Madhu,
Check the thread (Sudha Answered )
Re: To Retrieve Batch No. in AR Invoice PLD.
*Close the thread if issue solved.
Regards
Jambulingam.P -
PP : BATCH number creation
Hi All,
I am assigning batch number externally during the production order creation by using user exit. In my case i have to do
"The same batch number generated for the Main co-product should be assigned to the other co-products at the same time".
Please suggest how to achieve the same.
With regards,
PravinHi Pravin,
These exits will help you change the batch number to specific i.e. sales order number or production order number or date or plant etc. as in the function module documentation. But if you want to assign any batch which you've created using MSC1N or BAPI_BATCH_CREATE, then I feel that probably you've to use some other user-exit, these are not the ones which are going to help.
Try these BADI's:
WORKORDER_CONFIRM
WORKORDER_GOODSMVT
WORKORDER_UPDATE
Hope this helps.
Regards,
Satya -
Copying of Batch Number and Characteristics not copying in GI
Dear SAP Gurus,
I have created a Stock transport order (STO). Against that STO I have created the delivery. In the delivery I enter the Batch Number/Characteristics(MM). When I do the Goods Issue against that delivery the Batch number is not being copied. Against that Goods |ssue, when I do the Goods Receipt I have to enter the batch number/characteristics manually.
We have a two step Storage Location to Storage Location transfer. When we do the Goods Issue the stock goes to Goods in Transit and then the GR is done against that GI.
Please let me know how to copy the batch number/characteristics automatically. Please also mention the name of the user exit if this can be handled through a user exit.
Thanks and Regards
Shehryar ZuberiDear All,
Can anyone help please?
Thanks
Shehryar Zuberi -
Process order batch number not reflecting in corresponding inspection lot
Hi QM gurus,
I am working on inprocess inspection for production. I am creating process order during that time batch no is generated automatically by the system. Now process order is released during this time Inspection lot generated with inspection type 03. Now the problem is in the inspection lot, process order batch number is not reflecting. I have checked all the master data seetings. All seems to be fine. what could be the problem. any settings missed can anybody help me out.
Thanks
VinameathHi Vinameath,
Go to the Master Recipe (C202) of this Process order/Material. Go to Recipe Header tab and click on the Quality Management Header button.
Now,go to the Partial Lot Assign field and maintain the value " 0 Partial Lots not supported " and save.
Then create a new process order and in all probabilities, the batch should appear on the in-process inspection lot.
Hope this helps you!
Regards,
Vinodh -
Copying of Batch number in GI and then to GR - MM
Dear SAP Gurus,
I have created a Stock transport order (STO). Against that STO I have created the delivery. In the delivery I enter the Batch Number/Characteristics(MM). When I do the Goods Issue against that delivery the Batch number is not being copied. Against that Goods |ssue, when I do the Goods Receipt I have to enter the batch number/characteristics manually.
We have a two step Storage Location to Storage Location transfer. When we do the Goods Issue the stock goes to Goods in Transit and then the GR is done against that GI.
Please let me know how to copy the batch number/characteristics automatically. Please also mention the name of the user exit if this can be handled through a user exit.
Thanks and Regards
Shehryar ZuberiHi Shehryar
When you post the receipt (via MIGO or MB01) if you change the way you receive (e.g with reference to the outbound delivery) then all of the batch details and characteristics will be copied into the receipt
The batch is only copied when you receive with reference to the outbound delivery from the STO
Good luck
Steve -
Copying of Batch Number and Characteristics in GI/GR
Dear SAP Gurus,
I have created a Stock transport order (STO). Against that STO I have created the delivery. In the delivery I enter the Batch Number/Characteristics(MM). When I do the Goods Issue against that delivery the Batch number is not being copied. Against that Goods |ssue, when I do the Goods Receipt I have to enter the batch number/characteristics manually.
We have a two step Storage Location to Storage Location transfer. When we do the Goods Issue the stock goes to Goods in Transit and then the GR is done against that GI.
Please let me know how to copy the batch number/characteristics automatically. Please also mention the name of the user exit if this can be handled through a user exit.
Thanks and Regards
Shehryar ZuberiDear All.
Please help me solve this problem.
Thanks
Shehryar Zuberi -
Vendor batch number in stock transfer
Hi,
Batch management at plant level.
When we transfer the stock from one plant to another plant, the vendor batch number is not getting updated in the receiving batch master record.
In 303,we will send it from one plant to another plant (Stock in transit).
In 305,we will receive it to another plant with different batch number.
How do we know this 305 has been done for 303?
Eg:
303
Material : A
Plant:Phar1
Batch 100
305
Material: A
Plant:Phar2
Batch :200
How do we trace the stock in case we need to resend back to the supplier?
Thanks
SriniYou are facing a classic problem. Given Batch number is unique at Plant level, to maintain the continuity, you should have the same batch number between the two plants. Any specific reason why you don't have it.
Then if there is valid case not to have the same batch number in this scenario, then you should look at making the batch number generation external so that you can prefix/suffix or come up with a way to get the original batch number from the sending plant in the receiving plant batch number.
Recently we had a similar requirement, so we activated batch classifiction and put the orignial batch number as one of the characterisitcs in the batch class. You can also think enabling such functionality.. -
Automatic Batch number for rETURN Delivery
When creating a return delivery, without reference, we need to manually input the batch number (assign dummy?).
Is it possible to have the system automatically generate the batch number for returns? If yes, how?Hi,
No you can' not
even if you try to create Return delivery without refrance to any order then it will determine item category,but gives error that,
YOU CAN NOT ADD THIS ITEM IN DELIVERY
because it is controlled by delivery document category
the delivery document category is - T (Returns delivery for order)
Kapil -
How to automatically assign a batch number
Hello experts,
Our customer have the "Manage Item by" settings on "Batches" and the "Management Method" settings on "On Release Only".
He don't want to manually generates the batch numbers in Delivery Entry because he would like to have an automatic assignment of batch number like a progressive number for year.
How can I achieve it using DI API ?
I have tried to create a Delivery Document using the BatchNumbers object but I got the following error message "the batch number you selected doesn't exists".
So I created a Goods Receipt for the batch number above and finally the delivery document has been created successfully.
The issue came out is about the stock quantity for the itemcode because the Goods Receipt have increased it and as result I have the same stock quantity as before the delivery and of course it's not correct !
I noticed that SAP B1 after the manually generation of batch number it creates a record on the OIBT table using an existing Good Receipt.
How can I add a batch number in the OIBT table using DI API without the need to create a Good Receipt ?
Can someone help me ?
It would be very appreciated.
Many thanks for your time in advance.
Best regards
AndreaHi,
Try this code, May be it will help you
Dim v_StockEntry As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)
Dim v_StockExit As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)
Dim str_ProEntryNo As String = oDBDSHeader.GetValue("DocNum", 0)
'Dim str_DocDate As String = CDate(frmProductionEntry.Items.Item("t_DocDate").Specific.Value).ToString("yyyyMMdd")
Dim str_DocDate As String = Date.Now
Dim intStockRowCount As Integer = 0
Dim FGCost As Double = 0
Dim RMCost As Double = 0
Dim RMQty As Double = CDbl(oDBDSHeader.GetValue("U_TotRW", 0))
'--- RM Exist
v_StockExit.Comments = "Stock Exit For Production Entry(RM) Production-Entry No: " & str_ProEntryNo
v_StockExit.DocDueDate = str_DocDate
v_StockExit.Reference2 = str_ProEntryNo
intStockRowCount = 0
For i As Integer = 1 To oMatrix1.VisualRowCount - 1
intStockRowCount += 1
If intStockRowCount > 1 Then v_StockExit.Lines.Add()
v_StockExit.Lines.ItemCode = oMatrix1.GetCellSpecific("ItemCode", i).Value
v_StockExit.Lines.Quantity = oMatrix1.GetCellSpecific("Qty", i).Value
v_StockExit.Lines.WarehouseCode = oMatrix1.GetCellSpecific("WarCode", i).Value
'v_StockExit.Lines.AccountCode = AccCode
Dim qty = oMatrix1.GetCellSpecific("Qty", i).Value
qty = IIf(qty.ToString.Trim = "", 0, qty)
Dim cost = oMatrix1.GetCellSpecific("Cost", i).Value
cost = IIf(cost.ToString.Trim = "", 0, cost)
Dim PerQtycost = CDbl(cost) / CDbl(qty)
v_StockExit.Lines.Price = PerQtycost 'GetItemPrice(oMatrix1.GetCellSpecific("ItemCode", i).Value)
Dim ManBtchNum = getSingleValue("Select ManBtchNum from OITM Where ItemCode='" & oMatrix1.GetCellSpecific("ItemCode", i).Value & "'")
If ManBtchNum.Trim <> "N" Then
Dim rs As SAPbobsCOM.Recordset = GFun.DoQuery("select * from OBTQ where ItemCode ='" & _
oMatrix1.GetCellSpecific("ItemCode", i).Value & _
"' and WhsCode ='" & oMatrix1.GetCellSpecific("WarCode", i).Value & _
"' And Quantity > 0 order by SysNumber")
Dim count As Double = oMatrix1.GetCellSpecific("Qty", i).Value
For k As Integer = 0 To rs.RecordCount - 1
If CDbl(rs.Fields.Item("Quantity").Value) >= count Then
Dim ss = rs.Fields.Item("SysNumber").Value
v_StockExit.Lines.BatchNumbers.BatchNumber = _
getSingleValue("select DistNumber from OBTN where ItemCode ='" & _
oMatrix1.GetCellSpecific("ItemCode", i).Value & _
"' and SysNumber ='" & rs.Fields.Item("SysNumber").Value & "'")
v_StockExit.Lines.BatchNumbers.Quantity = count
v_StockExit.Lines.BatchNumbers.Add()
Exit For
Else
v_StockExit.Lines.BatchNumbers.BatchNumber = _
getSingleValue("select DistNumber from OBTN where ItemCode ='" & _
oMatrix1.GetCellSpecific("ItemCode", i).Value & _
"' and SysNumber ='" & rs.Fields.Item("SysNumber").Value & "'")
v_StockExit.Lines.BatchNumbers.Quantity = rs.Fields.Item("Quantity").Value
v_StockExit.Lines.BatchNumbers.Add()
count = count - CDbl(rs.Fields.Item("Quantity").Value)
End If
rs.MoveNext()
Next
End If
Next
If oMatrix1.VisualRowCount > 1 Then
If v_StockExit.Add() <> 0 Then
StatusBarWarningMsg("Unable To RM Post Stock Document....... " & oCompany.GetLastErrorDescription)
Return False
End If
End If
Maybe you are looking for
-
I downloaded ios 7 to my wifes ipad 2. The only problem was, with the new system the letters and numbers on the keyboard became so streamlined that my wife had trouble seeing them because of a eye problem. Is there a way to get the old keyboard b
-
Specific Setup for My Computer?
Howdy all, I've been reading all sorts of recommendations on how to setup your scratch disks in premiere and all I seem to find is a bunch of varying opinions from what seems to be very knowledgeable sources. It seems that scratch disk setup is some
-
Wordpress xml file from local to remote MySQL
I am developing a php site with an attached WordPress blog using Dreamweaver CS6 on my localhost test server. My php pages contain echos from private blog posts with an average of several divs per page. Heres my problem, when I export the xml from my
-
Hello Experts, how do you rate the service module in SBO, i have one problem as my work is in distributed environment, i have got technicians who are on the field all the time with few equipments. They come office once in a while. I would like to man
-
Problem using SAX as described in xdksample_040602
I am trying to implement SAX-based parsing/loading of large XML-documents into an Oracle817 database. When trying to create the procedure "docExpand" I get an error on the following line of code: "select xml into p_xml from xml_tbl where id=xmlid;" T