Test Run Option in BAPI_REQUISITION_CREATE

Hi All,
I want to run the BAPI BAPI_REQUISITION_CREATE in test mode, but BAPI doesn't have Test run field as input parameters as we have in some other BAPIs.
Is there any way to run the BAPI_REQUISITION_CREATE in Test mode.
Please guide me on this.
Thanks,
Jayaprasanna

Hi,
You can execute BAPI directly , with out specifying test run  also it wont update database.
with out  bapi_transaction_commit  changes will not be updated.
Thanks,
Hari.

Similar Messages

  • Test run for IW31

    Hi Experts,
    We are using BDC file for creating work orders in IW31.While creating orders,if we face any error in between the process, system will not allow further processing.but order will be generated for the remaining equipments.Can we provide any test run option in IW31 so that we can find out the error before generating work order.
    If no errors are there in process,then we need to upload the data.
    Can any one provide me some valuable inputs?
    Regards,
    Sibinraj

    Hi Sibinraj,
    As mentioned and suggested your technical team can achieve this, You can ask your technical team to work in below steps as
    1. All the pre-checks need to performed . 
    2. After the pre-checks a log is produced with complete results.
    3. If at any stage an Abort type error is encountered the log is updated as such but the checks are continued.
    4. After output of the log the load is aborted (prevented) by the system.
    5. If no Abort level error is encountered the user is still given the opportunity to manually abort after evaluation of the load-log.
    NOTE: In each case write the result as welwell as the state to the log.
    Once The successful Logs identified, User can go for actual run.
    Hope this will guide your technical team to meet your requirement.
    Riyaj

  • SAINT Test run

    I want to do a test run for an add-on. I have changed the scenario to Test via SPAM.  When i go to saint and start the run, its doing the actual run. Am I missing some thing here or do I have to set test scenario for saint differently.
    Any help is appreciated. My environment is R/3 Enterprise with oracle 9i
    Regards
    Kal

    Hi,
    You can activate the Test run option in SAINT
    Regards,
    Nirmal.K

  • The build directory of the test run either does not exist or access permission is required.

    i am trying to run automated tests
    i follow the steps in the web but when i have 2 issues that does not solve
    1. i created console project and add build definition without drop folder and queue builds that success.
    2. i created C# unit test and add build definition and run it from VS and it worked and done what i want to do.
    3. i built lab with 1 machine and define the controller on this pc ( the machine in the lab is another pc)
    4. i created test suite with test cases and from vs 2013 i associated automation nethod that i created in 2.
    5. when i try to associate the builds for the test plan i have a PROBLEM(1):
    this happened every new build that i try to assign - all the builds appears after refresh and when i press assign to plan button
    a pop up shown with error : " The build that you selected for this plan no longer exist " but he chose it in build in use but there no work item under it - the list is empty even that there are 2 tests under this test suite.
    and than when i try to run the automated tests i have this PROBLEM(2):
    The build directory of the test run either does not exist or access permission is required. and the test failed.
    Please Help
    Roey

    Hi Rory,
    Thank you for posting in MSDN forum.
    According to the error message:
    (1) a pop up shown with error : " The build that you selected for this plan no longer exist "
    I tried to create a build definition without the drop folder location for unit test solution from the VS IDE, and then I try to select the Build in use option to add the Available builds, then click this Assign to plan. I found that I get same error message
    with yours like the following screen shot.
    However, when we try to create a build definition with drop folder location for this same unit test solution and then build successfully in the VS IDE.
    After you add the Available builds and then click this Assign to plan in the MTM, it work fine.
    Therefore, I assume that the issue is related to that you did not specify a build directory for automated test case. MTM need to know where is the drop location of the build building your tests.
    http://stackoverflow.com/questions/20033217/couldnt-run-my-test-using-microsoft-test-manager
    In addition, I did some research about the problem 2:"The build directory of the test run either does not exist or access permission is required. and the test failed."
    I know that the error message occur in either of the following conditions:
    1. The account under which test controller is running does not have read permission on the build directory. (The build directory is same as the drop location of build associated with this test run.) 
    2. The build directory itself does not exist.
    So please refer the following blog to check this issue:
    http://blogs.msdn.com/b/aseemb/archive/2009/11/25/error-starting-the-test-run-build-directory-of-the-test-run-is-not-specified-or-does-not-exist.aspx
    Therefore, I suggest you can try to specify a drop location for build when you run the automated test from the MTM and then check this issue.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to Use synchronous RFC calls during test run for remote accesses

    there is a Setting for the usage of RFC accesses from a tested system
    using eCATT.
    'X' - Use asynchronous RFC calls during test run for remote accesses
    ' ' - Use synchronous RFC calls during test run for remote accesses
    I developed an eCATT as following :
      SAPGUI ( SAPGUI_1 , Target_system_1 ).
      SAPGUI ( SAPGUI_2 , Target_system_2 ).
    My question is how to run the eCATT in a synchronous RFC calls
    PS: I do not want to change the Target_system to the same one in the
    above script of ecatt.Because I need to run it in 2 different Target
    systems sometime.
    for example, I give a Target_system_3 when run this eCATT
    I want the SAPGUI_1 and SAPGUI_2 run the Target_system_3 but not the
    Target_system_1 or Target_system_2 .
    Could you please tell me how to make it without the changes in script?
    Edited by: Weitong Liu on Mar 24, 2011 9:44 AM

    Hi Liu,
    Weitong Liu wrote:
    > ' ' - Use synchronous RFC calls during test run for remote accesses
    This is the standard option value. Asynchronous are not the standard way and used only for very special purposes.
    Weitong Liu wrote:
    > I developed an eCATT as following :
    >   SAPGUI ( SAPGUI_1 , Target_system_1 ).
    >   SAPGUI ( SAPGUI_2 , Target_system_2 ).
    > My question is how to run the eCATT in a synchronous RFC calls
    The commands will be executed in sequence. So each call will be synchronously replayed against TS1 and TS2.
    What is you issue with this standard procedure?
    Kind regards,
    Christoph

  • How to run my program in "test run" mode, programmatically ??

    Hi,
    Assume I have written a Zprogram and called a BDC to input a batch of data from an CSV file. I could see that in a normal input mode, some of the SAP transactions allow me to select "Test Run" so that SAP first checks if the data I enter is correct and can be saved. It then reports a succes and then I re execute !! U can see that option in transaction KP90, Delete Planned cost.
    Can I do the same programmatically so that I ensure that my batch data upload will be successful for this set of data ??
    Also, another question related to BDC... what happens when a record fails to confirm the SAP input rules ?? will only that be skipped from the batch input and rest be stored in the DB or will the entire batch of data will be reverted , something like ROLLBACK ??
    thanks

    hi,
       set one flag in the program for test run.
       if flag = 'X'.
          write success message here.
          dont save ur data
       else.
         save ur data
       endif.
       regarding ur 2nd question if one record is error also the data will not be updated for all the records.
       as u had mentioned it will ROLLBACK

  • Need "test run" flag for change BAPI of fixed assets

    Hi Experts,
          There will be 'Test Run Flag' in the Bapi.Please tell where it will be given with in the BAPI . For example, in 'BAPI_FIXEDASSET_CREAT'.
    Thanks,
    gsaasg.
    Edited by: Julius Bussche on Sep 5, 2009 11:28 PM
    Please use meaningfull subject titles

    Hi,
    Test Run flag field is not available for the requested BAPI, but it is in the BAPI  BAPI_FIXEDASSET_CREATE1
    VALUE(TESTRUN) LIKE  BAPI1022_MISC-TESTRUN OPTIONAL
    Please test this new BAPI whether it will meet your requirement or not.
    Thanks,
    Mahesh.

  • Portal/Java system copy - test run

    Hi all,
    We are trying to do a test run of the java system copy - but would like to know where this option (test run) is in sapinst - which screen - we get to a point where it shows the parameters chosen with an option "restart system" chosen - so we are reluctant to go to the next sapinst screen, incase the portal  and /or DB is shutdown. NOTE - right now we want to do a test run of the Database export and instance export.
    We are running in a distributed environmnet with the app and db on differnet servers.
    Thanks in advance - Regards, Neeta

    Hi Neeta,
    If you choose for the option "Stop running system", you will get a pop-up at the end of the procedure. The system should be stopped by yourself, this will not be done automatically. So you can just proceed with your procedure..
    Kind regards,
    Mark

  • Test Run with BAPI_PRICES_CONDITIONS

    Hi,
    I am using BAPI_PRICES_CONDITIONS in my program to create pricing conditions.
    BAPI is working fine and it creates pricing conditions.  I can see them in VK13 and in table A9**.
    The surprising thing is - this BAPI creates pricing conditions in database, even if I am not calling BAPI_TRANSACTION_COMMIT or  COMMIT WORK in my program.
    In fact, I need to have two options as below in my program:
    1) Test Run --> Just to display the return messages from BAPI (no DB update)
    2) Create conditions --> Actual creation in Database
    Now the problem is that condition records are created in both of these cases.
    So, I am not able to achieve functionality of option-1.
    Has anyone faced this problem before or can anyone help me in this?
    Awaiting for your valuable input/suggestions.
    Thanks & Regards,
    Devendra

    Devendra Yadav,
    where yoiu able to resolve your issue number 1?
    I have the same problem.
    Thank you.

  • Test Run in BDC

    Hi Experts,
    Is it possible to run the BDC but in test run mode.
    If possible please guide me how to do that.
    Let say i'm doing BDC for VA01.
    If i tick the test run, means no need to create the Sales Order Document just test run.
    If i untick the test run, create the Sales Order document.
    I'm using Call transcation method to doing the BDC
      CALL TRANSACTION fu_tcode USING ft_bdcdata
                                MODE  fu_mode
                                MESSAGES INTO ft_bdcmsg
                                UPDATE 'S'.
    Best Regards,
    Victor.

    try this.
    REPORT  zcrdtdaupld
                     NO STANDARD PAGE HEADING LINE-SIZE 255.
                        I N T E R N A L  T A B L E                       *
    TYPES: BEGIN OF it_output,
           bldat(10)  TYPE  c,           "Document Date
           blart      TYPE  bkpf-blart,  "Document Type
           bukrs      TYPE  bkpf-bukrs,  "Company Code
           budat(10)  TYPE  c,           "Posting Date
           monat      TYPE  bkpf-monat,  "Period
           waers      TYPE  bkpf-waers,  "Currency
           xblnr      TYPE  bkpf-xblnr,  "Reference Field
           docid      TYPE  fs006-docid, "Document ID
           newbs      TYPE  rf05a-newbs, "Posting  Key
          newko      TYPE  rf05a-newko, "Account Code
           newko(10) TYPE c,        "Account,
           wrbtr(16)  TYPE  c,           "Amount in Document currency
           zfbdt(10)  TYPE  c,           "Baseline Date
           newbs2     TYPE  rf05a-newbs, "Account Key2
           newko2     TYPE  rf05a-newko, "Account code2
           wrbtr2(16) TYPE  c,                                  "Amount2
           END OF it_output.
    DATA : BEGIN OF wa_error,
            index TYPE c LENGTH 1,
            text TYPE c LENGTH 100,
            END OF wa_error.
    DATA lt_output  TYPE  it_output   OCCURS 0 WITH HEADER LINE.
    DATA i_bdcdata  TYPE  bdcdata     OCCURS 0 WITH HEADER LINE.
    DATA it_messtab LIKE  TABLE OF bdcmsgcoll.
    DATA wa_messtab LIKE  LINE OF it_messtab.
    DATA it_error   LIKE  TABLE OF wa_error.
                               D A T A                                   *
    DATA: message     TYPE string.
    DATA: v_index     TYPE i.
    DATA: v_text(100) TYPE c.
    DATA: c_x         TYPE char01 VALUE 'X',
          c_n(01)     TYPE c.
    TYPES: BEGIN OF t_proc_tab,
             xblnr LIKE bkpf-xblnr,   "Reference number
             bldat(10) TYPE c,        "Document date
             blart LIKE bkpf-blart,   "Document type
             bukrs LIKE bkpf-bukrs,   "Company code
             budat(10) TYPE c,        "Posting date
             monat LIKE bkpf-monat,   "Period
             waers LIKE bkpf-waers,   "Currency
             docid  TYPE  fs006-docid, "Document ID
            bktxt LIKE bkpf-bktxt,   "Document header text
             newbs LIKE rf05a-newbs,  "Posting key
            newko LIKE rf05a-newko,   "Account
             newko(10) TYPE c,        "Account
             wrbtr(12) TYPE c,        "Amount
             zfbdt(10)  TYPE  c,       "Baseline Date
            zuonr LIKE bseg-zuonr,   "Assignment
            xmwst LIKE bkpf-xmwst,   "Calculate tax flag
            mwskz LIKE bseg-mwskz,   "Tax code
            sgtxt LIKE bseg-sgtxt,   "Text
            kostl LIKE cobl-kostl,   "Cost center
             nwbs2 LIKE rf05a-newbs,  "Posting key for next record
             nwko2 LIKE lfb1-lifnr,   "Account for next record
             wrbtr2(16) TYPE  c,
           END OF t_proc_tab.
    DATA: wa_input_file TYPE it_output.
    Internal table for the processed records
    *DATA: i_proc_tab TYPE STANDARD TABLE OF t_proc_tab,
         wa_proc_tab TYPE t_proc_tab,
         wa_bdc_tab TYPE t_proc_tab.
    Structure for table T003
    TYPES: BEGIN OF t_t003,
             blart LIKE t003-blart,   "Document type
           END OF t_t003.
    Structure for table T001
    TYPES: BEGIN OF t_t001,
             bukrs LIKE t001-bukrs,   "Company code
           END OF t_t001.
    Structure for table TCURC
    TYPES: BEGIN OF t_tcurc,
             waers LIKE tcurc-waers,  "Currency code
           END OF t_tcurc.
    Structure for table TBSL
    TYPES: BEGIN OF t_tbsl,
             bschl LIKE tbsl-bschl,   "Posting key1
           END OF t_tbsl.
    Structure for table LFB1
    TYPES: BEGIN OF t_lfb1,
             lifnr LIKE lfb1-lifnr,   "Account number
             bukrs LIKE lfb1-bukrs,   "Company code
           END OF t_lfb1.
    Structure for table KNB1
    TYPES: BEGIN OF t_knb1,
             kunnr LIKE lfb1-lifnr,   "Cust Account number
             bukrs LIKE knb1-bukrs,   "Company code
           END OF t_knb1.
    Structure for table SKA1
    TYPES: BEGIN OF t_ska1,
             saknr LIKE ska1-saknr,   "G/L Account number
           END OF t_ska1.
    Structure for table T007A
    TYPES: BEGIN OF t_t007a,
             mwskz LIKE t007a-mwskz,  "Tax code
           END OF t_t007a.
    Structure for table CSKS
    TYPES: BEGIN OF t_csks,
             kostl LIKE csks-kostl,   "Cost center
           END OF t_csks.
    Structure to hold the error records
    TYPES: BEGIN OF t_error_file,
             row   LIKE alsmex_tabline-row,
             col   LIKE alsmex_tabline-col,
             value LIKE alsmex_tabline-value,
             mssg(100) TYPE c,
           END OF t_error_file.
    Structure to hold the BDC error records
    TYPES: BEGIN OF t_bdc_error,
            error_msg(100) TYPE c,
           END OF t_bdc_error.
           INTERNAL TABLE/STRUCTURE POOL DECLARATION                     *
    In this section you can define internal table and sturcture.        *
    Internal table for the input file
    *DATA: i_input_file TYPE STANDARD TABLE OF t_input_file,
         wa_input_file TYPE t_input_file.
    Internal table for T003
    DATA: i_t003 TYPE STANDARD TABLE OF t_t003,
          wa_t003 TYPE t_t003.
    Internal table for T001
    DATA: i_t001 TYPE STANDARD TABLE OF t_t001,
          wa_t001 TYPE t_t001.
    Internal table for TCURC
    DATA: i_tcurc TYPE STANDARD TABLE OF t_tcurc,
          wa_tcurc TYPE t_tcurc.
    Internal table for TBSL
    DATA: i_tbsl TYPE STANDARD TABLE OF t_tbsl,
          i_tbsl_2 TYPE STANDARD TABLE OF t_tbsl,
          wa_tbsl TYPE t_tbsl.
    Internal table for LFB1
    DATA: i_lfb1 TYPE STANDARD TABLE OF t_lfb1,
          i_lfb1_2 TYPE STANDARD TABLE OF t_lfb1,
          wa_lfb1 TYPE t_lfb1.
    Internal table for KNB1.
    DATA: i_knb1 TYPE STANDARD TABLE OF t_knb1,
          i_knb1_2 TYPE STANDARD TABLE OF t_knb1,
          wa_knb1 TYPE t_knb1.
    Internal table for SKA1
    DATA: i_ska1 TYPE STANDARD TABLE OF t_ska1,
          i_ska1_2 TYPE STANDARD TABLE OF t_ska1,
          wa_ska1 TYPE t_ska1.
    Internal table for T007A
    DATA: i_t007a TYPE STANDARD TABLE OF t_t007a,
          wa_t007a TYPE t_t007a.
    Internal table for CSKS
    DATA: i_csks TYPE STANDARD TABLE OF t_csks,
          wa_csks TYPE t_csks.
    Internal table for the processed records
    DATA: i_proc_tab TYPE STANDARD TABLE OF t_proc_tab,
          wa_proc_tab TYPE t_proc_tab,
          wa_bdc_tab TYPE t_proc_tab.
    Internal table for the processed records
    DATA: BEGIN OF i_bdc_tab OCCURS 0.
            INCLUDE STRUCTURE wa_proc_tab.
    DATA: END OF i_bdc_tab.
    Internal table for the erroneous records
    DATA: i_error_file TYPE STANDARD TABLE OF t_error_file,
          wa_error_file TYPE t_error_file.
    Internal table for the BDC error records
    DATA: i_bdc_error TYPE STANDARD TABLE OF t_bdc_error,
          wa_bdc_error TYPE t_bdc_error.
           DATA/VARIABLE DECLARATION                                     *
    In this section you can define internal tables,variables and etc.   *
    DATA : v_xblnr_cnt TYPE i.
            CONSTANTS DECLARATION                                        *
    Constants are named data objects that you create statically using   *
    a declarative statement. They allow you to store data under a       *
    particular name within the memory area of a program.                *
    The value of a constant cannot be changed during the execution of   *
    the program.                                                        *
    CONSTANTS: c_asc       TYPE char10 VALUE 'ASC',
              c_x         TYPE char01 VALUE 'X',
               c_01(02)    TYPE c VALUE '01',
               c_02(02)    TYPE c VALUE '02',
               c_03(02)    TYPE c VALUE '03',
               c_04(02)    TYPE c VALUE '04',
               c_05(02)    TYPE c VALUE '05',
               c_06(02)    TYPE c VALUE '06',
               c_07(02)    TYPE c VALUE '07',
               c_08(02)    TYPE c VALUE '08',
               c_09(02)    TYPE c VALUE '09',
               c_10(02)    TYPE c VALUE '10',
               c_11(02)    TYPE c VALUE '11',
               c_12(02)    TYPE c VALUE '12',
               c_dymd(04)  TYPE c VALUE 'DDMY',
               c_a(01)     TYPE c VALUE 'A',
              c_n(01)     TYPE c VALUE 'N',
               c_f63(04)   TYPE c VALUE 'F-63'.
             S E L E C T - O P T I O N S / P A R A M E T E R S           *
    SELECTION-SCREEN BEGIN OF BLOCK block0 WITH FRAME.
    PARAMETERS : p_file  LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN SKIP.
    PARAMETERS:p_test RADIOBUTTON GROUP rec,
               p_back RADIOBUTTON GROUP rec DEFAULT 'X',
               p_onli RADIOBUTTON GROUP rec.
    SELECTION-SCREEN END OF BLOCK block0.
             A T  S E L E C T I O N - S C R E E N                        *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          static    = 'X'
          mask      = space
        CHANGING
          file_name = p_file.
                   S T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
      PERFORM  upload USING p_file.
    Validate the input file records
      PERFORM f_validate_records.
    IF NOT p_test EQ c_x.
      PERFORM bdc.
    ENDIF.
    PERFORM f_audit_report. " for test mode option
    *&      Form  bdc
          text
    FORM bdc.
      IF p_onli =  c_x.
        c_n = 'A'.
      ELSE.
        c_n = 'N'.
      ENDIF.
      LOOP AT i_bdc_tab.
        v_index = sy-tabix.
        REFRESH i_bdcdata.
        CLEAR i_bdcdata.
        READ TABLE lt_output INDEX 1.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0100' c_x.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BKPF-BLDAT'  i_bdc_tab-bldat.
        PERFORM bdc_field       USING 'BKPF-BLART'  i_bdc_tab-blart.
        PERFORM bdc_field       USING 'BKPF-BUKRS'  i_bdc_tab-bukrs.
        PERFORM bdc_field       USING 'BKPF-BUDAT'  i_bdc_tab-budat.
        PERFORM bdc_field       USING 'BKPF-MONAT'  i_bdc_tab-monat.
        PERFORM bdc_field       USING 'BKPF-WAERS'  i_bdc_tab-waers.
        PERFORM bdc_field       USING 'BKPF-XBLNR'  i_bdc_tab-xblnr.
        PERFORM bdc_field       USING 'FS006-DOCID' i_bdc_tab-docid.
        PERFORM bdc_field       USING 'RF05A-NEWBS' i_bdc_tab-newbs.
        PERFORM bdc_field       USING 'RF05A-NEWKO' i_bdc_tab-newko.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0302' c_x.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'  i_bdc_tab-wrbtr.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'  i_bdc_tab-zfbdt.
        PERFORM bdc_field       USING 'RF05A-NEWBS' i_bdc_tab-nwbs2.
        PERFORM bdc_field       USING 'RF05A-NEWKO' i_bdc_tab-nwko2.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301' c_x.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=BU'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'  i_bdc_tab-wrbtr2.
        CALL TRANSACTION 'F-27' USING i_bdcdata
                                   MODE c_n
                                   UPDATE 'A'
                                   MESSAGES INTO it_messtab.
        PERFORM f_error_handling.
      ENDLOOP.
    ENDFORM.                    "bdc
          FORM BDC_DYNPRO                                               *
    -->  PROGRAM                                                       *
    -->  DYNPRO                                                        *
    FORM bdc_dynpro USING program dynpro dynbegin.
      i_bdcdata-program  = program.
      i_bdcdata-dynpro   = dynpro.
      i_bdcdata-dynbegin = dynbegin.
      APPEND i_bdcdata.
      CLEAR i_bdcdata.
    ENDFORM.                    "BDC_DYNPRO
          FORM                                                          *
    FORM bdc_field USING fnam fval.
      i_bdcdata-fnam = fnam.
      i_bdcdata-fval = fval.
      APPEND i_bdcdata.
      CLEAR i_bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  upload
          text
    -->  p1        text
    <--  p2        text
    FORM upload USING p_filename.
      DATA: p_file1 TYPE string.
      p_file1 = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = p_file1
          filetype = 'DAT'
        TABLES
          data_tab = lt_output.
    ENDFORM.                    " upload
          FORM f_error_handling
          This subroutine populates the BDC table
    FORM f_error_handling .
      LOOP AT it_messtab INTO wa_messtab.
        CLEAR v_text.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id   = wa_messtab-msgid
            lang = 'EN'
            no   = wa_messtab-msgnr
            v1   = wa_messtab-msgv1
            v2   = wa_messtab-msgv2
            v3   = wa_messtab-msgv3
            v4   = wa_messtab-msgv4
          IMPORTING
            msg  = v_text.
        IF sy-subrc = 0.
          CASE wa_messtab-msgtyp.
                  WHEN 'S'.
                  IF p_test NE c_x.
              WRITE:/ v_text.
              ENDIF.
              CLEAR v_text.
              SKIP 1.
            WHEN 'E'.
              wa_error-index = v_index. "record num
              wa_error-text =  v_text .  "message text
              APPEND wa_error TO it_error.
              CLEAR wa_error.
          ENDCASE.
        ENDIF.
      ENDLOOP.
      REFRESH it_messtab.
      CLEAR   wa_messtab.
    display error messages
    IF p_test NE c_x.
      IF NOT it_error[] IS INITIAL.
        WRITE: /30 'ERROR RECORDS DETAILS'.
        SKIP 1.
        WRITE: /5 'RECORD NO', 15 sy-vline,
                16 'ERROR MESSAGE'.
        ULINE.
        LOOP AT it_error INTO wa_error.
          WRITE : /5 wa_error-index LEFT-JUSTIFIED,
                   15 sy-uline,
                   16 wa_error-text.
          CLEAR wa_error.
        ENDLOOP.
      ENDIF.
      ENDIF.
    ENDFORM.                    " f_error_handling
    F O R M A L   E N D - O F - P R O G R A M                           *
    *&      Form  f_validate_records
          text
    -->  p1        text
    <--  p2        text
    FORM f_validate_records .
    DATA: lw_tabix LIKE sy-tabix,
            lw_rowno LIKE sy-tabix,
            lw_xblnr LIKE bkpf-xblnr.
    LOOP AT lt_output INTO wa_input_file.
      Convert the document date into system date format
    PERFORM f_convert_date USING wa_input_file-bldat
                            CHANGING wa_input_file-bldat.
      Convert the posting date into system date format
        PERFORM f_convert_date USING wa_input_file-budat
                            CHANGING wa_input_file-budat.
      Popoulate the account code with leading zeroes
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = wa_input_file-newko
          IMPORTING
            output = wa_input_file-newko
          EXCEPTIONS
            OTHERS = 1.
        IF sy-subrc NE 0.
        ENDIF.
      Populate the i_proc_tab internal table.
        wa_proc_tab-xblnr = wa_input_file-xblnr.   "Reference number
        wa_proc_tab-bldat = wa_input_file-bldat.   "Document date
        wa_proc_tab-blart = wa_input_file-blart.   "Document type
        wa_proc_tab-bukrs = wa_input_file-bukrs.   "Company code
        wa_proc_tab-budat = wa_input_file-budat.   "Posting date
        wa_proc_tab-monat = wa_input_file-monat.   "Period
        wa_proc_tab-waers = wa_input_file-waers.   "Currency
       wa_proc_tab-bktxt = wa_input_file-bktxt.   "Document header text
        wa_proc_tab-docid  = wa_input_file-docid .   "Document ID
        wa_proc_tab-newbs = wa_input_file-newbs.   "Posting key
        wa_proc_tab-newko = wa_input_file-newko.   "Account
        wa_proc_tab-wrbtr = wa_input_file-wrbtr.   "Amount
        wa_proc_tab-zfbdt = wa_input_file-zfbdt.   "Baseline Date
       wa_proc_tab-zuonr = wa_input_file-zuonr.   "Assignment
       wa_proc_tab-xmwst = wa_input_file-xmwst.   "Calculate tax flag
       wa_proc_tab-mwskz = wa_input_file-mwskz.   "Tax code
       wa_proc_tab-sgtxt = wa_input_file-sgtxt.   "Text
       wa_proc_tab-kostl = wa_input_file-kostl.   "Cost center
        wa_proc_tab-nwbs2  = wa_input_file-newbs2 .   "Posting key for next record
        wa_proc_tab-nwko2  = wa_input_file-newko2.
        wa_proc_tab-wrbtr2 = wa_input_file-wrbtr2 .
        APPEND wa_proc_tab TO i_proc_tab.
        CLEAR: wa_input_file,
               wa_proc_tab.
      ENDLOOP.
    Get the list of document types from table T003
      SELECT blart
      INTO TABLE i_t003
      FROM t003
      FOR ALL ENTRIES IN i_proc_tab
      WHERE blart EQ i_proc_tab-blart.
      IF sy-subrc NE 0.
        CLEAR i_t003.
      ENDIF.
    Get the list of company code from table T001
      SELECT bukrs
      INTO TABLE i_t001
      FROM t001
      FOR ALL ENTRIES IN i_proc_tab
      WHERE bukrs EQ i_proc_tab-bukrs.
      IF sy-subrc NE 0.
        CLEAR i_t001.
      ENDIF.
    Get the list of currency code from table TCURC
      SELECT waers
      INTO TABLE i_tcurc
      FROM tcurc
      FOR ALL ENTRIES IN i_proc_tab
      WHERE waers EQ i_proc_tab-waers.
      IF sy-subrc NE 0.
        CLEAR i_tcurc.
      ENDIF.
    Get the list of posting key from table TBSL
      SELECT bschl
      INTO TABLE i_tbsl
      FROM tbsl
      FOR ALL ENTRIES IN i_proc_tab
      WHERE bschl EQ i_proc_tab-newbs.
      IF sy-subrc NE 0.
        CLEAR i_tbsl.
      ENDIF.
    Get the list of account number from table LFB1
      SELECT lifnr
             bukrs
      INTO TABLE i_lfb1
      FROM lfb1
      FOR ALL ENTRIES IN i_proc_tab
      WHERE lifnr EQ i_proc_tab-newko
        AND bukrs EQ i_proc_tab-bukrs.
      IF sy-subrc NE 0.
        CLEAR i_lfb1.
      ENDIF.
    Get the list of account number from table KNB1
    SELECT kunnr
             bukrs
      INTO TABLE i_knb1
      FROM knb1
      FOR ALL ENTRIES IN i_proc_tab
      WHERE kunnr EQ i_proc_tab-newko
        AND bukrs EQ i_proc_tab-bukrs.
      IF sy-subrc NE 0.
        CLEAR i_knb1.
      ENDIF.
    Get the list of account number from table SKA1
      SELECT saknr
      INTO TABLE i_ska1
      FROM ska1
      FOR ALL ENTRIES IN i_proc_tab
      WHERE saknr EQ i_proc_tab-newko.
      IF sy-subrc NE 0.
      ENDIF.
    Get the list of posting key from table TBSL
      SELECT bschl
      INTO TABLE i_tbsl_2
      FROM tbsl
      FOR ALL ENTRIES IN i_proc_tab
      WHERE bschl EQ i_proc_tab-nwbs2.
      IF sy-subrc NE 0.
        CLEAR i_tbsl_2.
      ENDIF.
    Get the list of account number from table LFB1
      SELECT lifnr
             bukrs
      INTO TABLE i_lfb1_2
      FROM lfb1
      FOR ALL ENTRIES IN i_proc_tab
      WHERE lifnr EQ i_proc_tab-nwko2
        AND bukrs EQ i_proc_tab-bukrs.
      IF sy-subrc NE 0.
        CLEAR i_lfb1_2.
      ENDIF.
    Get the list of account number from table KNB1
    SELECT kunnr
             bukrs
      INTO TABLE i_knb1_2
      FROM knb1
      FOR ALL ENTRIES IN i_proc_tab
      WHERE kunnr EQ i_proc_tab-nwko2
        AND bukrs EQ i_proc_tab-bukrs.
      IF sy-subrc NE 0.
        CLEAR i_knb1_2.
      ENDIF.
    Get the list of account number from table SKA1
      SELECT saknr
      INTO TABLE i_ska1_2
      FROM ska1
      FOR ALL ENTRIES IN i_proc_tab
      WHERE saknr EQ i_proc_tab-nwko2.
      IF sy-subrc NE 0.
      ENDIF.
    CLEAR lw_rowno.
      LOOP AT i_proc_tab INTO wa_proc_tab.
        lw_tabix = sy-tabix + 1.
        lw_rowno = lw_rowno + 1.
        IF lw_xblnr NE wa_proc_tab-xblnr.
          ADD 1 TO v_xblnr_cnt.
          lw_xblnr = wa_proc_tab-xblnr.
        ENDIF.
      Validate the document type
        READ TABLE i_t003 INTO wa_t003
             WITH KEY blart = wa_proc_tab-blart.
        IF sy-subrc NE 0.
          wa_error_file-row   = lw_rowno.
          wa_error_file-col   = 2.
          wa_error_file-value = wa_proc_tab-blart.
          wa_error_file-mssg  = text-002.
          APPEND wa_error_file TO i_error_file.
          DELETE i_proc_tab.
          CONTINUE.
        ENDIF.
      Validate the company code
        READ TABLE i_t001 INTO wa_t001
             WITH KEY bukrs = wa_proc_tab-bukrs.
        IF sy-subrc NE 0.
          wa_error_file-row   = lw_rowno.
          wa_error_file-col   = 3.
          wa_error_file-value = wa_proc_tab-bukrs.
          wa_error_file-mssg  = text-003.
          APPEND wa_error_file TO i_error_file.
          DELETE i_proc_tab.
          CONTINUE.
        ENDIF.
      Validate the period
        IF NOT wa_proc_tab-monat EQ c_01 AND
           NOT wa_proc_tab-monat EQ c_02 AND
           NOT wa_proc_tab-monat EQ c_03 AND
           NOT wa_proc_tab-monat EQ c_04 AND
           NOT wa_proc_tab-monat EQ c_05 AND
           NOT wa_proc_tab-monat EQ c_06 AND
           NOT wa_proc_tab-monat EQ c_07 AND
           NOT wa_proc_tab-monat EQ c_08 AND
           NOT wa_proc_tab-monat EQ c_09 AND
           NOT wa_proc_tab-monat EQ c_10 AND
           NOT wa_proc_tab-monat EQ c_11 AND
           NOT wa_proc_tab-monat EQ c_12.
          wa_error_file-row   = lw_rowno.
          wa_error_file-col   = 5.
          wa_error_file-value = wa_proc_tab-monat.
          wa_error_file-mssg  = text-004.
          APPEND wa_error_file TO i_error_file.
          DELETE i_proc_tab.
          CONTINUE.
        ENDIF.
      Validate the currency
        READ TABLE i_tcurc INTO wa_tcurc
             WITH KEY waers = wa_proc_tab-waers.
        IF sy-subrc NE 0.
          wa_error_file-row   = lw_rowno.
          wa_error_file-col   = 6.
          wa_error_file-value = wa_proc_tab-waers.
          wa_error_file-mssg  = text-005.
          APPEND wa_error_file TO i_error_file.
          DELETE i_proc_tab.
          CONTINUE.
        ENDIF.
      Validate the posting key
        READ TABLE i_tbsl INTO wa_tbsl
             WITH KEY bschl = wa_proc_tab-newbs.
        IF sy-subrc NE 0.
          wa_error_file-row   = lw_rowno.
          wa_error_file-col   = 9.
          wa_error_file-value = wa_proc_tab-newbs.
          wa_error_file-mssg  = text-006.
          APPEND wa_error_file TO i_error_file.
          DELETE i_proc_tab.
          CONTINUE.
        ENDIF.
       IF wa_tbsl = '31' . " then its a vendor account no
      Validate the account number
        READ TABLE i_lfb1 INTO wa_lfb1
             WITH KEY lifnr = wa_proc_tab-newko
                      bukrs = wa_proc_tab-bukrs.
        IF sy-subrc NE 0.
          READ TABLE i_ska1 INTO wa_ska1
               WITH KEY saknr = wa_proc_tab-newko.
          IF sy-subrc NE 0.
            wa_error_file-row   = lw_rowno.
            wa_error_file-col   = 10.
            wa_error_file-value = wa_proc_tab-newko.
            wa_error_file-mssg  = text-007.          "Invalid Vendor account
            APPEND wa_error_file TO i_error_file.
            DELETE i_proc_tab.
            CONTINUE.
          ENDIF.
        ENDIF.
      ENDIF.
      IF wa_tbsl = '11' OR  wa_tbsl = '01'.  "Then its customer no.
      Validate the account number
        READ TABLE i_knb1 INTO wa_knb1
             WITH KEY kunnr = wa_proc_tab-newko
                      bukrs = wa_proc_tab-bukrs.
        IF sy-subrc NE 0.
          READ TABLE i_ska1 INTO wa_ska1
               WITH KEY saknr = wa_proc_tab-newko.
          IF sy-subrc NE 0.
            wa_error_file-row   = lw_rowno.
            wa_error_file-col   = 10.
            wa_error_file-value = wa_proc_tab-newko.
            wa_error_file-mssg  = text-026.          " Invalid Customer account
            APPEND wa_error_file TO i_error_file.
            DELETE i_proc_tab.
            CONTINUE.
          ENDIF.
        ENDIF.
      ENDIF.
      Validate the posting key2
    CLEAR wa_tbsl.
        READ TABLE i_tbsl_2 INTO wa_tbsl
             WITH KEY bschl = wa_proc_tab-nwbs2.
        IF sy-subrc NE 0.
          wa_error_file-row   = lw_rowno.
          wa_error_file-col   = 13.
          wa_error_file-value = wa_proc_tab-nwbs2.
          wa_error_file-mssg  = text-006.
          APPEND wa_error_file TO i_error_file.
          DELETE i_proc_tab.
          CONTINUE.
        ENDIF.
       IF wa_tbsl = '31' . " then its a vendor account no
      Validate the account number2
    CLEAR wa_lfb1.
        READ TABLE i_lfb1_2 INTO wa_lfb1
             WITH KEY lifnr = wa_proc_tab-nwko2
                      bukrs = wa_proc_tab-bukrs.
        IF sy-subrc NE 0.
        CLEAR wa_ska1.
          READ TABLE i_ska1_2 INTO wa_ska1
               WITH KEY saknr = wa_proc_tab-nwko2.
          IF sy-subrc NE 0.
            wa_error_file-row   = lw_rowno.
            wa_error_file-col   = 14.
            wa_error_file-value = wa_proc_tab-nwko2.
            wa_error_file-mssg  = text-007.          "Invalid Vendor account
            APPEND wa_error_file TO i_error_file.
            DELETE i_proc_tab.
            CONTINUE.
          ENDIF.
        ENDIF.
      ENDIF.
      IF wa_tbsl = '11' OR  wa_tbsl = '01'.  "Then its customer no.
      Validate the account number2
    CLEAR wa_knb1.
        READ TABLE i_knb1_2 INTO wa_knb1
             WITH KEY kunnr = wa_proc_tab-nwko2
                      bukrs = wa_proc_tab-bukrs.
        IF sy-subrc NE 0.
    CLEAR  wa_ska1.
          READ TABLE i_ska1_2 INTO wa_ska1
               WITH KEY saknr = wa_proc_tab-nwko2.
          IF sy-subrc NE 0.
            wa_error_file-row   = lw_rowno.
            wa_error_file-col   = 14.
            wa_error_file-value = wa_proc_tab-nwko2.
            wa_error_file-mssg  = text-026.          " Invalid Customer account
            APPEND wa_error_file TO i_error_file.
            DELETE i_proc_tab.
            CONTINUE.
          ENDIF.
        ENDIF.
      ENDIF.
      Populate the i_bdc_tab internal table.
        MOVE-CORRESPONDING wa_proc_tab TO i_bdc_tab.
      Get the posting key and account for the next records
        READ TABLE i_proc_tab INTO wa_proc_tab INDEX lw_tabix.
        IF i_bdc_tab-xblnr EQ wa_proc_tab-xblnr.
          IF sy-subrc EQ 0.
            i_bdc_tab-nwbs2 = wa_proc_tab-newbs.
            i_bdc_tab-nwko2 = wa_proc_tab-newko.
          ENDIF.
        ENDIF.
        APPEND i_bdc_tab.
      ENDLOOP.
    ENDFORM.                    " f_validate_records
    *&      Form  f_convert_date
          text
         -->P_WA_INPUT_FILE_BLDAT  text
         <--P_WA_INPUT_FILE_BLDAT  text
    FORM f_convert_date  USING    fp_in_date
                         CHANGING fp_out_date.
    DATA: lw_in_date(10)  TYPE c,
            lw_out_date(10) TYPE c.
      lw_in_date = fp_in_date.
      CALL FUNCTION '/SAPDMC/LSM_DATE_CONVERT'
        EXPORTING
          date_in             = lw_in_date
          date_format_in      = c_dymd
          to_output_format    = c_x
        IMPORTING
          date_out            = lw_out_date
        EXCEPTIONS
          illegal_date        = 1
          illegal_date_format = 2
          no_user_date_format = 3
          OTHERS              = 4.
      IF sy-subrc EQ 0.
        fp_out_date = lw_out_date.
      ENDIF.
    ENDFORM.                    " f_convert_date
    *&      Form  f_audit_report
          text
    -->  p1        text
    <--  p2        text
    FORM f_audit_report .
    DATA: lv_input     TYPE i,
            lv_process   TYPE i,
            lv_error     TYPE i,
            lv_bdc_error TYPE i.
      DESCRIBE TABLE lt_output LINES lv_input.
      DESCRIBE TABLE i_bdc_tab LINES lv_process.
      DESCRIBE TABLE i_error_file LINES lv_error.
      DESCRIBE TABLE it_error LINES lv_bdc_error.
      IF p_test = c_x.
      Audit report when the program is executed in test mode
        ULINE.
        WRITE:/ text-011.
        ULINE.
        WRITE: /5 text-012,
               50 lv_input,
               /5 text-013,
               50 lv_process,
               /5 text-014,
               50 lv_error,
               /5 text-025,
               50 v_xblnr_cnt.
        SKIP 2.
        WRITE: 1 text-015.
        ULINE.
        WRITE: /5 text-016,
               20 text-017,
               40 text-018,
               55 text-019.
        ULINE.
        LOOP AT i_error_file INTO wa_error_file.
          WRITE: /5 wa_error_file-row,
                 20 wa_error_file-col,
                 40 wa_error_file-value,
                 55 wa_error_file-mssg.
        ENDLOOP.
        ENDIF.
    ENDFORM.                    " f_audit_report
    check it is according to ur requirement.
    thanks jayant

  • Warning: The disabled test "SomeTest" was removed from the test run.

    Hello,
    When I mark test with Ignore attribute, mstest show the next message: Warning: The disabled test "SomeTest" was removed from the test run. And I don't want to see this warning.
    The question is: Is there any option to hide this warning, turn it off.
    Sincerely,
    Alex

    Hi Alex,
    I think I could repro this issue. For the Ignore attribute, it would share us this warning message by design when we run it in MsTest.exe.
    You could submit this feature request:
    http://visualstudio.uservoice.com/forums/121579-visual-studio.
    The Visual Studio product team is listening to user voice there. You can send your idea there and people can vote.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • LSMW TEST RUN

    Hello Gurus,
    Is there any method to do LSMW test run.
    I am working on LSMW for FB01 with standar batch program RFBIBL00. Is there any option to do test run the records.
    Like in BAPIS we will be having a flag where we can check the data. Is this function is avalible in LSMW recording.
    Urgent...... Plz.........-.......
    Thanks,
    Feroz.

    Hi Feroz,
    You can write the code for the same.........
    1. define one variable like pc_test in global data event in 5th step of LSMW ie field mappings and conversion step.
    PARAMETERS: PC_TEST AS CHECKBOX DEFAULT 'X'
    2. do all the validations.
    3. If pc_test = 'X'.
    then in the end of transaction step write the code like......
    IF pc_test = 'X'.
      skip_transaction.
    thats it, it will not transfer the records for further process.
    You can see this parameter in convert data step.

  • My system is asking to run the hard disk test run...What i have to do? can any one guide me????

    model is Hp Pavilion  g6.. windows 7 home basic,
    My system is asking to run the hard disk test run.. i have run , there was no error, but the message is still comming, i do not kow whether i amdoing it in a right way or not.. Please any giude do that test and find the issue.....

    Hi,
    If you receive this message when starting the notebook, try the following.
    Shut down the notebook.  Tap away at f10 as you start the notebook to enter the bios menu.  Under the Advanced or Diagnostic tab you should find the facility to run a test on the Hard Drive.  Post back with the details of any error messages.
    If you receive this message while Windows is running , click the Start Menu, click Computer, left click Local Disc C once to highlight it, right click Local Disc C and select Properties.  Click the Tools tab and then click the button to 'Check the Drive for Errors'.  In the following window make sure both boxes are ticked and then click Start.  Agree to schedule the check at the next system restart and then restart the notebook - this process can take a couple of hours to complete before loading back into Windows.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • I want to download and install adobe flash player. When I do so one occur. A dialog box appears but it has no run option but a save file or cancel option.

    # Question
    I want to download and install adobe flash player. When I do so one of 2 things occur. A dialog box appears but it has no run option but a save file or cancel option. The other is if the proper dialog box appears, I agree and the a different box appears and there is foxfire with a red circle with a diagonal line across is appears.

    I find the easiest way to install Adobe Flash is to use the manual installers. You just need to download the installer to your computer, then run it to install Flash. For more details see http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    That link states you should uninstall earlier versions, as you don't have the version of Flash used by Firefox you can skip that step.

  • Java -jar Test.jar  option is not identifing the CLASSPATH on UNIX BOX

    Hi All,
    java -jar Test.jar
    I am trying to execute Test.jar file using -jar option. I am able to excute the Test.jar file but it is not identifing the CLASSPATH set for other JAR files which is used in part of Test.jar. Saying java.lang.NoClassDefFoundError: for the class which are set in CLASSPATH.
    The same is able to identify the CLASSPATH if i excute the Test.class file directly with out -jar option like
    java Test. In this case everything is working fine.
    Can any one tell me why it is not identifying the classpath if i use or execute with java -jar Test.jar option.
    Thanks,
    sha

    When you use the -jar option, the only classpath that is used is the Class-Path in the manifest file of the jar. If there is no Class-Path, then only the jar is searched for classes. If there is a Class-Path, the paths must be relative to the jar file.

Maybe you are looking for