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

Similar Messages

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

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

  • Call transaction in Workflow doesn't work

    Hi all,
    I'm a strange problem.
    I built a call transaction in a FM. If I test the FM the call transaction works fine.
    if I put this FM in a workflow (in a class I build ad hoc for the WF) it doesn't work,
    I check in degub the import partameters and it is ok.
    I try to execute the FM also in UPDATE or in BACKGROUND task, or the call transaction in different MODE or UPDATE ways, but nothing.
    any idea?
    thanks
    enzo

    Hi,
    Whether your BDC code in your function module is requesting any input from user?.  If yes, make sure to pass values since you are calling through Workflow which dont popup BDC screens?.
    Let me know your scenario is different than I told here.
    Regards
    Krishna

  • Messages from call transaction don't appear

    Hello everyone,
    I'm having a problem that i never experienced.
    I have a call transaction for T-code 'FOB1', like this:
      CALL TRANSACTION f_tcode USING bdc_tab MODE f_mode UPDATE 'S'
                                           MESSAGES INTO messtab.
    I allready tried using 'A' mode and 'N' mode, but the problem persists. My table messtab, that should, at least, bring the message for successfull creation of document, is completely empty!! with one difference. If i choose "visible" mode, a warning appears that is not a concern for creating the document. That 'W' message appears in my table messtab, ONLY if i run the call transaction with 'visible' mode. It looks like if the messages are being deleted so fast that the system doesn't catch them.
    Any suggestions ??
          Thank you.

    Thank you for all your answers, but my problem persists.
    In response to all:
    - I tried eliminating the UPDATE statement or using option 'A', but the message table still appears empty.
    - When i create a document through transaction FOB1, it does send a S message with the number of the document created.
    - I tried creating a Batch Input and process it through SM35, and the log shows several S messages.
    I'm having trouble solving this one. Any more suggestions ?

  • AFAB program strange performance in TEST mode

    Hi colleagues,
    We are experiencing a strange performance in AFAB program.
    We have uploaded several assets in a particular company code. When executing AFAB transaction in TEST mode, the new assets are not considered, whereas, when performing a REAL execution yes they are.
    We think that when reconciliating assets at the end of the year, this issue which is not harmful (but strange indeed) may be solved, but we are not sure at all.
    Can anybody provide a clue on what is happening.
    Thanks and my best regards

    Hi When you run this report online in test it will only show +/- the first 1.000 assets and the new asset are later in the data base and you don't see them.
    You have to run it in test mode in back ground and look in the spool to the result (default the spool shows arround 20 page's but this you can change or go to the next 20 pages)

  • CALL TRANSACTION 'MM06'

    Hi,
    I am calling a transaction as;
    CALL TRANSACTION 'MM06' USING BATCH_ITAB MODE pMODE
                       MESSAGES INTO MES_ITAB UPDATE 'S'.
    in BATCH ITAB:
    'X' 'SAPMM03G' '0100',
    ' ' 'RM03G-MATNR' "any matnr,
    ' ' 'RM03G-WERKS' "any werks,
    ' ' 'RM03G-RMMG1' "space,
    ' ' 'BDC_OKCODE' '/00'.
    'X' 'SAPMM03G' '0111',
    ' ' 'RM03G-LVOMA' 'X',
    ' ' 'BDC_OKCODE' '=BU'.
    and
    DATA: BEGIN OF BATCH_ITAB OCCURS 0.
            INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BATCH_ITAB.
    But there is an interesting state. As you know MM06 puts a tick to delete a material. But after I have called MM06 transaction, sometimes puts a tick and sometimes does not put a tick. Why this is so? And I have realized(maybe this is not so true) if I call transaction using N mode there is problem putting a tick. But if call transaction using A mode it puts. But this can be deal with sometimes puts a tick and sometimes does not put a tick. I mean that maybe problem may not be deal with mode.
    Now, what can I do? where is the problem?
    Thanks for your helps.

    Hi,
    I looked the MES_ITAB while mod is N, and I see that MES_ITAB is initial, no updating. MES_ITAB data definition is:
    DATA MES_ITAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    I also want to say that I am first calling CS02, next MM02 and last MM06. Is there any problem because of calling CS02 and MM02 before MM06. But my CS02 and MM02 works true.
    I want to ask, how this problem can be occur because of data?

  • Call Transaction - Update Local

    Hi,
      I am using call transaction with Update mode "A".
      when i use this my work is being commited immediately.
      i want to know which UPDATE MODE i have to use .to commit my work later.
    and what should i write to commit at that point.(is COMMIT WORK) or any funtion.

    Hi.
    A mode itself indicates asynchronus update means donot wait for execution of Commit work...the mode u r using is correct..
    <b>Asynchronous update.</b>
    Updates of called programs are executed in the same way as if in the COMMIT WORK statement the AND WAIT addition was not specified.
    So..

  • Call Transaction QE51

    Hi,
    I am using a BDC Call Transaction QE51 for carrying out results recording. The first time I execute this (N mode), the call transaction fails. However, subsequent runs pass without any failure. Do I need to set any parameter id values prior to the call transaction for QE51?
    Please advise.
    Thanks,
    Tessy

    Hi,
    No, I am not missing any fields. When I run the call transaction in 'A' mode, it passes after the first run. However the first time that I run the call transaction for QE51, it fails. Thats why I was wondering if I needed to set any parameter ids.
    Thanks,
    Tessy

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

  • Call transaction is not working sometimes - Update mode as 'P'

    Hello Team,
    Whenever contact(ME31K) gets created the contract number should be updated in ME47(one custom fields).
    I have written BDC in the BADI IF_EX_ME_PURCHDOC_POSTED~POSTED.
          call transaction 'ME47' using it_bdcdata
                           mode vmode
                           update vupdate
                           messages into it_msgtab.
            vupdate type char1 value 'S',
            vmode type char1 value 'P'.
    Is the problem could be in mode 'P' but its working sometimes.
    And no further sessions on ME47 with same document number.
    What could be the reason.
    Regards,
    Vadamalai A

    Hi Vadamalai,
    mode 'P' is no proper vmode for a production system. No normal user should found himself stoppping at a break-point in debugger in any transaction. Please check, if the issue remains after changing the vmode to n.
    Is there really a break-point (maybe in a userexit or badi) that can be reached on DEV system? If not, there is no reasen to use vmode 'P'. If yes, please remove the break-point after finishing your test.
    Regards,
    Klaus

  • Call transaction KB21N processed by a program in background mode

    Hi to all,
    I call transaction KB21N using BDCDATA in a custom program. If I process this program in foreground mode all it's OK, but if I process the program in background mode, I have a runtime error with DUMP: RAISE EXCEPTION with exception condition CNTL_ERROR. This program has to be executed in background so a bapi exist to use instead of call transaction or something else?
    Thank you very much,
    regards
    Antonio

    HI Antonio,
    The transaction you are dealing with is an SAP Enjoy transaction and for such transactions it is not recommended to do a BDC. YOu should search for  a BAPI for the same as you have already identified. Basically the enjoy transactions uses GUI controls which cannot be handled by BDC.
    BAPI_ACC_ACTIVITY_ALLOC_POST may serve your purpose.
    Regards,
    ravi
    Message was edited by:
            Ravi Kanth Talagana

  • Call transaction in mode N fro transaction F-02

    Hi,
    The call transaction for F-02 work well in mode 'A' and it creates the FI posting. But when I execute it in mode 'N' it does not post.
    Any ideas?
    Thanks in advance.

    Hi Abel Isaac Polo,
    Welcome to SCN, as per your issue I do't thing that should happend... Can you paste wht all paramenters which you are passing to CALL Transaction statement.
    Regards,
    Suneel G

Maybe you are looking for

  • Should I Install Adobe AIR?

    Should I install Adobe AIR, I have a: iMac 24''  Processor  2.4 GHz Intel Core 2 Duo Memory  4 GB 667 MHz DDR2 SDRAM Graphics  ATI Radeon HD 2600 Pro 256 MB Software  Mac OS X Lion 10.7.1 (11B26) Is thier any reason not to run it? Is it safe? Thanks

  • Select a location to which a plant has been assigned

    Hi all. We Work in SRM 5.0 Extended Scenario, ECC 6.0. When I try to make a PO from a SC system sends me the following error: Select a location to which a plant has been assigned. I made corrections in the organizational unit, assign default to the p

  • Stopping ZIP Files from Uncompressing before they are sent by Email

    Hello. I zipped a large powerpoint presentation (26MB) using archive. Worked well. Fille down to 633k. Want to send the file via entourage. When I attach the compressed file it uncompresses. Not good. I changed the preferences panel in entourage (com

  • KP06 plannig

    Hi I have entered cost center planning in KP06 in object currency, which is different from Co Area currency. When I enter planning , it updates table COSP, with current exchange rate. Now when exchange rate is changed, table entries in COSP are not a

  • Replacing hubs with switches help needed

    I'm new at this so bear with me. I have two LANs, 10.0.0.x and 10.1.0.x, connected via firewall/router with 10.0.0.245 and 10.1.0.5 address. Clients and servers are connected to hubs on both networks. I want to replace the hubs with 2960TT switches a