Logic to retrieve batch number in batch split scenario for a material

Hi All!
LIPS-CHARG gives the batch number for a material in normal scenario.But in batch split scenario for a material what should be the logic to retrieve the field batch number based on POSNR,VBELN and UECHA in LIPS.
UECHA corresponds to higher level item of a batch.
I had been given the following logic to do the same but it is not pulling any values inspite of a batch split available for the material.The logic is
Select lips-charg (batch number) where  lips-posnr = lips-uecha ( higher level item batch)
Please advise
Regards
Praneeth

Hi Praneeth,
The way LIPS records are in a batch split scenario is that let us say you have a delivery with one line item 00010. Now if this splits into two batch split items, then you will find in LIPS 3 records, one with line item 00010, one with 90001 and another with 90002. Both 90001 and 90002 will have a UECHA of 00010, whereas for 00010, this field will be blank. So the logic is to create two internal tables one where UECHA is blank and another where it is not blank and use it.
SELECT * FROM LIPS
         INTO TABLE I_LIPS
        WHERE VBELN = P_VBLEN.
I_LIPS_TEMP[] = I_LIPS[].
DELETE I_LIPS_TEMP WHERE UECHA IS INITIAL.
*-- This table will not have only the batch split items not the main items.
LOOP AT I_LIPS WHERE UECHA IS INITIAL.
*-- loop at the main items.
  IF I_LIPS-CHARG IS INITIAL.
*-- batch is not there on the main item, see if it is there on any batch split items.
    READ TABLE I_LIPS_TEMP WITH KEY UECHA = I_LIPS-POSNR.
     do whatever
  ENDIF.
..... do whatever
ENDLOOP.

