Call Transaction in background mode

Hi everyone,
What I am currently trying to do is to perform a 'call transaction' while forcing the 'background processing' mode even when the user is running the program in online mode; this allows me to retrieve a lot more messages that are useful to the user than the messages generated in online mode.
As long as I have seen there is no field for that in the options table that can be passed to the 'call transaction' sentence. The only way to see that behavior while in online mode is by 'playing back' a recording thru the SHDB transaction and checking the 'Simulate background' option.
My first attempt was to set the SY-BATCH flag before doing the call transaction but it doesn't work, the flag seems to reset itself with the correct value during the call.
Any comments on this would be greatly appreciated.
Regards,
Sergio

You would have to create a job on the fly to do this.  This example shows how to kick off a background job via an ABAP program.
report zrich_0004 .
data:   sdate type sy-datum,
        stime type sy-uzeit,
        l_valid,
        ls_params like pri_params,
        l_jobcount like tbtcjob-jobcount,
        l_jobname  like tbtcjob-jobname.
start-of-selection.
* Get Print Parameters
  call function 'GET_PRINT_PARAMETERS'
       exporting
            no_dialog      = 'X'
       importing
            valid          = l_valid
            out_parameters = ls_params.
* Open Job
  l_jobname = 'ZRICH_0005'.
  call function 'JOB_OPEN'
       exporting
            jobname  = l_jobname
       importing
            jobcount = l_jobcount.
* Submit report to job
  submit zrich_0005   
       via job     l_jobname
           number  l_jobcount
       to sap-spool without spool dynpro
           spool parameters ls_params
              and return.
* Schedule and close job.
  call function 'JOB_CLOSE'
       exporting
            jobcount  = l_jobcount
            jobname   = l_jobname
            strtimmed = 'X'

