Detect the current transaction used in MIRO :EXIT_SAPLMR1M_001

hi ,
my requirment is to find  a way to detect the current transaction used within the MIRO transaction ,which can be one among
invoice/ credit memo/ subsequent debit/subsequent credit .if the user  is using the credit memo ,  then prevent him from posting based on the authority /role given to him. Im making use of the Exit:EXIT_SAPLMR1M_001 for this.
Please let me know which field of the exit parameters should be made use for detecting if the user is in credit memo transaction.
Thanks in advance,
Shyam.

Hi
Define a variable for VORGANG and set a value in the same way that from VORGANG SAP gives values for other fields in include LMR1MF5G (FORM vorgang)
  CASE rm08m-vorgang.
    WHEN '1'.                          " Rechnung
      rbkpv-xrech      = 'X'.          " - Rechnungs-Kennzeichen
      rbkpv-tbtkz      = space.        " - Nachbelastungs-Kennzeichen
      rbkpv-xrechl     = 'S'.
      rbkpv-xrechr     = 'H'.
    WHEN '2'.                          " Gutschrift
      rbkpv-xrech      = space.
      rbkpv-tbtkz      = space.
      rbkpv-xrechl     = 'H'.
      rbkpv-xrechr     = 'H'.
    WHEN '3'.                          " nachträgliche Belastung
      rbkpv-xrech      = 'X'.
      rbkpv-tbtkz      = 'X'.
      rbkpv-xrechl     = 'S'.
      rbkpv-xrechr     = 'H'.
    WHEN '4'.                          " nachträgliche Entlastung
      rbkpv-xrech      = space.
      rbkpv-tbtkz      = 'X'.
      rbkpv-xrechl     = 'H'.
      rbkpv-xrechr     = 'S'.
So, do the algorithm in the reverse for fields XRECH, TBTKZ, XRECHL and XRECHR in MRM_RBKPV.
I hope this helps you
Regards
Eduardo