Similar Messages

  • Split valuation for configurable material

    Dear expert,
    Is it possible to create split valuation for configurable material type (KMAT). I have create split valuation. But when i create material with material type KMAT, the split valuation category can't filled/ edited. Why?

    Thanks Charlie..
    But, if i maintain semifinished product by batch. Means i have one material number with 2 batch which are sweet and sour. I managed the quantity using batch. Before, i think i used split valuation to managed the value of sweet and sour. If split valuation doesn't work for configurable material, how to manage the value of this 2 batch?

  • How to activate split valuation for existing material having stock open PO,

    Hello,          
    How to activate split valuation for existing material in plant having stock and open PR,PO and Production order.
    Regards

    Hi
    It is not possible to activate in such case, u should not have any stock.
    With regards
    Pavan

  • Subcontracting PO - Batch number to be made mandatory for the components

    Hi All,
    I have a situation in Subcontracting PO. The components which are sent to vendor need to be updated with Batch number. Is there any User Exit  / Configuration available, which can provide a error message to the user when ever he tries to save the PO without the batch number entered for the components.
    SAP allows to save the SC-PO, if the batch numbers are not entered for the components which are batch managed. I have checked the PO Fields in Customizing, which has control of the Batch number for the header material in the material data tab & not for the components which will be available after the BOM icon is clicked.
    Appreciate if you experts provide a solution / work around for the above scenario, as the client is a pharma client & they need to exactly match the batch which has been sent out for making Finished product with the Sub contracting vendor.
    Thanks for your help & awaiting your reply at the earliest.
    Regards,
    Sathya Padmanabhan

    Hi,
    you shoudl definitively check out SAP best Practices for Pharmaceuticals, which can be foubnd in the helpportal:
    http://help.sap.com/bp_pharmav1600/Pharma_US/index.htm
    Go to the Business Information area....there are some subcontracting scenarios....
    Oliver

  • Split valuation for serialised material.

    We're using serialised materials that are also batch managed.  Split valuation is in use too, and I want to change the valuation type for one of the serialised materials.  But the val. type is held on the batch master record.  I only want to change the val. type for one of the serialised materials though not the entire batch. 
    This is possible?
    Regards

    Thanks for feedback, 309 is a material to material transfer. 
    But i want to use the same material, same serial number, same batch to retain the traceability.
    All i want is to change it from a New to Refurbished unit i.e. change the valuation type for the one unit.  This is not possible?
    Regards

  • Activating split valuation for existing material code

    All SAP Gurus,
    We have certain material codes in ROH and HALB material types in a plant.
    We are doing external procurement as well as inter-company stock transfer (STO) of the same materials.
    We want  to keep the separate accounting of the material which is procured from out side and which has been received through STO.
    As the material codes are same, in my view only solution is to have split valuation for these materials.
    Now, as the materials are already in use since very long, will it be possible to actvate split valuation for these materials?
    If yes then how?
    Is there any alternate way to tackle with the problem?
    Regards,

    Hi,
    Better you go with Split Valuation. But Before u go to split valution u have u clear all Pending Documents for that material.
    U must not have stock in for that particular material.
    In Split valuation, use material Valutaion type STO or External procurements.
    Donot make any of the Valuation Type as Default....it will create problem in Future.
    Hope Help u !
    REgards,
    Pardeep Malik

  • Missing Batches Number (Nonsplit Batch or Split Batch) in Invoice

    Hi guys,
    I need some help on you guys on following:
    I have a SO without batches information and I have interco PO with batches information.
    I create Invoice base on SO, therefore Invoice doesn't capture Batch or Split Batches information from PO.
    Is there anyway, I can populate this information during creation of Invoice?
    Aish.

    Hi,
    I have created delivery against sales order.
    While picking (during delivery PGI), I selected two batches to suffice the delivery qty. Please refer the example quoted below.
    Sales order (SO1) - Material (Mat1) - qty (15 ea)
    Delivery against sales order (Del1) - batch split: batch1 - 10 ea
                                                                         batch2 - 5 ea
    In table LIPS: when I enter delivery number as "Del1" and execute, I get 2 records:
       del no.     Item No.      Material   Qty       Batch no       Sales Order no     Sales Order Item no
    1. DEL1       10              Mat1        10 ea    batch1          SO1                    10
    2. DEL1       20              Mat1         5 ea     batch2         ______                 ____
    Thus in the 2nd record, the Sales order no.(LIPS-VGBEL) and sales order item no. (LIPS-VGPOS) does not get updated.
    I have to develop a report to display the Sales Order number and sales order line item number for each batch of the Delivery for the same item number. Please guide me to know how I can get the same.
    Hope this clarifies the issue faced.
    Regards,
    Ankush

  • Internal Batch Number for specific Production Order Type

    HI PP Guru
    We need to activate Internal Batch Numbers to a specific Production Order type.
    We need this at order confirmation level. i.e. (CO11/CO12)
    Is it possible? HOW ?
    Please let me know customizing Steps.
    If this is not possible then, Batch number should be internally assgisned at Order release stage. Please let me know customizaing steps for this even.
    Thks.

    hi Siva
    Thk for suggestion
    However, if we do not wish to activate Internal Batch Assigment and want to remain on manual BUT still we want system should not allow duplicate BATCH NUMBER, then, is there any way to achive this.
    This is because, once we manually enter batch in confirmation (CO11), we further break the material in to several part and we need to understand original batch number. For this we just take the original batch number and add further serial number like below
    Orinigal Confirmation Batch Number - 100001
    Batch Split of 10 - 10000101,10000102,..............10000110.
    So, what we want is system should check that same batch number is exist or not in confirmation. Is it possible or how it can be handle.
    thk in adv.
    SK

  • Missing batch number when running MI31

    HI experts,
    Please help me investigate this issue:
    We create PID using t-code MI31. After creation, we found, for a material, all of its batch numbers were successfully included in PID, except for only 1 batch. I investigate the missed batch and found that no PID has been created for it before, therefore according to standard logic it should not be excluded from MI31. And this batch is normally used for production.
    Besides missed batch, there are also some missed materials in MI31. These materials have stock in system.
    Any one can advise me what may be the problem here?
    Thank you very much.

    Hi Jurgen,
    You are right. I have to commit that errors are due to our end users and myself. There's nothing wrong with MI31. Thank you very much.
    Another question regarding to this issue: How many times in a fiscal year does SAP allow us to create PID for a specific material & batch number using MI31 WITHOUT selecting indicator "include material subject to PI" and "include batch subject to PI"?
    Some said number of allowed times is 1 per year, some said other. Then I need a confirmation.
    Thank you & regards,
    Duc.

  • Change of batch number

    dear all,
    by any chance can i change the batch number once material doc is posted and material is already there in stock with X batch number.
    i dont want to cancel the material document.
    please advice..
    regards,

    Hi,
    Create the new batch first through MSC1N for material, plant & sloc combination.
    Then you can transfer the stock from existing X Batch to new Y Batch through 309 or 311 movement type.
    Enter the receiving batch as the new Y batch. & the existing batch as X.
    Edited by: Komal Gala on Aug 8, 2008 4:09 PM

  • BAPI to delete Batch number

    Hi,
    Can anyone let me know the BAPI to delete the Batch Number when ever a particular Material document is reversed for a year.
    (Batch Number that was created as part of Material Document Creation and Each Batch Number is used only for one Material Document number)
    Points for sure..
    Thanks,
    Ponraj.s.

    Ponraj,
    BAPI_BATCH_CHANGE              Change Batch   
    BAPI_BATCH_CREATE              Create Batch   
    BAPI_BATCH_DELETE              delete batch
    Amit.

  • Cost by Batch Number

    Just to be sure, there is no way to manage an item cost by batch number?
    Thank you

    Thank you for replying, actually I do manage my raw materials by batch, but when release them from inventory, they get released with a cost valued by average or FIFO depending on the Item settings but, what I need, is to get the cost at batch level, not at item level.
    Im guessing it is not possible, could it be done by sdk?
    Thank you!

  • Object Link to Batch Number (MCH1 & MCHA)

    I am trying to link a DIR to Batch Number.
    For this i tried object MCH1(Batch Number without Plant) & MCHA (Batch Number with Plant).Screen Numbers for MCH1 is 264 & for MCHA is 265.
    After making the reqd. configurations, ie. defining object links for Document Type as MCHA & MCH1 when i go to transaction CV01N i can see the tab for MCH1(screen number 1264) and no tab is available for MCHA(1265).
    And when i go for CV04N, and try to search for same document type with the help of object links then both tabs are visible there. But now in these tabs material column is not visible, only Batch column is visible for MCH1 and Batch & Plant column are visible for MCHA. I have already checked the Table settings - there is nothing wrong with it.
    Please guide me why such problem is occurring instead of maintaining all configuration properly. Is there anything that i have missed?
    Points for helpful answers.

    Hi Christoph,
    Thank you for quick response.
    Looks like I was not clear in my query.
    What I have done is as following:
    1.Maintain Screen for Object Link: Here I maintained the objects MCH1 & MCHA with screen numbers 264 & 265 respectively. And also maintained value “1” for Authorization.
    2.Define Document Type >> Define Object Link: Then I have assigned these 2 objects to the particular Document Type with DC10 along with respective screens.
    Now when I go to CV01N and go to object links I can see only 1 tab which contains Material & Batch which I guess is visible because of MCH1 (Screen number 264).
    But I am not able to see the other tab which should contain Material, Batch & Plant as defined in the screen 265 for object MCHA.
    Second problem is when I go to CV04N, and enter the Document Type and go to object link tab, I can see 2 tabs. But one of these tabs has Batch & Plant Column and the other tab has only Batch column.
    Please help me out with this. Thank you.

  • Stored Procedure for Batch Number Format and Block Duplicate Batch Number

    Hi Experts !
    I am new one in forum asking question.. I want Stored procedure for Batch Number Format. I want fix one Batch number format in Stored Procedure.
    Example :
    My Batch number format Like  BATCH00001 - It should be first five digit is text format and next five is Numeric.
    IF create Goods receipt PO or Goods receipt stage I create batch number like BATCH 00001 or any other number means don't add that document and also duplicated batch number also does not allowed. please give me the solutions. I am sorry for my bad english .

    Dear Nagarajan K.
                         Thanks for your replay ..
    IF @transaction_type IN ('A','U') AND (@object_type = '106' )
    BEGIN
    set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,1) - 1)
    set @batch = substring(@list_of_cols_val_tab_del, len(@item)+1, (CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,len(@item)+2)) - (len(@item)+1))
    --set @base =( select basetype from ibt1 where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    set @count = (select count(*) from oibt quantity > 0 and where  batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    if @count > 1
    begin
    set @error = 1
    set @error_message = 'Please enter different Batch Code for batch ''' + @batch + ''' for item ' + @item 
    select @error, @error_message
    END
    END
                  I used above Stored Procedure. here we can use one batch number for different item but  i want to block one batch we should use one item and one time only after than we never use that batch number for same item and another item.
             After that I want format for Batch, we should follow unique Batch number for all items.

  • How to Change batch number in inbound?

    Hi, i have an issue.
    In our STO process, because supplying plant is applied batch management, when create Oubound Delivery, we enter a batch number, example Batch A.
    After post GI, the Inbound will be created automatically. And auto input the batch A in that IBD. That field isn't possible to be changed.
    The user want to changed it to Batch B.
    The question here is :
    Why batch A is input automatically to IBD?
    How to change Batch A to another in IBD?
    Edited by: Luankuz123 on Oct 20, 2011 7:51 AM

    Hi,
    In your case the stock is in stock in transit. You cannot change the batch number from A to B. It gives effect as A batch as negative and B batch as positive. Better do transfer posting from batch to batch in 309 after STO. Thanking you.

Maybe you are looking for

  • Error installing PI 7.1 on MSCS Windows

    Hi, When I try to install ASCS instance, sapinst is stopped with following error message: An error occurred while processing service SAP NetWeaver Process Integration 7.1 > Installation Options > SAP Systems with Oracle > High-Availability System > B

  • Appending the Original File Name as Suffix to Receiver File Name

    Been searching and I've seen Michael's blog about creating a UDF to place the original file name in the payload.    Since this is a file->file scenario, I have no mapping.  I have the Adapter-Specific Attributes turned on on the Sender to pass the fi

  • Photo uploading help.?

    I cannot upload any photos. I click import and go to the file source but it either says could not copy file to requested location, or gives me a bunch of random stuff that does not work or is not even in my files. What could I do to fix it or who cou

  • How can I use my Dell photo 924 printer with my iMac

    How can I use my Dell photo 924 printer with my iMac, I have tons of ink and don't want to buy a new printer right now.

  • Goods consumption document posting date should be same as POD confirmation

    Hi friends, The scenario is like this --- The delivery is POD relevant, after delivery consignment lending happens {movement type 631}, then GI is done. But, only after POD confirmation this GI document comes into this document flow and it can be see