Inventory Transfer - Restrict Add

Dear all,
How do you restrict an inventory transfer document to be added if one of the row have its line total or some other field is blank or zero?
thanks
SV Reddy

Hi SV Reddy.....
If you use this SP then you can exactly find out at which row and for which Item of any row Block Num field is Empty.....
Try once.....
If @Object_type='67' and (@transaction_type ='A' or @transaction_type ='U')
BEGIN
declare @Item1 as varchar(100)
declare @minline1 int
declare @maxline1 int
declare @BlockNum1 varchar(100)
set @minline1 = (select min(T0.linenum) from WTR1 T0 where T0.docentry=@list_of_cols_val_tab_del)
set @maxline1 = (select max(T0.linenum) from WTR1 T0 where T0.docentry=@list_of_cols_val_tab_del)
while @minline1<=@maxline1
          begin
          select @Item1=T0.itemcode from WTR1 T0 where T0.docentry=@list_of_cols_val_tab_del and T0.linenum=@minline1               
          select @BlockNum1=T0.BlockNum from WTR1 T0 where T0.docentry=@list_of_cols_val_tab_del and  T0.linenum=@minline1               
          if      @BlockNum1 Is Null
               begin
                    set @error=-1
                    set @error_message = 'Block Number in Inventory Trsnaction can't be blank ' + @Item1
               End
               set @minline1=@minline1+1
          end
End
Regards,
Rahul

