General BADi question:Call BADi in background job/batch input. Possible?

Hi out there,
i'm using thoe following BADi: /SAPSLL/CTRL_SD0C_R3 (Global Trade Service).
But also, this question is a general question.
If we are calling on screen the transaction VF01, the BADi is called correctly.
But unfortunately it seemes that the BADi is NOT called (im not really sure, cause i can't debug the background task) when we are calling a batch input sequence wth f.e. form bdc_transaction VF01 nothing happens.
Maybe BADi cannot be called in a background task? If it's possible, how could it be monitored. Thare isw no spool entry or anything like that!
Any answer can help.
Thank you in advance!
Regards,
Timo
Edited by: Timo Ehl on Apr 14, 2009 7:27 PM

Hi,
generally BADIs are called in background mode. You can use the following trick to debug your BADI. You just need to create an infinite loop in your BADI implementation. Something like this.
DATA: l_a TYPE c.
WHILE l_a IS INITIAL.
ENDWHILE.
Obviously when your BADI is called in background mode then program will get into infinite loop. You can easily connect and debug running programs from transaction SM50. You need to select your background process and go to Program/Session -> Program -> Debugging. You will jump directly into your BADI methos with infinite loop. Then you will just set value to l_a and you will start debugging your BADI. If you can not find any process then your BADI is not called in background mode.
Cheers

Similar Messages

  • Userexit or BADI for program *RMMRP000* for background job

    Hi,
    We are scheduling background job for MRP through SM36 using program  RMMRP000 or Through Transaction MDBT (MDBT is calling program RMMRP000) which creates PR (through background job).
    I want to default one field in PR (PO Price field in valuation tab in PR default to gross) using any userexit or BADI.
    Can any body suggest me userexit or BADI for program RMMRP000 for background job
    Regards.

    Hi,
    1. The below are the List of  Userexit for this MDBT t.CODE.
    2. But i dont see any one helping to resolve your issue.
    3. May be you should lookg at the Userexit for me21n or relevant Purhcase requisition creation transaction.
    reg
    dsk

  • Call transaction in Background job

    Hi,
    I am executing a program in background. In that program I am having a CALL TRANSACTION as below:
    CALL TRANSACTION 'ME22'
        USING g_t_bdctab
        MODE 'N'
        UPDATE 'S'
        MESSAGES into g_t_bdcmsg.
    But it is not working. The same is working when the program is executed in foreground.
    Is this means, we cannot have CALL TRANSACTION in background?
    If Yes, then what could be the solution for it?
    Thanks,
    Pankaj.

    Hello Pankaj,
    Call transaction works in background.
    Provided you are not picking file from presentation server.
    If you are picking file from presentation server, place the same file in application server and during background job pick the file from application server then your program works perfectly.
    Regards,
    Tarun

  • Error  while  calling badi using class cl_exithandler with getInstance

    hi experts...we are using SAP ECC 6.0  version
    I have created  BADI Def   and  Implementation using  se18   and se19 with some interface methods..
    Problem:
    I'm writing  a report to call  that using  class CL_EXITHANDLER but it shows an  Exception..
    " Exception condition "DATA_INCONS_IN_EXIT_MANAGEM" raised."
    Report example:
    DATA: CL_EXIT  TYPE REF TO CL_EXITHANDLER,
          IF_USER_INSTANCE TYPE REF TO ZIF_EX_USER_MAILID1.
    CALL METHOD cl_exithandler=>get_instance
      EXPORTING
       EXIT_NAME                       = 'ZBADI_USERMAIL_DEF'
    *    NULL_INSTANCE_ACCEPTED        = SEEX_FALSE
    *  IMPORTING
    *    ACT_IMP_EXISTING              =
      CHANGING
        instance                       = IF_USER_INSTANCE
    *  EXCEPTIONS
    *    NO_REFERENCE                  = 1
    *    NO_INTERFACE_REFERENCE        = 2
    *    NO_EXIT_INTERFACE             = 3
    *    CLASS_NOT_IMPLEMENT_INTERFACE = 4
    *    SINGLE_EXIT_MULTIPLY_ACTIVE   = 5
    *    CAST_ERROR                    = 6
    *    EXIT_NOT_EXISTING             = 7
    *    DATA_INCONS_IN_EXIT_MANAGEM   = 8
    *    others                        = 9
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    so i found that all  EXITs  are in the Table " SXS_ATTR" 
    but  what i have created BADI  has not exist  in that Table so that  it gets  an  Exception(while i'm debugging found this)
    so kindly tel me whats problem my BADI "ZBADI_USERMAIL_DEF"  not maintained that  Database table
    but  in Implentation class  its working fine..

    yes i have created  badi  in  Enhancement spot so  regarding what u told i'm using  GET BADI  and CALL BADI
    DATA:W_HANDLE TYPE REF TO ZBADI_USERMAIL_DEF.
    GET BADI W_HANDLE.
    CALL BADI w_handle->get_user_mailid
      EXPORTING
        uname  = UNAME
      changing
        mailid = W_EMAIL
    WRITE: / 'UNAME:',UNAME.
    WRITE: / 'EMAIL ID',W_EMAIL.
    CALL BADI w_handle->get_user_address_data
      EXPORTING
        uname    = UNAME
      changing
        addrdata = W_ADDRDATA
    IF W_ADDRDATA IS NOT INITIAL.
      WRITE: / W_ADDRDATA-BNAME,W_ADDRDATA-NAME1,W_ADDRDATA-NAME2,W_ADDRDATA-TELPR,W_ADDRDATA-TELNR,W_ADDRDATA-TEL01.
    ENDIF.
    but  here  BADI  are not  called 
    Interface implementation class methods  not  executed  so kindly tel me whats problem here.
    Thanks in Advance
    sivakumar

  • Error in calling BADI

    Hi All,
    I have created a BADI and implemeted it and when i tried to call it in the program it going to short dump.
    I debugged the program and found out that in  'cl_exithandler=>get_class_name_by_interface' an exception 4  'data_incons_in_exit_managem' raised, please provide methe  input on what i have to do.
    Thanks,
    Krish.

    Hi,
    If you are trying to call a New BADI (implemented with Enhancement Spot) , then you got to use GET BADI and CALL BADI.
    If you are trying to call a Classic BADI, use cl_exithandler=>get_instance
    If you have done the calling right, then check if you are passing all correct parameters and using the correct object. For a classic BADI, the object will be a reference to the Interface name. In the New BADI, the object will refer to the BADI definition.

  • Bad Pool Caller and Bad Pool Header issue

    Hi,I recently upgraded my system from Windows 8 to Windows 8.1. Since then it doesn,t start normally. Mainly give Blue screen with error Bad Pool caller, Bad pool header, Service Exception error, Driver corrupted expool. The system never hibernate or sleep. Please help. 

    Hi there
    Welcome to the HP Support Forums! It is a great place to find the help you need, both from other users, HP experts and other support personnel. I understand that after upgrading to Windows 8.1 you are experiencing various BSOD errors. I am happy to assist with this. Did this start immediately after the upgrade to Windows 8.1, or was it shortly after? Checking online for those messages, I found suggestions about conflicting drivers, multiple antivirus programs in use. Here are a few examples I found from the Microsoft support forums. Something within may be of use to you. driver expool corrupted windows 8 - answers.microsoft.comBAD_POOL_CALLER error in Windows 8.1 -  answers.microsoft.comsystem service exception error blue screen - answers.microsoft.com It may also be useful to open your own thread on the Microsoft Forums, as often the experts there are looking for dump files to look for specific causes. I hope this helps.

  • Classic BAdi and New BAdi ...

    Hi all,
    I have a question regarding the new BAdi concept using enhancement spots.
    With the classic BAdi's once we create an implementation it will call up our implementation when the BADI class is been called.
    But with the new concept we have to explicitly call the BAdi we created right ? doesn't this mean modifiying the standard code ( If there's no ehancement section or point )?
    Can someone tell me whether there is another way to call our implementation by using GET BADI and CALL BADI statement without modifying standard code ( by creating an explicit enhancement).
    Cheers,
    D.

    hi,
    Classic and new BAdIs differ in a number of features that are important for migration:
    1. BAdI object
    a. With classic BAdIs, a BAdI object is created by calling a factory method, and referenced via a reference variable of the type of the BAdI interface.
    b. With new BAdIs, a BAdI object is created via the ABAP statement GET BADIas a handle for the calls of BAdI methods, and referenced via a reference variable of the type of the BAdI. A BAdI object is an instance of an internal BAdI class, which otherwise is invisible to the outside.
    2. Passing comparison values for the filter
    a. With the classical BAdIs, the filter values are stored in a structure and passed with the call of the BAdI methods.
    b. With the new BAdIs, the comparison values for the filters used to search for implementations are passed when the BAdI object is created with the GET BADIstatement.
    There is no way of migrating the call of the factory method one-to-one into the ABAP statement, because GET BADI can also return an existing BAdI object, which is not possible with the factory method.
    3. Calling BAdI methods
    Passing comparison values for the filter
    a. A classic BAdI can be called only once and the call positions are registered centrally.
    b. With new BAdIs, multiple calls are possible and the call positions are not registered centrally.
    For the above reasons, an automatic call migration is not possible.
    Have a look at below link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/6f3b42ea85b26be10000000a155106/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/4d3e42fc94aa04e10000000a1550b0/content.htm
    I hope it helps.
    Best Regards,
    Reshma

  • Can we Create Post Good Issue Document as Background Job

    Hi SAP Techies,
    My current projects requires me to run Post Good Issue , as Background Job, Is it possible to do it.If yes
    What is the entire process.
    Regards
    Naveen

    Hi
    The answer to this question lies in transaction VL23.
    You can create a variant and schedule it to run; for example at 10:00 pm every night.
    You need to explore this more but this t-code is the main answer.
    Please reward points if you found this helpful.
    Regards
    SDC

  • Schedule Background job using transaction CATM

    Hi all,
    Since we cannot schedule a background job using transaction CATM, I have created a program calling the CATM transaction through batch-input.
    I have done a recording and entered the coding in a Z-program. For a vendor, I have recorded time in CAT2 for multiple purchase orders.
    After entering the vendor number in CATM, all the purchase orders showed up. I have clicked 'select all' and posted.
    When I run the program in the background, it posts only for one purchase order.
    When I  run the program in the foreground, using the Select All-button it only proceeds with the first line in my list of PO's.
    How to read the whole stack and post the whole stack of purchase orders? 
    Please help me out with this.
    Thanks
    Regards
    Srinivasan Desingh
    408 368 3837

    Hi,
    When I run the program in the background, it posts only for one purchase order.
    When I  run the program in the foreground, using the Select All-button it only proceeds with the first line in my list of PO's.
    See..it's a Z-program so Its difficult to answer without checking the program. But I think, you should check your BDC again from Debugging, with the help of your abaper. You will find, why its is processing only one entry.
    Regards
    Shishir

  • Creating EXCEL documents and background jobs

    Hi there,
    I was wondering whether the method 'SAVE_DOCUMENT_TO_URL' of the interface 'i_oi_spreadsheet' will work when called in a background job with the intention to store the information somewhere on the SAP servers filepath ...
    If so then I would assume that one needs to install both SAPGUI and MS EXCEL on the server to get it actual working?
    Thx,
    Steven

    Yes it does seem silly that there is check like that.  However have a look at the first perform in the function: Create_Spreadsheet.  Right inside of that form there is another perform for get_spreadsheet_interface.  The following is the very first executable line in this perform:
    * don't do anything in batch, because there is no GUI...
      check sy-batch is initial.
    By exiting at this point, l_iref_spreadsheet will be initial and message e893(ux) will be issued.  Based upon that; the if sy-batch is initial around the SAPGUI_PROGRESS_INDICATOR call can never not be true.

  • Background job to create/update vendors.

    Hello,
    We need to create/update vendor records for travel expenses reimbursement. So far we try to create it as background scheduled job for transaction PRAA, but in fact PRAA transaction only creates batch input session and donu2019t process it. In fact we end up with out updates for vendors. 
    Usual manual routine is: 
    Call PRAA to create batch input session for create/update vendor records from HR Master data.
    Call SM35 to process creates batch input session.
    We would like to avoid this manual routine and run it on background as scheduled job. Is it possible? How it possible to combine this 2 processes?
    BR, Maija

    the process can only be run in a two step process.
    You could have a BASIS program that automatically processed all sessions in SM35 with a certain Batch name, this will remove the manual step, however someone will still need to monitor it, as there may be errors.

  • Triggering background job event from Unix script

    Hi all,
      I am having one question regarding triggering of background job in SAP using Events from Unix script. Is this possible? If so, can anyboy provide some sample code related to Unix script and how do we communicate to SAP from Unix system. Actually, here the backend of R/3 system is MSSQL. I am having a program in R/3 system which is scheduled as a background job based upon event trigger. I want to trigger that even from the unix script.
      Appreciate for your help in advance.
    Thanks,
    Adithya K

    Hi,
    Check if this can help you
    http://help.sap.com/saphelp_sm32/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/content.htm
    Regards,
    Atish

  • Please help  me with some questions with batch input session?

    hello everyone.
      I come to some questions  like
    1 What is a batch input session ,
    2  What is the alternative to batch input session?
    3  An ABAP program creates a batch input session.   We need to submit the program and the batch session in back ground. How to do it? 
       would you please help me with the questions, couldn't thank you more.
       Best regards
                                                                          Frank

    Hi
    Batch Input Session:
    BATCH INPUT SESSION is an intermediate step between internal table
    and database table. Data along with the action is stored in session
    ie data for screen fields, to which screen it is passed, program
    name behind it, and how next screen is processed.
    Three processing modes of executing Batch Input Session :-
    Run Visibly : You can correct faulty transactions online & work step-by-step through  the transactions not yet executed.
    Display Errors only : You can correct faulty transactions online.   Transactions not yet executed, but without error, run in the background.
    Run in Background .
    2) What is the alternative to batch input session?
    Call transaction.
    3) An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
    go to SM36 and create background job by giving
         job name,job class and job steps (JOB SCHEDULING)

  • How to run the Batch input session(SM35) in background thru Report program

    Hi Experts,
    I am working in one modification report requirement ,the report is Mass upload will update and run the file via batch input session. The client requirement is to implement the report execution in background mode , the batch input session will process automatically (ie. the job runs the batch input session in background and process the session ends).
    Currently, the report calls SM35 to write a batch input session and the user manually selects the session and record the transactions.
    Once the Transaction enters and the selection-screen inputs are given, then the transaction executed in background mode and all the above batch input process to be implemented.
    Please advise and guide me, how to proceed.
    I need your guidance to proceed via Call transaction using bdcdata statement, if it can be achieved the requirement.
    Thanks & Regards
    San.

    Hi Arabind Prasad,
    Thanks for your inputs.
    I know the process of the report Execution in background and job steps.
    I want the inputs for how to upload thru Batch input session in background job and the session should also processed automatically
    Currently the report logic declared like call transaction 'SM35' and skip first screen.Once the report (tcode) executed (not in background) It writes one session in SM35. The user should select the session and process the transaction manually.
    The new requirement is, if the report (tcode) executes in background mode...what and how the batch input session should be declared and how it process automatically (like you said mode 'N').
    Hope I am clear in my query.
    Please advise.
    Regards
    San.
    Edited by: San Learner on Mar 1, 2011 7:16 PM

  • Batch input session in background BDC

    Hi to all,
    Please clarify me about below BDC point.
    Call to the transaction should be in background through batch input session. does It mean that we have to use session method and call this in back ground through RSBDCSUB, is this approach is correct or some thing else i  nend to do.Please tell me briefley.
    I want to track all the errors, how to track the errrors with out using call tranaction.
    could any one help me on this issue please.
    Regards
    Raadha

    Hi,
    as per your approach is correct in BDC session method ,in session method generally you want run the bdc in backgroung using in RSBDCSUB is used for scheduling .
    in program after writing bdc_close_group ,just use submit statement and schedule the background.
    and generally in session method  execute the program and going to the sm35 selcting particular session name manually processing that session,when schedule rsbdcsub it is directly going to the background screen ,then give the session name and run the program.
    Regards,
    Madhu

