How can we update mk01 with BDC call transaction method

can any one send the sample code for upload of MK01 using call transaction method.
its urgent..

Use the following code.
*& Report  ZMK01_VA01                                                  *
REPORT  Z_MK01                              .
SOURCE INTERNAL TABLE
DATA: BEGIN OF T_SOURCE OCCURS 0,
        LIFNR TYPE LIFNR,
        EKORG TYPE EKORG,
        KTOKK TYPE KTOKK,
        NAME1 TYPE NAME1,
        SORTL TYPE SORTL,
        LAND1 TYPE LAND1,
        WAERS TYPE WAERS,
      END OF T_SOURCE.
*DATA: E_MESSAGE TYPE C.
ERROR MESSAGE TABLE
DATA: T_ERRORMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
TARGET TABLE LIKE BDCDATA
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
TO UPLOAD DATA FROM LEGACY SYSTEM
      CALL FUNCTION 'WS_UPLOAD'
  EXPORTING
        CODEPAGE                      = ' '
         FILENAME                      = 'D:\MK01.TXT'
         FILETYPE                      = 'DAT'
      IMPORTING
        FILELENGTH                    =
        TABLES
          data_tab                      = T_SOURCE
       EXCEPTIONS
         CONVERSION_ERROR              = 1
         FILE_OPEN_ERROR               = 2
         FILE_READ_ERROR               = 3
         INVALID_TYPE                  = 4
         NO_BATCH                      = 5
         UNKNOWN_ERROR                 = 6
         INVALID_TABLE_WIDTH           = 7
         GUI_REFUSE_FILETRANSFER       = 8
         CUSTOMER_ERROR                = 9
         NO_AUTHORITY                  = 10
         OTHERS                        = 11
      IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
TRANSFERING DATA FROM INTERNAL SOURCE TABLE TO TARGET TABLE
LOOP AT T_SOURCE.
REFRESH BDCDATA.
perform bdc_dynpro      using 'SAPMF02K' '0107'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF02K-LIFNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RF02K-LIFNR'
                              T_SOURCE-LIFNR.
perform bdc_field       using 'RF02K-EKORG'
                              T_SOURCE-EKORG.
perform bdc_field       using 'RF02K-KTOKK'
                              T_SOURCE-KTOKK.
perform bdc_dynpro      using 'SAPMF02K' '0110'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-LAND1'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-NAME1'
                              T_SOURCE-NAME1.
perform bdc_field       using 'LFA1-SORTL'
                              T_SOURCE-SORTL.
perform bdc_field       using 'LFA1-LAND1'
                              T_SOURCE-LAND1.
perform bdc_dynpro      using 'SAPMF02K' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-KUNNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPMF02K' '0310'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFM1-WAERS'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFM1-WAERS'
                              T_SOURCE-WAERS.
perform bdc_dynpro      using 'SAPMF02K' '0320'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF02K-LIFNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
CALL TRANSACTION 'MK01' USING BDCDATA MODE 'A' MESSAGES INTO T_ERRORMSG.
ENDLOOP.
LOOP AT T_ERRORMSG.
WRITE:/ 'MESSAGE TYPE',T_ERRORMSG-MSGTYP,
         'FIELDNAME WERE ERROR OCCURED', T_ERRORMSG-FLDNAME.
*CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
  ID              = T_ERRORMSG-MSGID
  LANG            = SY-LANGU
  NO              = T_ERRORMSG-MSGNR
  V1              = T_ERRORMSG-MSGV1
  V2              = T_ERRORMSG-MSGV2
  V3              = T_ERRORMSG-MSGV3
  V4              = T_ERRORMSG-MSGV4
IMPORTING
  MSG             = E_MESSAGE
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.
*WRITE:/ E_MESSAGE.
ENDLOOP.
       Start new screen                                              *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
  CLEAR BDCDATA.
  BDCDATA-PROGRAM  = PROGRAM.
  BDCDATA-DYNPRO   = DYNPRO.
  BDCDATA-DYNBEGIN = 'X'.
  APPEND BDCDATA.
ENDFORM.
       Insert field                                                  *
FORM BDC_FIELD USING FNAM FVAL.
  IF FVAL <> SPACE.
    CLEAR BDCDATA.
    BDCDATA-FNAM = FNAM.
    BDCDATA-FVAL = FVAL.
    APPEND BDCDATA.
  ENDIF.
ENDFORM.
With Regards
K Srinivas