Similar Messages

  • I want add new column in matrix in "Inventory Transfer" Form (System Form)

    hai,
    i want to add new column in Matrix in "Inventory Transfer" Form (System Form)
    Is it possible or not?
    bye
    gopinath

    hai,
    i want coding how to add columns in the matrix ( system form)
    plz....
    bye
    gopi
    Edited by: Rui Pereira on Dec 23, 2008 4:45 PM

  • Inventory Transfer Draft via Add

    Hi,
               I need to make inventory Transfer,But it should not transferred immediately.It first gets added in Draft,but stock decreased from the respective counters of the source branch.After that from Draft document , stock gets added the destination Branch.
    All should be done through DI
    Plz Give me the Sample coding also
    Thanks in Advance

    Hi,
    What is your B1 version and PL?
    Thanks,
    Gordon

  • Want to Prevent Inventory Transfer More than Planned Quantity

    Dear Experts,
    I want to Prevent Inventory Transfer More than Planned Quantity. so that No one can Post any Issue for Production More than Planned Quantity has Assigned that Production Order. Using SAP Business One B1 .
    Please Advice ......
    Thanks In Advance ,
    Ajibul Hakim

    Hello Gordon,
    Thanks for your Reply . I want to Prevent Inventory transfer , which will Exceed the Planned Limit. but yesterday I Have Tried Myself again and I have succeed ! so thanks you again ,
    Also thanks to Nagarajan for your kind reply and i wanted to do like that but I want to restrict Inventory transfer...
    I have Done Like this....
    IF @object_type='67' 
      BEGIN
      IF @transaction_type='A' OR @transaction_type='U'-----Add
          BEGIN
            IF exists(SELECT * FROM  WTR1 T0
          LEFT JOIN OWTR T1 ON T1.DocEntry=T0.DocEntry
            WHERE  (T0.U_PlanQTY<(T0.Quantity+T0.U_TotalIssue)) AND T1.U_OrderType='100'
                         AND T0.DocEntry=@list_of_cols_val_tab_del)
            BEGIN
             SET @ERROR=1
             SELECT @ERROR_message = N'Issued Quantity Can not More than Planned Qty ,Check again and reconfirm please '
            END
          END   
       END
    Thanks,
    Ajibul Hakim
    Message was edited by: Ajibul Hakim

  • How to Display Inventory Transfer Current DocEntry in UDF Created in WTR1

    Hi Expert,
         I want a Inventory Transfer Current Form DocEntry in UDF U_DocEntry which is in the wtr1 For specific Doc
         I have write SELECT T0.[DocEntry] FROM OWTR T0 WHERE T0.[DocEntry] = $[OWTR.DocEntry] but this FMS is not working
    Regards,
    Sandy

    Hi,
    You can get the Next docentry from this but if two user open document same time the both user get same docentry, and the user who add document first have the same docentry in udf and Document but another user document Docentry and UDF doc entry will be differ.
    You should try this in SP_TransactionNotification will give Exact DocEntry.
    IF @object_type= '67' and @transaction_type in ('A','U')
    BEGIN
      UPDATE OWTR
      SET U_DocEntry=T1.DocEntry
      From OWTR T1(NOLOCK)
      WHERE OWTR.DocEntry=T1.DocEntry AND T1.DocEntry=@list_of_cols_val_tab_del
    END
    Thanks

  • Field integration between Inventory Transfer and Sales Order?

    Dear Gurus,
    Hope to find you well, we have to redefine our processes of sales. Now stock from a remote site will be transferred to inventory in transit warehouse recorded. Truck Number(UDF) and Document Number  (Inventory Transfer) will be used to trace inventory status and creating Crystal Reporting from Stock Uploading till the A/R Invoice are created. My Query is how can this be achieved in SAP B1 2007 A Patch 10. Please advice. Its very important for us.
    Please find trail that will help you understand:
    Process Mapping Help Needed
    Faisal
    Edited by: Faisal Baloch on Nov 17, 2011 7:02 AM

    Dear Faisal,
    Unlike the higher package, B1 has no option to link between Inventory Transfer and Sales Order. You have to add UDF and manually maintain the link.
    Thanks,
    Gordon

  • Inventory transfer Discount through DIAPI not working.

    Dear Expert,
    I try to add a inventory transfer through DIAPI, every field success, except Dicsount Percent. I'm using SAPB12007APL49.
    Just a simple code:
    oStockTransfer.Lines.DiscountPercent= 3.00
    The inventory transfer successful added, BUT without the discount.
    Any one have idea on this?
    Thanks in advance for any help.

    Actually because of the database.... i tried on another Db can add discount.

  • Error while posting report in inventory transfer from draft

    hi, 
             we have entered all the details in inventory transfer at the row level.Due to editing purpose we have saved it as draft.but now while posting the document it displayed the error as "No Matching records found".
    ca anybody tell what is the reason????
    regards priya

    Hi Priya,
    Please go through note 1112941
    https://service.sap.com/sap/support/notes/1112941
    If itu2019s not the case, please help collect error in detail.
    Hope it helps.
    Regards,
    Jacqueline Jiang
    SAP Business One Forums Team

  • Sales Order/A/R Reserve Invoice & Inventory Transfer

    Hi
    Suppose I have 2 warehouses A and B. A has 3 units of a particular good and B has 6 units of that same good.
    I understand that if I want to create an A/R invoice for a sale of 7 units of the good, I have to transfer 1 unit from A to B or 4 units from B to A before the tax invoice can be created. Does this requirement to have the stocks in one warehouse also apply to an A/R reserve invoice? Can I create an A/R reserve invoice for 7 units of the good before the transfer is performed?
    My second question is this.
    A sales quotation may be created when the required goods are in different warehouses. Can I create a sales order with the required goods still in different warehouses?
    Thank you for your patience with my questions as I am new to SAP B1 and do not have access to a test system at the moment.

    Hi,
    Only Delivery or normal invoices are related to inventory. For Sales Order/A/R Reserve Invoice, you do not need Inventory Transfer.
    Thanks,
    Gordon

  • Customer wants Inventory Transfer to associate Freight/Landed Cost to Items

    This is the situation:
    SAP B1 customer wants sells items from warehouse 01 and warehouse 02. Warehouse 01 on eastern side of Canada and Warehouse 02 on Western side.
    They would like to transfer certain items to warehouse 02. However, it involves Freight or Landed Costs associated.
    The customer may adjust the price of items transferred to 02 or and if they don't they atleast would like to know whether they are taking a loss in selling the transferred items from warehouse 02.
    In order to know the cost of items or associated cost with the items in 02, they need to track Freight or Landed costs associated with the transfer to western Canada.
    Inventory Transfer does not allow us to associate any shipping charges? or am I missing something here?
    Associating shipping charges with inventory transfer seems like such a natural act of transfer through Trucks? why isn't it associated with inventory transfer function in SAP B1?
    As usual appreciate all your help?
    Thanks.

    You may check this thread to have a work around:
    Re: Is it possible to have Freight for Stock Tranfer between Warehouses?
    Thanks,
    Gordon

  • Inventory transfer not visible in service call window

    Hi all,
    we have booked a service call.
    against that we transferred inventory to technicians in three documents out of which only two are visible in service call - expenses tab.
    The third document is visible separately in inventory - inventory transactions - inventory transfer.
    Now we want to create delivery out of it. How to go ahead ?
    if we select unseen items in the delivery will they be deducted twice from the inventory ?
    Pls. guide
    Thanks
    Malhaar

    Hi Gordon,
    We are able to find out the pain area.
    From the back end , we made out that inventory expenses entry was missing in the SCL2 table. and we landed into the conclusion that after punching Inventory Transfer we missed to update the service call window.
    thanks
    Malhaar.

  • Hey... I've not updated my Iphone 3GS to latest version, Is that so i cant use itunes to transfer or add files to my phone... Is that nesscesary to update it always... Mine is Jail Broken phone.... Pls do suggest me

    Hey... I've not updated my Iphone 3GS to latest version, Is that so i cant use itunes to transfer or add files to my phone... Is that nesscesary to update it always... Mine is Jail Broken phone.... Pls do suggest me

    It is prohibited under the terms of Use to offer support or discuss jailbreaking.  Sorry, but no one can help you so there is little point posting the same question more than once.

  • Excise duty on inventory transfer to non excisable warehouse and its sale

    Hi,
             Can anybody help me to map mentioned scenario;
    Inventory transfer from Excisable warehouse to Non excisable warehouse, subsequent creation of excise invoice, how debit in excise clearing account can be cleared. How to include value of excise duty on inventory transfer to item cost in receiving warehouse..
    thanks in advance.......

    HI Frnd,
    WELCOME to SAP FORUMS.......
    NO way u can't do against the Excise & SAP rule.s.
    THanks,
    JRAJPUT

  • FMS for auto populating itemcodes in detail grid of Inventory Transfer

    Hi All,
    Could anyone please give me the query for Formatted search to populate item codes in the detail grid of 'Inventory Transfer' automatically based on Production Order details, by selecting a 'Production Order No.' in a UDF in Inventory Transfer entry.
    I had tried the following FMS Query :
    Declare @LineNum Int
    Declare @ProdNo Varchar(10)
    Declare @ItemNo Varchar(40)
    Set @LineNum = $[$23.0.62]
    Set @ProdNo = $[OWTR.U_ProdOrderNo]
    Set @ItemNo = (Select WOR1.itemcode  From OWOR Inner Join WOR1 on OWOR.DocEntry = WOR1.DocEntry 
    And OWOR.DocNum = @ProdNo and WOR1.VisOrder = @LineNum - 1 )                 
    Select @ItemNo
    But user has to manually click on the itemcode FMS icon on each and every row to set the itemcode in that particular row.
    Can all the itemcodes get populated in 1 go just by selecting the Production Order No ?
    Thanks,
    William

    Hi William,
    You can also use the shortcut key Shift+Alt+F2 to open User Defined Table as specified by Nagarajan.
    Please check following link too
    Working with User Defined Values in SAP Business One | Packt Publishing
    Regards
    JO

  • Query to Lookup Ship To in a UDF for the Inventory Transfer

    Good Day Experts!
    I created a UDF for the Ship To Code in the Inventory Transfer Window.  The problem is I do not know how to create a query to be used in the Formatted Search for this UDF wherein it will lookup all the Ship To Codes in the table CRD1 of that particular  Customer selected in the Inventory Transfer window.  The objective is to choose a Ship to code just like in the sales document.
    My next problem would be how to display automatically the whole Ship To Address in another UDF based on the Ship To Code chosen in the UDF Ship To Code.
    Your inputs would be highly appreciated.
    Regards,
    Jen

    To get the Complete ShipTO Address, use the following Code
    SELECT T0.cardname+CHAR(13)+isnull(T0.Address,'')+CHAR(13)+
    cast(T0.Building as varchar(100))+CHAR(13)+isnull(T0.city,'')+CHAR(13)
    +isnull(T0.zipcode,'') as Address FROM CRD1 T0
    WHERE T0.CardCode =$[OWTR.CardCode] and  T0.cardtype='S' and
    T0.Address=$[OWTR.UDF1]
    Here Replace UDF1 with the Name of the UDF in which Shipto Address Names are shown as per my previous post.
    Hope you understand