Maybe you are looking for

  • Af:commandToolbarButton to open a link but not navigate away from taskflow

    I would like to be able to have the following - a commandToolbarButton that when clicked upon downloads a document (by a simple URL call whos http response tells the browser to download the file, not open it) - when click on the arrow on the right of

  • My Time Capsule no longer backups my MacBook automatically.

    I use my Time Capsule to back up two MacBook Pro's. It seems to work fine one moment and then not at all the next moment. For example, several days ago I was using both MadBooks and they were being backed up regularly by the time capsule. Yesterday a

  • Unknown Album appearing in Album view

    Hi, Minor frustration - in the 'Albums' view on my iPhone, a couple of 'Unknown Albums' appear - these are songs that have been stripped of their Album and Sort Album information, but which are still showing up under 'Albums'. They were purchased fro

  • Why can't I drag a new library audiobook from my MacBook to my iPhone to listen to anymore?

    I keep lots of audiobooks on my computer; and & when I'm ready to listen to them, I drag them onto my current device, which in this case, is my iPhone 5. But this morning it wouldn't drag. Help! I just got 4 great books from the library and want to h

  • Weird IP packets

    Not a specific Linux issue (though we do detect it via our s/w on Linux) - but I'm hoping someone can perhaps provide a URL pointer or something on the issue that can shed some light (my googling did not uncover something similar or an explanation as