Check a UDF of batch number when I create Goods Issue or Delivery

Hello,
I manage my items with batch number and I want to block the creation of all  Goods Issue or Delivery in function of the value of a UDF (created the OIBT table).
I think I can achieve this by using the stored procedure SBO_SP_TransactionNotification, but I never used it and I don't know if (and how) I can retrieve the selected batchnumbers of my documents.
Is it possible to do so, or do you have any better suggestions???
Thank You,
Xavier.

Hi Xavier,
You can find some additional information about the SBO_SP_TransactionNotification stored procedure here:
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf]
The stored procedure only returns the following;
- Object type
- Transaction type
- Num_of_cols_key (number of columns in the primary key of the object)
- List_of_key_cols_tab_del (the list of the columns in the primary key)
- List_of_cols_val_tab_del (the values of these columns)
So the stored procedure doesn't directly return the information you want. You would have to link this with a DI application to access the document in question using the value of the primary key returned by the stored procedure. (Or through using an SQL query also using the primary key returned by the SP).
Please note however, that SBO_SP_TransactionNotification is designed for notification purposes only. SAP can only support any issues arising out of use as a notification mechanism; the use of this stored procedure to block transactions or work as an authentication step are not supported. Please see SAP note 1011154 for more information.
Regards,
Niall

Similar Messages

  • Change batch number field during post goods issue

    Hello,
    During one step transfer posting i want to change the batch number during goods receipt via transaction VL02N.
    I have tried using the below exits and badi without success.
    Exit EXIT_SAPMM07M_010
    mb_document_badi
    LE_SHP_GOODSMOVEMENT
    Below is the code i have implemented in the exit
    clear v_vbeln.
    select single vbeln into v_vbeln
       from likp
    select * from likp
        where vbeln = i_mkpf-le_vbeln
        and   vstel = c_vstel
        and   werks = c_werks
        and   lfart = c_lfart.
        IF sy-subrc = 0.
          e_charg = 'X'.
        ENDIF.
    If any body has implemented same functionality kindly help.
    Regards,
    Koustubh

    Hi,
    In the BADI LE_SHP_GOODSMOVEMENT, inside method CHANGE_INPUT_HEADER_AND_ITEMS, loop the parameter CT_XIMSEG.
    For each line in CT_XIMSEG, change the value of CT_XIMSEG-CHARG according to you logic and modify the internal table CT_XIMSEG transporting the valude of CHARG.
    Check whether now it is getting updated in MSEG.
    Regards,
    Harish

  • Checking the duplication of batch number

    hi expert
           I m using the Stored procedure (SP_TranscationNotification) for checking the duplication for Batch Number ie when a alreasy existing batch number is given an error message should be shown.
          declare @ItemCode nvarchar(64)
          declare @batchNumber nvarchar(64)
          if @transaction_type in ('U','A') and (@object_type='106')
             begin
                set @itemCode = LEFT(@list_of_cols_val_tab_del, CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,1)-1)
                   set @batchNumber=substring(@list_of_cols_val_tab_del,charindex(char(9),@item)+1,len(@list_of_cols_val_tab_del))
                 if exists(select @itemcode,@batchnum from OIBT where BatchNum=@batchNumber and ItemCode=@Item)
                    begin
                        select  @error = 1, @error_message ='batch number already exists'
                    end
            end
         Here in the above SP , i cant able to get the batch number,Please anyone give me the solution of getting batch number or suggest a method to get the value between first and second tab of a row.

    Please check this answered link. Your level of batch would be defined on plant, thats why you are getting duplicate batches. Batch definition at Client level has unique batch numbers.
    Change the Batch Level
    Edited by: Afshad Irani on May 22, 2010 10:54 AM

  • When we duplicate Goods Issue that form   UDF's  should be blank .

    Hi experts
    one of my client  using  UDF's on the Goods Issue  Form  ,my client   have one query when they duplicate Goods issue documents
    UDF's value also carry  to duplicate document's , for a duplicacy purpose  they want to  in duplicate documents UDF should be
    blank.
    Thanks in advance .
    Regards
    nitin

    Hi Nitin,
    I am afraid you have to manually clear them out or use SDK to meet your goal.
    Thanks,
    Gordon

  • Batch determination not working during goods issue in MIGO screen

    Hi,
    We have configured search strategy according to shelf life expiration while doing the goods issue with movement type 201, 351 etc. Now when I do goods issue in MB1A for movement type 201 or in MB1B for movement type 351, by entering the * and clicking enter, system proposes the batch nos of the material according to the shelf life expiration. But when I do same procedure in MIGO screen, while entering * in batch field system does not propose the batch nos., instead it gives error as "use of special characters are not allowed"
    How the above problem can be resolved?
    Thanks in advance,
    Satish

    Thanks Aroop & Jurgen
    I have done the settings as per your suggestions by maintaining the Stock Determination Group. However It picks the batches as per FIFO and not as per shelf life expiration. Also same is the case with MB1A or MB1B.
    The reason I wish to use MIGO instead of MB1A or MB1B is as follows
    Suppose STO is made of say 10 line items (all Batch managed items). Now while issuing the goods, say for the seventh item there is no stock available then I can not bypass this item (it asks for enter the batch no. even though I change the quantity to zero) and I have to abort the complete transaction. But in case of MIGO I can bypass this item by unchecking the item OK check box.
    Any inputs on the above will be helpful.
    Thanks,
    Satish

  • Batch and Quantity display during goods issue to Production order

    Hi
    Most of our raw materials used in production order are batch managed.While issuing goods to production order(TC MIGO).
    While issuing goods ,when we issue we can see batch number only in the F4 help.At times the displayed batches may have ZERO stock.To prevent the wrong batch entry ,the end user is forced to open another screen in MMBE or MB52.
    Is there any way ,where in both Batch and the quantity is also displayed in F4 help.
    Thanks in Advance. 
    Surya

    Hi All
    my client have same problem. is it possible guide me how can prevent from to show Batch that has not Qty. when we do goods issue?
    Regards
    R.Tr

  • Abap Why Delivery no. can't creat batch number when PGI?

    Hello.
    Now I am working on PGI. I use the enhance to create default batch. But the delivery no. batch number can't be created when PGI.
    It only can be created when LV01N creating dn no.
    So can you offer me some help? So bad.....
    Thanks for your help.

    Hi,
    You can follow a different approach. Send the output of the Smartform to the spool.
    You have a Function Module to read the spool and convert it to PDF . Then there is one more function module to attach the PDF and send it as a mail.
    You need to configure SMTP in Tcode : SCOT.
    Search the forum with emailpdfattachment
    You have umpteen postings available.
    Pls reward if useful.
    Regards,
    Laxman Nayak

  • 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.

  • Where to enter the Assembly serial number when doing WIP Component ISSUE

    Hello Oracle Guru`s,
    I am performing Kit completion via API`s. I am able to perform Move transaction(have inserted in apps.WIP_MOVE_TXN_INTERFACE) and Completion Transaction(apps.mtl_transactions_interface, apps.mtl_serial_numbers_interface and apps.CST_COMP_SNAP_INTERFACE)
    When doing the Issue(Matreial transaction) , i am inserting in the apps.mtl_transactions_interface and apps.mtl_serial_numbers_interface, where do i enter the Assembly serial number? I would like to know, in what assembly serial number is my component residing.
    Aslo, when doing the issue(inserting in mtl_transactions_interface ), why is it important to enter the operation_seq_num and department_id? and what should be the value in these columns.
    we are using Average Costing.
    TX in advance for you reply.
    Regards,
    K

    Hello KING,
    Did you try doing online transaction for this case.
    I believe that you can enter parent serial number while entering serial number for components during online transaction. With this test, you can check that what column assembly number is going and you can try same in your background processing.
    Thanks,
    Ritesh

  • How to update batch number, Storage loc, qty in VL02N on delivery items?

    Hi all,
    Any idea how to perform the following using a BAPI or function call with regards to updating a Delivery (<b>VL02N</b>)?
    1) Enter or update a storage location on a delivery item?
    2) Batch split a delivery item to give multiple batch numbers. For example if delivery item is '000001' then after batch split additional delivery items with batch number assigned will appear as:
       item,    storage loc, batch,    qty
    '900001',  '0001', 2070062806,  1000
    '900002',  '0001', 2070052606,  3000
    '900003',  '0001', 2070025366,  3000
    can this be done using WS_DELIVERY_UPDATE/_2 or someother fn mod.
    Do not wish to use BDC or call transaction. Any help appreciated.
    thanks,
    Subba

    Answered!!

  • Batch not determined in MIGO-Goods Issue for cost center

    Hi,
    We are using Batch Determination while posting Goods Issue to cost center. However, when we enter * in the batch field system does not propose the batches.
    We have done following settngs
    Strategy type ME01 which is SAP standard
    Batch search procedure - ME0001
    Search procedure ME0001 is assigned to movement type 201 in "Allocate IM Search Procedure/Activate Check"
    Sort Rule - 01 using charecterstics (ascending)
    Class - BATCH_MASTER created
    Characterstics - Size, Shape, Color (No table or field are maintained in Addional Data) assigned to this class.
    Material is maintained with classification and batch management active.
    Master Data - Search Strategy is maintained using t code MBC1 for stratefy type ME01 (Key combination Movement Type/Plant/Material). Selection criteria - Values maintained for characterstics. Sort Rule - 01
    Now when we are issuing goods to cost center and enter * in batch field, system is supposed to suggest the batches (material is in stock and batches are available). However, system does not give pop up.
    Am I missing something? Where is the batch determination button as system is giving message to use button?
    Shekhar

    Thank you for the answer.
    It gives only one batch and not all the batches. Why it could be?
    Shekhar

  • HU error when Reversing the goods issue in STO process

    Hello Gurus,
    I will explain the whole process we follow for STO:
    1. Create sales order ->Based on PR in sales order schedule lines, PO will be created -> outbound delivery -> Pack in HU -> PGI -> based on output type Idoc will be triggered -> this outbound IDOC will create the Inbound IDOC and Inbound delivery -> Here HU will copied from Outbound delivery (Means both in inbound delivery and outbound delivery HU is same)-> then do the Good receipt in Inbound delivery.
    Now when user doing the goods receipt he is getting error MSSA-SATRA exceeded by 1PCE  The reason is someone deleted the item from the sales order.  Hence when user trying to post the GR it is checking for the open sales order item in MSSA table.  Since it has been deleted from the sales order he cant able post GR.
    Now user does not wants to receive this item, hence we wants to reverse the process.
    So we followed the below process:
    1. Unassigned the HU in Inbound delivery and then deleted the Inbound delivery.
    2. Then used VL09 transaction to reverse the goods issue.  But system giving error saying that HU is already assigned to object.
    I cant able to reverse the Goods issue since the HU is same in Inbound delivery and outbound delivery.
    Kindly suggest the reversal process for the above case.  Many thanks for your help in advance.
    Awating for your valuable replies.
    Br,

    Insted of deleting the handling units you should have un assign the handling units from inbound delivery.You have deleted the handling units and the same handling units will not be available in outbound delivery Pack icon.
    Do one thing are you able to enter line item in sales order ?.If yes then create inbound delivery manually and create new handling units for the qty and do GR.
    Currently where is the stock is it transit ?.If yes then above option may work.
    If nothing is possible only an option to write a SAP oss note they will correct your outbound delivery and inbound delivery.

  • MIGO: Events when new doc(Goods Issue) is created

    Hi,
    My requirement is, whenever there is a Goods Issue created in SAP using MIGO transaction, the data should flow to an external system. Do we have a standard IDoc associated with it.
    As MIGO tx. is built using OO-ABAP, do we have any standard events that get triggered when a new document is created.
    How do i acheive this..? Any pointers appreciated.
    Regards.

    check this thread -
    Re: Goods Receipt MIGO IDOC
    Regards,
    Amit

  • Batch Determination in time of Goods Issue

    Hi,
    We are doing internally numbered Batches. We got 4 btches say A- 10kg,B- 10Kg,  C- 10Kg, D- 10kg.
    I want to issue 30kg, at this time I want to select Batches automatically by the system which has stock thru FIFO. So that system will create 3 lines aautomatically & select batch accordingly. Is it possible.
    I saw Batch determinationin SPRO. I did all settings. consider, table, access sequence, procedure. Then make condition in MBC1 for movt. type, plant, material combination.
    When I am making isuue thru MB1A , it is not picking. How to do it ?
    RegardsBatch Determination in time of Goods Issue

    Hi
    Batch determination will not be able to determine 3 lines.
    If you enter three lines in MB1A then batches will be determined based on FIFO method.
    System cannot by itslef create three lines of 10.
    If the same was for any automatic movement such as GI for sales order then this may be possible.
    Thanks & Regards
    Kishore

  • Cannot add row without complete selection of batch/serial numbers while creating Goods receipt purchase order

    Error:Cannot add row without complete selection of batch/serial numbers
           Dim oPDN As SAPbobsCOM.Documents
           oPDN = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
                         Dim serno As String = "SH-A1,SH-A2"
                        Dim sernoval As String() = serno.Split(",")
                        Dim mnfser As String = "SH-B1,SH-B2"
                        Dim mnfserval As String() = mnfser.Split(",")
                        For k = 0 To sernoval.Length - 1
                            oPDN.Lines.SerialNumbers.InternalSerialNumber = sernoval(k).Trim
                            oPDN.Lines.SerialNumbers.ManufacturerSerialNumber = mnfserval(k).Trim
                            oPDN.Lines.SerialNumbers.Quantity = linedetails(iRowNo).Quantity
                            oPDN.Lines.SerialNumbers.SetCurrentLine(k)
                            oPDN.Lines.SerialNumbers.Add()
                        Next
                    oPDN.CardCode = "C232323"
                    oPDN.Lines.ItemCode = "A00004"
                    'oGR.Lines.LineNum = 0
                    oPDN.Lines.BaseLine = 1
                    oPDN.Lines.BaseEntry = 202
                    'oGR.Lines.BaseRef = 203
                    oPDN.Lines.BaseType = 20
                    oPDN.Lines.Quantity = 1
                    oPDN.Lines.UnitPrice = 2
                    oPDN.Lines.WarehouseCode = '01'
                 oPDN.Lines.Add()
                 lRetCode = oPDN.Add

    Hi Vasanth,
    Invert the SetCurrentLine () and Add() at the end of the SSSerialNUmbers loop.
    Regards,
    Eric

Maybe you are looking for

  • Error while executing query after migration

    I have migrated a  query to 7. While executing the report following error occurs When I attempt to open a query, (I get past the login and query selection screens) I get the following error: "Creation of item TEXTELEMENT_xx Failed" (20 or so lines) A

  • Regarding ALV output  to Excel file download

    Hi all, i had a requirement when downloading the ALV output to the Excel file it should ask for the password.if the user enters the password then this pass word shuld be assigned to the  Excel file that was downloaded. Can i know how this can be impl

  • What is Time Machine on my Imac cleaning up?

    Did a full back on 1 TB Imac Hard drive.  Now Time Machine is "cleaning up"? what is it cleaning - old backups?  If so, what happens if I cancell it prematurely? Thank you.

  • Multiple Keyword Sets (For Multiple Databases)

    I work with several different Lightroom databases and it would be nice to be able to have separate sets of keywords that go with each database. In my specific case, I use one database for my personal photographic endeavors and another for an image li

  • New phone wifi issues, 500 internal server error

    hello, hoping some one could help as im stuck! quick run down of my setup, i beleive i have a home hub 4, i run a tablet, a laptop and a desktop pc on my wifi, i run my sky box of an ethernet cable, all these devices work fine. i got a new phone sund