Similar Messages

  • How can I update Jdev with new JDK

    I currently have JDev323 and I wonder how can I update it with new JDK 1.4.

    What you should do is update the JDeveloper version that you use - 3.2 is sooooo old.
    Get Oracle JDeveloper 9.0.4 and you'll have JDK 1.4 built in.
    I don't remember if that feature was in 3.2 but since JDeveloper 9 you can switch the JDK - it is in the online help - do a search for the word JDK.

  • How to handle lock object in BDC  call transcation method?

    Hi,
    how to handle lock object in BDC  call transcation method?
    Thanks In advances.

    If you are updating Z-fields then you need to create a lock entry, before you use call transaction.
    After creating lock object, please use FM Enqueue_<lockname> before CALL transaction and FM Dequeue_<lockname> after you have commited your data.
    Thanks,
    Kartavya

  • Local mode update in bdc -Call transaction method

    what is LOCAL MODE UPDATE in BDC- Call transaction methods ?

    Hi,
    Try to understand from the below CODE
    CALL TRANSACTION 'ZBDCSINGLE' USING IT_BDCDATA MODE 'A' UPDATE 'S' MESSAGES INTO IT_BDCMSGCOLL.
    REFRESH IT_BDCDATA.
    Cheers!!

  • Holder(A008) is not maintaing in HRP1001 (BDC - Call Transaction Method)

    Dear Friends,
    Holder (A008) in HRP1001 is not maintained for some hiried persons through BDC - Call Transaction Method.
    Except Holder update eveything is updated in the hrp1001.
    When we hire a perosn through PA40, then its automatically maintaining Holder ( A008 ) in HRP1001. But for the same case through BDC program with Call Transaction method, its not maintaining Holder.
    What can be reason behind not updating holder in HRP1001. How we can maintain Holder in this case.
    Thanks
    Rav
    Edited by: Rav Jordan on Jan 10, 2012 8:03 AM

    Hi Keshav,
    Thanks for your response.
    After running
       CALL TRANSACTION 'PA40' USING BDCDATA
                               MODE CTUMODE " 'A'
                             UPDATE 'A'
                           MESSAGES INTO MESSTAB.
    if sy-subrc eq '0'.
    i am selecting perner created from pa0002.
    now to update holder i am using fucntion module.
         WA_HOLD-AEDTM = SY-DATUM.
          WA_HOLD-UNAME = SY-UNAME.
          WA_HOLD-OBJID = P_PLANS.
          WA_HOLD-BEGDA = DT.
          WA_HOLD-ENDDA = '99991231'.
          WA_HOLD-OTYPE = 'S'.
          WA_HOLD-PLVAR = '01'.
          WA_HOLD-RSIGN = 'A'.
          WA_HOLD-RELAT = '008'.
          WA_HOLD-SCLAS = 'P'.
          WA_HOLD-SOBID = GD_PERNR.
          CALL FUNCTION 'RH_INSERT_INFTY'
            EXPORTING
             FCODE                     = 'INSE'
             VTASK                     =  'A'
      ORDER_FLG                 = 'X'
      COMMIT_FLG                = 'X'
      AUTHY                     = 'X'
      PPPAR_IMP                 =
      OLD_TABNR                 = ' '
      REPID                     = ' '
      FORM                      = ' '
      KEEP_LUPD                 =
      WORKF_ACTV                = 'X'
            TABLES
              INNNN                     = WA_HOLD
      ILFCODE                   =
    EXCEPTIONS
      NO_AUTHORIZATION          = 1
      ERROR_DURING_INSERT       = 2
      REPID_FORM_INITIAL        = 3
      CORR_EXIT                 = 4
      BEGDA_GREATER_ENDDA       = 5
      OTHERS                    = 6
          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.
    This also not updating holder in the hrp1001 postion in the table.
    May i know where to do change in the code so that holder can be maintained.
    Thanks
    Rav

  • Error in BDC CALL TRANSACTION METHOD..

    hai i got an error in  doing BDC  CALL TRANSACTION METHOD
    Error:diffrent number of parameters in  FORM  and PERFORM(routine :FILL_SCREEN_DETAILS:,number of formal parameters :3,number of actual parameters:1)
    PROGRAM
    REPORT  ZDEMO_UPLOAD_COST_CENTER_DATA.
    DATA:BEGIN OF WA_DATA,
    KOKRS TYPE KOKRS,"CONTROLLING AREA
    KOSTL TYPE KOSTL,"COST CENTER
    DATAB TYPE DATAB,"START DATE
    DATBI TYPE DATBI,"END DATE
    KTEXT TYPE KTEXT,"NAME
    LTEXT TYPE LTEXT,"DESCRIPTION
    VERAK TYPE VERAK,"PERSON RESPONSIBLE
    KOSAR TYPE KOSAR, "COST CENTER CATEGORY
    KHINR TYPE KHINR,"HIERARCHY AREA
    BUKRS TYPE BUKRS,"COMPANY CODE
    GSBER TYPE GSBER,"BUISINESS AREA
    END OF WA_DATA.
    *TYPES:IT_DATA TYPE STANDARD TABLE OF TY_DATA.
    DATA:IT_DATA LIKE TABLE OF WA_DATA,
          IT_BDCDATA LIKE TABLE OF BDCDATA,
          WA_BDCDATA LIKE LINE OF IT_BDCDATA,
          IT_BDCMSGCOLL LIKE TABLE OF BDCMSGCOLL,
          WA_BDCMSGCOLL LIKE LINE OF IT_BDCMSGCOLL.
    DATA :V_FILE TYPE STRING.
    CONSTANTS :C_KS01(4) TYPE C  VALUE 'KS01',
                C_X(1) TYPE C VALUE 'X',
                C_A(1) TYPE C VALUE 'A'.
    SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    PARAMETER :PA_FILE LIKE FC03TAB-PL00_FILE OBLIGATORY.
    SELECTION-SCREEN:END OF BLOCK B1.
    *AT SELECTION SCREEN ON VALUE REQUEST
    * EVENT TO BE TRIGGERED WHEN WE PRESS F4.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FILE.
    PERFORM GET_F4_FOR_FILE USING PA_FILE.
    *         START-OF-SELECTION
    START-OF-SELECTION.
    *WE NEED TO MOVE THE PA_FILE INTO ANOTHER VARIABLE OF TYPE STRING
    *AS WE ARE GOING TO USE THE SAME IN THE FM:GUI_UPLOAD THERE THE FILE TYPE IS STRING
    V_FILE = PA_FILE.
    PERFORM UPLOAD_FILE_T0_ITAB USING V_FILE CHANGING IT_DATA.
    *FILL THE SCREEN AND FIELD DETAILS
    LOOP AT IT_DATA INTO WA_DATA.
    REFRESH IT_BDCDATA.
    *FIRST SCREEN DETAILS
    PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1''0200''X'.
    *CURSOR DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR''CSKSZ-KOKRS'.
    *OK CODE DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE''/00'.
    *CONTROLLING AREA
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KOKRS' WA_DATA-KOKRS.
    *COST CENTER DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KOSTL' WA_DATA-KOSTL.
    * START DATE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-DATAB_ANFO' WA_DATA-DATAB.
    *END DATE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-DATBI_ANFO' WA_DATA-DATBI.
    *NEXT SCREEN DETAILS
    PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1''0299''X'.
    *OKCODE DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE''=BU'.
    *SUBSCRN FIELD DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_SUBSCR''BDC-SUBSCR'.
    *CURSOR DETAILS
    PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR''CSKSZ-WAERS'.
    *NAME
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KTEXT' WA_DATA-KTEXT.
    *DESCRIPTION
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-LTEXT' WA_DATA-LTEXT.
    *PERSON RESPONSIBLE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-VERAK' WA_DATA-VERAK.
    *COST CENTER CATEGORY
    PERFORM FILL_FIELD_DETAILS USING'CSKSZ-KOSAR' WA_DATA-KOSAR.
    *HIERARCHY AREA
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KHINR' WA_DATA-KHINR.
    *COMPANY CODE
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-BUKRS' WA_DATA-BUKRS.
    *BUISINESS AREA
    PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-GSBER' WA_DATA-GSBER.
    *CALL THE TRANSACTION
    CALL TRANSACTION C_KS01 USING IT_BDCDATA
                              MODE C_A "ALL SCREENS
                                       "N-NO SCREENS
                                       "E-ERROR SCREENS ONLY
                              UPDATE 'A' "ASYNCHRONOUS
                                          "SYNCHRONOUS
                              MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    * FORM FILL SCREEN_DETAILS
    FORM FILL_SCREEN_DETAILS  USING PROGRAM LIKE BDCDATA-PROGRAM
                           DYNPRO LIKE BDCDATA-DYNPRO
                           DYNBEGIN LIKE BDCDATA-DYNBEGIN.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-PROGRAM = PROGRAM.
    WA_BDCDATA-DYNPRO = DYNPRO.
    WA_BDCDATA-DYNBEGIN = DYNBEGIN.
    APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDOFRM.
    * FORM FILL_FIELD_DETAILS
    FORM FILL_FIELD_DETAILS USING FNAM FVAL.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-FNAM = FNAM.
    WA_BDCDATA-FVAL = FVAL.
    APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDFORM.
    * FORM GETE_F4_FOR_FILE
    *DISPLAY ALL THE  FILES IN THE SYSTEM FOR SELECTION
    *P_PA_FILE NAME OF THE FILE
    FORM GET_F4_FOR_FILE USING P_PA_FILE.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    *  EXPORTING
    *    PROGRAM_NAME        = SYST-REPID
    *    DYNPRO_NUMBER       = SYST-DYNNR
        FIELD_NAME          = 'PA_FILE'
    *    STATIC              = ' '
    *    MASK                = ' '
       CHANGING
         FILE_NAME           = PA_FILE.
    *  EXCEPTIONS
    *    MASK_TOO_LONG       = 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.
    ENDFORM.
    * FORM UPLOAD_FILE_TO_ITAB
    * FP_V_FILE = FILE NAME
    *FP_IT_DATA =  INTERNAL TABLE TO STORE THE DATA
    FORM UPLOAD_FILE_TO_ITAB USING FP_V_FILE CHANGING FP_IT_DATA LIKE IT_DATA.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FP_V_FILE
      HAS_FIELD_SEPARATOR           = ' X'
      TABLES
        DATA_TAB                      =FP_IT_DATA.
    ENDFORM.
    Edited by: saifudheenc on Aug 7, 2010 5:09 PM

    hi
    try to add spaces between parameters :
    example:
    PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1' '0200' 'X'.
    regards,darek

  • Reg Vendor master upload using BDC Call Transaction Method

    Hi All,
    Thanks in advance.
    I am uploading vendor master data using bdc call transaction method for XK01. In that  i am getting an error message that the fields " smtp_addr" ( for email) and "time_zone" (for time zone) doesnot exist on the screen '0110' ( this is the second screen) . the field timezone will be displayed on the screen only when we go for communications button and select the URL field .
    Do anybody have the solution for this problem. if possible can you give me the code for that screen.

    Create a recording via SM35 (menu go to=>recording), this will generate automatically the code for filling your bdcdata-table...

  • Hi all, BDC call transaction METHOD, trapping ERRORS

    hi
    i have developed BDC (recording via call transaction method) for VB01. 
    could u please tell me how to display records having errors after running recording or to give index of records having errors.
    and is it possible to give transaction code for recording since my bdc is executable program.
    plase answer both the questions.
    thanx

    Here is the flow that Raja is explaining to you.
    DATA: v_index LIKE sy-tabix.
    LOOP AT itab.
      v_index = sy-tabix.
    *-- prepare the BDC data
      CALL TRANSACTION 'VB01' USING bdcdata
                               MODE 'N'
                              MESSAGES INTO bdcmsgcoll.
      READ TABLE bdcmsgcoll WITH KEY msgtyp = 'E'.
      IF sy-subrc = 0.
    *-- Error occured for the record with index <b>v_index</b>
      ELSE.
    *-- unless there is a success message with this number,
    *   it is not succesfull because 'No data for screen xxx'
    *   will not show up as an error message type, but will be
    *  a success message type
        READ TABLE bdcmsgcoll WITH KEY msgnr = '312'.
        IF sy-subrc = 0.
    *-- success
        ELSE.
    *-- error with index <b>v_index</b>
        ENDIF.
      ENDIF.
    ENDLOOP.
    As you can see, now you have the index of the record where the error occured. Now this will become complicated if you are combining several records into one transaction call. In that case you need to find how you can know all the records that you just accumulated.
    As an example, let us say you have an internal table with external number, customer, material, quantity and at every new external number, you want to create a sales order. Until you get a new external number, you will not do the call transaction because until then it will be items of the same sales order. So in this case, after the call transaction, you will have get all the records that belong to making this sales order by using the external number and then prepare your messages.
    I hope this is clear.
    Srinivas
    Message was edited by: Srinivas Adavi

  • Handling Warning pop up windows in BDC call transaction method

    Hi All,
    Iam using a BDC to automate the Costing Process i.e. Transaction CK40N using call transaction method. In a particular Screen after i perform the execute action, a warning pop up window appears. Only if I click on OK, the execution continues or else it will not proceed. How to handle this situation in case a warning pop up window appears based on the input which is given? In other words a Dynamic warning message. Thanks in advance....
    Regards,
    Nirmal

    Hello,
    U can either use NO_DIALOG or SUPPRESS DIALOG to avaid this,.
    Regards,
    Vasanth

  • How to avoid a POP-UP in CALL Transaction Method

    Hi All,
    I am doing a BDC for transaction CA02 by using CALL Transaction method, while i am trying to delete an operation i am getting a POP-UP asking YES/NO. My program contains the BDC OKCODE value as '=YES' for deletion of the operation/s. Still the POP-UP is persisting.
    Could you please let me know how can i avoid the POP-UP or is there any other way handling the POP-UP's.
    Reward Points Gauranteed. )
    Thanks in Advance,
    Suresh

    This means that you are running your CALL TRANSACTION in the frontend.
    One way would be to use the MODE addition
    Here is an extract from the Help
    ... MODE mode
    Effect
    The processing mode can take the following values:
    'A' Display screen
    'E' Display only if an error occurs
    'N' Do not display
    'P' Do not display; debugging possible
    But the fact that you get a popup you don't expect is worrying. You have to process this Popup otherwise the result is hazardous !

  • How will you  collect error records in call transaction method

    hello
    how will handle errors in call transaction method...

    DATA: BEGIN OF ITAB OCCURS 0,
          F1(10) TYPE C,
          F2(18) TYPE C,
          F3(15) TYPE C,
          END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 0,
          F1(2) TYPE C,
          F2(10) TYPE C,
          F3(18) TYPE C,
          F4(15) TYPE C,
          END OF ITAB1.
    DATA : ITAB2 LIKE ITAB OCCURS 0 WITH HEADER LINE,
                IT_SUCCESS LIKE ITAB OCCURS 0 WITH HEADER LINE,
                IT_ERROR LIKE ITAB OCCURS 0 WITH HEADER LINE.
    DATA : BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
               T_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
      CALL TRANSACTION 'VA01' USING BDCDATA MODE 'N' UPDATE 'S'
                                MESSAGES INTO T_BDCMSGCOLL.
      PERFORM ERRORHANDLING TABLES ITAB2 USING COUNT1 COUNT2.
      REFRESH BDCDATA.
    FORM ERRORHANDLING TABLES   P_ITAB2 STRUCTURE ITAB
                       USING    P_COUNT1
                                 P_COUNT2.
      IF SY-SUBRC <> 0.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            ID        = SY-MSGID
            LANG      = '-D'
            NO        = SY-MSGNO
            V1        = SY-MSGV1
            V2        = SY-MSGV2
            V3        = SY-MSGV3
            V4        = SY-MSGV4
          IMPORTING
            MSG       = T_BDCMSGCOLL
          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.
        IF P_COUNT1 = 1.
          WRITE : / ' The records not loaded are '.
          P_COUNT1 = P_COUNT1 + 1.
        ENDIF.
        LOOP AT P_ITAB2.
          WRITE : / P_ITAB2-F1 , P_ITAB2-F2 , P_ITAB2-F3 .
          CLEAR P_ITAB2.
          DELETE P_ITAB2 INDEX 1.
        ENDLOOP.
        WRITE : /.
      ELSE.
        IF P_COUNT2 = 1.
          WRITE : /  ' The records loaded are '.
          P_COUNT2 = P_COUNT2 + 1.
        ENDIF.
        LOOP AT P_ITAB2.
          WRITE : / P_ITAB2-F1 , P_ITAB2-F2 , P_ITAB2-F3 .
          CLEAR P_ITAB2.
          DELETE P_ITAB2 INDEX 1.
        ENDLOOP.
        WRITE : /.
      ENDIF.
    ENDFORM.                    " errorhandling

  • Screen no change in BDC call transaction method

    Hi experts
    Greetings!
    I have a BDC created in call transaction method for t-code FB01.
    Data passed successfully to the first screen but when it navigates to the second screen I am not able to pass any data.
    After debugging I found that the issue was because of the DYNPRO value.
    It was 8500 when I created this recording but now the screen number shows 350.
    Is is possible that screen nos change because of any support stack or OSS notes implementation.
    In run time i tried to change the value to 350 and it works fine..
    Thanks
    Jay

    Hi,
    LSMW Direct input method is better for your quiry. Becasuse i wrote BDC for FB01 but not working properly.
    So i used LSMW, helped me a lot. Progmra name is RFBIBL00. Or else i will export and send you if you want. It can handle multiple line items upto 950.
    Thanks,
    Sriram

  • In bdc call transaction method which one ll prefer synchronous or asynchron

    hi could anybody tel me
    call transaction method which one is preferred synchronous or asynchronous..?
    what ll happen if we do other method..?
    foreground or background which one ll prefer..?
    what ll happen if we do otehr method..?
    on which condition we have to use synchronous and asynchronous
    on which condition we have to use foreground and background
    thanx
    kals.

    Hi,
    if you haven't done yet please visit for general information:
    http://help.sap.com/saphelp_nw70/helpdata/en/d2/f8f3393bef4604e10000000a11402f/frameset.htm
    for further information:
    http://help.sap.com/saphelp_nw70/helpdata/en/69/c2501a4ba111d189750000e8322d00/frameset.htm
    This will hopefully answer your question.
    Regards
    Bernd

  • How can I update JTable with new Object[][]

    Hallo, I have got a problem. I want to update my Jtable with new Values,
    with
    setValueAt(Object aValue, int row, int column)
    i can only update one Object.
    Is it possible to update All Objects "Object[][]"??? in a whole Table
    after I clicked a Button???

    Hi,
    AbstractTableModel's method setValueAt(Object aValue, int row, int column)
    is not the way to fill values into a table. It is the way the table returns the changed values to you after the user has entered something. This is a very common misconception, probably because the method names are so confusing.
    The table model uses getValueAt (int row , int column)
    to fill in its rows and columns.
    If you extend AbstractTableModel to make this method fill in the correct values from you data array. then, when you wish to update the whole table, you can
    1) Put new values in the data array
    2) fireTableValuesChanged
    this will cause the table model to call getValueAt for every row and column.
    good luck.

  • How to resolve the error in bdc call transaction in ALV report

    Dear Experts, i am executing the alv report program and in alv report program one bdc is there..
    after executing output is showing in alv format but one button is there (update master)..when i am clicking update button the bdc is run but is not updated in the material master..after executing my bdc is not updated in mm02.
    how to resove it?
    CALL TRANSACTION 'MM02' USING BDCDATA MODE MODE
                                                              UPDATE 'S'
                                                      MESSAGES INTO MESSTAB.

    Hi Kaustav,
    Looking at the code you attached, it appears to me that your BDC (Form  USER_COMMAND) is not executed at all as you haven't passed the 'USER_COMMAND' in FM REUSE_ALV_GRID_DISPLAY for ALV display.
    You must pass the importing parameter  I_CALLBACK_USER_COMMAND of this FM as 'USER_COMMAND', only then this form will be executed and your BDC will run.
    Thereafter, in case your BDC update fails, you can put a break-point in the form (at CALL TRANSACTION statement) and analyze the message table MESSTAB.
    Hope it helps.
    Regards,
    Sapeksh

