How does Goods Issue know which Batches to deallocate from A/R Credit Memo?

Hi,
I am creating an addon that runs after a A/R Credit Memo is created.  It creates a Goods Issue, and enters the Item Code and the Quantity from the line items on the Credit Memo into the Goods Issue.
After it writes the Goods Issue to SAP, I open up the document it created and see that the line items are in there correctly, and that somehow the batches assigned to those line items are also in there.
There is nothing in the code that does anything with the Batches, but somehow SAP knows which batches to work with.
I haven't been able to find any info about it.  Can you please help us understand what is happening?  How does SAP know and make assignments to batches in line items in Goods Issues?
Thank you,
Mike

Hi Michael and Gordon,
Sorry Gordon, I'm quite sure you misunderstood Michael original question. Michael asked how the add-on he created could link corresponding batch number from an A/R Credit Memo document could be selected by Goods Issue document which generated by the add-on, while he actually never wrote a code to select any batches numbers which available in the system.
Maybe a little bit of illustration:
1. Item A, qty 10 - (batch A qty 5, batch B qty 3, batch C qty 2)
2. A/R Credit Memo occurred, return of Item A with 3 qty (batch A qty 1, batch B qty 1, batch D qty 1). Therefore, item A latest position should be (batch A qty 6, batch B qty 4, batch C qty 2, batch D qty 1). This A/R Credit Memo created by add-on.
3. Goods Issue document triggered by add-on. The problem is, Michael never write any code to select any batch numbers, and somehow the system choose batch number precisely as occurred in number 2 (A/R Credit Memo document), which is (batch A qty 1, batch B qty 1, batch D qty 1). Therefore the stock position for Item A back to as being displayed in number 1.
I believe this shouldn't be possible at all. Unless, there is a certain mechanism in SAP that automatically choose batch number to used in Goods Issue document using LIFO (Last In First Out), which is, as far as I know never exist in any SAP B1 version. Yes you could automatically choose batch numbers according to available batch, but you could do this when system prompt you when you tried to issue certain document using SAP application itself, not using add-on.
And of course, you could write a code to choose certain batches based on certain A/R Credit Memo, but still, you need to write a code, you can't do this without a code, selection of batches is compulsory when you tried to add a goods issue document which consist of items that managed using batches.
In my opinion, I think it is better for you to re-write those codes and relate batches you want to attach with your Goods Issue document based on corresponding A/R Credit Memo. It is much safer, and the error message you encountered won't happen again in the future.
Best Regards,
Hendry Wijaya