Maybe you are looking for

  • Printing in Hindi on SAP Form

    Hi Guru's, I have requirement to print some hindi text in SAP Form , please advise how to do that. I have gone through several posts which were posted for the same requirement but somehow don't see any concrete solution on it. As hindi language is no

  • Vat declaration - configuration in erp system

    Hello experts, I configured elster vat declaration in PI system as described in sap note 1293294. But what I have to configure at erp system? sap note 1293294 only describes that I have to select the Exchange Infrastructure transfer type in transacti

  • Parse file and evaluate expressions

    Hi, I'm fairly new to Java and would be grateful for advice on the following problem: I have a text file containing a set of equations in the form -7 < a0 < 10 9 < a1 a0+a1 = 0... I need a method that can check quickly if a given array of numbers a0,

  • I have a fairly new iMac wI now have iMovie events and Final Cut pro events that are duplicates.  Does that mean that all my video is copied onto my hard dive twice?

    If I have video in imovie and final cut pro X, does that mean there are two copies of the video, one for each piece of SW?  If so, how do I get rid of the imovie events and keep only the Final Cut Pro X events (video)?  I don't want multiple copies o

  • Unreadable data

    Hi, My application connects through JDBC to a MySql. The problem is that althgough mysql can store data that contains cyrillic characters (the cp1251 charset is set for the DB columns), when I try to get these values from database, i get only unreada