Run in test mode call transaction

I have written a bdc program using call transaction method. I am giving the option in the
selection screen like run in test mode.so i want to display the error mess
without actually updating the tables,
if there is a way to do this
please tell me how to run in test mode.
thank you so much for all the replies.

have written a bdc program using call transaction method. I am giving the option in the
selection screen like run in test mode.so i want to display the error mess
without actually updating the tables,
if there is a way to do this
please tell me how to run in test mode.
thank you so much for all the replies.
Hi
it is not possible, once u run call tranation the data is updated in table.
for ur requirement, put the option in test mode in selection screen, in this mode flat file data check with master data (flat file validations
) , if any errors it disaly errors in a report.
i provide some code, this is for fb60 check this code
      FORM validate                                                 *
FORM validate.
  delete t_record index 1.
  loop at t_record.
    delete t_record where accnt = ' '.
    translate t_record-bukrs to upper case.
    translate t_record-accnt to upper case.
    translate t_record-waers to upper case.
    translate t_record-xblnr to upper case.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
         EXPORTING
              INPUT  = t_record-accnt
         IMPORTING
              OUTPUT = t_record-accnt.
    move-corresponding t_record to n_record.
    append n_record.
    clear n_record.
  endloop.
  loop at t_record.
    clear flag.
    delete t_record where accnt = ' '.
vendor  and company code checking.
    translate t_record-accnt to upper case.
    translate t_record-bukrs to upper case.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
         EXPORTING
              INPUT  = t_record-accnt
         IMPORTING
              OUTPUT = t_record-accnt.
    select single * from lfb1 where bukrs = t_record-bukrs
                                  and  lifnr = t_record-accnt.
    if sy-subrc <> 0.
      flag = 'X'.
      error_record-rowno = sy-tabix + 1.
      move-corresponding t_record to error_record.
      error_record-text1 = 'The Vendor not Under this company Code'.
    endif.
With holding liability.
    select single * from lfbw where bukrs = t_record-bukrs
                                    and  lifnr = t_record-accnt
                                  and  WT_SUBJCT = 'X'.
    if sy-subrc <> 0.
      flag = 'X'.
      error_record-rowno = sy-tabix + 1.
      move-corresponding t_record to error_record.
error_record-text2 = 'The Vendor doesnt have Withholding Tax Liability'.
    endif.
G/L account check with company code*
    select single * from skb1 where bukrs = t_record-bukrs
                                  and saknr = t_record-hkont.
    if sy-subrc <> 0.
      flag = 'X'.
      error_record-rowno = sy-tabix + 1.
      move-corresponding t_record to error_record.
    error_record-text3 = 'The G/L acc not under the given company code'.
    endif.
*cost centre checking
this FM for leading zeros
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
         EXPORTING
              INPUT  = t_record-kostl
         IMPORTING
              OUTPUT = v_kostl.
select single kostl from csks into v_kostl where bukrs = t_record-bukrs
                                         and kostl = v_kostl.
    if sy-subrc <> 0.
      flag = 'X'.
      error_record-rowno = sy-tabix + 1.
      move-corresponding t_record to error_record.
error_record-text4 = 'The costcentre not under the given company code'.
    endif.
it check the invioce alredy posted or not.
    translate t_record-waers to upper case.
    translate t_record-xblnr to upper case.
select single belnr into v_belnr1 from bsip where bukrs = t_record-bukrs
                                          and   lifnr  = t_record-accnt
                                          and   waers  = t_record-waers
                                              and   bldat  = p_invdat
                                          and   xblnr  = t_record-xblnr.
    if sy-subrc = 0.
      day   =  p_invdat+6(2).
      month =  p_invdat+4(2).
      year  =  p_invdat+0(4).
      concatenate day month year into date1 SEPARATED BY '.'.
      error_record-rowno = sy-tabix + 1.
      move-corresponding t_record to error_record.
concatenate 'This document under number' v_belnr1 'already posted on '
      date1 into fld2  separated by space.
      error_record-text5 = fld2.
      flag = 'X'.
    endif.