Similar Messages

  • Applications: How does OS X Know Which App to Reference a File to?

    I just got my new Macbook and while installing applications, a question I've had for a while came up again.
    How does OS X know to reference applications to certain file types?
    For example. I have a .avi I downloaded to watch, and downloaded VLC to watch it. I open the .dmg and drag/drop VLC to my Applications folder. Instantly, VLC appears in the "Open With" list for my .avi. How does it know to list it?
    My theories are:
    1. When dragging/dropping VLC, it's not just copying files, it's also doing some background stuff, including VLC telling OS X that it should be referenced for .avi files
    2. When I "Open With" a file, OS X looks at apps in my Applications folder and detects applicable ones in some manner.
    3. It's Voodoo magic.
    How does it work? I hope my question makes sense.
    Thanks!

    From what I understand, the second the .dmg is opened and VLC is seen by OS X as an application, Launch Services asks VLC what filetypes to associate it with, and adds that to the database? Then when I try to "open with" a .avi, it sees that .avi is associated with QuickTime, and now VLC too.
    that's right. inside the VLC application bundle there is a file called info.plist which contains among other things the info about which files VLC can handle. that file is consulted by the Launch services once it becomes aware of VLC being present in the system and that info is recorded in the launch services database. That's how it works with all applications. you can view this file if you want. control-click on VLC in finder and select "show package contents". in the new finder window that opens up go to Contens folder and quicklook the file info.plist.
    Is this correct?
    Thanks.

  • How does the scrollbar know which field it lands on?

    Hi all
    I'm looking at components at the moment. Not how to use them
    but how to create them yourself to increase your workflow.
    When dragging a scroll component on to a dynamic textfield it
    automatically determines which field it land on, and populate the
    targetInstanceName variable in the property inspector.
    How does it do that? I guess it's a jsfl file being run, but
    I can't figure out how to run a jsfl file the moment the user let
    go on the component.
    Thanks in advance,
    Jakob

    Hi Antony,
    There is no need of Sender Agreement and hence sender communication channel. Sender Agreement identifies three things,
    Namespace, Software component version and Outbound Interface. In Idoc communcation there is no need of Sender agreement as we can identify above things without Sender Agreement itself like namespace - Idocs have standard namespace and can be accessed across the sofwatware component versionsn and the idoc type it self specifies the interface name.
    You cannot define a sender IDOC channel in Integration Directory due to fact dat IDOC adapter does not run in J2EE AF but is an 'built in" adapter.
    Thanks,
    Vijay Kumar T.

  • SCOM 2012 - How does SQL MP "know" which instances are available and active?

    Using SCOM 2012 R2 with Microsoft's SQL MP 6.5.1.
    Getting alerts occasionally for issues with SQL instances which are later found to be not active any more or removed from the SQL server.
    Can someone explain how the MP determines which SQL instances are available?  Is it a matter of simply reading folder structures on the various mount points, reading registry?  Much appreciated for any tips.

    SCOM SQL MP will using discovery to discovery SQL instance. Once the SQL instance is discovery, the SQL instance object persist in the database even though the SQL instance is removed.
    Solution:
    To clean up the objects you can run the Remove-SCOMDisabledClassInstance Powershell cmdlet. Then all the relationships that involve objects related to a disabled discovery is deleted.
    Roger

  • How does my employer know which sites I visit during private browsing?

    My employer has told me that they have discovered that I have visited unsuitable sites. They must have found a way to get into my private browsing history. What can I do to prevent this from happening again?

    There are services that will encrypt all of your web browsing so that intermediate computers and firewalls don't know what you're doing. (However, this will not fool a company proxy server.)
    At this point, lots of secure traffic from your PC would look ''very'' suspicious. If your job is important to you, you probably should do your NSFW browsing from outside the company network.

  • How to change the g/l a/c being used while doing goods issue using migo

    when I pass a migo entry whilie purchasing material
         , the entry goes through stock
         stock (230000 a/c no)    150        dr
          GR/IR (150000 a/c)      150        cr
    when I issue material after reservation for which again migo is done
        entry is
          repairs to plant and mach (4800569 a/c)   175
                    stock (230000 a/c no)           175
    The stock a/c is debited and credited due to t.code obyc where for inventory posting I have assigned a/c 2300000 for valuation class assigned to material.
    now I want to have a/c no  4800689 in place of 4800569. how can i change that.
    that is when I issue material from stock this should be debited to 4800689 instead of 4800569. please provide t.code to change the gl from 4800689 from 4800569
    full points will be awarded

    continuing my issue is it possible to that we donot have to change the gbb and vbr and still we can have the desired results.
    that is we are able to use different gl for debit while doing goods issue from a single stocked material
    or we want to have this result
    1.          repairs to p&m    1000    dr
                         stock of cement  a/c           1000    cr
    2.          repairs  to building    2000   dr
                          stock of cement  a/c            2000   cr.
    3.             construction     3500     dr
                                 stock  of cement     3500     cr
    we donot want to change the GBB and VBR every time    or change the GL a/c while doing reservation.
    is there any third option where we get the desired result without changing or entering the g/l manually
    if there is please let me know the t.codes

  • Order Confirmation Without Doing Goods Issue & No Goods Receipt W/o Confirm

    Hi,
         I am facing a problem at client site & i need a quick response from you people.
    If i am not doing GOODS ISSUE to a Production Order the system is allowing me to do Confirmation for that Production order & also the system is allowing me to do GOODS RECEIPT for that Order before doing complete Confirmation.
    My client wants that Without doing Goods Issue it should not allow order confirmation & also No Goods receipt without doing Final confirmation. Please help me regarding this configuration, How to do it. If it is possible then please help me& tell how to do it.
    I am in final stage of my project.Please i want a quick response.
    regards
    Jimmy

    Hi Ashish,
    you need to create new thread anyway
    for process industry you need to use CONFPI 02  you can put this in SMOD and go to display in that you can see component when you click that you can find functional module  : EXIT_SAPLCORF_402 click in that you can see include in which you need to modify
    take help of ABAP and do some modify to this module
    Thanks
    Bala

  • How does disk utility decide which optical drive to use for burn?

    This is a somewhat daft question and purely out of interest.
    How does disk utility decide which optical drive bay to open for burning?
    I have two drives in a MacPro and both have the same capabilities (DVD-RW). Why does it sometimes open the lower one, and sometimes the top one?

    Grant Bennet-Alder wrote:
    The estimate is based on how long it already took to do how many blocks, and how many blocks are left to do. If you told it to overwrite 35 times, it will be a long, long time before it completes.
    The estimate is made grossly large by the presence of Bad Blocks that need to be Read during the test (not the case with Erase and Write Zeroes).
    Each Block is written with some redundancy bits, so that small errors can be corrected on reading. A Bad Block causes the drive to re-read. and re-read, and re-read, in hopes of getting correctable data the next time. This should NOT be an issue in writing. But if the drive stops responding (which can and does happen with a bad drive) the Erase function will just sit there, thinking it is making progress, and stretching out the time.
    Thanks, Grant.
    If I read your reply correctly, Erase and Zero Out free space shouldn't elongate the process, because there's no read occurring.
    The drive will not be Mounted while Disk Utility works on it, so it will not be on the Desktop. But ask Apple System Profiler \[ About this Mac > More Info > Serial ATA ] if the drive is still THERE . If it cannot be seen, you have your answer -- the drive dropped out of sight while being tested -- Bad Drive.
    Well, now I am confused. It's a FW800 drive. It's on the Desktop. And it appears under FireWire in System Profiler. AND Disk Utility shows a mount point. But the Unmount and Eject buttons are grayed out.
    Will the drive be mounted if it fails to respond to Disk Utility? That doesn't seem to make sense.
    How do I determine its status? It appears to be stuck at "1 day, 5 hours" but it'll take an hour for that to change. I think it's been that long since I first noticed the time.
    Harv

  • In the second leg STO GR and IR created withought doing Goods issue

    Hi Guru's
    Please can any one tell us user is created second leg STO withought doing good issue and Intercompany invoice, but he has been done GR and IR it is causing problem in MR11 report still outstanding.
    i asked user to do GR cancelation or reversal, it is not possible because stocks released to QA. and GR and IR created with ref to PO

    Hi,
    We can not cancel GRN once it is released form QA or UD is made.

  • In the second leg STO GR and IR created without doing Goods issue and IV

    Hi Guru's
    Please can anyone tell us user is created second leg STO without doing good issue and Intercompany invoice, but he has been done GR and IR it is causing problem in MR11 report still outstanding.
    i asked user to do GR cancelation or reversal, it is not possible because stocks released to QA. and GR and IR created with ref to PO

    Hi,
    We can not cancel GRN once it is released form QA or UD is made.

  • Can you have multiple Apple TV's in the same house and network? If so how do you know which one to pick from your Idevice?

    can you have multiple Apple TV's in the same house and network? If so how do you know which one to pick from your Idevice?

    Yes, there are even defaults for naming them, such as LivingRoom, Bedroom, etc, or you can even enter your own name with the remote for each AppleTV.

  • User exit while doing Goods Issue

    Dear Guru's,
    I have the below requirement from my client,
    They want an warning msg from the system while doing Goods issue, if the stock of certain material is goes below min stock level, so i spoke to my abaper to create user exit, but he is asking for some programs from MM side related MIGO. What programs we need to give him ? is that right ? pls suggest
    Edited by: channabasappa kallapur on Jan 21, 2009 5:29 PM

    I don't believe you need a user exit for this .. USE OMCM and configure the availability check against the appropriate movement type

  • Issue while doing goods issue

    Daear All,
    while doing goods issue getting the error message : Acct. 200510 for trans./event key BSX, postable directly.
    the same in goods receipt also.
    please help me on this.
    Best Regards,
    Venkat.

    In FS00 ,Please TICK 'post automatically only' for the GL 200510.
    Regards
    jabeen

  • How does the system knows hire action first

    Hi all,
    Iam new to this community, recently i have joined as an SAP HR trainee ,and i am undergoing SAPHR training Programme.
    why can't the system allow us to do promotion action before Hire action?where do we configure this to make it happen, how does the system knows to do the Hire action first, where are the settings for this..
    Swathi

    hai
    there are a number of programmes running in the back groung when u do any application.
    the validations will be written in them
    when u try to do something through the programe running at the back ground does these validations  like the example u have taken when u do the promotion action it checks whether actions exists or not if not then it throws the error written in the program.
    regards
    nalla

  • How does the system knows age or seniority is crossed for so and so... EE

    Hi Experts,
    In my project we have configured some Health plans based on ages and seniority,
    Employee can enroll in to the plan when they reach the age or seniority,
    my question is how does the system knows  age or seniority is crossed for so and so... EE, where exactly we do this setups
    Pleae let me know your valuable answers
    Regards
    Sreeni

    hr_entry_date and you can use various
    fm to calculate this, It reads 0019, 0041 or Hdate feature
    3QP8                           Time related calculation function mod.
    HR_AUPBS_SENIORITY             Calculate the whole length of service of employee
    3RP3A                          Leave schem proration modules
    SGPS_LS_SENIORITY_CALCULATION  Function for seniority calculation for Singapore Leave Scheme
    HRDO
    HR_DE_PBS_SENIORITY_PERIODS
    HRFPBS4AV0
    HR_PSF_AV_ANC_INPUT_SENIORITY
    HRF_METADATA_IT
    HRF_READ_SENIORITY_IT

