How to track error message when calling Transaction: va02

Hi all,
    As we all know, when we change an order through T-Code: VA02, system will update modified data to corresponding database. Meanwhile, if our operate is not legal or incorrect on T-code: VA02, system will call corresponding error messages to us.
    Now I want to know:
   1. how to track the error messages
   2. Is there any Tcode such as: SM21 that we can see the message logs after our operation?
Thanks.

Hi ,
message table for call transaction
DATA: BEGIN OF G_T_MSG OCCURS 0.
        INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF G_T_MSG.
Exucute transaction via Call Transaction
  CALL TRANSACTION  'FB01'
                 USING g_t_bdcdata
                 MODE g_l_mode
                 UPDATE 'S'
                 MESSAGES INTO g_t_msg          .
errors will be stpored in the table g_t_msg ..
Thanks .

Similar Messages

  • How to track Error message no.

    Hi,
    Could anyone please expalin how to track error messages using message no.
    Urgent???????????????????
    Reg,
    CM

    Hi,
    You can not track just based on the Message number whether it is Error or Warning Message and where it is effecting.
    But for this message number you will have Message class/Application Area Based on this Message class you can check on which area (Masterdata/Purchasing/Inv Mgmt/LIV) this message number is effecting.
    Then in SE91 you can enter this Message class then system will show you which area it is related,what is the message number description.
    Then in MM IMG Settings you can check message number for that Particular Area.--Define Attibutes for System messages in every area.
    rgds
    Chidanand

  • Error message when running Transaction Code = ME84

    hi,
    i am getting an error message when running Transaction Code = ME84
    Error is 'No processing (error message P5 017), No data for chosen selection'
    can someone please guide me on this ?

    Hi Mahendra,
    There are several reasons for the release not happeneing.
    1. The issue could be in the selection of release type
    2. Scope of selection
    3. Strategy profile
    Please check whether the selection parameters are considered are right for release to happen.
    Regards,
    Harish

  • Display error messages in Call transaction

    Hi Gurus,
    I have donme BDC using call transaction..can anybody help me in displaying the error messages in call transaction..
    A detailed code wud be very much helpful..
    full marks wud given
    regards
    Sahil

    hi check this,
    PERFORM Z11_BDC_VA02.
          ELSE.
            MESSAGE I013 WITH TEXT-013.
          ENDIF.
    ELSE.
              CLEAR V_FLAG.
           MESSAGE E012 WITH TEXT-012.
    ENDIF.
    FORM z11_bdc_va02 .
    *COVER 1
    perform bdc_dynpro      using 'SAPMV45A' '0102'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-VBELN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-VBELN'
                                  wa_head_detail-vbeln.
    *COVER 2
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\03'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(01)'.
    *COVER 3
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ITNE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(01)'.
    *COVER 4
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-KWMENG'.
    perform bdc_field       using 'VBAP-MATNR'
                                  wa_head_detail-matnr.
    perform bdc_field       using 'RV45A-KWMENG'
                                  v_kwmeng.
    perform bdc_field       using 'VBAP-VRKME'
                                  wa_head_detail-meins.
    *COVER 5
    perform bdc_dynpro      using 'SAPLSPO2' '0101'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '=OPT1'.
    call transaction 'VA02' using it_tab1 mode 'A' UPDATE 'S' MESSAGES INTO
    IT_TAB_ERROR.
    "CAlling transaction with all screen
    Loop at it_tab_error.
    if it_tab_ERROR-MSGTYP = 'E' .
    clear v_flag.
    message I014 with TEXT-014.
    else.
    clear v_flag.
    message I019 with TEXT-019.
    endif.
    endloop.
    refresh it_tab1.
    clear V_KWMENG.
    ENDFORM.                    " z11_bdc_va02
    Reward if helpful,
    Gaurav J.
    Edited by: GAURAV on Feb 4, 2008 9:10 AM

  • Error messages when calling RSDRI_INFOPROV_READ for more than one time

    Hello all,
    I need to write a cube, however, before I do this I need to check whether there are already data in the target cube for a certain accounting period. This I do by reading the cube via FM RSDRI_INFOPROV_READ. The following coding is called from a running program after pushing a button on the screen.
    <i>* clear internal tables.
          CLEAR gt_range.
          CLEAR gt_sfc.
    *fill internal tables
          CLEAR ls_sfc.
          ls_sfc-chanm    = '0FISCPER'.
          ls_sfc-chaalias = '0FISCPER'.
          ls_sfc-orderby  = 0.
          INSERT ls_sfc INTO TABLE gt_sfc.
          CLEAR ls_range.
          ls_range-chanm    = '0FISCPER'.
          ls_range-sign     = rs_c_range_sign-including.
          ls_range-compop   = rs_c_range_opt-equal.
          ls_range-low      = '2007001'.
          APPEND ls_range TO gt_range.
    here I do not know what exactly to do with this flag
          lf_first_call = abap_true.
          CALL FUNCTION 'RSDRI_INFOPROV_READ'
            EXPORTING
              i_infoprov             = 'T01'
              i_th_sfc               = gt_sfc
              i_th_sfk               = gt_sfk
              i_t_range              = gt_range
              i_packagesize          = 1
            IMPORTING
              e_t_data               = lt_rd_cube
              e_end_of_data          = lf_eod
            CHANGING
              c_first_call           = lf_first_call
            EXCEPTIONS
              illegal_input          = 1
              illegal_input_sfc      = 2
              illegal_input_sfk      = 3
              illegal_input_range    = 4
              illegal_input_tablesel = 5
              no_authorization       = 6
              illegal_download       = 7
              illegal_tablename      = 8
              trans_no_write_mode    = 9
              inherited_error        = 10
              x_message              = 11
              OTHERS                 = 12.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          lf_eod = abap_false.
          IF NOT lt_rd_cube IS INITIAL.
            RAISE target_data_found.
            EXIT.
          ENDIF.</i>
    When testing with a period for which data already exists, it runs through quite perfectly. The return table is filled and I know that data exists and I EXIT.
    However, if I press the button again (program is still running) I get an error message 'Nested call of RSDRI_INFOPROV_READ'. And this for each time I press the button.
    So I thought I should clear the flag lf_first_call. After having done so I get an error message 'SQL Error'. Funny is that I get this error only every second time the Function Module is processed. Every other time it works perfectly.
    How can I get rid of those error messages?
    PLEASE - can anybody help me?
    Many thanks in advance,
    Thomas

    Hi,
    you have something like:
    end_of_data = ' '.
    first_call  = 'X'.
      WHILE end_of_data = ' '.
            CALL FUNCTION 'RSDRI_INFOPROV_READ'
              EXPORTING  i_infoprov             = ....
                         i_th_sfc               = ...
                         i_th_sfk               = ...
                         i_t_range              = ...
                         i_reference_date       = ...
                         i_save_in_table        = ....
                         i_save_in_file         = ....
                         I_USE_DB_AGGREGATION   = ...
                         i_packagesize          = 100000
                         i_authority_check      = ...
              IMPORTING  e_t_data               = .....
                         e_end_of_data          = end_of_data
              CHANGING   c_first_call           = first_call
              EXCEPTIONS illegal_input          = 1
                         illegal_input_sfc      = 2
                         illegal_input_sfk      = 3
                         illegal_input_range    = 4
                         illegal_input_tablesel = 5
                         no_authorization       = 6
                         ncum_not_supported     = 7
                         illegal_download       = 8
                         illegal_tablename      = 9
                         OTHERS                 = 11.
      ENDWHILE.
    hope this helps...
    Olivier.

  • MEASUREM_DOCUM_RFC_SINGLE_001 ( How to track Error message in BAPI_)

    Hi Friends
      For the crating Measure ment point i have use BAPI MEASUREM_DOCUM_RFC_SINGLE_001  But my problem is  One order having 10 measuremntpoint. In that 6 creating successfull but four measurement point was error. But that BAPI no option to track error messages. Please let me know how to track message and any other way to fidn the messages.
    Thanks in advance.
    Prabu K

    Hi,
    define itab for collecting errors of type BAPIRET2.
    After the FM check sy-subrc and append the errors to itab.
    IF sy-subrc <> 0.
        ls_message-id = sy-msgid.
        ls_message-type = sy-msgty.
        ls_message-number = sy-msgno.
        ls_message-message_v1 = sy-msgv1.
        ls_message-message_v2 = sy-msgv2.
        ls_message-message_v3 = sy-msgv3.
        ls_message-message_v4 = sy-msgv4.
        APPEND ls_message to et_return.
        CLEAR ls_message.
      ENDIF.
    Regards
    Praveen

  • How can I get error message when calling pl/sql

    Hi,
    I call a pl/sql java wrapper generated by Rosetta.
    public static void startWf(
    OracleConnection _connection,
    BigDecimal p_goal_header_id,
    BigDecimal p_submiter_userid,
    String p_commit,
    String p_init_msg_list,
    String [] x_return_status,
    BigDecimal [] x_msg_count,
    String [] x_msg_data
    ) throws SQLException
    the pl/sql is written by the standard way of OAF backend,
    PROCEDURE start_wf ( p_goal_header_id in number
              ,p_submiter_userid     in number
    ,p_commit in varchar2 DEFAULT FND_API.G_TRUE
              ,p_init_msg_list in varchar2 DEFAULT FND_API.G_FALSE
    ,x_return_status out varchar2
    ,x_msg_count out number
    ,x_msg_data out varchar2);
    when running this procedure in TOAD, in case of error, following script can print error message:
    if l_return_status <> 'S' then
    dbms_output.put_line('Result');
    dbms_output.put_line('status: '||l_return_status);
    dbms_output.put_line('error count: '||l_msg_count);
    dbms_output.put_line('Loop Error');
    dbms_output.put_line('Err: '||fnd_msg_pub.get(-1,p_encoded=>'F'));
    for i in 2..l_msg_count loop
    dbms_output.put_line('Err: '||fnd_msg_pub.get(p_encoded=>'F'));
    end loop;
    end if;
    if l_return_status = 'S' then
    dbms_output.put_line('Success');
    end if;
    end;
    My question is when calling pl/sql java wrapper from Java, in case of Error, return_status="E", then in order to get exact error msg, is there any equivalent java method such as get error from pageContext or OADBTransaciton.. etc instead of calling again pl/sql fnd_msg_pub.get to get error msg?
    thanks
    Lei

    Lei,
    You can use
    checkErrors(OADBTransaction pTx,
    int pMessageCount,
    String pReturnStatus,
    String pMessageData)
    method in OAExceptionUtils Class.For details look at javadoc of OAExceptionUtils Class.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to pass error message when restoring iPhone on iTunes?

    I am trying to restore my iPhone on iTunes. But since I have update my MbP to OSX 10.8.2 I can not get passed an error message on iTunes after it is done extracting the software and is contacting iTunes. I have wifi and everything works fine. I heard it could be a host issue, but I have no idea how to fix it? Any help would be appreciated.

    Hi ,
    message table for call transaction
    DATA: BEGIN OF G_T_MSG OCCURS 0.
            INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF G_T_MSG.
    Exucute transaction via Call Transaction
      CALL TRANSACTION  'FB01'
                     USING g_t_bdcdata
                     MODE g_l_mode
                     UPDATE 'S'
                     MESSAGES INTO g_t_msg          .
    errors will be stpored in the table g_t_msg ..
    Thanks .

  • Error message when calling a Business Connector RFC destination from SRM

    Hello all,
    We are facing one problem with data Purchase Order transmission between SRM 5.0 (SRM_SERVER 5.5, extended classic scenario) and Business Connector 4.7.
    We made needed customizing in order to have "XML / XI" output medium available in tab 'Company Data' in "Manage Business Partners" web transaction (by updating BBP_USE_AI table in SM30 transaction).
    Then, we implemented BAdI definition BBP_EBPXML_OUT_BADI with method PURCHASEORDER in order to change XI system type to Business Connector.
    In this way, PO transfer data between SRM and BC is done using BC Module Function BAPI_POEC_XML_SEND (TCP/IP RFC connection was defined for Purchase Order in BBPC_RFCDEST table).
    Nevertheless, even if method BBP_PO_SEND_XML is correctly triggered when PO is created with a vendor with XML output medium, we have in the document output log ("Process Purchase Order" web transaction) an error message:
    ' Error (Unknown Partner and Message Type. Routing Rule created. Sender: SMR Receiver:) when calling RFC destination BC '
    where SRM is the SRM log. sys. and BC the Business Connector log. sys.
    Our EAI team is working on it, but if you have any idea, your are welcome !
    Thank you in advance.
    Regards.
    Laurent

    Hello Christian,
    Thank you for your help. However, we abandoned this solution between SRM and Business Connector.
    So, we followed instructions indicated in OSS note 883693 - "ECS: PO output determination in R/3".
    Nevertheless, in order to restrict this behaviour for specific vendors and purchasing organizations, we added some filters.
    It is working fine.
    However, when the PO is modified in SRM, then order again, PO is modified in R/3 (by the RFC user from SRM) more than once.
    As a consequence, we have as much messages as modifications of the order in R/3 (due to multiple RFC access with the SRM RFC user).
    Does anybody have an idea to have only one R/3 output message when the PO is modified in SRM ?
    One solution could be to check in the NAST table if the time creation of the last output message is lower than, for example, one minute.
    If it is the case, we do not allow R/3 ouput message.
    Any suggestions is welcome.
    Regards.
    Laurent.

  • How to upload error records in call transaction method

    Hi all,
    While uploading data by using call transaction. If any errors occured, how can we process that  error records to database.
    If all records are processed. How can we display the recent records which where uploaded.
    AdvanceThanks for all.

    Hi Bharath
    You can handle this in many ways. But the easiest option to do is as below,
    once the call transaction ends in error, move that particular upload data to a separate internal table. Then finally download all these data to an error file.
    Besides this after processing all the records diplay the log for error. So that users can modify the error in the file and can use the same for uploading again. For the data that has been processed successfully you can display the log similarly.
    The error as well as sucess messages can be obtained from the messages table.
        CALL TRANSACTION TCODE USING BDCDATA
                         MODE   CTUMODE
                         UPDATE CUPDATE
                         MESSAGES INTO MESSTAB.
    Regards
    Kathirvel

  • Track error records in Call Transaction method

    Hi
    I have used call transaction method for uploading legacy data.
    I need to track the error record.
    Please help me to find out the solution.
    Thanks in advance
    Reagards
    shriraam

    HI,
    !. Obtain  the  messaged into an Interal table of type BDCMSGCOLL using Call Transaction  syntax..
                   Call Transactio <Tcode>
                           using <BDC Table>
                          mode  <A/N/P>
                          update  <A/S>
                         messages  INTO <mSGTAB>
    2. Read the Msg table for eroors and success messages
    3. Then format the messge with the help of Function Module  :'Format_messages'.
    4. Display the respective messges with the help of write statements or with the help of ALV.
    Rgds
    Umakanth

  • How to get a message from call transaction in RFC call

    Hello :
    I would like to ask one favor i make a 2 call transaction in a RFC funtion when i make the first CALL TRANSACTION using te next statement.
        CALL TRANSACTION 'F-43'
          USING bdcdata MESSAGES INTO messtab2 OPTIONS FROM l_fromopt.
    I recive the number of the document in the field  sy-msgv1 from the message table messtab2 , then i make the second  CALL TRANSACTION  and i am waiting to get the other number of the document from the table messtab3  using the next statatement.
         CALL TRANSACTION 'FIBLFFP'
            USING bdcdata MESSAGES INTO messtab3 OPTIONS FROM l_fromopt. but now the table messtab3 don't send the number of document , and i need to get the number of this document for making a REFERENCE.
    thanks a lot for you help

    FORM bdc_transaction USING tcode TYPE tcode.
      DATA: l_mstring(480).
      DATA: l_subrc  TYPE sy-subrc,
            lwa_t100 TYPE t100.
      DATA : gv_ctumode TYPE ctu_params-dismode VALUE 'A'.
    call transaction using
    BREAK-POINT.
      REFRESH gt_messtab.
      CLEAR gwa_messtab.
      gv_ctumode = gc_ctumode.
      CALL TRANSACTION tcode USING gi_bdcdata                "#EC CI_CALLTA
                       MODE   gv_ctumode
                       UPDATE gc_cupdate
                       MESSAGES INTO gt_messtab.
      l_subrc = sy-subrc.
      IF sy-subrc <> 0.
        WRITE: / 'CALL_TRANSACTION',
                 tcode,
                 'returncode:',
                 l_subrc,
                 'RECORD:',
                 sy-index.
        LOOP AT gt_messtab INTO gwa_messtab.
          CLEAR lwa_t100.
          SELECT SINGLE * FROM t100 INTO lwa_t100  WHERE sprsl = gwa_messtab-msgspra
                                    AND            arbgb = gwa_messtab-msgid
                                    AND            msgnr = gwa_messtab-msgnr.
          IF sy-subrc = 0.
            l_mstring = lwa_t100-text.
            IF l_mstring CS '&1'.
              REPLACE '&1' WITH gwa_messtab-msgv1 INTO l_mstring.
              REPLACE '&2' WITH gwa_messtab-msgv2 INTO l_mstring.
              REPLACE '&3' WITH gwa_messtab-msgv3 INTO l_mstring.
              REPLACE '&4' WITH gwa_messtab-msgv4 INTO l_mstring.
            ELSE.
              REPLACE '&' WITH gwa_messtab-msgv1 INTO l_mstring.
              REPLACE '&' WITH gwa_messtab-msgv2 INTO l_mstring.
              REPLACE '&' WITH gwa_messtab-msgv3 INTO l_mstring.
              REPLACE '&' WITH gwa_messtab-msgv4 INTO l_mstring.
            ENDIF.
            CALL FUNCTION 'FORMAT_MESSAGE'
              EXPORTING
                id        = gwa_messtab-msgid
                lang      = sy-langu
                no        = gwa_messtab-msgnr
                v1        = gwa_messtab-msgv1
                v2        = gwa_messtab-msgv2
                v3        = gwa_messtab-msgv3
                v4        = gwa_messtab-msgv4
              IMPORTING
                msg       = l_mstring
              EXCEPTIONS
                not_found = 1
                OTHERS    = 2.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
            CONDENSE l_mstring.
            IF NOT l_mstring IS INITIAL.
              WRITE: / gwa_messtab-msgtyp, l_mstring(250).
              MESSAGE l_mstring TYPE 'I'.
            ENDIF.
          ELSE.
            WRITE: / gwa_messtab.
          ENDIF.
        ENDLOOP.
        SKIP.
      ENDIF.

  • Bdc error message in call transaction

    Hi all,
            Can anyone send me a program where they have used the ' BDCMSGCOLL ' structure and format_message FM. I need only complete program, please don't send sample codings or just a part of coding.
    Points are assured.
    Thanks and regards,
    subbu.

    Hi,
    Here is the BDC recording program  for updating  a custom field (out of 3 custom fields)  in CALL TRANSACTION method depends upon which value is given in text file, based on that the corresponding radio button will be selected for that PERNR in PA30.(For 3 custom fields in PA0007) created.
    Flat file contains 1) PENR    2) Custom field1      3) CF2        4) CF3.
    The values are like [ '636363', ' ', 'X', ' ' ] .
    Here is the complete program using BDCMSGCOLL structure.
    report Y0007_BDC NO STANDARD PAGE HEADING MESSAGE-ID RP LINE-SIZE 180." LINE-COUNT 28.
                  DATA DECLARATION                                     *
    TYPES : BEGIN OF TY_0007,
              PERNR      TYPE PERNR,      " PERNR
              SCHKZ      TYPE SCHKN,      " Work Schudule
              ZTERF      TYPE PT_ZTERF,   " Time Magmt Status
              R1         TYPE C,
              R2         TYPE C,
              R3         TYPE C,
            END OF TY_0007.
    DATA  : INT_0007  TYPE STANDARD TABLE OF TY_0007 WITH HEADER LINE,
            WA_0007   TYPE TY_0007.
    DATA: P_FNAME TYPE IBIPPARMS-PATH.
    DATA : begin of int_out occurs 0,
      pernr type persno,
      mesg(300),
      end of int_out.
    DATA : BEGIN OF int_err occurs 0,
      pernr type persno,
      mesg(300),
      end of int_err.
    include bdcrecx1.
              SELECTION SCREEN                                         *
    SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
    PARAMETERS : P_PATH TYPE string.
    SELECTION-SCREEN END OF BLOCK B.
    SELECTION-SCREEN END OF BLOCK A.
          CALL FUNCTION FOR INPUT FILE NAME                            *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_path.
      CALL FUNCTION 'F4_FILENAME' 
      EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = ' '
        IMPORTING
          FILE_NAME     = P_FNAME.
      p_path = p_fname.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    start-of-selection.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = P_PATH
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = 'X'
        TABLES
          DATA_TAB                = INT_0007
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      perform open_group.
    *Looping pernr values*
      LOOP AT INT_0007 INTO WA_0007.
        perform bdc_dynpro      using 'SAPMP50A' '1000'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '/00'.
    *INSERTING THE PERNR VALUE*
        perform bdc_field       using 'RP50G-PERNR'
                                      WA_0007-PERNR.            "'00001011'.
        perform bdc_field       using 'RP50G-TIMR6'
                                      'X'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RP50G-CHOIC'.
        perform bdc_field       using 'RP50G-CHOIC'
                                      '0007'.
        perform bdc_dynpro      using 'SAPMP50A' '1000'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RP50G-PERNR'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=INS'.
        perform bdc_field       using 'RP50G-PERNR'
                                      WA_0007-PERNR.            "'1011'.
        perform bdc_field       using 'RP50G-TIMR6'
                                      'X'.
        perform bdc_field       using 'RP50G-CHOIC'
                                      'Planned Working Time - 0007'.
        perform bdc_dynpro      using 'MP000700' '2000'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=UPD'.
        perform bdc_field       using 'P0007-BEGDA'
                                      '12/01/2007'.
        perform bdc_field       using 'P0007-ENDDA'
                                      '12/31/9999'.
    *INSERTING THE WORK SCHEDULE*
        perform bdc_field       using 'P0007-SCHKZ'
                                      WA_0007-SCHKZ.            "'N12'.
        perform bdc_field       using 'P0007-ZTERF'
                                      WA_0007-ZTERF.            "'1'.
    *INSERTING THE OVERTIME CLASS*
        IF WA_0007-R1 = 'X'.
          perform bdc_field       using 'ZHQ0007-OVT_ELGBLE'
                                        'X'.
        ELSEIF WA_0007-R2 = 'X'.
          perform bdc_field       using 'ZHQ0007-OVT_NOTELG'
                                              'X'.
        ELSEIF WA_0007-R3 = 'X'.
          perform bdc_field       using 'ZHQ0007-OVT_TMPELG'
                                            'X'.
        ENDIF.
    *BDC output for transaction code*
       perform bdc_transaction using 'pa30'.  (STD)
        perform f_bdc_output using 'pa30'.  (write on our own)
      ENDLOOP.
    **Writing the output**
      PERFORM f_write_output.
      perform close_group.
    *&      Form  f_write_output
          text
    -->  p1        text
    <--  p2        text
    FORM f_write_output .
    *For Successfull  Records*
      if int_OUT[] IS NOT INITIAL.
        WRITE : /50 TEXT-004 color 4.
        write : / sy-uline.
        LOOP AT INT_OUT.
          WRITE : /40 int_out-pernr,50 '-->',54 int_out-mesg.
        ENDLOOP.
      ENDIF.
      write / sy-uline.
      SKIP 2.
    *For Error records*
      if int_err[] IS NOT INITIAL.
        WRITE /53 text-005 color 6.
        write / sy-uline.
        LOOP AT int_err.
          write :/40 int_err-pernr,50 '-->',54 int_err-mesg.
        ENDLOOP.
      endif.
      write / sy-uline.
    ENDFORM.                    " f_write_output
    *&      Form  f_bdc_output
          text
         -->P_0369   text
    FORM f_bdc_output  USING    VALUE(P_0369).
      DATA: L_MSTRING(480).
      DATA: L_SUBRC LIKE SY-SUBRC.
      REFRESH MESSTAB.
    *Capturing the output message*
      CALL TRANSACTION 'PA30' USING BDCDATA
                       MODE   CTUMODE
                       UPDATE CUPDATE
                       MESSAGES INTO MESSTAB.
    L_SUBRC = SY-SUBRC.
      IF SMALLLOG <> 'X'.
        LOOP AT MESSTAB.
    *Selection for capturing the text for records*
          SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
                                    AND   ARBGB = MESSTAB-MSGID
                                    AND   MSGNR = MESSTAB-MSGNR.
          IF SY-SUBRC = 0.
    *Moving the text from T100 to local variable*
            L_MSTRING = T100-TEXT.
            IF ( MESSTAB-MSGTYP = 'W' or
                MESSTAB-MSGTYP = 'S' OR
                MESSTAB-MSGTYP = 'E' ).
    *Moving the success records pernr and text to internal table*
              IF MESSTAB-MSGTYP = 'S'.
                INT_OUT-PERNR = WA_0007-PERNR.
                INT_OUT-MESG  = L_MSTRING.
                APPEND INT_OUT.
                CLEAR INT_OUT.
    *Moving the success records pernr and text to internal table*
              ELSEIF MESSTAB-MSGTYP = 'E'.
    *For getting the error text exactly*
                IF L_MSTRING CS '&1'.
                  REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
                  REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
                  REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
                  REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
                ELSE.
                  REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
                  REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
                  REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
                  REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
                ENDIF.
                CONDENSE L_MSTRING.
                INT_ERR-PERNR = WA_0007-PERNR.
                INT_ERR-MESG  = L_MSTRING.
                APPEND INT_ERR.
                CLEAR  INT_ERR.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.
        SKIP.
      ENDIF.
    *&     CALL FUNCTION 'BDC_OPEN_GROUP'
      IF L_SUBRC <> 0 AND E_GROUP <> SPACE.
        IF E_GROUP_OPENED = ' '.
          CALL FUNCTION 'BDC_OPEN_GROUP'
            EXPORTING
              CLIENT   = SY-MANDT
              GROUP    = E_GROUP
              USER     = E_USER
              KEEP     = E_KEEP
              HOLDDATE = E_HDATE.
          E_GROUP_OPENED = 'X'.
        ENDIF.
    *&     CALL FUNCTION 'BDC_INSERT'
        CALL FUNCTION 'BDC_INSERT'
          EXPORTING
            TCODE     = 'PA30'
          TABLES
            DYNPROTAB = BDCDATA.
    *&     CALL FUNCTION 'BDC_CLOSE_GROUP'
        CALL FUNCTION 'BDC_CLOSE_GROUP'
          EXCEPTIONS
            NOT_OPEN    = 1
            QUEUE_ERROR = 2
            OTHERS      = 3.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      REFRESH BDCDATA.
    ENDFORM.                    " f_bdc_output
    Hope it helps u..
    Kindly reward points if helpful
    Regards,
    Shanthi

  • Error message during call transaction

    Hi all,
    I want to get the message type after calling the transaction method. I've simulated an input for error, and I expect that the returned message type should be 'E' or 'W'. But it (SY-MSGTY and msgtab-MSGTYP) still returns 'S' even there is error. What's wrong ?
    Call transaction 'VL02N' USING BTAB MODE 'N' UPDATE 'S'.
    messages into msgtab.

    CALL TRANSACTION tcode USING bdcdata
                       MODE   ctumode
                       UPDATE cupdate
                       MESSAGES INTO messtab.
    LOOP AT messtab.
        msgtype = messtab-msgtyp.
    Check what the actual tranaction is giving as message for eg. mm01 does give u a sucess message saying data for the matnr is already maintained.

  • Error Message When Running Transaction F.05

    When running transaction f.05 to revalue foreign currency items, I am getting an error message" Error 543 FC Valuation SAPF100" for two of the G/L accounts and showing on the report <Expen.> and <Adjust.> instead of G/L accounts shown for debit and credit entries. No document or reversal document is created for these two accounts.
    Any help is appreciated.

    Thanks for taking the time to reply.
    I have checked OB59. The foreign currency valuation method is already defined. and in OBA1, these two G/L accounts are also there. I could not find any field on the G/L master where to assign the valuation method. For some reason, other G/L accounts mentioned in OBA1 are being posted correctly and are generating the documents and reversal documents except these two G/L accounts. For the correct G/L accounts, against the Debit and Credit posting keys G/L accounts are shown while for these two accounts, <Expen.> and <Adjust.> is written at the place of G/L accounts in the report. Can you please tell me from where the system is picking these accounts that are shown for Debit(40) and Credit(50) posting?

