Badi not invoked in standard code because of act_imp_existing check

HI
Can you please tell me when act_imp_existing is set during cl_exithandler->get_instance method call. We are on 46C.
I have debugged and also checked the code of get_instance. act_imp_existing is not set at all. Now I have seen that wherever in SAP standard code BADI method is invoked based on whether act_imp_existing is not initial BADI is not called at all. Is it by design or I have not implemented BADI properly.
Consider this case.
1) MB_DOCUMENT_BADI (called from mb_post_document)
SAP code is
call method cl_exithandler=>get_instance
changing instance = mb_document_badi.
call method mb_document_badi->mb_document_update
exporting
xmkpf = zmkpf[]
xmseg = zmseg[]
xvm07m = zvm07m[].
Here since act_imp_existing is not being used call goes thru whereas
in
2) BADI me_define_caltype (called from me21n, me22n). SAP code is
if static_calctype_instance is initial.
call method cl_exithandler=>get_instance
importing
act_imp_existing = static_calctype_active
changing
instance = static_calctype_instance.
endif.
if not static_calctype_active is initial.
call method static_calctype_instance->define_calctype
exporting
im_x_nekko = p_im_nekko
im_x_oekko = p_im_oekko
im_x_nekpo = p_im_nekpo
im_x_oekpo = p_im_oekpo
im_x_nbekpo = p_im_nbekpo
im_x_obekpo = p_im_obekpo
changing
ch_x_lf_calctype = p_lf_calctype.
endif.
Here since static_calctype_active is not set badi won't be invoked. Please tell me how to invoke define_calctype which I need to manually do repricing during me21n/me22n.
Regards
Saurav Choudhury

HI
  Christian and Sergei
   Thanks a lot for the reply. But may be there is some note which would apply the correction as per sergei. (But while searching thru oss I could not find any such note). Source code of our system is as follows.
method get_instance.
  class cl_abap_typedescr definition load.
  data: exit type ref to object,
        temp type abap_abstypename,
        int_ref type ref to cl_abap_refdescr,
        type_ref type ref to cl_abap_typedescr,
        interface type seoitfname,
        exit_name type exit_def,
        clskey type seoclskey,
        mult type seex_boolean,
        subrc like sy-subrc,
        abs_type_classname type string.
The absolte type name of the changing parameter instance
is got via dynamic describe
  call method cl_abap_typedescr=>describe_by_data
         exporting
                   p_data       = instance
         receiving
                   p_descr_ref  = type_ref.
  if type_ref->type_kind ne type_ref->typekind_oref.
    raise no_reference.
  endif.
  catch system-exceptions others = 1.
    int_ref ?= type_ref.
  endcatch.
  if sy-subrc = 1.
    raise no_reference.
  endif.
  call method int_ref->get_referenced_type
        receiving
            p_descr_ref = type_ref.
  if type_ref->type_kind ne type_ref->typekind_intf or
     type_ref->absolute_name ns '\INTERFACE='.
    raise no_interface_reference.
  endif.
Get the interface name by the absolute type name
  split type_ref->absolute_name at '=' into temp interface.
Get the exit_name for the interface name
  select exit_name from sxs_inter into exit_name
           where inter_name = interface.
    exit.
  endselect.
  if sy-subrc = 4.
    raise data_incons_in_exit_managem.
  endif.
Get the name of the exit class
  call function 'SXV_GET_CLIF_BY_NAME'
       exporting
            name   = exit_name
            prefix = seex_exit_class_prefix
       importing
            clif   = clskey-clsname.
  concatenate '\CLASS=' clskey-clsname into abs_type_classname.
Is the given instance initial?
  if not instance is initial.
    call method cl_abap_typedescr=>describe_by_object_ref
           exporting
                     p_object_ref = instance
           receiving
                     p_descr_ref  = type_ref.
    check type_ref->absolute_name ne abs_type_classname.
  endif.
check how many implementations exist for an exit
  call function 'SXC_ACT_IMPS_PER_FLT_VAL'
       exporting
            exit_name                = exit_name
       exceptions
            multiply_active          = 1
            no_active_implementation = 2
            others                   = 3.
  subrc = sy-subrc.
  if subrc = 1.
there are more than one active implementations
read the properties of the exit
    select single mltp_use from sxs_attr into mult
                  where exit_name = exit_name.
    if sy-subrc = 4.
      raise data_incons_in_exit_managem.
    elseif mult = seex_false.          " singular exit
      raise single_exit_multiply_active.
    endif.
  endif.
ok, then do your job
  create object exit type (abs_type_classname).
  catch system-exceptions move_cast_error = 1.
    instance ?= exit.
  endcatch.
  if sy-subrc = 1.
    raise cast_error.
  endif.
endmethod.