Similar Messages

  • 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

  • Call transaction in test mode

    Dear Folks!
    Is there a way to do something like a call transaction in test mode?
    What I need is to check the data of the file and return a log of the errors that this file would give if executed in call transaction, before executing it for real in the production environment.
    Thanks in advance for any help.
    Kind Regards,
    Gilberto Li

    Hello Gilberto
    Yes, it <i>is possible</i> to run transaction in test mode using <b>eCATT</b>.
    Here is the procedure for transaction ME21N (please note that this transaction has a "CHECK" button to validate the input data):
    - First I created an eCATT testscript and chose pattern TCD (Record) with transaction ME21N.
    - Within the recorded transaction I only entered the vendor and then pushed the CHECK button (-> popup appears with all messages)
    - Next I cancelled the transaction without saving the purchase order and saved the recording within the testscript
    - Then I surrounded the TCD recording with a MESSAGE...ENDMESSAGE block:
    MESSAGE ( MSG_1 ).
      TCD ( ME21N , ME21N_1 ).
    ENDMESSAGE ( E_MSG_1 ).
    Now if you run the testscript you will see all the messages collected thus far within the recorded transaction in the<b> eCATT log</b>.
    I admit that this approach will not work for all transactions. However, it may be useful for testing many transactions.
    Regards
      Uwe

  • Debugg VL10 transaction in background mode

    Hi,
    I want to know how to debugg VL10 transaction in background mode. Since the control does not go to the breakpoint when clicked on background.

    Hi,
    Try this option..
    In classical debugger ..Click settings and check the last option,In back ground task.
    Cheers,

  • Call transaction in background in report

    I have a report in which I call a transaction, but the requirement is that I have to call it in background.
    Can you please suggest how I can achieve this.
    <removed_by_moderator>
    Edited by: Julius Bussche on Aug 26, 2008 3:20 PM

    Hi charles,
    Use the mode 'N'
    Example:-
    DATA:
      fs_opt TYPE ctu_params.
      fs_opt-dismode = 'N'.
        CALL TRANSACTION 'PA30'  USING t_bdcdata OPTIONS FROM fs_opt.
    Luck,
    Bhumika

  • CALL Transaction in background not working pls help URGENT

    hi i have writtin a bdc program which uses CALL TRSANCTION everything is working in foreground.
    if i schedule the program in background the call transaction does not work. any idea why?????????
    pls help its urgent

    hi
    good
    have you checked in the debug mode, if you have checked in the debug mode check wheather it is giving any error before data is displaying in the screen, if any error is displaying as a message than check that error why it is coming there.
    If no error is coming than check your flow of the bdc screen in the debug mode , there must be some prob, so that it is not working in the background.
    thanks
    mrutyun^

  • Call transaction in N mode

    Hi,
    I have used BDC Call transaction method in N(background) mode from my report.
    But when the report itself,  is run in background, then the BDC is not working.
    Please help. I must run the report in background as well.
    Thanks&Regards
    Ananya Mukherjee

    I faced the same issue while running a BDC for a custom transaction. It was working fine in foreground, but not in background with error log message "Object Reference Not Assigned". Later, we found out that, it was due to some HTML text editors and inplace excel displays, which interact with foreground processes and can't run in background.
    Kindly check the error log of the BDC. Write the errors in application server or in report output using WRITE statement, so that you can check it in spool.
    In your custom dialog program check for any inplace document displays, HTML text editors or GUI functionalities. If it's due to GUI functionalities only, run the piece of code responsible for the GUI , only when sy-batch NE X in your main dialog program.

  • Call Transaction in Background for IW52

    Hi All..
    When i execute my BDC (Call Transaction) in foreground, the code will update IW52 screens without any errors/warnings.
    But if we schedule this in background, the IW52 screens are not getting updated.
    Even there are no Errors observed.
    We have used the syntax as follows..
    CALL Transaction IW52 using it_bdcdata MODE 'N' messages into it_bdcmsg.
    Can anyone help me how to rectify it and make it to execute successfully in background mode..??
    Your Help will be highly appreciated..
    Regards
    Pavan

    Hello Friends...
    I am running a call Transaction code in Background mode.
    I am facing Error message..
    If i run the same in foreground, it is working fine...
    Error Message is "No Batch Input data for screen <SAPNV screen No>"
    Expecting your guidence in this case...
    Regards
    Pavan
    Message was edited by:
            Pavan Sanganal

  • Not able to execute custom transaction in Background mode

    Dear All,
    There is a custom modele pool program to update the data in info type 9003. We have written a Z program in that we are calling this custom modele pool through CALL TRANSACTION with mode 'N' and update 'S'.
    Z Program is running successfully and updating data in 9003 info type when we run in foreground mode.
    But it is not updating when runs in Background mode.
    Am I need to take any other precautions when run in background mode for custom transaction?
    We are using 4.6C version.
    Thanks in advance.
    Regards,
    Abaper

    For custom transactions you shouldn't have a problem - unless you're trying to do something that needs dialog with the presentation server.
    Set an infinite loop in the custom transaction, launch your program in backround, then from Sm50, go to debug and find out what's going on.
    DATA: debug.
    WHILE debug IS INITIAL. " Debug from SM50 will get you here, change field DEBUG in the
    ENDWHILE.               " debugger to contain 'X', and the loop will end.
    Also, if your custom tx calls any standard SAP programs/FM, there is a chance that those programs work differently in background than foreground.

  • Transaction in background mode

    Hi experts,
    is it possible to execute transaction VT01N in background mode ?
    This doesn't seem to work with ERP2005 ...
    CALL TRANSACTION 'VT01N' USING bdcdata MODE 'N' UPDATE 'S'
    Thanks for support.
    David.

    HI,
    yes it is possible.
    for more information please check out the link below it will help you
    http://www.s001.org/ABAP-Hlp/abapcall_transaction.htm
    ***********please reward points if the information is helpful to you************

  • Require Job name in SM37 while executing call transaction in background

    Hi all,
    I am executing a report program, which contains Call transaction.
    I have recorded properly. The recording contains background job screen also ( means a separate popup came and i gave the job name and i gave immediately )
    When i execute in this program in foreground its creating job,its showing the job in sm37.
    But when i execute this program in background, it does not showing the job name in sm37.
    Anyone kindly help this out?
    Anandhab

    Hi,
    The job will be created by the step level user.
    Try searching again with jobname and * for username.
    Regards,
    Jovito

  • Call Transaction in foreground mode

    Dear friends,
    I am calling a transaction from a program inside a loop using CALL TRANSACTION statement in foreground mode.
    After processing that transaction, i need to get the control back to the loop for processing next record.
    Whether this is possible?
    Thanks,

    Tthe control will come back to the loop for processing next record but only if the transaction runs according to the recording without any error messages else it will stop at the particular screen since its running in foreground mode . Also make sure you refresh the BDCDATA for each loop pass.

  • "Call Transaction" in Simulate Mode?

    Hi All,
    Is there a way to use "CALL TRANSACTION" in a Simulation Mode, I mean get the messages back without any COMITT or Updates performed?
    Thanks in advance for your help.

    Srinivas -  to me, there's two stages to writing a BDC program. The first is getting the program that creates the BDC correct. The second is getting the BDC itself correct.
    Let's say you are writing a program that reads a file of vendor data and creates a BDC that creates or changes vendors. The program works well, creates a session and when you run the session, half of the updates fail due to a problem with the program. So you change the program, but then what? If you rerun the program with the same file, you won't necessarily get the same results as if you'd run the changed program with the file the first time because the database was changed by the first BDC.
    Also when posting financial transactions, users like to check the final balance to ensure that it matches what they expect. If the BDC has run more than once, the balance won't be what they expect.
    Having said all that, I do find this to be more work than I really care to do. So now, I generally skip this and watch the transactions go by in 'A' mode without pressing 'save'.
    Additionally, some transactions do have a 'simulate' button that can be pressed instead of 'back'. This would give a better idea of how the transaction would behave.
    Rob

  • MIGO-Error when MIGO is execute by call transaction on background

    When we execute MIGO_TR or MIGO_GI in call transaction, this error is showed.
    "RAISE_EXCEPTION" " "                                                      
    "CL_GUI_CUSTOM_CONTAINER=======CP" or "CL_GUI_CUSTOM_CONTAINER=======CM001"
    "CONSTRUCTOR"  
    Is there any alternate function available for the MIGO  and avoiding the same error.
    Thanks in advance.
    Walter

    Hi Walter,
    MIGO is a SAP Enjoy transaction so BDC is not supported on the same.
    Regards,
    Atish

  • BDC VA01 in background mode error

    Hi ,
    I am psoting data into VA01 using BDC call transaction in background mode for two cases.
    For one it is running successfully and for the other it is not.
    I have compared the data in the table BDCDATA for both the cases and it is same.
    Then I tried debugging in foreground mode and the same case which was not running earlier is running in foreground mode.
    Please advice what could be the problem?

    >
    ABHI wrote:
    > I am getting the following messages:
    >
    >
    >
    > TCODE     DYNAME     DYNUMB     MSGTYP     MSGID     MSGNR     MSGV1     MSGV2     MSGV3     ENV
    > VA01     SAPMV45A     4001     W     VU     1          Purchase order date          CTU
    > VA01     SAPMV45A     4001     W     V1     221     5/27/2010               CTU
    > VA01     SAPMV45A     103     I     V1     81                    CD
    > VA01     SAPMSSY3     131     S     0     344     SAPMSSY3     131          CTU
    Hello ABHI,
    The problem is because of some breakpoints created by you. So it is entering it to debugger in the background mode which cannot be handled by the BDC. Delete all your breakpoints before testing or open a new logon session to test it in background.
    Hope this solves your problem.
    Regards,
    Karthik D

