Batchnumbers and Serialnumbers in Sales - Delivery

Hi,
i must have a control over the serial- and batchnumbers in the ui from Sales - AR - Delivery (not DI-API)
1. Insert Batchnumbers/Serialnumber for all lines
2. Check the choosed Batchnumbers/Serialnumbers before the user is added the document
Is there a solution for this?
regards
Martin Heigl, beas GmbH

Hi Martin,
Do Following the step :
1. Create one UDF on Row level.( e.g Batch/ Serial) lenght = 35
2. Run and Save the below SQL Query.
     declare @batch as nvarchar(100)
     declare @txt nvarchar(max)
     set @txt = ''
     declare P cursor for SELECT T0.[BatchNum] + space(1)
       + cast(cast(T1.[Quantity] as decimal(19,2)) as nvarchar)
       + space(1) + case when T0.[ExpDate] is null then '' else convert(nvarchar,T0.[ExpDate],102) end
      FROM OIBT T0 INNER JOIN IBT1 T1 ON T0.ItemCode = T1.ItemCode and T0.WhsCode = T1.WhsCode
      and T0.BatchNUm = T1.BatchNum
      WHERE T1.[BaseEntry] =$[$38.45.0] and T1.[BaseLinNum] =$[$38.46.0]
     open P
     fetch next from P into @batch
     while @@fetch_status = 0
     begin
      set @txt = @txt '\n'@batch +','
      fetch next from P into @batch
     end
     close P
     deallocate P
     select @txt
3.Apply the FMS on that UDF on AR  Invoice form.
Then check the reffection
Regards
Kamlesh Naware