Maybe you are looking for

  • Populate Primary Key with DBSequence in ADF UIX page

    I have a table with a trigger, so that the primary key is populated by DBSequence. My problem is, I open a ADF UIX Input Page to create a row for my table. The field of the primary key is populated by any number but not with the logical sequence numb

  • Complex Duty Rates

    Hello, Can anyone give some direction on how to correctly upload Complex Customs Duty Rates (i.e. those of type B00X in the XML file) from the data provider (i.e. Customs Info)? There does not seem to be any mapping that exists for B00X in GTS config

  • Reg :-  For Updating WBS in MIRO (any User Exits or Enhancements)

    Hi, I have a requirment while doing MIRO, I am selecting 'Calculate Tax' Checkbox to update G/L accounts specified for a particular TAX code in the MIRO Screen simultaneously I want to update WBS element for that G/L accounts specified in the TAX cod

  • Adobe forms multiple print issue

    Hi All, I am new to ADOBE forms and my development involves generating prints of the same form with different data on it in one go. Now everythign is working fine except for the print preview bit. I want to disable print preview and dialog. I have pa

  • I want the PCI-MIO-16-E4 ad board driver file.

    I am  doing research in aerospace department Anna university. i am using the hotwire annemometer. Data acquisition  purpose using the PCI-MIO-16-E4 AD board. The driver file of the board is corrupted. so request you to send the driver file. thank you