Maybe you are looking for

  • Adobe Air 2 not working in Ubuntu 10.04 32Bits

    Hello, i just installed Adobe Air 2 from .deb file and later from .bin file, but is not working in my Ubuntu, i dont know what is really happening cus i dont get any error message. Do someone knows what is going wrong?

  • After Upgrade To SL Software Update Shows Fewer Items?

    I upgraded from Leopard a couple of days ago and opened SU. To my surprise, the long list of items I had previously chosen not to update had shrunk to 9. I can understand essential system items being updated during the upgrade but there were many app

  • Cf builder 2.0.1  has MS SQL 2008 connection error

    when i try to create Apptacular generation   with Mssql 2008  and msAccess  :  on  CfBuilder2.0.1 An Error has occured. Message:Element IDENTITY.IDENTITY is undefined in a CFML structure referenced as part of an expression. Details: this issue writte

  • When trying to reformat my 5th gen Ipod classic, windows tells me that it is "unable to complete the format". Help?

    My Ipod started making the frowny face at me and telling me to go to support, I plugged it in to my PC and was told that the device needed to be reformatted. I attempted to do so, the quick format fails right away, and when I try to do a regular form

  • MII 12.1 business scenario

    Hi in Master guide stated To implement the following SAP MII business scenarios, you must use SAP ECC 6.0 or higher: - Shop Floor Quality Integration - Content Versioning - Transactions for BAPI Consumption 1. Shop Floor Quality Integration (is this