Inventory- Sequence for TRANSACTION_HEADER_ID in MTL_TRANSACTIONS_INTERFACE

Hi all.
I'm new to Apps, and I'd like to know the best approach for extracting the TRANSACTION_HEADER_ID when importing inventory transactions using the open interface MTL_TRANSACTIONS_INTERFACE. Is there an appropriate sequence for that, or it can be user-defined?
Thanks.
Denis

There is a sequence from which you can fetch the value for transaction_header_id
SELECT mtl_material_transactions_s.NEXTVAL
INTO l_hdr_id
FROM DUAL;

Similar Messages

  • Seperate Sequence for Separate Column in a Table

    I have following table
    id,        Inv_no,         Item,          Item_Sequence
    1, 132 , Processor,     
    2 , 132 , RAM,     
    3 , 132, DVD ROM,     
    4 , 133 , Processor     ,
    5, 133 , RAM,     
    6 , 133 , DVD ROM     ,
    7 , 953 , Processor,     
    8 , 953 , Harddisk,     
    9 , 953 , RAM,     
    10 , 953 , DVD ROM     ,
    I want to generate autosequence for "*Item_Sequence"* column, let say for processor i want pr-001, p1-002, pr-003 , and for RAM, it can be ram-001, ram-002 ......................
    if i input any item it should start creating auto number for that,
    If any one can help me here, Thanks in Advance
    Kind Regards
    Abbas
    Edited by: Abbas on Apr 3, 2011 10:42 AM
    Edited by: Abbas on Apr 3, 2011 10:43 AM
    Edited by: Abbas on Apr 3, 2011 3:13 PM

    Abbas wrote:
    I want to generate autosequence for "*Item_Sequence"* columnFirst of all, sequence does not guarantee "no holes". If, for example, session inserting in your table rolls back or if sequence has CACHE and you restart database, seaquence will have holes. Said that, just for fun (I'd do extensive testing before using it in production):
    SQL> create table inventory(
      2                         id     number,
      3                         Inv_no number,
      4                         Item   varchar2(50),
      5                         Item_Sequence number
      6                        )
      7  /
    Table created.
    SQL> create or replace
      2    function get_nextval(
      3                         p_seq_owner varchar2,
      4                         p_seq_name varchar2
      5                        )
      6      return number
      7      is
      8          pragma autonomous_transaction;
      9          v_cnt number;
    10      begin
    11          select  count(*)
    12            into  v_cnt
    13            from  dba_sequences
    14            where sequence_owner = upper(p_seq_owner)
    15              and sequence_name  = upper(p_seq_name);
    16          if v_cnt = 0
    17            then
    18              execute immediate 'create sequence ' || p_seq_owner || '.' || p_seq_name;
    19          end if;
    20          execute immediate 'select ' || p_seq_owner || '.' || p_seq_name || '. nextval from dual' into v_cnt;
    21          return v_cnt;
    22  end;
    23  /
    Function created.
    SQL> create or replace
      2    trigger inventory_bir
      3      before insert
      4      on inventory
      5      for each row
      6      begin
      7          :new.Item_Sequence := get_nextval('scott',replace(:new.Item,' ','_'));
      8  end;
      9  /
    Trigger created.
    SQL> insert into inventory(id,inv_no,item) values(1, 132 , 'Processor');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(2 , 132 , 'RAM');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(3 , 132, 'DVD ROM');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(4 , 133 , 'Processor');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(5, 133 , 'RAM');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(6 , 133 , 'DVD ROM');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(7 , 953 , 'Processor');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(8 , 953 , 'Harddisk');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(9 , 953 , 'RAM');
    1 row created.
    SQL> insert into inventory(id,inv_no,item) values(10 , 953 , 'DVD ROM');
    1 row created.
    SQL> select  *
      2    from  inventory
      3    order by item,
      4             id
      5  /
            ID     INV_NO ITEM                                               ITEM_SEQUENCE
             3        132 DVD ROM                                                        1
             6        133 DVD ROM                                                        2
            10        953 DVD ROM                                                        3
             8        953 Harddisk                                                       1
             1        132 Processor                                                      1
             4        133 Processor                                                      2
             7        953 Processor                                                      3
             2        132 RAM                                                            1
             5        133 RAM                                                            2
             9        953 RAM                                                            3
    10 rows selected.
    SQL> Obviously, performance will be questionable for high(er) volumes. Also, you will need to add error handler for sequence creation to ignore sequence already exists situations which can happen in multi-session environment.
    SY.

  • Help with enabling TPM in Task Sequence for Dell Laptops

    Hi there,
    I would appreciate some advice on creating a task sequence for Win8.1 with TPM enabling for Dell laptops; I have BitLocker set up manually with a Group policy, but want to have TPM enabled in the task sequence. I have read older posts on sites such as windows
    noob, but can't see how to reference the CCTK and get TPM going for win8.1 in a SCCM2012 environment. 
    Obviously I haven't created this before so any help would be appreciated; I have noticed when I try to import my CCTK configurations into SCCM as it isn't a zip file I cannot do it.

    Luckily Dell wrote a whitepaper about that subject, see:
    http://en.community.dell.com/techcenter/extras/m/white_papers/20209083
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • How to create a sequence for an particular item in my apex form

    Hi friends,
    I created an database application, of a form with a report, and it is working fine...
    But in my form, i have a requirement....The below are the existing fields in my form
    issue no
    created by
    start date
    status
    priority
    due date
    Among these fields in my form i need to create a 'Sequence' for my field "issue no",
    So that whenever i opened the form the 'issue number' must generate automatically like 1 for the first time, 2 for the second time and so on..
    For that i created a sequence
    CREATE SEQUENCE "ORDERS_SEQ"
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    INCREMENT BY 1
    START WITH 1000
    NOCACHE
    NOCYCLE;
    But for validation where i need to write the sequence query for the particular item 'issue no'....i dont have any idea of where to write the validation query for the sequence..
    please tell where i need to write in step wise manner..please help me friends...
    As the below is my validated sequence query for item 'issue no'
    'select seq.issue_id.nextval into issue_no'
    This is my above validation query whether the query that i mentioned is right..if not let me know the validation query..
    And also i need where to apply this validation query in steps..
    Thanks in advance
    Regards,
    Harry...

    Harry,
    Rik is on the right track. Here is a sample insert trigger: Would need to substitute you sequence ORDERS_SEQ with my sequence las_log_seq, how you define or use timestamps is up to you.
    DROP TRIGGER LASDEV.BINS1_LAS_LOG_TBL;
    CREATE OR REPLACE TRIGGER LASDEV."BINS1_LAS_LOG_TBL"
       BEFORE INSERT
       ON las_log_tbl
       FOR EACH ROW
    BEGIN
       -- Description: Insert log_seq, creation_dt, creation_id,
       --              lst_updt_dt and lst_updt_id.
       -- Maintenance:
       -- Date        Actor          Action
       -- ====        =====          ======
       -- 07-Sep-2010 J. Wells       Create.
       :new.creation_id := nvl( v( 'app_user' ), user );
       :new.creation_dt := SYSDATE;
       :new.lst_updt_dt := :new.creation_dt;
       :new.lst_updt_id := :new.creation_id;
        SELECT las_log_seq.NEXTVAL
          INTO :new.las_log_seq
          FROM DUAL;
    END bins1_las_log_tbl;
    /Heff

  • Inventory report for valuation type

    Hi experts,
    Is there any SAP standard reports can show the inventory value based on the valuation type?
    we have actived the split valuation, so one material may have several valuation types. Different valuation types have different MAP and amounts.  Now we want to find the inventory value for each valuation type, for the whole inventory.
    tcode such as MB51 only can display every movement details, we want to find a report for all materials.
    Thanks.

    Hi
    Pls try MB5L
    Regards
    Sanil Bhandari

  • Inventory Report For Special Stock (Project Stock)

    Dear Sir,
    We are in Make -To - Order scenario and procure the material against  the WBS element . For getting the Inventory List , we use MBBS tcode but it has following limitation :
      a) It give the Stock Status as on date basis . While we need Stock Inventory on a cut off date , say on
          31/Jan/2007 .
      b) We are not able to get the Inventory Report , Material Group wise
    I request to kindly guide me , as how to take the Inventory Report for Project Stock .
    Regards
    B Mittal

    Hi Shailesh,
    Is there any way we can include some extra fields into this MC.9 report - i tried but could not find anything.  Can you please help.
    Regards,
    Laxmi

  • Inventory report for Previous Periods

    Hi Experts ,
    I would like to have an inventory report for all materials in a Particular Plant for the Periods Sep 2009 and Sep 2010 . Could you please help me in providing the reports for the same .
    Thanks
    Moderator message: Basic frequently asked question - Please search forum for answers and read the docu in help.sap.com 
    See as well our rules of engagement: http://scn.sap.com/docs/DOC-18590
    A good way to search the forum is with google. See this blog with details for a good search
    http://scn.sap.com/community/support/blog/2012/04/16/getting-the-most-out-of-google-optimizing-your-search-queries
    This blog describes how to use the SCN search: http://scn.sap.com/community/about/blog/2012/12/04/how-to-use-scn-search
    The discussions are not a replacement for proper training
    Thread locked
    Message was edited by: Jürgen L

    You can well run these reports on background..
    Go to SE38 Enter the program name "J_1HSTCD"
    Then press Execute / F8.
    Enter you selection date as 01.09.2009 to 31.09.2010 and enter the plant and leave the all selection as per SAP standard..
    Then press F9 or Go to Program

  • Inventory report for stock category B

    Hi everyone,
    We are trying to generate a customer stock inventory report with stock category B. The table MARD is not displaying any values annwe also looked at table MKOL. Its not giving us any. How do i get the inventory report for this stock type B. Kindly Advise.

    it is customer owned stock. We receiver materials from customer for repair and we recondition them and we give it back. for this we maintain it in stock type B. it is specifically used in aerospace industries. We want to make an inventory report for this customer owned stock in our inventory . i am unable to get the table. Kindly advise

  • Access sequence for stock transfer order

    Hi,
    My client is a paper industry. client is procuring raw materials from forest center. We are considering forest center as plant 1800 and paper mill as plant 1100. several depots has been created under forest center and considering them as storage location. goods receipt at forest center is happening through scheduling agreements. stock is transfered from forest center depots to mill through stock transport order.
    For each depots, freight value per MT is fixed for transporting goods from forest center to mill. Clients requirement is to maintain the rates for freight for each depots so that it will pick from condition records. No need to enter freight value in stock transport order.
    I have created an access sequence for combination of plant (1800) and forest center depots and maintained condition table. but it is not working as in stock transport order, there is no storage location option for supplying plant. In stock transport order supplying plant is forest center (1800) and receiving plant is mill (1100).
    Please guide me where to maintain the freight rate as this is mandatory for my client.
    Thanks
    Prasant

    Access seq with depot will not work becuse you don't have the storage location field in the header
    Rather create the diff pruchase group for each depot and assign them in STO based on your depot(storage location)
    and create the access sequence based on the palnt and purchase group than it will work.

  • How to create the Access sequence for the Vendor+material+plant combination

    Hi all
    Please let me know How to create the Access sequence for the Vendormaterialplant combination..
    Whats the use? What its effect in purhcase and taxe..
    brief me please

    Hi,
    you are asked to maintain the access sequence for the tax condition for which you are putting 7.5%.
    goto OBQ1 or img..financial accounting new...global settings.... taxes on sales and purchases ......basic settings.....
    find the tax condition type. see in it which access sequence is attached.
    if there is none then use JTAX used for taxes in India.
    or you can create the similar one for your.
    to create the same goto OBQ2.
    new entry or copy JTAX.
    and assign the access sequence to condition type.
    this will resolve your problem if you just need to assign the access sequence.
    regards,
    Adwait Bachuwar

  • One sequence for multiple lookup tables?

    I am sorry if this is off-topic, however can anybody advise what is better - use one sequence for all tables (lookup tables) or to create unique sequence for each table?
    Thanks
    DanielD

    Daniel,
    After you read this (http://asktom.oracle.com/pls/ask/f?p=4950:8:::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:2985886242221,), you may be sorry you asked.
    Scott

  • Is there a way to set up browse sequences for project with multiple TOCs and conditionalized modules

    I'm using RoboHelp 9 with WebHelp output.
    I've got five outputs, one of which contains Help for common functions, while the other four contain Help for licensed modules. When a user opens the Help for a licensed module, the user sees the core Help and the licensed Help. In addition, files are conditionalized so that searching for unlicensed content from a licensed Help module brings up nothing.
    I've been troubleshooting problems with the Previous Topic and Next Topic which, thanks to William, I learned are related to browse sequences. After trying assorted configurations, I've got a couple of questions:
    Does RH support only a single browse sequence in a project, even when the project has multiple outputs & TOCs?
    If RH supports only a single browse sequence, does that mean there is no way to create a unique browse sequence for each separate output?
    If RH supports multiple browse sequences, what is the workflow?
    I also maintain a 'master' TOC that contains all the modules, both common and unlicensed. What I've done for now is to autocreate a browse sequence based on the 'master TOC'. When I generate output for a licensed module, which is conditionalized, I only see the TOC for that module and, therefore, can only browse between books and subbooks in that module. I've also verified that topics that do not appear in the conditionalized module, such as for another licensed module, do not appear in the Search results list either.
    Carol

    Me again, Carol
    You also asked about the functional differences between WebHelp and WebHelp Pro, so let me elaborate.
    I'm aware of only two major differences (other than the extra benefits of feedback analytics reports and management of "Areas" with authentication in RoboHelp Server).
    The behavior of Browse Sequences as explained above
    The fact that Content Categories are not supported in WebHelp Pro for this latest version 9.
    As for the Browse Sequences you are trying to provide for different modules (licensed, etc.): Multiple Browse Sequences are included in a single .BRS file. The sequences are defined in the XML within the single file.
    As a workaround (for either WebHelp or WebHelp Pro) you could create a NGP Help.brs. which you have already created for one module; then backup and archive it. Then, create a modification for the different module before you generate again. The NGP Help.brs. will need to have the same name as your project so you will have to manage the desired .brs file into the project folder when you generate that version. All of your other choices (TOC, Index, Conditional Tags, etc.) would remain the same for the respective modules.
    Finally, I note that you are apparently generating WebHelp Pro right now even though you are not publishing it to the RH Server? This is really not the best practice. You should generate plain WebHelp for a web server that does not have RH Server on it (even though you may be getting away with it). As for your concern about "breaking" something; each output is placed in a different !SSL! folder automatically when you generate, so you should be able to generate WebHelp without interferring with the WebHelp Pro output. Then, you can re-publish to the RH Server using WebHelp Pro whenever the server is ready.
    John Daigle
    Adobe Certified RoboHelp and Captivate Instructor
    Evergreen, Colorado
    www.showmethedemo.com

  • BW error:  "invalid call sequence for interface when recording changes"

    I am getting the error "invalid call sequence for interface when recording changes" when I try to activate a datasource in BW.  Any ideas on how to resolve this error?
    Thanks.

    I already tried that.  This is what's happening..  When I get this error, if I try again it will activate and gets collected into a transport.  I moved this transport to our QA system.  As soon as I try to execute an infopackage under this datasource in QA, I get the error datasource   xxxxx must be activated.   Before the excecution of the infopackage, the datasource is in "Active version executable".   After I get the error message "datasource must be activated", the datasource in the QA system changes to "Active version not executable".   I am not sure all these issues are related back to the "invalid call sequence" error I am getting when I try to activate the data source.
    I also tried recollecting the transport from our Dev system to QA and it still gives the above errors.
    Any help?
    Thanks.

  • Create New Access Sequence for Free Goods

    Hi Guru,
    please help me, I need to do a new Access Sequence for Free Goods, different from standard SAP. (Vendor/Material/Purch. organization)
    The new sequence of access for "Vendor/Plant/Material", I have already created, but at the time that the use in condition, being created PO not shoot the discount goods. (despite having loaded a record condition with MBN1)
    Please help me, to create a condition of discount goods that shots for "Vendor/Plant/Material".
    Tank you
    Miki

    Thank you for your interest,
    but unfortunately I have already made this assignment Field.
    Please help me, there must be a way to run the discount goods.
    Tank you
    Miki

  • Access sequence for the partner is optional?

    Hello Experts,
    Is the access sequence for determining the partners is optional? What if no access sequence is mentioned in the partner determination procedure for any of the partner functions? Is there any other way of determining the partners exists other than access sequence?
    Could you please clarify?
    Thanks in advance!
    Regards,
    Swathi

    No, you must use access sequence. The only other way would be that you write your own function in which you prefill partners and trigger this function with event or if you write the same logic in on of the suitable badies.

Maybe you are looking for