Maybe you are looking for

  • Follow up IE msstree's question

    Thanks to all for your pass help! This is great, I have found most of my questions answered from pass discussions. Don, I have read of your fondless for OS9 and I agree. I have experienced several problem with IE and looking for a new browser I am fi

  • Cannot add a new SHIP_TO address to a exist customer by using Interface

    Hi, I am encountered an error when i am using Customer Import Interface to add a new SHIP_TO address to a exist customer, the template format of the Excel i used like below: <will insert to table: ra_customers_interface_all> Customer Num. | Customer

  • RollOut: Data migration phase - material master

    Dear all, we are going to implement the SAP in one of our subsidiaries. The phase data migration of the material master is not that clear because I am not very experienced in such a project. Can anybody consult me concerning my intentions? I would li

  • Trouble finding macbook apps

    I go to itunes and see apps for iphones and ipads, but there is not a section for apps for mac computers. I used to have the twitter app, but it stopped working so I deleted it and tried to find it in the app store, but could only find the iphone and

  • Error browsing SSAS 2008 cube on Windows 7 with SSMS 2008 R2 Client

    I recently have upgraded to Windows 7 and SSMS 2008R2 and I'm trying to browse a cube through SSMS and I'm getting the following error below after connecting and trying to browse. I have verified that I have .Net 3.5 with SP1 installed. I also was ab