Similar Messages

  • An Invalid Setup has been detected for the current Transaction Type in AME

    Gurus,
    I am constantly getting an error An Invalid Setup has been detected for the current Transaction Type in Approvals Management
    My client have 3 units say A,B,C. A requirement is such that whenever a vacancy is created, an approval should be sought from units HR manager.
    I have created a dynamic query for this and it is working fine for first two units say A & B. i.e. whenever somebody from unit A or B creates a vacancy it is correctly fetching the
    respective units managers. But, this whole AME is not working for unit C. An error pops out which says *An Invalid Setup has been detected for the current Transaction Type in
    Approvals Management* . Can anybody tell me what can be the issue?
    Edited by: 919527 on Aug 8, 2012 12:40 AM
    Edited by: 919527 on Aug 8, 2012 12:41 AM

    Solved it. The cursor wsa fetching two rows in plcae of one.

  • Detecting the current window in Forms 4.5

    Hello,
    Is there a way to detect the current window that is in use? I want to find the window's x/y coordinates to center another form or LOV on top of it. Thanks for any help you can provide.
    Frank

    To help make it more clear... If I have a 'root_window' and I launch an LOV or another form with a button on the window, I want to pass in the form or LOV (to be centered) into a procedure pCenterLOV('myLOV') without having to pass in the window name too. Hope this makes more sense.
    Thanks again for your time.
    null

  • How to Read the GUID of the current Transaction.

    Hi
    I am writing a new Function Module, which i will use in the Search Help. I need to process the data using this Function Module. For the same, i need to read the data from the current Transaction. I will be using CRM_ORDER_READ for the same. However, i need to READ the "Header_Guid" before.
    Can anyone help. How to read the GUID of the current Transaction?
    Thanks and Regards
    Jaideep

    Hi Jaideep,
    From where you are going to call this FM ? Are you planning to Implement some BADI or from some BSP application ? If from BSP application then code will look something like this.
      DATA: current           TYPE REF TO if_bol_bo_property_access.
      DATA: dref              TYPE REF TO data.
      DATA: lv_guid           TYPE crmt_object_guid.
    FIELD-SYMBOLS: <l_data> TYPE data.
    IF iterator IS BOUND.
        current = iterator->get_current( ).
      ELSE.
        current = collection_wrapper->get_current( ).
      ENDIF.
      TRY.
          dref = current->get_property( 'GUID' ).          
        CATCH cx_sy_ref_is_initial.
          RETURN.
      ENDTRY.
      ASSIGN dref->* TO <l_data>.
      CLEAR: lv_guid.
      lv_guid = <l_data>.
    and you will have the current transaction guid. Since I am not sure at what point of time you are trying to get the guid so I have given you the code at the context node BTADMINH level.
    Hope this will give you some idea.
    Thanks,
    Vikash.

  • Can I recover the database to the current time using a backup control file?

    Can I recover the database to the current time using a backup control file? How far can I recover this database?
    I have an Oracle 10g(10.2.3) database on RHEL4.3 system.
    I have lost all the current control files and all the online redo logs, archived redo logs and all other files are OK.
    Now I have to recovery this database using a backup control file.
    Can I recover the database without any data lost?

    If
    a) it was a Shutdown Abort or an Instance Crash (i.e. backgrounds died on detecting loss of redo logs),
    b) redo logs are lost
    c) data files are intact
    You'd have to
    a) Restore datafiles
    b) Do an Incomplete Recovery to the last available ArchiveLog
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Getting a reference to the current Transaction

    In a session bean, I need to call enlistResource(XAResource), an instance method in interface javax.transaction.Transaction, in order to enlist my XAResource object with the current transaction (whether it's a bean-managed or container-managed transaction).
    In order to accomplish this, my code therefore needs to be able to obtain a reference to the current transaction, or to the transaction manager (since I could then call TransactionManager's getTransaction() method to obtain the transaction).
    Is there a way to do this in IPlanet? (I have found techniques that work for JBoss and BEA, but not IBM.)
    [Please note that a reference to a UserTransaction object is of no use, as it provides no enlistResource() method, nor any way to obtain the corresponding Transaction object or the TransactionManager.]

    Try
    InputStream is =
    ThisClass.class.getClassLoader().getResourceAsStream(resourceName);
    Note this will get a different classloader which uses
    the whole class-path.Just as an FYI, class.getResourceAsStream() delegates to the object's ClassLoader, so you can save some typing by omitting the call to getClassLoader(). :o)

  • How to get the current transaction variant ?

    dear guru,
    could you please tell me how to get the current transaction variant?
    i tried the following method:
      DATA l_tcvariant TYPE tcvariant.
      CALL 'DY_GET_TX_VARIANT'
         ID 'VARIANT' FIELD l_tcvariant.
    but it failed.
    best regards.
    zj

    Try something like this
    DATA:  VARIANT LIKE SHDTVCIU-TCVARIANT.
      CLEAR VARIANT.
      CALL FUNCTION 'RS_HDSYS_GET_TC_VARIANT'
       IMPORTING
         TCVARIANT                     = VARIANT
    *     FLAG_CLIENT_INDEPENDENT       =
    *     RC                            =
    *   TABLES
    *     T_SCREEN_VARIANTS             =
    *     T_INACTIVE_FUNCTIONS          =

  • How to update the FB01L transaction using the FM  bapi_acc_document_post

    Hi All,
            How to update the FB01L transaction using the bapi_acc_document_post but there is no ledger group field in the bapi function module.
    Please help me how to do it.

    hi,
    use batch input method for the same.
    check this.
    [https://forums.sdn.sap.com/click.jspa?searchID=19107237&messageID=884744]

  • In dialog programming i want to leave the current transaction

    Hi,
    In dialog programming i want to leave the current transaction and come out to the standard   sap initial screen.
    Please advise me how can i apply.
    Thanks.

    Basic question, please search before posting.
    Thread locked.
    Thomas

  • How to check whether  entity has been persisted in the current transaction

    Hello,
    I am porting functionality which relay heavily on lifecycle of the entity.
    For example methods like these:
    * returns true if the instance has been modified, deleted or newly made
    * persistent in the current transaction
    public boolean isModified(final EntityObject entity)
    public boolean isDeleted(final EntityObject entity)
    For some of these callsI have found how to port them to toplink und just want to validate that this is the right way:
    protected static UnitOfWork getUnitOfWork(EntityManager entityManager) {
    return ((JpaEntityManager) (entityManager.getDelegate())).getUnitOfWork();
    public static boolean isModified(EntityManager entityManager, Object entity) {
    UnitOfWorkChangeSet set = getUnitOfWork(entityManager).getCurrentChanges();
    ObjectChangeSet oset = set.getObjectChangeSetForClone(entity);
    return !oset.getChanges().isEmpty() || oset.isNew();
    public static boolean isDeleted(EntityManager entityManager, Object entity) {
    UnitOfWorkChangeSet set = getUnitOfWork(entityManager).getCurrentChanges();
    return set.getDeletedObjects().keySet().contains(entity);
    but I did not find how to do following with the eclipselink:
    * returns true, if the given entity object has been persistet during the
    * current transaction
    * @param entity
    * @return true, if the given entity object has been persistet during the
    * current transaction
    public boolean isPersistent(final EntityObject entity)
    Questions:
    - how can I check whether the entity is persistent in the sense already stored in the DB ?
    - how can I check whether the entity has been persisted in the current transaction ?
    Thanks in advance.
    Andre Teshler

    Hi Andre,
    In Eclipse link there are Entity listeners which will define the life cycle events like preInsert(),postInsert() etc.On successful insertion of an object its postInsert() life cycle method gets called.If you have to validate whether object inserted successfully then best place is to override the postInsert() and check for the existence of the record.All the event life cycle methods take a DescriptorEvent as parameter which will give handle to API as given below.In the same method you can check if this insert operation succeeded in the same transaction.
    package model;
    import java.util.Vector;
    import org.eclipse.persistence.descriptors.DescriptorEvent;
    import org.eclipse.persistence.descriptors.DescriptorEventAdapter;
    import org.eclipse.persistence.descriptors.DescriptorEventListener;
    import org.eclipse.persistence.internal.sessions.ObjectChangeSet;
    public class SampleEntityLIstener extends DescriptorEventAdapter {
    public SampleEntityLIstener() {
    super();
    public void postInsert(DescriptorEvent event) {
    event.getRecord().containsKey("pass the object");
    event.getChangeSet().getUOWChangeSet();
    public void preInsert(DescriptorEvent event) {
    Once you implement the DescriptorEventListener,need to register with the Entity so that life cycle methods gets called and respective business logic gets executed.
    Hope this helps,
    Regards,
    P.Vinay Kumar

  • PERSG previous bet different from the current PERSG using info-type pa0000

    Hi Friends,
    Please guid me how get the PERSG previous bet different from the current PERSG
    using info type pa0000.
    Regards,
    Durga

    Folks,
    even after having repaired the inbox folder under "properties" a few times, I still had some e-mails where the contents are different from the subject line.
    In other words in the inbox there are two e-mails: one with subject line "abc", and another one with subject line "def".
    When I display the e-mail with the subject line "abc", the contents are from the e-mail with the subject line "def" in the in-basket.
    What else can be done to correct this problem?
    Thanks and best regards.
    Fred Kunz-Shirzad
    Chemin Ronzeures 6A
    1297 Founex VD
    Switzerland
    [email protected]

  • Highlight the current word using the keyboard

    How do you highlight the current word using the keyboard
    eg lets say the cursor is after the letter d in AddComments would like to highlight the AddComments using the keyboard
                mediatorMap.mapView(AddComments, LoginFormMediator);

    Hi
    I dont think its possible. In Java you have something like Select Enclosing Element, which mimicks selecting a word (Alt-Shift-Up). However, FB does not have this feature, AFAIK.
    There is an Eclipse enhancement request for this behaviour, which should address this in some future release. Given the fact that its still not implemented in core Eclipse, and the lame speed at which FB develops, I wouldn't expect anything before 2012.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=23080

  • How to detect the current VI being used.

    I have built security into my LabVIEW application and would like to implement an auto logoff function. Is there a way I can get a VI reference to the VI that the user is currently interfacing with? I can then use the detect front panel activity vi to reset a timer.

    Check the VI Property:Front Panel Window:Is Frontmost. If that is true, the VI is in front and, therefore, is most likely the one being used. I am not sure how modal windows and dialog boxes affect this.
    Lynn

  • Detecting The Current Brush Size

    Hi all,
    Is there anyway in javascript to detect the pixel size of the current brush? I want to use that value as a variable in a script.
    Thanks for any help.

    >
    > Is there anyway in javascript to detect the pixel size of the current brush?
    It's fairly easy to set the current brush size via scripting listener code, but
    reading the current value does not appear to be as simple.
    If I had to do it, I would create a new (temporary) brush preset, save the
    preset to disk, delete the temporary in-memory preset, then pick apart the saved
    brush file to extract the brush size.
    The last part is the only part that gets a bit tedious. The others can all be
    taken care of via SL code. Or, even easier, the PresetsManager script in xtools.
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • How do I create a new calendar for the current year, using last years calendar's birthday's/photos and comments from the lower pages?

    Each year for the past 5 years I make a family calendar and send copies to all he family members around the globe.  I hate that I have to recreate all the birthdays and special occasions from scratch, and re-drag all the photos onto these dates, in the lower half of the page of each month on the new calendar.  How can I create a new calendar for the current year and port all of these photos/comments into the new calendar from last years calendar, to save having to redo all this work!!  I am not talking about the upper half page of the photos only...I am referring to the calendar page of each month.
    Thanks in advance. 
    Colin

    Welcome to the Apple Discussions. Open iWeb so you see your original site in the left hand pane. Use the File->New Site menu option to create a new site. Give it the name you want.
    Now select a page in your original site and type Command+D. That will duplicate the page. Drag the duplicate page down to the new site and rename it as needed. Do that for the other pages you need in the original site.
    OT

Maybe you are looking for