Similar Messages

  • Tax code I9 does not exist for jurisdiction code 7700000000

    Hi all,
    My user is trying to post the trip to finance. While posting she is getting error: Tax code I9 does not exist for jurisdiction code 7700000000. I checked setting of tax code I9 in HR box. Everything looks fine. Can anyone suggest me what are possible reasons behind this error.
    Thanks and Regards,
    Vikrant Deshpande

    does this results get from cluster
    if yes delte the data for that record from cluster
    and rerun the simulation and run the posting

  • Vendor not permitted for company code

    Dear experts,
    While raising the PO in srm I am getting the error message as 'Vendor not permitted for company code'.
    When I checked vendor details in srm and back end, vendor is exist for particular company code and purchasing ord combination. 
    What might be the reason for this error?? can you please share your thoughts about this??

    Hi. Check all the blocking and deletion flags in both systems, especially looking at the "central block" and "archiving" flags in transaction BP in SRM.
    Regards,
    Dave.

  • Vendor not defined in company code

    Hi,
    I have problem, one of vendor not defined in company code.
    I already check table LFB1, no entry found in that table.
    Please advice how to solve this issue.
    Thanks
    Moderator: Please, avoid asking basic questions

    hi,
    if it is not created you can create it by fk01,
    regards,
    raj
    Edited by: subramanyan1985 on Dec 14, 2010 10:19 AM

  • Unable to prepare project for publishing. The project could not be prepared for publishing because an error occurred. (Error code -50) imovie 09 v8.0.6

    When I try to export the movie I get this error code. Im doing a music video and have put days into it and now I can not get it to export! My other small project export with no problem.

    Thanks for the details.  We have a similar problem (see my post below) and are in the process of adding back each clip and then testing for export.  My question is, once iMovie is unable to export the project, does it render the file "bad" and prevent exporting even if you remove the "poisned" clip(s)?
    ++++++++++++++++++++++++++++++++++++++++++++++++
    Hello,  We are having a similar problem running iMovie '09.  We get the exact same error as you reported. 
    "Unable to prepare project for publishing" The project could not be prepared for publishing because an error occurred (-50)
    We have a very similar situation were we have multiple repeated clips.  However, our clips are 2.4 's.  Like you, we took the finished project and started eliminating edits that we thought might be preventing it from exporting. The following actions still would not allow the project to export:
    removing title pages
    removing transitions
    removing imported music from iTunes
    removed another clip from another event
    closed all other programs
    closed iMovie, powered off computer, opened iMovie, tried to export
    reconfirmed the last project exported would still export - it did without issueThe only difference between the project that will export and the one that does not are these short (2.4's) repeating clips
    When we create the new project from the recorded event without making any edits (just as recorded), it exports without issue.  We have started the arduous task of adding back in each edit and testing it for export until we determine which edit is causing it to "not export".  This is a very inefficient way of troubleshooting.
    This is a science project for my son and we need to be able to save it as a QT or mpeg4 movie so that he can submit it to his teacher for viewing and a grade!
    Any ideas from any other users would be greatly appreciated.

  • I am using Adobe Acrobat 9 Standard version in Windows 8.1 and when I try to create a .pdf file, I receive the following error message "Acrobat could not open "file name.log" because it is either not a supported file type or because the file has been dama

    I am using Adobe Acrobat 9 Standard version in Windows 8.1 and when I try to create a .pdf file, I receive the following error message "Acrobat could not open "file name.log" because it is either not a supported file type or because the file has been damaged.  To create a PDF document, go to the source application then print the document to .pdf"  I am going to the source application and printing the document to .pdf yet it's saving the file as a .log file.  After reinstalling the software, I initially didn't encounter this problem but on my second and third attempts to convert files to .pdf format, this error message reappeared.  How do I resolve this problem?

    I have a similar problem which i did not have before...and it exists only in some powerpoint files which i want to print as a pdf file...and i get the same message as above.
    the log says the bellow details...what's the problem and how can i resolve it? thanks.
    %%[ ProductName: Distiller ]%%
    %%[Page: 1]%%
    %%[Page: 2]%%
    Cambria not found, using Courier.
    %%[ Error: invalidfont; OffendingCommand: show ]%%
    Stack:
      %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

  • No matter how I try to finalize my imovie , I get the following message:  "The project could not be prepared for publishing because an error occurred. (Error code = -49))"

    No matter how I try to finalize an imovie I get the following message:
    "The project could not be prepared for publishing because an error occurred. (Error code = -49)"

    Hi
    Error -49 opWrErr  File already open with write permission
    Trash the preference files while application is NOT Running.
    Easiest way to find out if this is the problem is by:
    • Create a new User-Account
    • Log out of Your old one and into this
    • Re-try iMovie
    If it now works OK - then 99.9% the problem is iMovie pref. file that needs to be trashed.
    from Karsten Schlüter
    Some users notice on exporting larger projects from within iMovie that this operation is aborted with an 'error -49'
    This issue occurs only on MacOs machines using 10.7x
    try switching-off the Local Mobile Backup
    in Terminal copy/paste
    sudo tmutil disablelocal
    Re-launch Mac
    Yours Bengt W

  • The project could not be prepared for publishing because an error occurred. (Error code = -2009)

    The project could not be prepared for publishing because an error occurred. (Error code = -2009)  whY?

    Hi
    Lennart Thelander found this discussion
    https://discussions.apple.com/message/12425004#12425004
    and reading it trough - I think is very close.
    Yours Bengt W

  • After many hours of "rendering", the message appears that"--could not be prepared for publishishing because an error occurred error code= -34"  What does this mean?

    After many hous of "rendering"  the message appeared that "--could not be prepared for publishing because an error occurred error code= -34"

    re-post in the iMovie forum where all the people that use that software are.  This is the Lion 10.7 forum.

  • HT5628 i was installing windows 8 on mac by boot camp and after i put the windows code and choose the partition i formatted the boot camp sector it said windows can not install on this sector because it is gpt

    i was installing windows 8 on mac by boot camp and after i put the windows code and choose the partition i formatted the boot camp sector it said windows can not install on this sector because it is gpt

    Reinstalling Mavericks depends on several factors:
    if you erased your recovery partition
    what OS originally came on your Mac.
    I'll assume you don't have a backup available that you made before your mishap,  because you didn't mention it.
    That's really the take home message here: have a backup!
    If you still have your recovery partition:
    boot into the recovery partition (command R at restart)
    use the recovery partition to reinstall Mavericks. see: OS X: About OS X Recovery
    if you do not still have your recovery partition, then it depends on whether your Mac originally came with installer disks or not.
    If it originally came with installer disks, you would boot from the installer disks, erase your HD, and then reinstall the OS that is on the installer disks, and then upgrade as necessary until you get to Mavericks.
    If your mac did not originally come with installer disks, but you managed to erase your recovery partition, then you can try to boot into internet recovery (option-command-R at restart), and use internet recovery to erase your HD and reinstall the OS that originally came with your computer, and then upgrade to Mavericks if you need to. See: Hands on with Mountain Lion's OS X Recovery and Internet Recovery | Macworld
             (the reference refers to ML but it applies just as well to Mavericks).

  • I try to connect to iTunes and it comes up with a box saying "iTunes could not connect to the iPad because it is locked with a passcode. you must enter your code on the iPad before it can be used with iTunes", but i cant enter the code on the iPad

    I try to connect to iTunes and it comes up with a box saying "iTunes could not connect to the iPad because it is locked with a passcode. you must enter your code on the iPad before it can be used with iTunes", but i cant enter the code on the iPad because it is saying "connect to iTunes". Can anybody help?? It is on the new iPad.

    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.

  • Sms code for verification does not reach to my mobile. ? i can not access my e-mail because of code that does not sent right now. code that related to my alternated e-mail was sent , but not to mobile

    sms code for verification does not reach to my mobile. ? i can not access my e-mail because of code that does not sent right now. code that related to my alternated e-mail was sent , but not to mobile

    Bugzilla is not the place for this sort of problem. Forwarded this post to the relevant team.

  • HT4061 Forget  iPhone password, when connect to computer "iTunes could not connect to the iPhone because it is locked with a pass code. You must enter pass code on the iPhone before it can be used with iTunes."

    Forget  iPhone password, when connect to computer "iTunes could not connect to the iPhone because it is locked with a pass code. You must enter pass code on the iPhone before it can be used with iTunes."

    You have to restore it using a computer with iTunes per the knowledge base article above.
    With iOS 7, if you have Find My Phone turned on you can login to iCloud from a computer and send an erase signal to the iPhone to clear it...that will erase all content and settings.

  • I want the iphone 4 ios supports 8 be kind are not bad not let oblivion because the iphone 4 is as good as the iphone 4s

    I want the iphone 4 ios supports 8 be kind are not bad not let oblivion because the iphone 4 is as good as the iphone 4s

    iOS 8 requires a dual-core processor; the iPhone 4S has that, but the iPhone 4 doesn't.
    (117890)

  • I can not back up my iphone because it is locked and I can not remember the code

    I can not back up my iphone because it is locked and I can not remember the code

    You're out of luck, then. Either that is not the computer it's set up to sync with, or the passcode was set AFTER the last time you synced, as Lawrence tried to explain.
    You're going to lose your data.

Maybe you are looking for

  • How to downgrade from Windows 8 to Windows 7 (64 bit)

    I have Taken New laptop that is G510 Lenovo before 1 week and it has pre-installed windows 8 but i want to change this os to windows 7 but when i try to format after loading files from windows 7 CD it hangs on windows logo. please tell me some soluti

  • Problem in enjoy transaction

    hi, I have a doubt that why we cannot record enjoy transactions? Can you tell me the reasons for that? thank you. regards raghu

  • Changing the recipient to which alert messages go

    When we installed the JSMS system a few years ago, the installer has defined a certain email address (aliased as [email protected]) to which the alert messages (e.g. most delivery failed messages) go Now I want to change this email address so another

  • XMLType, TopLink 1013dp3r2 = which JDBC driver supports XMLType?

    I'm using the oracle thin driver 10.1.0.4 and getting this exception when reading an XMLType column that is mapped to a string: [exec] Exception Description: The object [oracle.sql.OPAQUE@f63c6a], of class [class oracle.sql.OPAQUE], could not be conv

  • Acer pda n30 ni usb-6008

    Hi! I want to connect Pocket PC Acer PDA n30 with NI USB-6008 card and with accelerometer ADXL311. Did anyone do somything symilar to this? Could anyone send me a link to a paper that has something to do with my question? I am looking for someone who