Transaction in transaction

          Hi,
          I have a session bean calling another session bean. The first bean starts a transaction
          so the 2nd uses the same one. In case an Exception is thrown then the 1st bean
          catches it and rollsback. What I need to achieve is to have one call in the 2nd
          bean to run outside the current transaction so that it is not rolled back even
          when an error does occur. Is there any clean way to do it?
          Thanks a lot,
          A.
          

"iggy" <[email protected]> wrote in message news:[email protected]...
          > but what I want to achieve is that all of the actions performed by the 2nd bean
          > are rolled back except one (setXxx on a cmp), can you set requiresNew on a single
          > call?
          You can set Transaction on a particualar method of the bean:
          <container-transaction>
          <method>
          <ejb-name>Manager</ejb-name>
          <method-name>updateDocument</method-name>
          </method>
          <trans-attribute>RequiresNew</trans-attribute>
          </container-transaction>
          Regards,
          Slava Imeshev
          >
          > Thanks,
          >
          > A.
          >
          > "Slava Imeshev" <[email protected]> wrote:
          > >"iggy" <[email protected]> wrote in message news:[email protected]...
          > >
          > >> I have a session bean calling another session bean. The first bean
          > >starts a transaction
          > >> so the 2nd uses the same one. In case an Exception is thrown then the
          > >1st bean
          > >> catches it and rollsback. What I need to achieve is to have one call
          > >in the 2nd
          > >> bean to run outside the current transaction so that it is not rolled
          > >back even
          > >> when an error does occur. Is there any clean way to do it?
          > >
          > >Set RequiresNew transaction attribute on the second bean's method.
          > >Than the first transaction will be suspended, second bean will do its
          > >work
          > >and the first TX will be resumed.
          > >
          > >Regards,
          > >
          > >Slava Imeshev
          > >
          > >
          >
          