*zero balance
    on change of t_record-accnt or t_record-xblnr.
      amount = 0.
      totalamount = 0.
      amount = t_record-wrbtr1.
      loop at n_record where bukrs = t_record-bukrs
                           and  accnt = t_record-accnt
                           and xblnr = t_record-xblnr
                           and wrbtr1 = t_record-wrbtr1
                           and waers = t_record-waers.
        totalamount = totalamount  + n_record-wrbtr2.
      endloop.
    endon.
    if amount ne totalamount.
      error_record-rowno = sy-tabix + 1.
      move-corresponding t_record to error_record.
      error_record-text6 = 'Posting only possible with zero balance'.
      flag = 'X'.
    endif.
    if flag = 'X'.
      error_record-flag = 'X'.
      append error_record.
    endif.
    if flag <> 'X'.
      move-corresponding t_record to f_record.
      append f_record.
    endif.
    clear f_record.
    clear error_record.
  endloop.
endform.
*&  Form  Table Control
FORM head_item .
  clear t_record.
  LOOP AT t_record.
    delete t_record where accnt = ' '.
    translate t_record-bukrs to upper case.
    translate t_record-accnt to upper case.
    translate t_record-waers to upper case.
    translate t_record-xblnr to upper case.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
         EXPORTING
              INPUT  = t_record-accnt
         IMPORTING
              OUTPUT = t_record-accnt.
    on change of t_record-accnt or t_record-xblnr or t_record-wrbtr1.
      MOVE-CORRESPONDING t_record TO t_head.
      APPEND t_head.
    endon.
    MOVE-CORRESPONDING t_record TO t_item.
    APPEND t_item.
    clear : t_item,t_head.
  ENDLOOP.
ENDFORM.
form disperrortestrun.
  loop at error_record.
    format color 2 intensified on.
    set left scroll-boundary column 70.
    write :   /'|',
             (6) error_record-rowno,         '|' no-gap,
             (14) error_record-bukrs,        '|' no-gap,
             (12) error_record-accnt,        '|' no-gap,
             (16) error_record-xblnr,        '|' no-gap,
             (16) error_record-wrbtr1,       '|' no-gap,
             (8)  error_record-waers,        '|' no-gap,
             (13) error_record-secco,        '|' no-gap,
             (20) error_record-sgtxt,        '|' no-gap,
             (14) error_record-hkont,        '|' no-gap,
             (15) error_record-wrbtr2,       '|' no-gap,
             (10) error_record-mwskz,        '|' no-gap,
             (20) error_record-gsber,        '|' no-gap,
             (12) error_record-kostl,        '|' no-gap,
             (5)  error_record-flag,         '|' no-gap,
             (50) error_record-text1,        '|' no-gap,
             (53) error_record-text2,        '|' no-gap,
             (50) error_record-text3,        '|' no-gap,
             (50) error_record-text4,        '|' no-gap,
             (67) error_record-text5,        '|' no-gap,
             (45) error_record-text6,        '|'  .
  endloop.
  uline at /1(538).
  format color off.
endform.
Report Header for Test Run                                          *
form header.
  set left scroll-boundary column 70.
  format color 5 .
  write: 'REPORT :', sy-repid,
38 'ERROR RECORDS DETAILS OF TEST RUN OF FB60(VENDOR INVIOCE POSTING)'
  ,123 'DATE :', sy-datum .
  format color off.
  skip 3.
  format color 1 intensified on.
  uline at 1(538).
  write : /'|',
          (6) 'Row No',                             '|' no-gap,
         (14) 'Company Code',                       '|' no-gap,
         (12) 'Vendor No',                          '|' no-gap,
         (16) 'Reference',                          '|' no-gap,
         (16) 'Invioce Amount',                     '|' no-gap,
         (8) 'Currency',                            '|' no-gap,
         (13) 'Section Code',                       '|' no-gap,
         (20) 'text',                               '|' no-gap,
         (14) 'G/L Account',                        '|' no-gap,
         (15) 'Item Amount',                        '|' no-gap,
         (10) 'Tax Code',                           '|' no-gap,
         (20) 'Business Area',                      '|' no-gap,
         (12) 'Cost Centre',                        '|' no-gap,
         (5)  'Error record Status',                '|' no-gap,
         (50) 'Company Code/Vendor',                '|' no-gap,
         (53) 'Vendor/With holding tax Liability',  '|' no-gap,
         (50) 'Company Code/ G/L Account',          '|' no-gap,
         (50) 'Company Code / Cost Centre',         '|' no-gap,
         (67) 'Invioce Status',                     '|' no-gap,
         (45) 'Invalid Balance',
        '|'.
  uline at /1(538).
  format color off.
