Execute CALL TRANSACTION in the background....

Hi,
I want to use CALL TRANSACTION in a report program and execute this report in the background.
There is not GUI_UPLOAD / GUI_DOWNLOAD used anywhere.
Can someone suggest me what precaution I need to take in my code for CALL TRANSACTION?
Is there any additional code for background processing?
Thanks.

hi,
this is the sample code:
Precations need to take :
1. see that u r transfer tha data in correct field, on correct screen, and of correct format.
2. capture the error logs in bdcmsgcoll - error logs have to be handle.
3. ensure correct recording.
in selection screen you can mention in which mode u want :
A     Display all screens
E     Display errors
N     Background processing
P     Background processing; debugging possible
This is the sample code:
& Report  ZKO01_BDC                                                       &
& Object Id       :                                                       &
& Object Name     : ZKO01_BDC                                             &
& Program Name    : ZKO01_BDC                                             &
& Transaction Code: ZKO01_BDC                                             &
& Module Name     : FI / CO                                               &
& Program Type    : BDC Program      Create Date     : 23.06.2008         &
& SAP Release     : 6.0              Transport No    :                    &
& Description     : BDC to upload internal order with indernal assignment &
& Version         : 1.0.                                                  &
& Changed on      :                                                       &
report zko01_bdc
       no standard page heading line-size 255.
types: begin of record,
        auart_001(004),
        ktext_002(040),
        bukrs_003(004),
        werks_004(004),      " ADDED NEW - RAHUL SHINDE
        scope_005(010),
        prctr_006(004),      " ADDED NEW - RAHUL SHINDE
        waers_007(005),
        astkz_008(001),
        plint_009(001),
      end of record.
types: begin of ty_stats,
       mess(72) type c,
       auart_001(004),
       text(18) type c,
       end of ty_stats.
data : it_record type table of record,
        wa_record like line of it_record.
data: bdcdata type table of bdcdata,
      mestab type table of bdcmsgcoll.
data : stats type table of ty_stats.
data: opt type ctu_params.
data: m(72) type c.
data : fl_name type string.
data :  wa_bdcdata like line of bdcdata,
        wa_mestab like line of mestab.
data :  wa_stats like line of stats.
data:   ctumode like ctu_params-dismode.
data:   cupdate like ctu_params-updmode.
data: file type  rlgrap-filename.
data: xcel type table of alsmex_tabline with header line.
data: mod1(1) type c.
initialization.
opt-dismode = 'A'.
opt-updmode = 'S'.
opt-nobinpt = 'X'.   "No batch input mode
                    Selection Screen
selection-screen begin of block bk1 with frame.
selection-screen skip 1.
parameters p_file type localfile. " default 'D:\Common\PWC\Asset BDC\Book2.xls'.
parameters p_mode like ctu_params-dismode obligatory.
selection-screen skip 1.
selection-screen end of block bk1.
file = p_file.
mod1 = p_mode.
at selection-screen on value-request for p_file.
  call function 'KD_GET_FILENAME_ON_F4'
       exporting
            static    = 'X'
       changing
            file_name = p_file.
                    Selection Screen
start-of-selection.
file = p_file.
ctumode = mod1.
cupdate = 'L'.
  call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       exporting
            filename                = file
            i_begin_col             = '1'
            i_begin_row             = '1'
            i_end_col               = '100'
            i_end_row               = '5000'
       tables
            intern                  = xcel
       exceptions
            inconsistent_parameters = 1
            upload_ole              = 2
            others                  = 3.
loop at xcel.
  case xcel-col.
    when '0001'.
        wa_record-auart_001 = xcel-value.      "ok
    when '0002'.
        wa_record-ktext_002 = xcel-value.      "ok
    when '0003'.
        wa_record-bukrs_003 = xcel-value.      "ok
    when '0004'.
        wa_record-werks_004 = xcel-value.      "ok
    when '0005'.
        wa_record-scope_005 = xcel-value.      "ok
   when '0005'.
       wa_record-KTEXT_005 = xcel-value.    "ok
    when '0006'.
        wa_record-prctr_006 = xcel-value.      "ok
    when '0007'.
        wa_record-waers_007 = xcel-value.      "ok
    when '0008'.
        wa_record-astkz_008 = xcel-value.      "ok
    when '0009'.
        wa_record-plint_009 = xcel-value.      "ok
  endcase.
  at end of row.
    append wa_record to it_record.
    clear wa_record.
  endat.