Similar Messages

  • Problem in with automatic payment TRANSACTION    f110  transaction

    Hi
    We are facing problem with automatic payment TRANSACTION    f110  transaction  version SAP ECC6.0
    When there are multiple invoices for the same customer with cash  discount amount  given by the user manually( not  cash discount percent)
    For eg if there  5 invoices with cash discount amount
    When there is  payment method defined on document level for some of the  invoices(3) and  2 invoices payment method is not defined on document level(Payment method is defined on customer master  also for those customers )
    The following dumb occurs
    Settlement  will be created, but the F110 cancelled with a shortdump on customer master balance update
    Database error text........: "[IBM][CLI Driver][DB2] UNSUCCESSFUL EXECUTION
      CAUSED BY DEADLOCK OR TIMEOUT. REASON CODE 00C90088, TYPE OF RESOURCE , AND
      RESOURCE NAME"  
    Internal call code.........: "[RSQL/UPDT/KNC1 ]"
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    "SAPLF005" or "LF005F01"
    "ZAHLVERHALTEN_FORTSCHREIBEN"
    Any help in this is highly appreciated
    Thanks
    Sarath

    1615356     F110 Code improvements
    1255455     F110 Exception BCD_FIELD_OVERFLOW during item output
    1237330     F110 Error if more than one down payment
    1105073     F110: Program termination DBIF_RSQL_SQL_ERROR

  • Javax.transaction.RollbackException: Transaction marked for rollback

    Hello all,
    This is my first topic/question in the forums. I am relatively novice with J2EE programming so please pardon my ignorance. I have spend several hours thying to figure out the following issue.
    So here is the scenario. I have a JSF ManagedBean called SymbolProcessBean. Here is part of its declaration
    @PersistenceContext(name = "persistence/LogicalName", unitName = "MantisPU")
    public class SymbolProcessBean {
    @Resource
    private UserTransaction utx;
    }The Bean is callef by a h:command from a jsp page
    <h:commandLink action="#{symbolProcessBean.processSymbol}" value="Process"/>In part of the process the Bean read data from a webpage and persists them in a MySQL database. Here is the loop:
            try {
                // Create a URL for the desired page
                String urlStr = "http://ichart.finance.yahoo.com/table.csv?s=" + this.selectedSymbol.getTicker();
                if (firstNewDay != null)
                    urlStr += "&a=" + firstNewDay.get(Calendar.MONTH) +
                              "&b=" + firstNewDay.get(Calendar.DATE) +
                              "&c=" + firstNewDay.get(Calendar.YEAR);
                URL url = new URL(urlStr);
                // Read all the text returned by the server
                BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
                String str;
                outText = in.readLine() + "<br />";    // Discard first line
                Context ctx = (Context) new InitialContext().lookup("java:comp/env");
                utx.begin();
                em = (EntityManager) ctx.lookup("persistence/LogicalName");
                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
                while ((str = in.readLine()) != null) {
                    // Use togenizer to parse comma separated fields
                    StringTokenizer strtok = new StringTokenizer(str, ",");
                    // Read the data from the line
                    Date recordDate = formatter.parse(strtok.nextToken());
                    Float open = Float.valueOf(strtok.nextToken());
                    Float high = Float.valueOf(strtok.nextToken());
                    Float low = Float.valueOf(strtok.nextToken());
                    Float close = Float.valueOf(strtok.nextToken());
                    Integer volume = Integer.valueOf(strtok.nextToken());
                    Float adj_close = Float.valueOf(strtok.nextToken());
                    // Set the PriceRecord data members
                    PriceRecord pr = new PriceRecord();
                    pr.setSymbol(this.selectedSymbol);
                    pr.setRecordDate(recordDate);
                    pr.setOpen(open);
                    pr.setHigh(high);
                    pr.setLow(low);
                    pr.setClose(close);
                    pr.setVolume(volume);
                    pr.setAdjClose(adj_close);
                    // Create Record
                    em.persist(pr);
                    this.selectedSymbol.getPriceRecordCollection().add(pr);
                    // Add record string to output text
                    outText += str + "<br />";
                in.close();
                this.selectedSymbol = em.merge(this.selectedSymbol);
                utx.commit();
            } catch (Exception e) {
                utx.rollback();
                throw e;
            }All this works fine on the first invocation of the command link and the Bean reads the data from yahoo for a Stock symbol and persists into the database. When the command link is clicked again for a different stock then the utx.commit(); throws a "javax.transaction.RollbackException: Transaction marked for rollback" exception. NOTE that when I redeploy the application and run it again it will work. But it works only the first time. The second time it will throw the exception.
    I am not sure why this happens. I looked in the create() methods of the autogenerated JPA Controllers (PriceRecordJpaController) and they allways commit the transaction. Why would it fail in my case? Is there a way to "refresh" the transaction?
    Thank you in advance.
    Edited by: kkyriako on Nov 11, 2009 10:37 PM

    Thank you for your responses. I had no idea that when a runtime exception is thrown the transaction will be marked for rollback. The getCause of the exception is null however I got the following stack trace from the GlashFish log:
    WARNING:
    Local Exception Stack:
    Exception [EclipseLink-7197] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Null primary key encountered in unit of work clone [ejb.entities.PriceRecord[idPriceRecord=null]].
            at org.eclipse.persistence.exceptions.ValidationException.nullPrimaryKeyInUnitOfWorkClone(ValidationException.java:1305)
            at org.eclipse.persistence.descriptors.changetracking.DeferredChangeDetectionPolicy.calculateChanges(DeferredChangeDetectionPolicy.java:84)
            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:557)
            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1320)
            at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2848)
            at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:223)
            at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157)
            at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
            at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:411)
            at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:843)
            at com.sun.enterprise.transaction.UserTransactionImpl.commit(UserTransactionImpl.java:198)
            at ejb.logic.SymbolProcessBean.accessURLData(SymbolProcessBean.java:165)
            at ejb.logic.SymbolProcessBean.processSymbol(SymbolProcessBean.java:182)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
            at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
            at javax.faces.component.UICommand.broadcast(UICommand.java:387)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
            at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
            at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
            at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
            at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
            at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
            at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
            at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
            at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)SymbolProcessBean.java:165 is the utx.commit(). The idPriceRecord is the primary key of the table. It is an autoincrement field. I do not modify it before the em.persist(pr); statement so it goes as null. However the first time when I execute the commit everything is persisted in the database. When I run a second time for a different symbol then I get the exception until I redeploy the wed site. Maybe the persistence layer does not update the idPriceRecord with the value generated by MySQL. Nuy why does that does not cause a problem the first time?

  • Status of transaction or transaction item prevents credit check

    Hi,
    While performing credit check in Quotation showing Below error messge
    "Status of transaction or transaction item prevents credit check"
    Please help me to solve this issue
    Currently working on C

    hi, you can check the credit check configure in crm basic function path, if your trans type and item be assgined to the credit check.
    Furthermore, you can login the SAP GUI, do the some action in CRMD_ORDER tcode, if the same error message appear, you can find out the error trigger place by where used search , and debug the programe.

  • Inter-Company Transaction thro Transaction Code FB60 it is giving me Error.

    Dear Friends,
    When I do Inter-Company Transaction thro Transaction Code FB60 it is giving me Error.
    For Example: if I have 2 Company Codes u2013 8001 & 8002
    I want to Post One Vendor Invoice
    Ex:
    Vendor - 20003 Rita Chemicals            5000     Credit
    460000   - Expenses                                  2000      Debit      - Company Code     -   8001
    (Then Debit Expenses G/L Account 460000 for Company Code 8001)
    460100   - Expenses                                  3000      Debit      - Company Code     -   8002
    (Then Debit Expenses G/L Account 460100 for Company Code 8002)
    When I am going to POST it is giving me an Error please sees below.
    Error Message
      A unique company code has not been assigned to company number MODA
    Message no. GLT0001
    Diagnosis
    Document breakdown is active in your system. In certain cases, a company code is derived from the company ID number, and this must lead to the assignment of a unique company code.
    A unique company code could not be assigned to company number MODA.
    System Response
    You cannot carry out the required posting.
    Procedure
    Assign one company code to company number MODA.
    Please tell me  How to solve this issue.
    Thanks,
    Srem

    Dear friends,
    I Assigned the company name to both company code throught t.code OX16
    but still it is giving me same error Message.
    When I do Inter-Company Transaction thro Transaction Code FB60 it is giving me Error.
    For Example: if I have 2 Company Codes u2013 8001 & 8002
    I want to Post One Vendor Invoice
    Ex:
    Vendor - 20003 Rita Chemicals            5000     Credit
    460000   - Expenses                                  2000      Debit      - Company Code     -   8001
    (Then Debit Expenses G/L Account 460000 for Company Code 8001)
    460100   - Expenses                                  3000      Debit      - Company Code     -   8002
    (Then Debit Expenses G/L Account 460100 for Company Code 8002)
    When I am going to POST it is giving me an Error please sees below.
    Error Message
      A unique company code has not been assigned to company number MODA
    Message no. GLT0001
    Diagnosis
    Document breakdown is active in your system. In certain cases, a company code is derived from the company ID number, and this must lead to the assignment of a unique company code.
    A unique company code could not be assigned to company number MODA.
    System Response
    You cannot carry out the required posting.
    Procedure
    Assign one company code to company number MODA.
    Please tell me  How to solve this issue.
    Thanks,
    Asm

  • How To Perform Lot Split Transactions Using Transaction Open Interface (MTI)

    Can anyone give me some guidance on how to perform lot split transaction using MTI?
    I am using the following code:
    DECLARE
    l_transaction_type_id NUMBER := 83;
    l_transaction_action_id NUMBER := 41;
    l_transaction_source_type_id NUMBER := 13;
    l_org_id NUMBER := 1884;
    l_txn_header_id NUMBER;
    l_txn_if_id1 NUMBER;
    l_txn_if_id2 NUMBER;
    l_txn_if_id3 NUMBER;
    l_parent_id NUMBER;
    l_sysdate DATE;
    l_item_id NUMBER :=287996;
    l_user_id NUMBER;
    l_distribution_account_id NUMBER;
    l_exp_date DATE;
    BEGIN
    --For Lot Merge, there should be only one resultant lot.
    --The transaction_quantity populated in MTI/MTLI should be the entire
    --quantity that is available to transact for the org/sub/item/locator/LPN in
    --that particular lot number.
    --Get transaction_header_id for all the MTIs
    SELECT APPS.mtl_material_transactions_s.NEXTVAL
    INTO l_txn_header_id
    FROM sys.dual;
    --Get transaction_interface_id of resultant record
    SELECT APPS.mtl_material_transactions_s.NEXTVAL
    INTO l_txn_if_id1
    FROM sys.dual;
    l_parent_id := l_txn_if_id1;
    l_sysdate := SYSDATE;
    l_user_id := -1; --substitute with a valid user_id
    l_distribution_account_id := NULL; --needed for lot translate
    l_exp_date := NULL; --set if required
    --Populate the MTI record for resultant record
    INSERT INTO MTL_TRANSACTIONS_INTERFACE
    transaction_interface_id,
    transaction_header_id,
    Source_Code,
    Source_Line_Id,
    Source_Header_Id,
    Process_flag,
    Transaction_Mode,
    Lock_Flag,
    Inventory_Item_Id,
    revision,
    Organization_id,
    Subinventory_Code,
    Locator_Id,
    Transaction_Type_Id,
    Transaction_Source_Type_Id,
    Transaction_Action_Id,
    Transaction_Quantity,
    Transaction_UOM,
    Primary_Quantity,
    Transaction_Date,
    Last_Update_Date,
    Last_Updated_By,
    Creation_Date,
    Created_By,
    distribution_account_id,
    parent_id,
    transaction_batch_id,
    transaction_batch_seq,
    lpn_id,
    transfer_lpn_id
    VALUES
    l_txn_if_id1, --transaction_header_id
    l_txn_header_id, --transaction_interface_id
    'INV', --source_code
    -1, --source_header_id
    -1, --source_line_id
    1, --process_flag
    3, --transaction_mode
    2, --lock_flag
    l_item_id, --inventory_item_id
    null, --revision
    l_org_id, --organization_id
    'EACH', --subinventory_code
    1198, --locator_id
    l_transaction_type_id, --transaction_type_id
    l_transaction_source_type_id, --transaction_source_type_id
    l_transaction_action_Id, --l_transaction_action_id
    100000, --transaction_quantity
    'EA', --transaction_uom
    100000, --primary_quantity
    l_sysdate, --Transaction_Date
    l_sysdate, --Last_Update_Date
    l_user_id, --Last_Updated_by
    l_sysdate, --Creation_Date
    l_user_id, --Created_by
    l_distribution_account_id, --distribution_account_id
    l_parent_id, --parent_id
    l_txn_header_id, --transaction_batch_id
    2, --transaction_batch_seq
    NULL, --lpn_id (for source MTI)
    NULL --transfer_lpn_id (for resultant MTIs)
    --Insert MTLI corresponding to the resultant MTI record
    INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
    transaction_interface_id
    , Source_Code
    , Source_Line_Id
    , Process_Flag
    , Last_Update_Date
    , Last_Updated_By
    , Creation_Date
    , Created_By
    , Lot_Number
    , lot_expiration_date
    , Transaction_Quantity
    , Primary_Quantity
    VALUES (
    l_txn_if_id1 --transaction_interface_id
    , 'INV' --Source_Code
    , -1 --Source_Line_Id
    , 'Y' --Process_Flag
    , l_sysdate --Last_Update_Date
    , l_user_id --Last_Updated_by
    , l_sysdate --Creation_date
    , l_user_id --Created_By
    , 'Q0000.1' --Lot_Number
    , l_exp_date --Lot_Expiration_Date
    , 100000 --transaction_quantity
    , 100000 --primary_quantity
    INSERT INTO MTL_TRANSACTIONS_INTERFACE
    transaction_interface_id,
    transaction_header_id,
    Source_Code,
    Source_Line_Id,
    Source_Header_Id,
    Process_flag,
    Transaction_Mode,
    Lock_Flag,
    Inventory_Item_Id,
    revision,
    Organization_id,
    Subinventory_Code,
    Locator_Id,
    Transaction_Type_Id,
    Transaction_Source_Type_Id,
    Transaction_Action_Id,
    Transaction_Quantity,
    Transaction_UOM,
    Primary_Quantity,
    Transaction_Date,
    Last_Update_Date,
    Last_Updated_By,
    Creation_Date,
    Created_By,
    distribution_account_id,
    parent_id,
    transaction_batch_id,
    transaction_batch_seq,
    lpn_id,
    transfer_lpn_id
    VALUES
    l_txn_if_id1, --transaction_header_id
    l_txn_header_id, --transaction_interface_id
    'INV', --source_code
    -1, --source_header_id
    -1, --source_line_id
    1, --process_flag
    3, --transaction_mode
    2, --lock_flag
    l_item_id, --inventory_item_id
    null, --revision
    l_org_id, --organization_id
    'EACH', --subinventory_code
    1198, --locator_id
    l_transaction_type_id, --transaction_type_id
    l_transaction_source_type_id, --transaction_source_type_id
    l_transaction_action_Id, --l_transaction_action_id
    100000, --transaction_quantity
    'EA', --transaction_uom
    100000, --primary_quantity
    l_sysdate, --Transaction_Date
    l_sysdate, --Last_Update_Date
    l_user_id, --Last_Updated_by
    l_sysdate, --Creation_Date
    l_user_id, --Created_by
    l_distribution_account_id, --distribution_account_id
    l_parent_id, --parent_id
    l_txn_header_id, --transaction_batch_id
    3, --transaction_batch_seq
    NULL, --lpn_id (for source MTI)
    NULL --transfer_lpn_id (for resultant MTIs)
    --Insert MTLI corresponding to the resultant MTI record
    INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
    transaction_interface_id
    , Source_Code
    , Source_Line_Id
    , Process_Flag
    , Last_Update_Date
    , Last_Updated_By
    , Creation_Date
    , Created_By
    , Lot_Number
    , lot_expiration_date
    , Transaction_Quantity
    , Primary_Quantity
    VALUES (
    l_txn_if_id1 --transaction_interface_id
    , 'INV' --Source_Code
    , -1 --Source_Line_Id
    , 'Y' --Process_Flag
    , l_sysdate --Last_Update_Date
    , l_user_id --Last_Updated_by
    , l_sysdate --Creation_date
    , l_user_id --Created_By
    , 'Q0000.1' --Lot_Number
    , l_exp_date --Lot_Expiration_Date
    , 100000 --transaction_quantity
    , 100000 --primary_quantity
    --Get transaction_interface_id of Source record-1
    SELECT APPS.mtl_material_transactions_s.NEXTVAL
    INTO l_txn_if_id2
    FROM sys.dual;
    --Populate the MTI record for Source record-1
    INSERT INTO MTL_TRANSACTIONS_INTERFACE
    transaction_interface_id,
    transaction_header_id,
    Source_Code,
    Source_Line_Id,
    Source_Header_Id,
    Process_flag,
    Transaction_Mode,
    Lock_Flag,
    Inventory_Item_Id,
    revision,
    Organization_id,
    Subinventory_Code,
    Locator_Id,
    Transaction_Type_Id,
    Transaction_Source_Type_Id,
    Transaction_Action_Id,
    Transaction_Quantity,
    Transaction_UOM,
    Primary_Quantity,
    Transaction_Date,
    Last_Update_Date,
    Last_Updated_By,
    Creation_Date,
    Created_By,
    distribution_account_id,
    parent_id,
    transaction_batch_id,
    transaction_batch_seq,
    lpn_id,
    transfer_lpn_id
    VALUES
    l_txn_if_id2, --transaction_header_id
    l_txn_header_id, --transaction_interface_id
    'INV', --source_code
    -1, --source_header_id
    -1, --source_line_id
    1, --process_flag
    3, --transaction_mode
    2, --lock_flag
    l_item_id, --inventory_item_id
    null, --revision
    l_org_id, --organization_id
    'EACH', --subinventory_code
    1198, --locator_id
    l_transaction_type_id, --transaction_type_id
    l_transaction_source_type_id, --transaction_source_type_id
    l_transaction_action_Id, --transaction_action_id
    -200000, --transaction_quantity
    'EA', --transaction_uom
    -200000, --primary_quantity
    l_sysdate, --Transaction_Date
    l_sysdate, --Last_Update_Date
    l_user_id, --Last_Updated_by
    l_sysdate, --Creation_Date
    l_user_id, --Created_by
    l_distribution_account_id, --distribution_account_id
    l_parent_id, --parent_id
    l_txn_header_id, --transaction_batch_id
    1, --transaction_batch_seq
    NULL, --lpn_id (for source MTI)
    NULL --transfer_lpn_id (for resultant MTIs)
    --Insert MTLI corresponding to the Source record-1
    INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
    transaction_interface_id
    , Source_Code
    , Source_Line_Id
    , Process_Flag
    , Last_Update_Date
    , Last_Updated_By
    , Creation_Date
    , Created_By
    , Lot_Number
    , lot_expiration_date
    , Transaction_Quantity
    , Primary_Quantity
    VALUES (
    l_txn_if_id2 --transaction_interface_id
    , 'INV' --Source_Code
    , -1 --Source_Line_Id
    , 'Y' --Process_Flag
    , l_sysdate --Last_Update_Date
    , l_user_id --Last_Updated_by
    , l_sysdate --Creation_date
    , l_user_id --Created_By
    , 'Q0000' --Lot_Number
    , l_exp_date --Lot_Expiration_Date
    , -200000 --transaction_quantity
    , -200000 --primary_quantity
    END;

    the first MTI record should be the source record ...ie. it should have transaction quantity as negative.
    new set of MTI records should have positive transaction quantities.
    Also ensure that sum of transaction quantities for the set should be 0...
    What is the error that you are getting?
    Thanks,
    Hrishi.

  • FWZE transaction , call transaction is not working as 4.6C (TR-TM)

    Hi ,
    After upgrade from 4.6C to ECC 6, the call transaction  statement is behaving different.
    We are using a custom program in which we are calling the standard transaction FWZE .
    In 4.6C ,After carrying out posting, when we click back, the next statement after 'CALL TRANSACTION' is getting executed. But in ECC 6 after carrying out posting in FWZE if we click back it is going to
    SAP ACCESS initial screen and it is not resuming to the next point. Please tell us why it is not happening in ECC 6. If only the execution comes back to the custom program then we have the
    functionality of clearing the document.
    Also please tell us if we could use any enhancement or BADI in Standard transaction FWZE to resume
    to the calling point after posting.
    Thank You,

    Hi Vadamalai,
    mode 'P' is no proper vmode for a production system. No normal user should found himself stoppping at a break-point in debugger in any transaction. Please check, if the issue remains after changing the vmode to n.
    Is there really a break-point (maybe in a userexit or badi) that can be reached on DEV system? If not, there is no reasen to use vmode 'P'. If yes, please remove the break-point after finishing your test.
    Regards,
    Klaus

  • Pass Parameter to a Transaction Using Transaction Iview Portal

    Dear Experts.
    I have the following doubt:
    The developer ABAP created a program Z_PROGRAM_ABAP
    and a T.Code Z_CODE_PROGRAM for this program.
    I have created a Transaction Iview in the portal for this transaction, but I need pass a value in the Iview  to a variable in the program that call this transaction.
    How can pass a paramete to a variable in the program that is called with the transaction Z_CODE_PROGRAM?
    Thank In advance for your help.
    Best Regards
    Carmen G.

    Hi .
    I have the following code:
    REPORT Z_PROGRAM_ABAP.
       parameters: XYZ type Char no-display.
    if XYZ = 1.
    Write 'ABC'.
    else.
    Write 'MNO'.
    endif.
    And in the portal:
    Application Parmeter    :  XYZ = 1
    Parameters Forwarded: 1
    The problem is that i not want that the user can see the parameter XYZ in the Sreen. When I delete the NO-DISPLAY of the sentence    parameters: XYZ type Char no-display, the parameter is passed.
    How can solve this issue?
    Best Regards
    Carmen

  • Transaction launcher-'Transaction execute is unknown'

    Hi,
    I am trying to launch transaction BP in IC web client
    I have configured the launcher wizard and entered the URL in transaction 'CRMC_IC_CROSS_SYS . I  have added the navigation link but when i click on this link I get  SAP initial screen ( easy access) instead of BP screen with an error 'Transaction execute is unknown'
    I directly want to navigate to BP, can someone please help here or point me to some useful documentation. My mail id is [email protected]
    Thanks

    Hello Amit,
    I think you made a mistake in your transaction launcher wizard.
    If you want an external url to be displayed you should choose URL and not BOR method in the trans launch wizard. The error message 'Transaction execute is unknown' means that you have selected BOR object in the wizard. When selecting BOR object it will automatically look for a EXECUTE methode in the business object. (Or, if you do wanted to execute a BOR object you have picked the wrong one)
    Run through the wizard again and make sure you have entered the correct values.
    Reward points if useful,
    Kind regards,
    Joost

  • IC Account Overview - Sales Transactions & Quote Transaction BP_BPBT

    CRM 7.0
    I activated the Account Overview screen in the IC and realized only the oldest 100 sales transactions and quotes are showing in BP_BPBT SALESOORDERSOV & SALESQUOTATIONSOV. For me these are documents from years  2005 - 2007, nothing recent.  Is there a way to change this to the 100 most recent transactions?
    As a workaround I found >>>
    IMG entry > CRM > Master Data > Business Partner > Specify Display Options for Business Transactions
    allows entries for Role / Area / Time Frame,
    Is there another spot to configure time Frame?  the entries I listed below but I would like a entry of current year and previous year.
    I'm using Y A  This Year in the interim.
    D 0     Today
    D+-1     Yesterday
    D+1     Tomorrow
    M A     This month
    M+-1     Last month
    M+1     Next month
    W*2     <- 14 days ->
    W+-1     Last week
    W+0     This week
    W+1     Next week
    Y A     This year
    Y+-1     Last year
    Y+1     Next year

    Hopeful someone can provide some insight, I'm going to ask my developers to look at these badi's
    Note 1131623 - BAdI for selection of business transactions at Accounts
    Note 1478075 - BAdI for selection of business transactions at Accounts
    1478075 has this comment but I see no place in this IMG entry in 7.0 to adjust the number of items >>>>>>>
    SAP already provides a customizing at IMG for restricting the number of items which are retrieved and displayed in the assignment blocks:
    Customer Relationship Management > Master Data > Business Partner > Specify Display Options for Business Transactions.

  • Restrict the Users from doing Transactions from transactional Iview.

    Dear all,
    We are having  some transactional iviews in EP7.0 and ECC 6.0. We want to restrict the enduser from doing transactions by entering the transaction codes.
    1.Can we remove the command line
    2.Can we restrict the user
    We are using transactional iviews using connectors.
    Reply asap
    Thanks
    Ravi.S

    1) There is an its parameter you add in transaction SICF in the webgui service.  It is something like ~noheaderokcode.
    See here:
    http://help.sap.com/saphelp_webas620/helpdata/en/96/c09788c65b11d480c100c04f99fbf0/content.htm
    2) Backend authorisations define which transaction codes you have access to.
    Paul

  • SOLAR01/02 - Transaction Tab - Transaction length more than 20 characters.

    We have SCM transactions with more than 20 characters.
    There are any way to use in SOLAR01/02?
    Thanks
    Federico

    Hello,
    The Domain TCODE in se11 is defined with length 20, therefore there is no
    possibility to enter longer values.
    Regards,
    Jared Singh

  • User Exit for Transaction CO11N Transaction

    Hello Friends,
                             I have a requirment , In the Transaction C011N , When I specify the Order Number, When I am confirming the Production Order , I want to compare the Item Level Material with some manipulated data .... But I am not getting the Item Level Information , Can any one tell me which User Exit should I use ......
    Thanks & Regard
      Nagaraj S

    CHeck these...
    CONF0001            Enhancements in order confirmation
    CONFPI02            Process order confirmation: Customer spec. input checks 1
    CONFPI06            Process order confirmation: Actual data transfer
    CONFPM02            PM/SM order confirmation: Customer specific input checks 1
    CONFPP06            PP Order Confirmations: Actual Data Transfer
    CONFPS01            PS confirmation: Determine customer specific default values
    CONFPS02            PS confirmation: Customer specific input checks 1
    CONFPS03            PS confirmation: Customer specific check after op. selectio
    CONFPS04            PS confirmation: Customer specific input checks 2
    CONFPS05            PS confirmation: Customer specific enhancements when saving

  • Pass paremeter to VD03 transaction using Transaction Launcher

    Hello experts,
    I have a requirement to pass the confirmed account id to VD03 transaction when i click on launch transaction VD03. I have configured the transaction launcher to launch VD03 transaction.
    Please let me know the steps.
    Thanks
    Ramakrishna

    Hi .
    I have the following code:
    REPORT Z_PROGRAM_ABAP.
       parameters: XYZ type Char no-display.
    if XYZ = 1.
    Write 'ABC'.
    else.
    Write 'MNO'.
    endif.
    And in the portal:
    Application Parmeter    :  XYZ = 1
    Parameters Forwarded: 1
    The problem is that i not want that the user can see the parameter XYZ in the Sreen. When I delete the NO-DISPLAY of the sentence    parameters: XYZ type Char no-display, the parameter is passed.
    How can solve this issue?
    Best Regards
    Carmen

  • MIRO TRANSACTION - BSX TRANSACTION KEY TAKE PLACE

    Dear Consultants,
    While posting MIRO document, the BSX transaction key is taking place & posting key is 89 apart from WRX transaction key, the figure of (MIRO )WRX transaction key ie the automatic G/L a/c assign in OBYC is matching with WRX transaction key in MIGO.
    pls note that BSX transaction key i.e automatic G/L posting is taking effect in MIGO.( 120000Rs)
    My question is why BSX transaction key ( hardly 200 Rs ) is taking place in MIRO posting, wht was the reason & further there is no invoice condition difference from PO & MIRO.
    Anticipating your advices.

    Hello
    Posting key 89 is for debit and BSX transaction gets debited at the time of MIGO as stock account is getting debited at the time of MIGO.
    WRX is GR/IR clearing and it gets credited at the time of GR.
    In normal cases the debit and credit entry will be for the same amount unless configured otherwise.
    At the time of MIRO WRX gets debited and vendor account gets credited. As you are saying BSX is also coming into play at the time of MIRO, that means some amount is getting into the material accounts in the line item.
    It can happen if you have given unplanned delivery costs (should be Rs.200) and is configured to be distributed among the material account.
    Hope it is clear.
    Regards
    Gregory Mathews

Maybe you are looking for