Maybe you are looking for

  • Can anyone of you who own a Thinkpad R61 Share your experience?

    I Just get a Thinkpad R61, and it freeze on Windows Vista 3 time out of 6 boots, and it is making a high pitch noise. I do a few test with it before I return to the dealer for replacement. I didn't even bother to install Linux on it because if it is

  • Fnd_icx_launch.launch HTTP-503 ORA-12645

    Hello, I getting an error after login Service Temporarily unavailable, The Server is is temporarily unable to service you request due to maintenance downtime or capacity problem. Please try again Later. In the apache log the following error shows up.

  • Downloaded applications won't open

    I recently upgraded my eMac OS X 10.2.8 to 10.3.4 and everything seemed to be working really well like my other 10.3.4... I downloaded some applications, MSN Messenger (6.0.4) and Google Earth, and they seemed to download as normal... but when I trie

  • Unable to allocate enough memory to render the current frame

    I am a bit of a novice at AE, just starting to learn. I have googled this, searched these forums and tried all I can think of. No luck. SO I will ask here.  I bought this AE file  http://videohive.net/item/-earth-zoom-customize/6451983  Here is the e

  • Idoc - DTD file  - schema

    Hi, In my outbound idoc scenario, i have to send idoc in XML format with schema. I don't know what schema is, if it's XSD file or other. My answers is: 1) What is it schema (or XSD) file? I have to send always or just one first time? 2) the DTD file