Similar Messages

  • Crystal Report for Sales, Delivery and Payment.

    Hi Guys,
    Need some expert advice over here. Currently, our sales team are using 3 separate report, one report on sales per month for each specific customers, one report on delivered amount per month for specific customers again and the last one report on payment received per month for specific customers as well.
    We have the idea of joining this 3 report so that I can report on sales, delivery and payment all at once so that they can see the trend better. However, after trying for quite a few times, we fail to create a common joining between ORDR, ODLN and ORCT. Is there any possible way to work something out ?
    I have thought of using subreport, but I just cant find the way to plug in the figure correctly.
    Need some advice over there.
    Thank you.
    Best Regards,
    Alex

    Based on what you have told me, then you should then join Sales Order, Delivery, Invoice and Incoming Payments into one.
    The reason I say Invoice table also is because, you cannot directly link Delivery and Incoming Payments window.
    Also you it is not enough that you link the ORDR, ODLN and ORCT, you will need to get the details from RDR1 and DLN1.
    In SAP Business One, each line in SAP Business One can have a different Delivery documnet.
    The TrgetEntry, TargetType will give you this information. For example, if a line for Sales Order has TargetType 15, then TrgetEntry will be the DocEntry in the ODLN. But if it TargetType is 13 it means the Sales order was converted directly to and Invoice and bypassed the creation of Delivery step, which is possible in SAP.
    So here is how I think you will need to link Sales order and Delivery
    RDR1.TrgetEntry INNER JOIN DLN1.DocEntry AND
    RDR1.TargetType INNER JOIN DLN1.ObjType AND
    RDR1.LineNum INNER JOIN DLN1.BaseLine
    Now this could get a little more complicated if you do partial deliveries. For example if a line in your Sales Order has say 10 items and 6 of them are delivered using Delivery Note 123 and the remaining are delivered using Delivery Note 124, then the join will give you 2 different lines.
    So basically you will need to link the tables in this fashion
    ORDR <-> RDR1 <-> DLN1 <-> INV1 <-> RCT2 <-> ORCT
    Unfortunately, this linking process can get complicated if you do not follow certain steps, like for example if you do not create a Delivery Note and converted your Sales order to Invoice. Then the link would be
    ORDR <-> RDR1 <-> INV1 <-> RCT2 <-> ORCT
    I hope I didn't confuse you.
    Krishnan

  • Deletion of delivery and rejecting the sales order

    hi,
    my requirement is
    we have to delete the delivery and reject the sales order.
    can any body provide me the code for that.
    it is very urgent..
    thanks in advance.

    how do we come to know abt ur Config settings  in case of rejecting Sales Order ? Just ask ur functional person what to do in  this case ?
    Regards
    Prabhu

  • Multiple printing option of Sales, Delivery and Billing

    Hi All,
    How to take multiple print of sales, Delivery and Billing from Standard transactions.

    Hi
    You have to handle in the driver program by writing the function modules
    START_FORM....WRITE FORM...END_FORM in the loop of documents
    example for sales orders:
    Sort ITAB by vbeln.
    loop at ITAb.
    at new VBELN.
       call function  START_FORM....
       endat.
       call function  WRITE FORM.
    at end of vbeln.
       call function  END_FORM..
    endat.
    endloop.
    Reward points if useful
    Regards
    Anji

  • Exit to block Sales Delivery and Invoice?

    Hi Experts,
    Does there exist any exit to block the sales delivery and invoice?

    badi LE_SHP_DELIVERY_PROC
    Regards.

  • Linking column for sales,delivery  and invoices

    I just have a question regarding database schema in SAP B1.
    I would like to know   how SAP b1 links
    Sales Delivery and invoices
    In other words
    i want to know all invoices based on Sales and delivery
    all invoices based on  just delivery etc
    What is the linking field or column between these three tables
    rdr1, dln1,inv1
    How does Sap keep track of whether a invoice is based on sales or delivery or
    both.? I appreciate your help.
    Thanks,
    Josh

    Hi Joshua,
    What you need to look at are the BaseEntry, BaseType and BaseLine fields in the item row (ie INV1 or DLN1). It works as follows:
    BaseType = The originating document type where 17 is a sales order and 15 a delivery
    BaseEntry = The DocEntry of the originating document
    BaseLine = The LineNum of the originating document
    A simple example is as follows:
    1) I create an order (DocEntry 10) with 2 rows (LineNum 0 and 1)
    2) I create a delivery (DocEntry 5) based on this order with both rows. In the DLN1 table my rows will have BaseEntry 10, BaseType 17 and BaseLine 0 and 1.
    3) I create an invoice for the second row from the delivery. In the INV1 table I will see BaseEntry 5, BaseType 15 and BaseLine 1.
    You also have TargetType and TargetEntry which show the target document details but these are not that useful as they only show the last target number and type and cannot be used where you have multiple target documents.
    Kind Regards,
    Owen

  • Check Credit and Stock on Sale Order

    Hi All
    Could you please tell me how to check Credit and Stock on Sale Order.
    Thank and Best Regard
    Thang

    How To Do Configuration For Credit Management
    Credit and risk management takes place in the credit control area. According to your corporate requirements, you can implement credit management that is centralized, decentralized, or somewhere in between. 
    An organizational unit that represents the area where customer credit is awarded and monitored.   This organizational unit can either be a single or several company codes, if credit control is performed across several company codes. One credit control area contains credit control information for each customer.
    For example, if your credit management is centralized, you can define one credit control area for all of your company codes. 
    If, on the other hand, your credit policy requires decentralized credit management, you can define credit control areas for each company code or each group of company codes. 
    Credit limits and credit exposure are managed at both credit control area and customer level.  You set up credit control areas and other data related to credit management in Customizing for Financial Accounting. The implementation guide is under Enterprise Structure -> Definition or Assignment -> Financial Accounting and then Maintain credit control area. You assign customers to specific credit control areas and specify the appropriate credit limits in the customer master record.
    Settings for determining the credit control area of a document.  The settings of items 1 - 4 are taken into account according to their priority.  The credit control area found is stored in field VBAK-KKBER.
    1. Transaction OB38
       Check which credit control area is assigned to the company code.
       Company code:
       Credit control area:
    2. Transaction OVFL
       Check which credit control area is assigned to the sales area.
       Sales area:
       Credit control area:
    3. Transaction XD02 or VD02
       Check which credit control area is assigned to the payer.
       Payer:
       Credit control area:
    4. Transaction SE37
       Is user exit EXIT_SAPV45K_001 being used?
    5. Transaction OBZK
       For the settings under items 2 - 4, field "All company codes" must be marked in Transaction
       OB45, or the credit control area must be entered under the relevant company code in table
       T001CM of the credit control areas allowed.
       Company code:
       Credit control areas allowed:
    6. Settings for the credit checks
    7. Transaction OVAK
       Which settings do exist for the sales document type used?
       Sales document:
       Check credit:
       Credit group:
    8. Transaction OVAD
       Which settings do exist for the delivery type used?
       Delivery type:
       Credit group for delivery:
       Credit group for goods issue:
    9. Transaction OB01
       Credit management/Change risk category
       Definition of the risk category for each credit control area. This risk category can be
       assigned to a credit account by using Transaction FD32.
    10. Transaction OVA8
        Here, the individual credit checks for key fields
        o credit control area
        o risk category
        o credit group are set. Take these key fields from the above settings and go to the detail
          screen. In particular, check whether fields "Reaction" and "Status/block" are set
          correctly. To carry out follow-up actions in case of a credit block, the credit check
          status must be set (field "Status/block").
    11. Transaction FD32
        Credit master data for the payer of the relevant document.
        Credit account:
        Credit limit:
        Risk category:
        Currency:
    12. Settings for updating the credit values Update of the credit values is required for the limit
        check (static or dynamic credit limit check).
    13. Transaction OVA7
        Update of the credit value is active for the corresponding item type if the check box is marked. This field corresponds to 
        field "Active receivable" in Transaction VOV7.
        Item type: 
        Active receivable:
    14. Transaction V/08, Pricing
        In the pricing procedure used for pricing, subtotal "A" must be entered in a line for
        determining the credit value (mark the pricing procedure and doubleclick on "Control").
        Usually, the net value plus taxes is used. This way the system is determined to use this
        subtotal for credit pricing. The credit price is stored in field VBAP-CMPRE and used for
        update and credit check.
        You can find the used pricing procedure of the order under "Item -> Condition -> Analysis".
        Pricing procedure:
        Line with subtotal = 'A':
    15. Transaction OB45
        Which update group (field "Update") do you use in the relevant credit control area? The
        default setting is "12". If you use another update group, check whether this is fine with
        you. If you open an OSS message, please tell us the alternative update group.
        Credit control area:
        Update:
    16. Transaction OMO1
        Which kind of update did you choose for structure S066? 
         In any case, "Synchronous update (1)" has to be chosen as the kind of update. 
         All other settings will lead to errors
    Regards
    Raja
    Edited by: ramanathan raja on Jul 25, 2008 4:37 PM

  • Questions on Inter-company and Cross-company sales ordering process..

    Hi,
    I understood the delivery plant and the sales org. is not in the same company code might be the process, but i want to know some details especially in SAP system how it is realized and processed, hope could kindly help me on below questions!! thanks!!
    1)what is the difference between inter-company sales and Cross-company sales??
    2)What is the general document flow and config. when in below 2 cases:
    Suppose the 2 company code under same sap client system, then what kinds of company code,plant config within the system for inter-compan and cross-company, and finally what kind of document flow will it be in the system.
    Suppose the 2 company code is under diff sap system, then what kind of doc flow in each sap system for inter-company and cross-company sales process???
    Thank you very much!!!!

    Hi,
    Basically there are totally Three types of scenarios
    1. Intra Compnay Stock Transport Order
    In this type of scenario, the stock is transfered between Two Plants which are under the same Compnay Code. The document type used here is UB. Here in this scenario the owner ship on the stock is not changed thats way there will not be any Invoice. The process as follows
    a. Create Purchase Order with document type UB - ME21N
    b. Create Replenishment Delivery with Document type NL - VL10B
    c. Picking and PGI - VL02N
    Now stock will be shown in Transit, you can check this using T.Code MB5T.
    d. Do MIGO to receive the stock into ordering plant.
    2. Inter Compnay Stock Transport Order
    This is called as Cross Compnay STO. Here the stock is sent from one plant to another plant which are in two different Compnay codes. That means the Ownership on the stock is changed in this scenario, that way there will be Intercompnay Invoice IV is reaised. Here the stock is just moved to one plant to another plant but not to any customer.
    The Process is as follows
    a. Create a PO using type NB - ME21N
    b. Create a Cross Compnay Replenishment delivery using type NLCC - VL10B
    c. Picking and PGI in VL02N
    d. Inter Compnay Invoice IV is raised by Supplying Compnay code to the Ordering Compnay Code - VF01
        for this a customer created in Supplying Compnay who represents the Ordering Compnay and the invoice is raised against to that customer.
    e. MIGO to receive the stock in Ordering Plant
    f. MIRO to do invoice verification and do Vendor account update. This also can be done by EDI triggering, to update the Vendor Account. That means with this step, ordering compnay will update into its vendor account that he has to give certain amount to the compnay who supplied the stock.
    3. Inter Compnay Customer Sales
    This is similer to the 2 process, but here instead of sending to Plant we will send the stock directly to Customer of other compnay code.
    The process is as follows
    a. Customer raises  normal sales order in another compnay code of type OR - VA01
    b. But if the plant of that compnay does not have stock, then in the order the plant is changed to other compnay code plant.
    c. Delivery is created in supplying Compnay against this Order - VL01
    d. Picking and PGI is done - VL02N
    e. But the stock is sent direclty to customer from supplying plant.
    f. Ordering compnay will raise normal invoice F2 to the customer
    g. Supplying Compnay will raise Intercompnay invoice IV to the Ordering Compnay.
    But for all these process there are some configurations can be done, like
    the material should be extended to both the plants
    a customer is created in supplying plant who represents the ordering plant so that IV can be generated to that customer.
    Supplying Plants should be linked to ordering Sales Org and Distribution channel. etc.
    Hope this is clear.
    Thanks
    Praveen

  • Creating Excise Invoice from Sales Delivery using DI API.

    Hi Experts,
    I have been searching a lot for any Business Object for creating Excise Invoice base on Sales Delivery using DI API.. But have not yet found any one.
    I want to create Invoice for excisable items from Sales Delivery using DI API.,for Excisable items we cannot create standalone A/R Invoice . We need to create Excise Invoice also . But How to create Excise Invoice based on Sales Delivery using DI API. Is there any Business Object for that.
    Please suggest me.
    Thanks and Regards,
    Pooja Singh.

    Hi all,
    I have not received any reply for this thread. Does this mean that there is no provision for creating Excise Invoice from Sales Delivery ? Actually I was asked to create sales delivery and then Outgoing Excise Invoice and then Sales Invoice using DI API.
    But I don't find any Business Object for this in SDK ? Is it really not possible to create Outgoing Excise Invoice from Sales Delivery using DI API.? If possible then how?
    Please reply me if anyone has got any idea in this regard.
    Thanks and Regards,
    Pooja Singh.

  • Item availability for selected items and directly create the delivery

    Hi All,
    For a very big sales order ..lets say having 700 line items ...is there any convenient way to create the delivery for selected items ..e.g. 30-40 line items rather going and selecting the line items then doing the item availability.
    do you have any LSMW format by which we can do the item availability for selected items and directly create the delivery.
    kindly Guide me..
    With Regards
    Azeez.Mohd

    Hi ,
    There is no stand way of doing it . You need to take help of abaper to do this :
    1. Create a t code where if you give sale order number , it displays a report with all the items with a check box near to it as we see in SE16 .
    2. This report could be best in ALV form where users can do "ctr+f" and search only the required materials then select those lines and press a button on the top of report .
    3. Once the button is pressed , program will run vL01n ( create delv in backgrnd) in a BDC form . At time of delev creating , the bdc program in backgrnd uses only those items which were selected by user and not the other items .
    4. Program will create a delv using a BDC in background and return the delv number for user to view tht.
    U can also try using FM : RV_DELIVERY_CREATE to create delv in backgrnd after user selection if BDC is getting tricky.
    Hopefully ,this shuld work and will be a easy process for the customers.
    Let us know the outcome .. .
    B O L ..
    Hope this Helps !!!

  • Correct procedure to transfers Sales Delivery to Sales A/R Invoice

    Hi,
    Is there someone who can white some code to explain the best way to transfers a Sales Delivery to A/R Invoice with the SDK the same way as Copy To (A/R Invoice) from the Delivery window in SAP ?
    I've been successful at transfering one by hand saving every properties of the document source to the document destination for a simple document
    but now I'm faced with documents that have BP's with Credit Limit exceeded etc..etc and I'm getting (XXXX) Internal Error (-5002) occured
    Which XXXX is different from one document to another

    Hi Marc,
    I don't think there is a simple procedure as such because there are quite a few ways to code this, depending on your requirements. It obviously gets more complex where you are copying multiple deliveries to a single invoice or splitting a delivery in to multiple invoices based on the originating orders. If you use additional expenses (eg freight) then you also need to copy this across otherwise it will be left on the delivery and never invoiced.
    It makes sense to check for available credit before you add an invoice. In this way you can give a much more user-friendly error message than the one that SBO gives (ie the 5002 error). You'd still need to trap any errors returned by the Add method.
    Kind Regards,
    Owen

  • Which table stored the Inbound ASN IDOC # and corresponding In.B Delivery#

    Hi,
    May i know which table stored the inbound ASN IDOC# and corresponding created Inbound Delivery number??
    Thanks!!

    Dear Hoo Laa,
    You may find the Sales Organisation/Distribution Channel details in PO itself (Shipping Tab). Table where you can get Sales Organisation/Disribution Channel is EKPV.
    Regards
    Samier Danish

  • Orders consolidation and Frieght charges in delivery

    Hi SAP gurus,
    Scenario: customer 'x' places orders every day. once the material is available we want to ship it. so lets say that for orders placed on monday and tuesday ...material is available on wednesday. so i consolidate the two orders and make one delivery. and then after packing the delivery, shipper will call different frieght companies and get quote and  choose one depending on rate and time. once he get that information he wants to add that charge in delivery.what do i configure this scenairo in sap and how do i add freight charges in every delivery??
    please help me out.

    Hi All,
    Thanks for your inputs, how the system detemines the price at billing it has to copy from sales order and delivery at simultaneously.
    Is it possible to get all the conditions from sales order and only frieght from delivery and combining these in billing.
    And what pricing type do we need to maintain in copy controls?
    Thanks in advance.
    Raj

  • Sample bom creation and explosion in sales order

    hi,
         can any one help to create a simple bom with atleast one sub item for the bom and create a sales order in which the bom explodes ( i mean when u enter the main bom item it should list its sub items as its line item below it)...
    (also mention what item categories are to be taken care ... )
    rewards for sure
    thanks
    mmn

    Hi MMn,
    Bill of materials (BOM)
    1. In the SAP System, you can use BOMs to represent different objects (such as materials, equipment, functional location BOMs, and documents) and to maintain object-specific data.
    2. Document BOM: A complex document may be made up of several documents, such as a program, technical drawings, papers, and photographs. These related information and documentation objects are grouped together as a unit using a document structure – a BOM for a document.
    3. Equipment BOMs are used to describe the structure of equipment and to assign spare parts to equipment for maintenance purposes. Bills of material for functional locations group together the elements of a technical structure, such as the functional unit of an entire plant.
    4. You work with order BOMs when you specially tailor the make-to-order production of your products to the requirements of your customers. In order to meet the customer requirements, sales order specific modifications to various assemblies are often required. Furthermore, assemblies are often specially constructed for a particular sales order.
    5. Before you can create a BOM for the component parts of an object, the object must have a valid master record in your system.
    6. A bill of material that you create for a material is known as a material BOM in the SAP System. A BOM explosion answers the question: What is the product made of? This question arises in various situations, such as when you want to:
    Determine material requirements for a product
    Look at the overall structure of a product in a design department
    See an overview of the parts and materials required
    Calculate the effects of changes to costs
    7. BOM is a collection of materials that make up a product. For example – computer, home theatre system. Material BOM is complex and is dependent on sales and distribution, material management or production planning.
    8. The most important rule is that the material type has to be a FINISHED PRODUCT (FERT) in order to categorise it as a BOM.
    9. BOM processing is divided into two different ways – either at the MAIN item level if the item is assembled or at the sub-item level (i.e. at the component level) if the material is not assembled.
    10. BOM is configured at the item category level (VOV7) and transaction code to create a BOM is CS01.
    11. In case of single level BOM, main item categories TAQ and TAP should represent single level BOM in VOV7 and in case of multi level BOM, the main item categories should represent multi level BOM.
    Main item level processing
    1. The material master records should have the item category group ERLA in the sales org.2 screen of the finished product. In this case, the associated sub items function only as text items, and thus are not relevant for delivery. This process ensures that pricing, inventory control and delivery processing is carried out the header level that is for the finished product only. This is mainly relevant to the assembled products.
    2. item category group – ERLA; main item category – TAQ (schedule line – CP) and sub item category – TAE (schedule line – CT)
    Sub-item level processing
    1. If the business prefers to have the sub-items be responsible for pricing, inventory control and delivery processing, the item category group should be LUMF on screen sales org.2 of the respective material master record. This ensures that subcomponents are relevant for processing. This is relevant to the products that are not assembled.
    2. item category group – LUMF; main item category – TAP (schedule line is CT), sub item category – TAN (schedule line is CP)
    Multi-level BOM
    In order to activate the multi-level BOM, structure scope in VOV7 has to be changed from single level explosion to multi level explosion.
    Try this and revert back fr clearifications
    Reward Points if helpful.
    Regards
    Srini

  • Block the Quantity in Sales Delivery

    Hi,
    I want to block the Quantity in Sales Delivery if it is Exceeding the Quantity in Sales Order.
    The scenario is..............
    I m creating a sales order for one or more line items with Quantity as 100.
    based on this sales order i m creating a Sales delivery (it can b partial too)
    if the Deliver Quantity exceeds the Order Quantity,
    either it shoudn't allow the Document to b added
    or show a error msg
    Thanks in advance

    Hi,
    Please select this and paste in "SBO_SP_TransactionNotification"- Stored Procedure
    IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'15')
    BEGIN
    declare @numlinii int
    SELECT @numlinii = (LineNum + 1) FROM DLN1
    WHERE DLN1.DocEntry = @list_of_cols_val_tab_del AND
    ((Quantity > BaseOpnQty))
    ORDER BY LineNum ASC
    IF (not ISNULL(@numlinii, 0) = 0)
    BEGIN
    SET @error = 10
    SET @error_message = N'Quantity is invalid in Line ' + CONVERT(nvarchar(4), @numlinii) + N' !'
    end
    END
    SAGAR