endform.
thanks
sitaram.

Similar Messages

  • Run in test mode the transaction FB01, FB08 and FBR2

    HI,
    I would like to know if its possible to run the transaction fb01,fb08 and fbr2 in test mode.
    thanks

    Hi,
    You can run in simulation mode which is nothing but the test mode in finance. Every posting can be seen in simulation mode before posting the document.
    Regards,
    Sreekanth

  • Wat r the Different possiblities we go 4 Asynchronus Mode Call Transaction

    Hey Folks,
    Let me Know what are the Different Scenarios where we have to go for Asynchronous Mode  CALL Transaction ( BDC).
    Thanks,
    Naresh.

    We can go for asynchrounous updates in call transaction , whenever there is no dependency for the statements to follow.
    For example, if you are doing a BDC to create a sales order and then another BDC to Change the same sales order, you cannot use Asynch update. The reason for this is the Sales Order Creation itself is not yet complete by the time you try to change it.
    For all other scenarios, where there is no dependencies, you can go for Async updates, which is faster for obvious reasons.
    Regards,
    Ravi

  • MD01- MRP run in test mode.......

    Hi Expets,
    My client wants to see the Material and quantity going to be generated by MRP run, so how can I run the MD01 in test mode, in order to view which materials are planned and with what quantity PR is going to be generated before MRP run, Same like in the single level planning MD03 with "Display results before they are saved ".
    Regards,
    Sri.....

    Hi Afshad Irani ,
    My question was is there any way to see the test results in PRD only like in MD03 T-Code.Every time we can not copy the PRD to Quality.
    Regards,
    Sri.......

  • Erroneous GP successfully run in test mode.

    Hi,
    We have some GP's which are in erroneous status. The same erroneous GP's gets processed when re-run in the test mode.
    1)Could you please let us know the steps to re-run GP's  in the test mode
    2)Is this something related to framework
    Rgrds,
    Saket

    Hello Saket,
    If a GP process instance goes into error, it is not poissible to rerun it. You must initiate the process again. Please see the following Knowledge Based Article on this:
    #1649701 Guided Procedures Erroneous Process Instances
    Thanks and best regards,
    Carl Connolly
    Senior Support Consultant - Netweaver Web Application Server
    AGS Primary Support, Global Support Centre Ireland
    Guided Procedures trouble shooting guide:
    https://
    www.sdn.sap.com/irj/scn/wiki?path=/display/jstsg/%2528gp%2529home

  • Error 00-341 RAISE_EXCEPTION when using Call Transaction for VA01 in backgr

    Hi,
    I am getting this message when I use call transaction to create a sales order using VA01. Following is the statement I have used.  Note that when i execute the program online, I am not getting any errors. I could create sales order without any problem. I am getting this exception only when I run in background.
          CALL TRANSACTION 'VA01'
                     USING BDC_TAB
                      MODE 'N'
                    UPDATE 'S'
             MESSAGES INTO W_MESS_TAB.
    When I captured message tab, I got following messages.
    DC006 - Control Framework: Fatal error - GUI cannot be reached
    00341 Runtime error RAISE_EXCEPTION has occurred.
    Please help me in this regard.
    Regards
    Kasi

    Some times execution of BDC program in back ground is different from the foreground. Some screens may appear in background and raise error while same will not when executed in foreground.
    Double click the message in Session log to know more details.
    One way is to suppress the screen while executing BDC.
    Alternatively I suggest to use BAPI instead.
    - Sanjay

  • What are the parameters in Call transaction method?

    Hi ABAPER'S,
        Please give me what are the parameters in call transaction method?
    Thanks,
    Prakash

    Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
    Syntax:
    CALL TRANSACTION <tcode>
    USING <bdc_tab>
    MODE  <mode>
    UPDATE  <update>
    <tcode> : Transaction code
    <bdc_tab> : Internal table of structure BDCDATA.
    <mode> : Display mode:
    A
    Display all
    E
    Display errors only
    N
    No display
    <update> : Update mode:
    S
    Synchronous
    A
    Asynchronous
    L
    Local update
    A program that uses CALL TRANSACTION USING to process legacy data should execute the following steps:
    Prepare a BDCDATA structure for the transaction that you wish to run.
    With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
    CALL TRANSACTION 'TFCA' USING BDCDATA
    MODE 'A'
    UPDATE 'S'.
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC <> 0.
    <Error_handling>.
    ENDIF.
    The MODE Parameter
    You can use the MODE parameter to specify whether data transfer processing should be displayed as it happens. You can choose between three modes:
    A Display all. All screens and the data that goes in them appear when you run your program.
    N No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished.
    E Display errors only. The transaction goes into display mode as soon as an error in one of the screens is detected. You can then correct the error.
    The display modes are the same as those that are available for processing batch input sessions.
    The UPDATE Parameter
    You use the UPDATE parameter to specify how updates produced by a transaction should be processed. You can select between these modes:
    A Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.
    Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.
    If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.
    S Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
    L Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
    The MESSAGES Parameter
    The MESSAGES specification indicates that all system messages issued during a CALL TRANSACTION USING are written into the internal table <MESSTAB> . The internal table must have the structure BDCMSGCOLL .
    You can record the messages issued by Transaction TFCA in table MESSTAB with the following coding:
    (This example uses a flight connection that does not exist to trigger an error in the transaction.)
    DATA: BEGIN OF BDCDATA OCCURS 100.
    INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    DATA: BEGIN OF MESSTAB OCCURS 10.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF MESSTAB.
    BDCDATA-PROGRAM = 'SAPMTFCA'.
    BDCDATA-DYNPRO = '0100'.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    CLEAR BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CARRID'.
    BDCDATA-FVAL = 'XX'.
    APPEND BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CONNID'.
    BDCDATA-FVAL = '0400'.
    APPEND BDCDATA.
    CALL TRANSACTION 'TFCA' USING BDCDATA MODE 'N'
    MESSAGES INTO MESSTAB.
    LOOP AT MESSTAB.
    WRITE: / MESSTAB-TCODE,
    MESSTAB-DYNAME,
    MESSTAB-DYNUMB,
    MESSTAB-MSGTYP,
    MESSTAB-MSGSPRA,
    MESSTAB-MSGID,
    MESSTAB-MSGNR.
    ENDLOOP.
    The following figures show the return codes from CALL TRANSACTION USING and the system fields that contain message information from the called transaction. As the return code chart shows, return codes above 1000 are reserved for data transfer. If you use the MESSAGES INTO <table> option, then you do not need to query the system fields shown below; their contents are automatically written into the message table. You can loop over the message table to write out any messages that were entered into it.
    Return codes:
    Value
    Explanation
    0
    Successful
    <=1000
    Error in dialog program
    > 1000
    Batch input error
    System fields:
    Name:
    Explanation:
    SY-MSGID
    Message-ID
    SY-MSGTY
    Message type (E,I,W,S,A,X)
    SY-MSGNO
    Message number
    SY-MSGV1
    Message variable 1
    SY-MSGV2
    Message variable 2
    SY-MSGV3
    Message variable 3
    SY-MSGV4
    Message variable 4
    Error Analysis and Restart Capability
    Unlike batch input methods using sessions, CALL TRANSACTION USING processing does not provide any special handling for incorrect transactions. There is no restart capability for transactions that contain errors or produce update failures.
    You can handle incorrect transactions by using update mode S (synchronous updating) and checking the return code from CALL TRANSACTION USING. If the return code is anything other than 0, then you should do the following:
    write out or save the message table
    use the BDCDATA table that you generated for the CALL TRANSACTION USING to generate a batch input session for the faulty transaction. You can then analyze the faulty transaction and correct the error using the tools provided in the batch input management facility.

  • BDC Session in Test Mode

    Hi Guys,
    Can we run BDC seesions in test mode. If yes how.
    Thanks,
    Rohit

    Hi,
    Only some FI transactions can be run in Test mode.
    In BDC's till the cursor reaches OK code of the SAVE button it won't get saved in Database, but once pressed SAVe you won't have control.
    So running BDC's in test mode  can't arise.
    Regards,A
    nji

  • IDOC in Test Mode

    Hi,
    I am  using CREMAS
    I am submiting program  rbdapp01 to post the IDCOS
    Now I want to run in TEST MODE (simulation run) , not to create any vendors , but it should give success and error messages as usual
    I had found one TEST Flag on selection screen of  rbdapp01 , i tried using that but it is giving message "No Data Selected"
    Any inputs on this
    thanks
    chandra
    Edited by: Chandrasekhar Jagarlamudi on May 3, 2008 12:44 AM

    Hello Chandrasekhar, While I have not worked on this specifically here is what I think.
    The test flag indicator is not what you think. You cannot take just any IDOC and set the test indicator on RBDAPP01 and "simulate" it.
    in WE20 check the entry for any partner having CREMAS in the inbound profile. There you will find a field "Test flag". If that is checked for a particular partner that means any thing from that is in test mode and IDOCs from that Partner will be in TEST mode.
    So RBDAPP01 will pick IDOC in status "64" and if you have idocs from this partner and test flag field set , only then they will be posted as TEST and not commited.
    I hope you got my point. if in WE20 the TEST flag is not set then no matter what the rbdapp01 test flag does not do anything.
    AGAIN i have not used this , but this is my best guess, as no one had replied , I posted this.
    Regards

  • Call Transaction prob

    Hi All,
    I am calling XD02 transaction at line selection in a report. But the user wants the report to display directly sales screen when clicked.
    For example : If the user clicks ok 123 Sold to Party : I need to pass 123 to XD02 and select sales Check box and display directly the Sales related data.
    Now my prob is how can i select the Check box 'Sales' at run time..before calling transaction.
    Thanks

    Hello,
    check the F1 details of that 'Sold to Party' in that message.
    In the "Techincal information" box look for the Parameter ID. Write down the field name and parameter ID.
    then define the parameter ID and set it as below and then use it in call transaction.
    I have used below the parameter ID anr for screen field input-field as example
    at line selection
    if (input-field ne space)
    set parameter id 'anr' field input-field.
    call transaction 'T_CODE' and skip first screen.
    endif.
    clear input_buffer.
    revert back if needed further clarification
    thanks
    manish

  • Wat are the Different possiblities we go 4  Asynchronus Mode Call Transactn

    Hey Folks,
    Let me Know what are the Different Scenarios where we have to go for Asynchronous Mode  CALL Transaction ( BDC).
    Thanks,
    Naresh.

    We can go for asynchrounous updates in call transaction , whenever there is no dependency for the statements to follow.
    For example, if you are doing a BDC to create a sales order and then another BDC to Change the same sales order, you cannot use Asynch update. The reason for this is the Sales Order Creation itself is not yet complete by the time you try to change it.
    For all other scenarios, where there is no dependencies, you can go for Async updates, which is faster for obvious reasons.
    Regards,
    Ravi

  • CSA Test Mode ?

    My goal is to have the personal firewall in enforce mode and all other rule modules in test mode. Problem: If a host is in any group that's running in test mode, all rules being applied to the host are in test mode. It seems like if I place a rule module in test mode, I will get events logged even if allow rules are in place. What is the best way to enforce the personal firewall module while keeping the rest of the applied rule modules/policies in test mode? Thanks in advance for any help.

    Ok, well as you know, if a host is in even one group that is in test mode, the host itself is in test mode. You can either take it out, or keep it in.
    Monitor mode is extremely useful. I still stand by the suggestion to maybe start again slowly adding the rules you've already created/crafted by placing them in monitor mode.
    I have to comment on the log comment. I don't think you understand that rule setup. You have to actually uncheck the box that says "LOG" in order to stop receiving alerts. Your statement is true withstanding, that if the log option is selected, you'll get an alert for allow or deny. Now, if a rule is hitting a deny, and you set a exception to allow, obviously your exception isn't working. You'll have to mitigate that issue in order to resolve the other.
    I wish you'd go into more depth concerning what the actually problem is though. I can only pull apart that you want something to do something but its alerting from something but I still want it to do the other thing too.
    Again, I hope this assists you. And if you need further understanding or clarification please ask. That is the primary reason for this forum.

  • 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

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

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

Maybe you are looking for