endloop.
loop at it_record into wa_record.
perform bdc_dynpro      using 'SAPMKAUF' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'COAS-AUART'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'COAS-AUART'
                              wa_record-auart_001.
perform bdc_dynpro      using 'SAPMKAUF' '0600'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BUT2'.
perform bdc_field       using 'COAS-KTEXT'
                              wa_record-ktext_002.
perform bdc_field       using 'BDC_CURSOR'
                              'COAS-SCOPE'.
perform bdc_field       using 'COAS-BUKRS'
                              wa_record-bukrs_003.
perform bdc_field       using 'COAS-WERKS'
                              wa_record-werks_004.
perform bdc_field       using 'COAS-SCOPE'
                              wa_record-scope_005.
perform bdc_field       using 'COAS-PRCTR'
                              wa_record-prctr_006.
perform bdc_dynpro      using 'SAPMKAUF' '0600'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SICH'.
*perform bdc_field       using 'COAS-KTEXT'
                             wa_record-KTEXT_005.
perform bdc_field       using 'BDC_CURSOR'
                              'COAS-PLINT'.
perform bdc_field       using 'COAS-WAERS'
                              wa_record-waers_007.
perform bdc_field       using 'COAS-ASTKZ'
                              wa_record-astkz_008.
perform bdc_field       using 'COAS-PLINT'
                              wa_record-plint_009.
call transaction 'KO01' using bdcdata
                        options from opt
                        messages into mestab.
*PERFORM loggs.
clear wa_record.
refresh bdcdata.
endloop.
end-of-selection.
clear : wa_stats.
if stats is initial.
    write :/ text-001.
else.
  loop at stats into wa_stats.                         "displays runtime messages
    write:/ 'MESSAGE  :',wa_stats-auart_001.
    if wa_stats-auart_001 is not initial.
    write:/ wa_stats-auart_001,  wa_stats-text.
    endif.
    skip 1.
  endloop.
endif.
*&  FORMS BDC_DYNPRO
form bdc_dynpro using program dynpro.
  clear wa_bdcdata.
  wa_bdcdata-program  = program.
  wa_bdcdata-dynpro   = dynpro.
  wa_bdcdata-dynbegin = 'X'.
  append wa_bdcdata to bdcdata..
endform.
  FORM BDC_FIELD                                                 *
form bdc_field using fnam fval.
    clear wa_bdcdata.
    wa_bdcdata-fnam = fnam.
    wa_bdcdata-fval = fval.
    append wa_bdcdata to bdcdata..
endform.
*&      Form  loggs
      text
-->  p1        text
<--  p2        text
form loggs .
loop at mestab into wa_mestab.
    if wa_mestab-msgtyp = 'E'.
      call function 'FORMAT_MESSAGE'
        exporting
          id        = wa_mestab-msgid
          lang      = 'E'
          no        = wa_mestab-msgnr
          v1        = wa_mestab-msgv1
          v2        = wa_mestab-msgv2
          v3        = wa_mestab-msgv3
          v4        = wa_mestab-msgv4
        importing
          msg       = m
        exceptions
          not_found = 1
          others    = 2.
      wa_stats-mess = m.
      wa_stats-text = text-001.            "'Not Created'.
      wa_stats-auart_001 = wa_record-auart_001.
      "wa_stats-sernr = wa_flat-sernr.
      append wa_stats to stats.
    elseif wa_mestab-msgtyp = 'S'.
      call function 'FORMAT_MESSAGE'
        exporting
          id        = wa_mestab-msgid
          lang      = 'E'
          no        = wa_mestab-msgnr
          v1        = wa_mestab-msgv1
          v2        = wa_mestab-msgv2
          v3        = wa_mestab-msgv3
          v4        = wa_mestab-msgv4
        importing
          msg       = m
        exceptions
          not_found = 1
          others    = 2.
      if wa_mestab-dyname = 'SAPMIEQ0'
                                and wa_mestab-dynumb = '0101'
                                and wa_mestab-msgspra = 'E'
                                and wa_mestab-msgid = 'IS'
                                and wa_mestab-msgnr = '144'.
        loop at stats into wa_stats where auart_001 = wa_record-auart_001.
                                      "and sernr = wa_flat-sernr.
             delete stats.
        endloop.
            clear : wa_stats.
            wa_stats-mess = m.
            append wa_stats to stats.
      endif.
    endif.
    clear : wa_stats.
  endloop.
