Subinventory Transfer script .

Hi All,
i have developed the following script to bulk sub inventory transfer ,please correct if i done any thing wrong and
give me some valuable suggestions .
create or replace
PROCEDURE XX_SUB_INV_TRN (errbuf OUT varchar2, retcode OUT number,P_SUB_INV_NAM IN VARCHAR2 , P_ORG_ID IN number ,P_ITEM in VARCHAR2,P_SUB_INV_TO VARCHAR2) IS
l_SUB_INV_NAM mtl_secondary_inventories.SECONDARY_INVENTORY_NAME%type := P_SUB_INV_NAM ;
l_SUB_INV_TO mtl_secondary_inventories.SECONDARY_INVENTORY_NAME%type := P_SUB_INV_TO ;
l_ORG_ID mtl_system_items.ORGANIZATION_ID%type := P_ORG_ID ;
l_item mtl_system_items.segment1%type := p_item;
l_transaction_interface_id NUMBER;
p_user_id     NUMBER; -- The USER_ID number
p_resp_id     NUMBER; -- The ID number of the responsibility
p_resp_appl_id     NUMBER ;     -- The ID number of the application to which the responsibility belongs
l_dis_acc_id number ;
L_RETURN_STATUS varchar2(4);
l_msg_cnt number;
l_msg_data varchar2(200);
l_trans_count number;
transaction_interface_id number;
retval NUMBER;
cursor item_cur Is
select msi.inventory_item_id,
msi.organization_id ,
msin.SECONDARY_INVENTORY_NAME,
msi.segment1,
msi.list_price_per_unit,
msi.lot_control_code,
msi.primary_uom_code,
msi.default_so_source_type,
sum(moq.TRANSACTION_QUANTITY) QTY
from mtl_system_items msi,
mtl_secondary_inventories msin,
mtl_onhand_quantities_detail moq
where      msi.ORGANIZATION_ID = msin.ORGANIZATION_ID
and      msi.ORGANIZATION_ID = moq.ORGANIZATION_ID
and      msi.inventory_item_id = moq.inventory_item_id
and      msin.SECONDARY_INVENTORY_NAME = moq.subinventory_code
and      msin.SECONDARY_INVENTORY_NAME = l_SUB_INV_NAM
and      msi.INVENTORY_ITEM_STATUS_CODE = 'Active'
AND      MSI.MTL_TRANSACTIONS_ENABLED_FLAG = 'Y'
and      msi.ORGANIZATION_ID = l_ORG_ID
and      msi.segment1 = l_item
group by      msi.inventory_item_id,
msi.organization_id ,
msin.SECONDARY_INVENTORY_NAME,
msi.segment1,
msi.list_price_per_unit,
msi.lot_control_code,
msi.primary_uom_code,
msi.default_so_source_type
order by 1,2;
item_rec item_cur%rowtype;
BEGIN
fnd_global.apps_initialize(user_id => 1318
,resp_id => 50583
,resp_appl_id     => 401);
BEGIN
FOR item_rec in item_cur
LOOP
BEGIN
INSERT INTO MTL_TRANSACTIONS_INTERFACE
TRANSACTION_INTERFACE_ID
, TRANSACTION_HEADER_ID
, SOURCE_CODE
, SOURCE_LINE_ID
, SOURCE_HEADER_ID
, PROCESS_FLAG
, TRANSACTION_MODE
, LAST_UPDATE_DATE
, LAST_UPDATED_BY
, CREATION_DATE
, CREATED_BY
, ORGANIZATION_ID
, TRANSACTION_QUANTITY
, TRANSACTION_UOM
, TRANSACTION_DATE
, TRANSACTION_TYPE_ID
, LAST_UPDATE_LOGIN
, ITEM_SEGMENT1
, SUBINVENTORY_CODE
, LOCATOR_ID
, REVISION
, DSP_SEGMENT1
, TRANSACTION_SOURCE_NAME
, TRANSFER_SUBINVENTORY
, TRANSFER_ORGANIZATION
, TRANSFER_LOCATOR
, XFER_LOC_SEGMENT1
VALUES
mtl_material_transactions_s.nextval
, mtl_material_transactions_s.nextval
, 'INV TEST'
, mtl_material_transactions_s.nextval
, mtl_material_transactions_s.nextval
, 1
, 2
, SYSDATE-60
, 1318
, SYSDATE-60
, 1318
, l_ORG_ID          
, ITEM_REC.QTY
, ITEM_REC.primary_uom_code
, '11-JAN-2010'
, 2
, -1
, ITEM_REC.segment1
, l_SUB_INV_NAM
, NULL
, NULL
, NULL
, NULL
, l_SUB_INV_TO
, l_ORG_ID
, NULL
, NULL
COMMIT;
select transaction_interface_id into l_transaction_interface_id from mtl_transactions_interface ;
dbms_output.put_line('before calling API');
FND_FILE.PUT_LINE(Fnd_File.Log ,'before calling API');
-- Call API to process transactions
retval := apps.INV_TXN_MANAGER_PUB.process_Transactions(
p_api_version => 1.0
,p_init_msg_list => fnd_api.g_true
,p_commit => fnd_api.g_true
,p_validation_level => fnd_api.g_valid_level_full
,x_return_status => l_return_status
,x_msg_count => l_msg_cnt
,x_msg_data => l_msg_data
,x_trans_count => l_trans_count
,p_table => 1
,p_header_id => l_transaction_interface_id
dbms_output.put_line (item_rec.inventory_item_id || ' ' || item_rec.segment1|| ' '||l_trans_count||' '|| l_msg_data);
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
END;
EXIT when item_cur%NOTFOUND;
END LOOP;
END ;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END XX_SUB_INV_TRN;
Thanks,
apasupuleti

No.
But you can use a move order and do a approvals for move orders.

Similar Messages

  • Transfer Script

    I am trying to restrict access to a course page by password protecting it. I have went into the edit course page and added in custom permission added download to USHistory@urn:mace:..... Ok now i tried to go into the transfer script and add the following credential;
    String[] credentialsArray = { USHistoryCredential };
    String displayName = "USHistory";
    String emailAddress = "[email protected]";
    String username = "USHistory";
    String userIdentifier = "password";
    What am I doing wrong cause this isn't working.
    Thanks

    Hmm ... lemme see if I can explain. I'm not sure I'm going to do your question justice ... but I'll try.
    The first thing to know is this: Apple does not hold any userid/password info for an iTunes U site ... with one, very very specific, exception. But that exception does not come into play for you in this instance. The basic rule of thumb is that Apple does not know any of your users ... Apple only deals with credentials.
    In iTunes U, what you do is authenticate your users your own way (whatever that is ... Banner, Active Directory, LDAP with an MD5 hashed password store, Kerberos). Your authentication process basically gives a yes/no answer ... "such-and-such user is valid at our school" or "such-and-such user is not part of our school". If you get a "yes" response from your authentication system, you generate a set of credentials for your user and pass them to Apple. Based on the credentials you assign to your user, Apple grants him/her access to specific courses and iTunes U tracks.
    As I am fond of saying, an iTunes U credential is like a high school hall pass. The hall pass itself is a piece of plastic or paper or cardboard ... it could be laminated ... but it only says one thing, "Let the bearer of this pass go to the lunchroom," or, "Let the bearer of this pass go to the bathroom," or, "Let the bearer of this pass go to the principal's office" ... like that. If a teacher stops a student in the hallway, he/she might ask, "Can I see your hall pass?" The teacher will not necessarily know who the student is ... all he/she needs to know is that the student has a valid hall pass. In fact, the beauty of the hall pass system is that no teacher need know the name of any particular student ... all that matters is that someone the teacher trusts gave the student a valid hall pass. iTunes U works the same way ... Apple "trusts" you to validate your users and assign them the right set of hall passes. That trust is established with your shared secret ... only you and Apple know what it is. But when Apple sees your users, it only sees credentials ... the hall passes ... it doesn't know your users' names, passwords, usernames, etc.
    So you might be asking, "Hey Rich, you say that Apple doesn't care about my users, so why does the example transfer script have 'username' in it, what's up with that?" Well, the answer is that you can, if you like, tell Apple to record identity information about your users and pass it back to you later in site usage logs ... but you do not have to pass identity information at all ... you can leave "username", "e-mail", "name" ... you can leave all that stuff blank and iTunes U would still work. However, when Apple sends you your site usage logs, all you'll see is that some "visitor" downloaded a certain track at a certain time. If you want to know who that was, you have to tell Apple to record that for you by sending a username along with a credential set. But Apple does not "see" your usernames/e-mail addresses/whatnot ... all Apple cares about is that credential set. Apple merely records user info to send back to you "as is". If you send bogus user info, for example, Apple would dutifully record it in logs and send it back to you the way you sent it. But get a credential wrong, and iTunes U will not work.
    So display name, username, user identifier, and e-mail address are not used by Apple at all in iTunes U. They are just recorded and sent back to you "as is" in usage logs -- they are just means for you to figure who's who when looking at logs. Apple does not encrypt them ... they are sent in the clear. For that reason, I would strongly urge you to not to send password info in that user identifier string.
    To restrict access to something in iTunes U, a credential is only half the story ... in iTunes U, there is something called a "permission". A permission is the combination of a credential and an access level. For example, a permission might look like this:
    Student@urn:mace:itunesu.com:sites:myu.edu DOWNLOAD
    or:
    Administrator@urn:mace:itunesu.com:sites:my.edu EDIT
    When you create a permission in iTunes U, you're saying that if someone comes to a "place" in your site, and he/she bears a certain credential ("Student" or "Administrator"), that he/she should have a certain access level ("can browse and download content" or "can edit this page") for that "place". Notice how usernames/passwords aren't a part of this scheme ... if you bear the "Student" credential, you can "DOWNLOAD" whereas if you bear the "Administrator" credential, you can "EDIT". Apple does not need to know who's who ... you've already authenticated your people and told Apple about the the creds/access that should be granted. Apple trusts you because you signed the user's request with the shared secret that only you and Apple know.
    Make sense?

  • API's used to perform Subinventory Transfer.

    Hi,
    My requirement is to make Subinventory Transfer automated. So could anyone help me in this regard. What are all the API's and Tables were used to automate the Subinventory Transfer process. And what are all the steps do I need to take care.
    Thanks in Advance,
    Manasa.

    Step 1 : Insert the Records in MTL_TRANSACTIONS_INTERFACE
    Step 2 : Call the INV_TXN_MANAGER_PUB.process_transactions API : Input Paameter TRANSACTION_INTERFACE_ID
    Step 1 :
    INSERT INTO MTL_TRANSACTIONS_INTERFACE
    ( created_by
    ,creation_date
    ,flow_schedule
    ,inventory_item_id
    ,last_updated_by
    ,last_update_date
    ,last_update_login
    ,locator_id
    ,lock_flag
    ,material_account
    ,organization_id
    ,process_flag
    ,program_id
    ,program_update_date
    ,scheduled_flag
    ,source_code
    ,source_header_id
    ,source_line_id
    ,subinventory_code
    ,transaction_date
    ,transaction_header_id
    ,transaction_interface_id
    ,transaction_mode
    ,transaction_quantity
    ,transaction_type_id
    ,transaction_uom
    ,transfer_locator
    ,transfer_subinventory
    ,validation_required
    Step 2:
    INV_TXN_MANAGER_PUB.process_transactions(
    p_api_version => 1.0
    ,p_init_msg_list => fnd_api.g_true
    ,p_commit => fnd_api.g_true
    ,p_validation_level => fnd_api.g_valid_level_full
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_cnt
    ,x_msg_data => l_msg_data
    ,x_trans_count => l_trans_count
    ,p_table => 1
    ,p_header_id => l_transaction_header_id
    );

  • Trigger event for during subinventory transfer

    Hi
    I would like to have a hook or to trigger an event (like firing a concurrent program) when subinventory transfer is performed. Is this possible and how to do it?

    You can write a personalization that fires a conc. program.

  • Is there a php transfer script?

    Has anyone written or stumbled uppon a PHP transfer script they can share?
    Thanks

    Well, I have found this.  I am having trouble understanding how to impliment it.  Does anyone have any helpful suggestions?
    http://omega1.uww.edu/itunesu/

  • I-Tunes Transfer Script - Duncan Bernhardt

    I'm not sure if this is the correct location for this, but i noticed that some other site admins are getting help directly from Duncan Bernhardt, so i'll give it a go.
    I'm trying to do the initial setup for our I-tunes account (the address is https://deimos.apple.com/WebObjects/Core.woa/Browse/und.edu), and I keep getting messages saying the page has been opened in i-tunes, but then there's a error page, and it looks like I-tunes is looking for the transfer script at
    https://www.und.edu/cgi-bin/itunesu?destination=und.edu
    Is this correct? This is the location where the transfer script should be located?
    Kevin Crawford
    University of North Dakota

    The transfer script just needs to be hosted some where that you can access it, but preferably it would be hosted in a secure, password protected location as it gives you site administrator level access to your site.
    The script generates an HTTP POST request that is sent to the iTunes U server. The server checks the digital signature of the token to ensure it is valid. If it is valid then iTunes U returns a redirect URL that gives you access to your iTunes U site.
    https://www.und.edu/cgi-bin/itunesu?destination=und.edu is the default login URL for your site. You are redirected to this URL when your authorization fails. You can change this login URL once you have access to your site.

  • Is this transfer script business necessary?

    I have been asked by my school ot investigate setting up the iTunes site, but I have no clue and it's way over my head in dealing with scripting languages. Can we set up a site without having to create this transfer script business?

    If you don't have a transfer script how are you going to make your site public? How are you going to add content to your site?
    The transfer script is absolutely necessary. Its the only way to ensure that only the authorized users can edit the content of your site.

  • Inter-org / subinventory transfer api

    Hello,
    I am looking for a real-time api that will conduct an inter-org or subinventory transfer.
    I know there is an option of using the open interface table/concurrent manager but I am looking for a real-time api.
    I thought process_move_order api would have worked but it seems like I have the wrong one.
    Any help?
    Thanks

    Hi Naga,
    Thanks for your update.
    For Subinventory transfer, i have understood it. But coming to Inter-Org Transfer, here we do 2 transactions. One is transfer from Sourcing Organization and receiving from Destination Organization. So for this, do i need to first do a intransit shipment through MTL_MATERIAL_TRANSACTION_INTERFACE and process them through API. Then use RECEIVIGN TRANSACTION for destination Organization and process. Please let me know what would be exact approach with respect to Inter_org Transfer.
    Regards,
    Sravan.

  • MOT vs Subinventory transfer

    Hi
    what is the difference from the "move order transfer" with "subinventory transfer"?
    whether the two which creates a journal?
    best regards,
    the pooh

    A move order transfer can go thru' an approval process.
    Both won't create journal entries as long as the a/c numbers associated with the 2 subinventories are same.
    Hope this answers your question,
    Sandeep Gandhi

  • API for subinventory transfer in R12.

    Hi All,
    Could anyone let me know api for subinventory transfer in R12?
    Thanks in Advance.
    Regards,
    Rider.

    Hi,
    I think you've got the wrong forum.
    Check f.i.:
    http://download.oracle.com/docs/cd/B34956_01/current/html/docset.html

  • Java transfer script to iTunesU

    I am working on the transfer script to iTunesU.
    In this example
    http://deimos.apple.com/rsrc/doc/iTunesUAdministrationGuide/CustomizingYouriTune sUSite/chapter_8_section_9.html
    credentials=Instructor@urn:mace:example.edu:courses:fall06:eecs302:02&identity=" Jane Doe"<[email protected]>(jdoe)[528392]&time=1139331600
    Jane Doe has access to
    fall06:eecs302:02 course.
    What credentials will give him also access to
    fall06:eecs250:01
    course?
    He needs to have access to both  fall06:eecs302:02 and fall06:eecs250:01 courses (pages).
    Should it be done in the separate tokens to iTunesU?
    Any help will be greatly appreciated!
    Thanks!

    it is being fixed
    thanks!

  • ASP transfer script

    I'm setting up iTunes U for my institute. I've run the initial login email and currently researching solutions for the transfer script.
    Has anyone come across any ASP solutions for this? Thanks.

    Duncan,
    I've got C# (.NET 2.5) code that I use in Windows Woolamaloo. If people would like, I'd be happy to post the code that creates the iTunes U URL request. ASP would, except for superficial languages differences, be the same. The thing about the Windows CLR is that works with any language, so long as that language can be changed to behave the exact same way as C#.

  • Subinventory transfer integer quantity.

    Hello,
    Is there any way to enforce integer primary unit of measure quantities in the subinventory transfer transaction?
    I need to make sure I don't end up with half a laptop in the subinventory. But I still would need to transact 0.5 DZ (6 PZ) of laptops.
    Regards,
    Luis

    Hi Sandeep,
    As i am populating a valid item_id to the mtl_transactions_interface.inventory_item_id, but the column is null in mtl_item_locations.inventory_item_id.
    as per your comments, if the value is null for mtl_item_locations.inventory_item_id it is not a issue.
    Pls suggest.
    Reards
    Yram

  • Transfer script for public sites

    Hi,
    Is there a way for using a transfer script in public sites ?
    I only want to get the content information using a script.
    Thanks

    We're not including the destination variable in the form post that calls our cgi script. I can't get to the Edit Site Settings window in the original iTunes U store - we use this transfer script to handle the admin access, and it isn't working for that either.  I've been testing a very simple version of this Perl script from a fresh copy of the sample files collection, and with debugging enabled it looks like it is getting everything except for a current time - it tells me that the time is valid, but is "too far in the past" and so it doesn't include the otherwise valid identity and credential values.  I'm checking with our system administrators to verify that our server's time is accurate.  Thanks for the follow-up response.

  • Subinventory Transfer documents to be flown.

    Can a approval cycle exist in the Subinventory Transfer.
    Do we have the documents that can support the subinventory transfer.
    Regards
    Sri

    No.
    But you can use a move order and do a approvals for move orders.

Maybe you are looking for

  • How to synchronize NI-Scope and traditional DAQ

    I use a PXI-1042 System with a PXI-5124 Ni-Scope Card and a PXI-6120 with traditional DAQ controlled by a PC running WinXP and LabView 7.0 The intention of this setup is to make synchronized acquisition with both cards with different sample rates. Fo

  • When checking my Service and Support Coverage is states that my iPhone 5 is not activated.

    I activated my phone on the 21st, from the phone, right when I received it. It's been working fine. I also got an e-mail from Apple stating to reply to it to receive AppleCare +, which I did, and that seemed to go through. The odd thing is, that when

  • Forecast Pro integration for CRM On Demand

    Any information on CRM integration for "Forecast Pro" software? Displaying Forecast Pro reports in the CRM UI ? This is outside using the imbedded forecasting functionality in CRM on Demand.

  • Finder being very slow on user account

    Hello, I have a retina MacBook Pro with 16GB of ram. I am having an issue with finder being very slow on one of my user accounts, sometimes it is taking up to a 2mins to show the files in the folder. Also if often hangs and I get the beachball icon w

  • Bluetooth Problems when running other programes in the background

    I have been experiening problems with the bluthooth conenctivity on my 2012 Macbook Air. It is the 2.0GHZ i7 8GB RAm with 256Gb flash storage model released June 2012. I use it in clamsehll mode hoked up to an external HD monitor using the Mini displ