Maybe you are looking for

  • Newest OS i can get on 2008 MB

    I have a late 2008 (white) MB, model identifier Macbook 4,1 with OS X 10.5.8. What I'm trying to do is wipe the memory and get the newest OS X I can on it. This is my first time doing this so I have very little clue what I'm doing, so my questions ar

  • Dispatcher status yellow after kernel update.

    Hi exsperts. my system SQL2005 on Windows2003. After updating kernel from 146 to 179 system status in sapmmc turned yellow with info:    dispatcher Runnig but Dialog Queue info unavailable, J2EE:All processes runing. second issue:    In sapmmc : AS A

  • BDC ...?  . ?  ..  . ? Confused

    Hai Dear ABAP Pros.. As far as I know, BDC is used to Transfer data from legacy system to SAP system. I have newly started my career in SAP ABAP & I am the only guy for this company on ABAP & havenot yet worked on BDC yet. I have gone thru the notes

  • Not able to log in as an AD Network User

    Hey guys, I am sure this has been beaten to death but I can't seem to be able to authenticate as an AD network user to my os x 10.5.7 system. I see that my domain controller is responding normally inside of the Directory Utility but when I try to log

  • How do i disable voiceover utility

    i hit a button a few minutes ago and the voiceover utility will not shut up. And everthing I click on now has a box around it. HELP!!