endform.                    " loggs
Edited by: Naseeruddin on Nov 26, 2008 8:57 AM

Similar Messages

  • How to set the BDC Call transaction Program in Background

    Hi All,
            I have a requirement. If i execute a BDC Call Transaction Program in Background it is showing 0 seconds means it is not executing. Normally it is working properly. If execute in background it is not executing. But my client wnats to execute in background. How can i overcome this could you please suggest me?
    Thanks in Advance

    hi
    To schedule the processing of session in backgroud you can use report RSBDCSUB.
    You can do in two ways -
    Ist Method
    Define a batch job in SM36 with two steps -
    First Step - Your Custom Program ( with a variant )
    Second Step - RSBDCSUB ( With a variant having
    the session name ).
    2nd Method
    In your program after BDC_CLOSE_GROUP add a line.
    SUBMIT RSBDCSUB WITH MAPPE EQ <SESSION_NAME>.
    Scedule you program as a batch job in SM36 ( Single Step ). ( You can also test the program by running in online mode . After your programs executes , go and see in SM35. You will see that your session created in being processed or has been processed in background).
    In Both ways the session created by BDC_OPEN_GROUP will be processed in background
    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.
    regards
    Satish

  • Run the SOST transaction in the Background with, or without, a BDC

    Hello all,
    I was trying to write a Z-Program that would create a BDC that executed Transaction SOST to resend fax messages.  It turned out that I could not record the ALV Grid that contains most of the selection/filter criteria functions because those functions exist in the ALV Grid.  Some fields exist above the ALV Grid and could be recorded. I record them and used them in my BDC to filter for the faxes I wished sent.  I also used a saved layout for the filtering I would have applied if I cold have recorded the ALV Grid.
    All seemed well in testing until I attempted to run my Z-Program in the Background.  The Z-Program creates the BDC which in tern executes the resending of faxes.  I did not realize that the SOST transaction had a completely different screen layout in the Background.  That was something pointed out to me when I was instructed to Record the BDC in "Simulate Background Mode".  It doesn't seem like I can enter selection criteria in the Background version of the screen at all.
    Has anyone been able to run the SOST transaction in the Background with, or without, a BDC?  If not has anyone ever automated the SOST functionality in a Z-Program?  Can SOST run in the background at all?
    Thanks

    Hi,
    try to resend it using program RSCONN01.
    Regards,
    Adrian

  • Call transaction in the popup screen

    hi friends . ı want to call transaction in the popup screen.
    what do ı do ?
    thanks.

    to call a transaction in the popup screen
    can u give me one scenerio
    because
    try this
    create a program of type report
    in that "call screen '100' starting 10 10 ending at 100 100.
    and u click on this 100  and make the layout what ever u want
    and just go to se93 create transaction for this report program
    thats it
    if it ok
    then ur problem is solved
    or else it is not solved

  • Web Dynpro ABAP call transaction in the foreground

    In Screen Painter/SAP ALV, we can create a screen where for example if you double click on a sales order field it can take you a VA03 transaction by :
    call transaction VA03 ... and skip first screen.
    I am creating Web Dynpro ABAP application that needs to do the same thing where if we click on the field, it will take to VA03 transaction or other transactions.
    Has anyone done this in Web Dynpro ABAP? I have done some research and determine that we cannot call transaction in the foreground? I hope I am wrong.  Any help/insights will be greatly appreciated.

    Hi Phong,
    WDA is generic client to Netweaver connection based on HTTP/S.
    At this stage on a few clients are supported. WEB dynpro client and Browsers...
    SAPGUI connects to SAP using a different protocol.
    No SAPGUI connection is implied by a WDA client connection.
    Therefore  abap statements that invoke screens and otherwise assume SAPGUI
    is connected are not supported in WDA.   eg call screen, call transaction
    You can either
                         a) build your own WDC to front end calls to BAPIs to get the Sales order data.
                        b) open/ exit to the new WDC for Sales Orders in ERP2005
                              see LORD_MAINTAIN_COMP
                           c) exit to the INTERNAL ITS URL for transaction VA03 
                               eg http://<host>:<port>/sap/bc/gui/sap/its/webgui?~Transaction=VA03
                              but getting the skip first screen may require you to call custom tran ZVA03
                               which calls VA03 to skip first screen setting the PID appropriately.
    Hopefully you opt for option a) or b).
    c) can work... I have used it from BSPs but it not pretty.
    regards
    Phil

  • 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 from the ABAP report

    Hi Gurus,
    Please help me with suggestion. I would like to access from SAP report with double click transaction FB03. I can access it, but in old transaction view ... How can I get the new transaction view?
    Here is the code,
    BR
    Saso
    IF fieldname CS 'BELNR'.
      PERFORM bdc_screen USING 'SAPMF05L' '100'.
          PERFORM bdc_field USING 'RF05L-BELNR' fieldvalue.
          PERFORM bdc_field USING 'RF05L-BUKRS' '0008'.
          PERFORM bdc_field USING 'RF05L-GJAHR' int-gjahr.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
          CALL TRANSACTION 'FB03' USING bdc_data MODE 'E'.
          REFRESH bdc_data.
    ENDIF

    Try this Example:
    REPORT  ZABHI_TABSTRIP NO STANDARD PAGE HEADING
                 LINE-SIZE 80 LINE-COUNT 60.
    TABLES : sscrfields.
    DATA  activetab(6) TYPE c .
    DATA  mat_des TYPE makt-maktx.
    DATA  pl_des  TYPE t001w-name1 .
    DATA  mat_gro  TYPE mara-mbrsh .
    DATA  mat_typ  TYPE mara-mtart .
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-010 FOR FIELD matnr.
    PARAMETERS matnr TYPE mara-matnr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-020 FOR FIELD matnr.
    PARAMETERS werks TYPE t001w-werks.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block2.
    SELECTION-SCREEN END OF SCREEN 002.
    SELECTION-SCREEN BEGIN OF SCREEN 003 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block3 WITH FRAME TITLE text-004 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-030 FOR FIELD matnr.
    PARAMETERS mbrsh TYPE mara-mbrsh.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block3.
    SELECTION-SCREEN END OF SCREEN 003.
    SELECTION-SCREEN BEGIN OF SCREEN 004 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block4 WITH FRAME TITLE text-005 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-005 FOR FIELD matnr.
    PARAMETERS mtart TYPE mara-mtart.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block4.
    SELECTION-SCREEN END OF SCREEN 004.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1
                                        DEFAULT SCREEN 002.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2 .
    SELECTION-SCREEN TAB (15) tabs3 USER-COMMAND ucomm3.
    SELECTION-SCREEN TAB (15) tabs4 USER-COMMAND ucomm4.
    *                     DEFAULT SCREEN 002   .
    SELECTION-SCREEN END OF BLOCK tabb1.
    INITIALIZATION.
       tabs1 = text-002.
       tabs2 = text-003.
       tabs3 = text-004.
       tabs4 = text-005.
       activetab = 'TABS1'.
    AT SELECTION-SCREEN .
       CASE sscrfields-ucomm.
         WHEN 'UCOMM1'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 001.
           tabb1-activetab = 'TABS1'.
           activetab = 'TABS1' .
         WHEN 'UCOMM2'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 002.
           tabb1-activetab = 'TABS2'.
           activetab = 'TABS2'.
            WHEN 'UCOMM3'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 003.
           tabb1-activetab = 'TABS3'.
           activetab = 'TABS3'.
            WHEN 'UCOMM4'.
           tabb1-prog = sy-repid.
           tabb1-dynnr   = 004.
           tabb1-activetab = 'TABS4'.
           activetab = 'TABS4'.
       ENDCASE.
    START-OF-SELECTION.
       CASE activetab.
         WHEN 'TABS1'.
           SELECT SINGLE maktx  FROM makt INTO pl_des WHERE matnr = matnr.
           WRITE: 'Material ' , matnr , mat_des .
           WHEN 'TABS2'.
           SELECT SINGLE name1  FROM t001w INTO pl_des WHERE werks = werks.
           WRITE: 'Plant ' , werks ,pl_des.
         WHEN 'TABS3'.
           SELECT SINGLE mbrsh  FROM mara INTO mat_gro WHERE mbrsh = mbrsh.
           WRITE: 'Material Group ' , mbrsh ,mat_gro.
           WHEN 'TABS4'.
           SELECT SINGLE mtart  FROM mara INTO  mat_typ WHERE mtart = mtart.
           WRITE: 'Material Type ' , mtart , mat_typ.
           ENDCASE.
    And let me know.

  • How do I execute a vi in the background and pass it starup pramaters?

    I would like to create a queue and pass it's handle to a subvi that runs in the background. I see several examples of running a vi in the background using the vi server, but I could not find any examples of running in the background and passing startup arguments.

    Hi,
    you can do following: Create your subVI with the needet connectors (queue
    and startup parameters perhaps) and insert a loop, which ends when the queue
    is destroyed. Insert shift registers an initialize them with you start
    parameters. During execution update the shift registers with the new values.
    Now create the main VI and place a create queue. Wire the outgoing queue
    reference to the subVI and a new loop.
    So your subVI starts running and the loop is executing parallel. To stop the
    program just destroy the queue inside the main loop and your subVI will also
    stop.
    I hope it will plain enought for you...
    greets
    Henrik
    N. Blaine Morgan schrieb in im Newsbeitrag:
    [email protected]..
    > I would like to create
    a queue and pass it's handle to a subvi that
    > runs in the background. I see several examples of running a vi in the
    > background using the vi server, but I could not find any examples of
    > running in the background and passing startup arguments.

  • How to call transaction MRKO in background

    Hi All,
    I want to call transaction MRKO in foreground step in workflow.
    After calling transaction I want to get the posted document number.
    I do not have any information prior to calling transaction regarding input fields for MRKO. User can put anything and settle consignment.
    Next step in workflow needs information, like posted document number from MRKO to do further processing ..
    How can I achieve this?
    Thanks ,
    Vinaya.

    Hi,
    you have to define a handler for the event hotspot_click of class CL_GUI_ALV_GRID, if you are using that class. If you are using class CL_SALV_TABLE maybe class CL_SALV_EVENTS_TABLE may help you.
    Regards,
    Klaus

  • Call transaction & leave the current screen

    Hi
    I have created two Table maintanence Generator one for master table & second for transaction table. In my master table i have written code for calling the second TMG
    ie, call transaction 'zhdms'.
    but my problem is from my first TMG when im clicking on one button it calling the second TMG. & im making new entries over der & when i click on BACK button it will call the first TMG  & again if i am clicking on Next button it will move on to second screen. but it is showing one information like DEveloper is locked. we can only display it. how to avoid this.
    Can we avoid this using leave screen . How to write code for that.

    Hi ,
    Try this
    CALL TRANSACTION AND SKIP FIRST SCREEN.
    Effect
    Skips the first screen in the transaction (provided all the required fields have been assigned values by the SPA/GPA mechanism).
    or
    LEAVE TO { {TRANSACTION tcod} | {CURRENT TRANSACTION} } AND SKIP FIRST SCREEN.
    Effect
    Ends current processing and starts the (new) transaction tcod. All previous internal sessions are deleted from the stack and one new internal session is opened for the program of the transaction that was called. When this session has finished, the system returns to the next higher area menu.
    If you specify CURRENT TRANSACTION (as of Release 6.20), the current transaction is called with exactly the same transaction code it was called with using CALL TRANSACTION or LEAVE TO TRANSACTION. With the exception of parameter or variant transactions, this is the transaction code that is also in the system field sy-tcode.. In the case of parameter or variant transactions, it is their transaction code, while sy-tcode contains the name of the implicitly-called dialog transaction.
    Regards,
    Chitra.

  • Second transaction in the background in an EJB3 application?

    Hi!
    Is there any way (preferrably with container-managed persistence, but even manually) to implement 2 transactions in EJB3 that fullfil the following criteria:
    a)
    pseudo-code:
    T1 {
    doSomething1
    start T2 in background
    doSomething2
    commit
    T2 {
    doSomething
    commit
    b)
    conditions: T2 "depends" on T1 in the sense that
    1. T2 starts during T1
    2. if T1 is rolled back ==> T2 must be rolled back, too
    (==> this implies: T2 ends after T1 OR T2 waits for T1 to finish before committing)
    3. if T2 is rolled back ==> doesn't cause T1 to rollback
    c)
    graphically: (intended for viewing with a fixed-width font)
    ("_" = "commit", "." = waiting)
    T1
    [ ]---> T2
    OR
    T1
    [ ]---> T2
    [_]      _The hardest part seems to me to make T2 wait until T1 finishes (in the otherwise unlikely but possible case that T1 finishes first). You can safely presume that the two transactions run on the same JVM, but of course a solution that doesn't rely on this presumption would be even better.
    I have tried to find ways for T2 to somehow monitor T1, but on my first half-hearted try I couldn't find anything.
    Any ideas?
    Thanks,
    Agoston
    Edited by: 994954 on Mar 19, 2013 11:36 PM

    2. if T1 is rolled back ==> T2 must be rolled back, tooI don't think that's possible, the nested transaction is going to be isolated. Otherwise what would be the point of creating it!
    The hardest part seems to me to make T2 wait until T1 finishesImplying that T2 is created in a different thread, otherwise T1 would be suspended until T2 finishes in a normal container managed transaction environment. Why thread them when it matters in which order they finish?
    I have tried to find ways for T2 to somehow monitor T1, but on my first half-hearted try I couldn't find anythingPerhaps because you've been looking in the context of EJB technology, while you should have been researching 'java concurrency'.

  • In the background process field tcode is clean

    Executing a transaction in the background field tcode is clean.
    For example the transaction mir11 run in the background does not fill the field BKPG-TCODE as it happens running online.
    there 'a solution?
    thanks

    Hi Prashant,
    I know that the value is empty.
    I need for example, because there are rules that check the TCODE to control (user exit), replacements and / or validation.
    These work online while in the background is not.
    Moreover, in the transaction MR11, sap record documents setting the transaction who created (BKPF-TCODE) and there is a check for the transfer (MR11SHOW) which controls the TCODE to do other things.
    However I would also like to know if there is a rule or SAP note clarifying that the TCODE is never set in the background and that can not be used so as to seek other solutions.
    thanks and excuse my English!
    Caterina

  • Call transaction in user exit?

    Hi
    can we say "call transaction" in the background?.while using user exit...
    regds
    gunjan

    Hi Gunjan
    I've to consider you ( or your exit) are in trx, so if you need to update some tables or another object don't belong to main trx, you make sure to do the updating only if the main trx is finished successfully.
    So it's usually placed the code for updating in a exit called before saving.
    But also you make sure the saving is done successfully, SAP usually does the saving in update tusk, so it has to call a COMMIT to start the saving action.
    When the COMMIT is called you can be sure the saving'll be done.
    So if you run your code in update tusk, you'll be sure your action'll start after saving.
    For these reason you should insert your code in a form called in update tusk.
    PERFORM UPDATE_MY_DATABASE ON COMMIT.
    So only when the system'll do the commit your code'll work.
    Max

  • 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 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

Maybe you are looking for

  • Logical Difference of defining Multiple Logical level keys

    Hi All, We add logical level keys in BMM layer by right cliking the logical level column of a dimesional hierarchy, doing so defines a new logical key, i already have another logical level column defined as logical level key. When i double click on l

  • Error when I deployed the java EAR application in NWDS 7.1

    HI All, I got the  error when I deployed the java EAR application in NWDS 7.1 version..help me out........................................... com.sap.ide.eclipse.deployer.api.APIException: DeployException,cause=[ERROR CODE DPL.DCAPI.1023] Authorizati

  • Intel Mini sometimes refuses to wake up

    My Energy Saver function is always set at 15 min for both computer and display and the box "put the HD to sleep when possible" is checked. It usually works. I didn't notice any particular event that could be the cause of this problem. Can you make a

  • How to change color of spinning logo

    How can i change the color for the spinning logo part on a flash site template? Is there a way to simply adjust it, or is it nescessary to make a whole new design? The animation for me is ok, but i only want a different color..

  • Can I Tile Windows in Tiger?

    Can I Tile Windows in Tiger like on PC? Sometimes I just want to work with all my windows visible at the same time.