Problem in BDC for MM02

Hi,
I am working on a BDC for the tcode MM02 in which i have to insert the Inspection Type in the Quality Managment View of materials. i had executed the code which was working fine,but when i executed it ,it remains on the same screen where the after specifying on the file path. I dont know why it is happening ,plzz provide me guidelines for solving this problem.

report ZMM02 no standard page heading line-size 255.
include bdcrecx1.
DATA: BEGIN OF ZVBM OCCURS 0,
       MATNR(18) TYPE C,
       BRGEW(16) TYPE C,
       NTGEW(16) TYPE C,
END OF ZVBM.
start-of-selection.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
  CODEPAGE                      = ' '
   FILENAME                      = 'c:\vijay.txt'
   FILETYPE                      = 'DAT'
  HEADLEN                       = ' '
  LINE_EXIT                     = ' '
  TRUNCLEN                      = ' '
  USER_FORM                     = ' '
  USER_PROG                     = ' '
  DAT_D_FORMAT                  = ' '
IMPORTING
  FILELENGTH                    =
  TABLES
    DATA_TAB                      = ZVBM
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
  OTHERS                        = 10
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.
LOOP AT ZVBM.
perform bdc_dynpro      using 'SAPLMGMM' '0060'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-MATNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RMMG1-MATNR'
                              zvbm-matnr.
perform bdc_dynpro      using 'SAPLMGMM' '0070'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSICHTAUSW-DYTXT(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                              'X'.
perform bdc_dynpro      using 'SAPLMGMM' '4004'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BU'.
perform bdc_field       using 'MAKT-MAKTX'
                              'VIJAY3'.
perform bdc_field       using 'MARA-MEINS'
                              'KG'.
perform bdc_field       using 'MARA-MATKL'
                              '01'.
perform bdc_field       using 'MARA-SPART'
                              '01'.
perform bdc_field       using 'BDC_CURSOR'
                              'MARA-NTGEW'.
perform bdc_field       using 'MARA-BRGEW'
                              zvbm-brgew.
perform bdc_field       using 'MARA-GEWEI'
                              'KG'.
perform bdc_field       using 'MARA-NTGEW'
                              zvbm-ntgew.
perform bdc_transaction using 'MM02'.
ENDLOOP.
perform close_group.

Similar Messages

  • BDC FOR MM02

    Hi Friends,
    i want to write a BDC FOR MM02 T.CODE AT PLANT LEVEL AND METERIAL LEVEL.
    I WANT UPLOAD THE BELOW FEILDS DATA :
    THE FIELDS THAT I WANT UPLOAD IS EISBE(SAFETY STOCK) , MAABC(ABC INDICATOR)
    AND WZEIT(LEAD TIME).....AT PLANT LEVEL AND METERIAL LEVEL.
    PLS HELP ME.... IT IS AN URGENT.
    REGARDS,

    because with LSMW , you can standard program RMDATIND (direct input ==> faster than batch input.
    In step 1 : you select standard program (OBject 0020 method 0000)
    In step 2 you define source structure ZSRC_MARA
    In step 3 you list the fields : MATNR, WERKS, MAABC, MINBE
    In step 4 you make the link of your source struture to BGR00, BMM00, BMMH1
    In step 5 you map your fields + BMM00-XEID1 ( you have to flag the views you consider).
    Finished from developpement side
    DAvid

  • Problem in BDC FOR uploading more than 1 insep. typ in QM view for MM01

    Hi,
    I had made a BDC in which i am trying to upload the data for the QM view which is being extended in it but the problem is when the program reaches the to QM view it is only able to upload only 1 inspection Type which is working fine but when there is more than 1 it gives error that its QM View has already maintained.  Please provide me guiddlines how to solve this problem .
    Here's is the link to the code which i am trying to modify:-
    http://docs.google.com/Edit?id=dngp529_2fxwgmrgg
    Edited by: ricx .s on Apr 16, 2009 2:30 PM

    hi,
    But is it not possible that while creating the insepction type for the first it should simultaneously take the value of 2nd inspection type .
    see,ina bdc of qp01 or ca01 we can insert the values at the screen but why can't we do d same in the bdc of mm01,
    I had made a bdc for tcode MM02 in which i am able to upload  the data but in that there is a problem that some of the materials have the Quality managmnt View at position no. 11 or 13 of the screen.
    here's is d link for the code of the program :-
    http://docs.google.com/Doc?id=dngp529_3wcgnjdf3
    plzz provide me guidelines how to solve it    .
    Edited by: ricx .s on Apr 17, 2009 9:26 AM
    Edited by: ricx .s on Apr 17, 2009 10:56 AM

  • BDC For MM02 & MASS - BUS1001

    HI,
    I am trying to make BDC for updating Table - MARD, Feild - LGPBE using MM02.
    The problem I facing is the selection of view (General Plant Data/ Storage 1).
    For VERP Materials, it comes to 12th Position, while for HALB Materials is on 15th Position.
    The reason for the same is that for VERP Materials, the Sales Views are not maintained.
    I am facing the similar kind of problem while creating the BDC for MASS (Using Mass Maintenance - BUS1001).
    I need to update the Storage Bin of all Materials.
    What is the correct way to upload the same?
    Thanks & Regards,
    P K Karn

    hi PK you have to program your BDC according to material type..
    eg if material type = HALB
    BDC1
    else if material type = VERP
    BDC2..
    end if
    regards..

  • BDC for MM02 - Quality management

    Hi Friends,
    I need to create BDC program for MM02 with Quality Management View.
    My problem is with the sequence of the QM view in MM02 for different material types as per with recording.
    Kindly suggest me to resolve the issue.
    Thanks & Regards,
    S.Suresh
    Edited by: The Rock on Nov 7, 2011 1:43 PM

    Hi S.Suresh,
    I would simply read table QMAT to check if material/plant has Inspection Type '01'.
    Then, in case Inspection Type needs to be created, just call the BAPI_MATINSPCTRL_SAVEREPLICA FM with structure INSPECTIONCTRL properly filled-in.
    If successful, then remember to call BAPI_TRANSACTION_COMMIT.
    Hope this could help.
    Bye,
    Flavio

  • Problem in bdc for table control for line items

    Hi experts,
    I am runnig a bdc for ME52.
    i am just entering PR number, in the second screen i have got all the line items. I need to select these line item 10 and double click or hit enter, it takes me to screen 3, there im just checking a checkbox and saving.
    Again i need to select the line item 20 and double click or hit enter. again the same process.
    Again repeat for all the line items.
    But my problem is it is updating everytime for only line item  10. for line item 20 and others it say "no chnge in the data".
    I am pasting my code here. please check and revert me back .plz.
    DATA: w_output LIKE LINE OF i_output.
      REFRESH I_ITAB[].
      SELECT * FROM EBAN
               INTO TABLE i_itab
               WHERE banfn in s_banfn AND
                     bsart in s_bsart AND
                     bstyp in s_bstyp AND
                     matnr in s_matnr AND
                     werks in s_werks AND
                     lfdat in s_lfdat AND
                     pstyp in s_pstyp AND
                     knttp in s_knttp AND
                     estkz in s_estkz AND
                     loekz eq ' '.
      IF sy-subrc = 0.
        CLEAR: w_itab,
                 i_poitab[].
        SORT i_itab by banfn.
        LOOP AT i_itab INTO w_itab where menge GT eban-bsmng.
          IF p_close = 'X' AND p_rep = 'X'.
            IF w_itab-ebakz = 'X'.
              w_itab-ebakz = ' '.
              APPEND w_itab to i_poitab.
            ENDIF.
          ELSEIF p_open = 'X' AND p_rep = 'X'.
            IF w_itab-ebakz = ' '.
              w_itab-ebakz = 'X'.
              APPEND w_itab to i_poitab.
            ENDIF.
          ELSEIF p_close = 'X' AND p_repw = 'X'.
            IF w_itab-ebakz = ' '.
              APPEND w_itab to i_poitab.
            ENDIF.
          ELSEIF p_open = 'X' AND p_repw = 'X'.
            IF w_itab-ebakz = 'X'.
              APPEND w_itab to i_poitab.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
      LOOP AT i_poitab into w_output.
        APPEND w_output to i_output.
       PERFORM CALL_BDC.
      endloop.
    IF p_rep = 'X'.
    PERFORM CALL_BDC.
    ENDIF.
    ENDFORM.                    " GET_DATA
    *&      Form  CALL_BDC
          text
    -->  p1        text
    <--  p2        text
    FORM CALL_BDC.
    DATA: seltab(5) TYPE N,
          seltab1(2) TYPE N,
          tempvar(30) TYPE N,
          cnt TYPE N.
    LOOP AT i_output.
    clear: seltab,
           seltab1.
    seltab = i_output-bnfpo.
    seltab1 = seltab+2(2).
    perform bdc_dynpro      using 'SAPMM06B' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EBAN-BANFN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'EBAN-BANFN'
                                  i_output-banfn.
    perform bdc_dynpro      using 'SAPMM06B' '0106'.
    clear tempvar.
    *cnt = 1.
    concatenate 'EBAN-BNFPO(' seltab1 ')' into tempvar.
    perform bdc_field       using 'BDC_CURSOR'
                                 'EBAN-BNFPO(seltab1)'.
                                    tempvar.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=DETA'.
    perform bdc_field       using 'RM06B-BNFPO'
                                  i_output-bnfpo.
    perform bdc_field       using 'RM06B-TCSELFLAG(seltab1)'
                                 'X'.
    perform bdc_dynpro      using 'SAPMM06B' '0102'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'EBAN-EBAKZ'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'EBAN-EBAKZ'
                                  i_output-ebakz.
    CALL TRANSACTION 'ME52' USING bdc_data MODE 'A'
                                   MESSAGES INTO i_bdcmsg.
        COMMIT WORK AND WAIT.
    ENDLOOP.
    ENDFORM.                    " CALL_BDC
    *&      Form  bdc_dynpro
          text
         -->P_0686   text
         -->P_0687   text
    FORM bdc_dynpro USING    program dynpro.
    CLEAR bdc_data.
      bdc_data-program  = program.
      bdc_data-dynpro   = dynpro.
      bdc_data-dynbegin = 'X'.
      APPEND bdc_data.
      CLEAR bdc_data.
    ENDFORM.   
    thanks,
    N

    Looks like table control logic is wrong -- do compare with below program...
    only table contril area
    REPORT ZPadmam
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
    i1 TYPE i,
    lifnr LIKE rf02k-lifnr,
    bukrs LIKE rf02k-bukrs,
    ekorg LIKE rf02k-ekorg,
    ktokk LIKE rf02k-ktokk,
    anred LIKE lfa1-anred,
    name1 LIKE lfa1-name1,
    sortl LIKE lfa1-sortl,
    land1 LIKE lfa1-land1,
    akont LIKE lfb1-akont,
    fdgrv LIKE lfb1-fdgrv,
    waers LIKE lfm1-waers,
    END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
    j1 TYPE i,
    banks LIKE lfbk-banks,
    bankl LIKE lfbk-bankl,
    bankn LIKE lfbk-bankn,
    END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\first1.txt'
    filetype = 'DAT'
    TABLES
    data_tab = itab.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = 'C:\second.txt'
    filetype = 'DAT'
    TABLES
    data_tab = jtab.
    LOOP AT itab.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RF02K-KTOKK'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RF02K-LIFNR'
    itab-lifnr.
    PERFORM bdc_field USING 'RF02K-BUKRS'
    itab-bukrs.
    PERFORM bdc_field USING 'RF02K-EKORG'
    itab-ekorg.
    PERFORM bdc_field USING 'RF02K-KTOKK'
    itab-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-ANRED'
    itab-anred.
    PERFORM bdc_field USING 'LFA1-NAME1'
    itab-name1.
    PERFORM bdc_field USING 'LFA1-SORTL'
    itab-sortl.
    PERFORM bdc_field USING 'LFA1-LAND1'
    itab-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' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    cnt = 0.
    LOOP AT jtab WHERE j1 = itab-i1.
    cnt = cnt + 1.
    CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-banks.
    CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankl.
    CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
    PERFORM bdc_field USING fdt jtab-bankn.
    IF cnt = 5.
    cnt = 0.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=P+'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKN(02)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    ENDIF.
    ENDLOOP.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTR'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-FDGRV'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LFB1-AKONT'
    itab-akont.
    PERFORM bdc_field USING 'LFB1-FDGRV'
    itab-fdgrv.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB1-ZTERM'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LFB5-MAHNA'.
    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'
    itab-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'.
    PERFORM bdc_transaction USING 'XK01'.
    ENDLOOP.
    PERFORM close_group.
    Thanks
    Seshu

  • BDC for MM02 - MRP area

    Hello everyone!
    I have developed a BDC program to batch input data into MM02 / MRP area.
    It's working perfectly fine when I use mode 'A' in CALL TRANSACTION statement, but when I change it to 'N', so I can give this for the customer to test, it stops working, giving me an error in one of the screens, saying the "MRP area  is not assigned to plant CH01" (when running with mode "E" it also gives me the error).
    Here's my coding:
    REPORT  zload_mrp_areas.
    Data and variables definition
    DATA:  bdcdata    LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_header OCCURS 0,
            link      LIKE mara-matnr,
            matnr     LIKE mara-matnr,
            werks     LIKE marc-werks,
            mstae(2)  TYPE c,
            perkz(2)  TYPE c,
          END OF t_header.
    DATA: BEGIN OF t_details OCCURS 0,
            muvbr(5)  TYPE c,
            unvbr(5)  TYPE c,
            matnr     LIKE mara-matnr,
            priod(6)  TYPE c,
            gsvbr(5)  TYPE c,
          END OF t_details.
    DATA: v_count(3)  TYPE n,
          v_week      LIKE scal-week,
          v_week1(6)  TYPE n,
          v_week2(6)  TYPE n,
          v_page(5)   TYPE p DECIMALS 2,
          v_index(3)  TYPE n,
          v_field(19) TYPE c,
          v_mode      TYPE c,
          v_date1     LIKE sy-datum,
          v_date2     LIKE sy-datum,
          v_date3     TYPE i.
    Screen definition
    SELECTION-SCREEN  BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    PARAMETERS: headfile     LIKE rfpdo1-febauszf OBLIGATORY,
                detsfile     LIKE rfpdo1-febauszf OBLIGATORY.
    SELECTION-SCREEN  END OF BLOCK 1.
    File selection
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR headfile.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          mask      = ',Multicash,*.txt'
          static    = 'X'
        CHANGING
          file_name = headfile.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR detsfile.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          mask      = ',Multicash,*.txt'
          static    = 'X'
        CHANGING
          file_name = detsfile.
    START-OF-SELECTION                                           *
    START-OF-SELECTION.
    Load files
      PERFORM load_files.
      PERFORM process_file.
    *&      Form  LOAD_FILES
          Load files from network to SAP
    FORM load_files .
    File upload
      DATA: l_filename TYPE string.
      l_filename = headfile.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = l_filename
          filetype            = 'ASC'
        TABLES
          data_tab            = t_header.
      IF sy-subrc <> 0.
      ENDIF.
      l_filename = detsfile.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = l_filename
          filetype            = 'ASC'
        TABLES
          data_tab            = t_details.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " LOAD_FILES
    *&      Form  process_file
          Load files into Material Master
    FORM process_file .
      LOOP AT t_header.
        REFRESH bdcdata.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0060'.
        PERFORM bdc_field   USING 'RMMG1-MATNR'     t_header-matnr.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '/00'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0070'.
        PERFORM bdc_field   USING 'BDC_OKCODE'       '=SELA'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0070'.
        PERFORM bdc_field   USING 'BDC_OKCODE'       '=ENTR'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0080'.
        PERFORM bdc_field   USING 'RMMG1-WERKS'     t_header-werks.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=ENTR'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '4004'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=SP12'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '4000'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=PB42'.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0010'.
       PERFORM bdc_field   USING 'SMDMA-BERID(01)' 'X'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=AEND'.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=SP04'.
        CLEAR v_week.
        CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
          EXPORTING
            date = sy-datum
          IMPORTING
            week = v_week.
        CALL FUNCTION 'WEEK_GET_FIRST_DAY'
          EXPORTING
            week = v_week
          IMPORTING
            date = v_date1.
        LOOP AT t_details WHERE matnr = t_header-matnr.
          CLEAR: v_week1, v_week2.
          v_week1 = v_week.
          v_week  = t_details-priod.
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
            EXPORTING
              week = v_week
            IMPORTING
              date = v_date2.
          v_date3 = v_date1 - v_date2.
          v_page  = v_date3 / 7.
          IF v_page > 11.
            v_index = v_page MOD 11.
            v_page  = v_page / 11.
            COMPUTE v_count = TRUNC( v_page ).
          ELSE.
            v_index = v_page.
          ENDIF.
          IF v_index IS INITIAL.
            v_index = 11.
            v_count = v_count - 1.
          ELSE.
            v_index = v_index + 1.
          ENDIF.
    Paging
          IF v_count NE 0.
            v_count = v_count + 1.
            DO v_count TIMES.
              PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
              PERFORM bdc_field   USING 'BDC_OKCODE'      '=P-'.
            ENDDO.
            PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
            PERFORM bdc_field   USING 'BDC_OKCODE'      '=P++'.
            v_count = v_count - 1.
            DO v_count TIMES.
              PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
              PERFORM bdc_field   USING 'BDC_OKCODE'      '=P-'.
            ENDDO.
          ENDIF.
          PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          v_field = 'RM03M_DB-KOVBW(*)'.
          REPLACE '*' WITH v_index INTO v_field.
          PERFORM bdc_field   USING v_field     t_details-muvbr.
          v_field = 'RM03M_DB-VBWRT(*)'.
          REPLACE '*' WITH v_index INTO v_field.
          PERFORM bdc_field   USING v_field     t_details-unvbr.
         PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          PERFORM bdc_field   USING 'BDC_OKCODE'      '=WEIT'.
          PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          PERFORM bdc_field   USING 'BDC_OKCODE'      '/00'.
          PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          PERFORM bdc_field   USING 'BDC_OKCODE'      '=P++'.
        ENDLOOP.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=UEBE'.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0010'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=UEBE'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '4000'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=BU'.
        DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
        v_mode = 'N'.
        CALL TRANSACTION 'MM02' USING bdcdata
                       MODE   v_mode
                       UPDATE 'S'
                       MESSAGES INTO ITAB.
        if sy-subrc is initial.
        endif.
      ENDLOOP.
    ENDFORM.                    " process_file
    *&      Form  BDC_DYNPRO
          text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
    *&      Form  BDC_FIELD
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD
    Can anyone help? Please!
    Thanks and regards,
    Fernanda

    You are trying to access one of the MRP area which is not yet assigned to CH01 plant. You need to make sure wheather the MRP view was already created for that material for CH01 plant.
    So, first check your data against the MARC for material and plant. If you don't fine any material for that plant than don't run BDC for that plant.
    Regards,
    Naimesh Patel

  • Problem in BDC For Actions

    Hi All,
    I am making a BDC for IT0000.
    I have done the recording and developed a program for that.
    IT0105 is also there in info grouping for action.When I am executing the bdc in Foreground Processing the error is coming "No batch input data for screen MP010500 2000" for IT0105.
    When I am processing the program in background error is coming in the screen IT0105.But the screen displayed here for IT0105 shows different fields from what it shows in foreground processing.
    Can anyone help me out in solving the problem?

    Hi Sutapa,
    Try making the call transaction in mode 'E' and it will stop in the screen which is giving you the error. Some screens will come up only during the backend run(mode N). So in that case you need to write the code after seeing it in mode 'E' which all are the screens coming up.
    Cheers
    JK.

  • Problem in BDC For MR21

    hi all,
    I had written the bdc for mr21 using session method. I am not able to change the standard price using BDC. Recording is perfect. Using transaction mr21 I can change the price but using bdc , it's not changing.It is not giving any error. it gives message that no changes in price have been made.
    Thanks in Advance.
    Regards,
    Atul

    Hi,
    In the code check for one thing...
    when you are populating the price value in the table use the following code and then check if it works.
    data lw_string type string.
    write price to lw_string currency currncykey   " here price is the variable which contains the value... and
    "   Currency key is the currency key for the price which you can get from the table where you get the price.
    "then
    bdcdata-fieldval = lw_string.
    append bdcdata.
    Just check if this works, As earlier I faced a similar kind of a problem when I did this it was resolved....
    Regards,
    Siddarth

  • Problem in BDC for MIRO.....................

    Hi friends,
    I am using BDC for MIRO....In screen number 6220 where POs and items are to filled in table control where i need to fill 100 records... When i am using page down option during recording it is capturing function code as /OO .But while running BDC program this function code /OO is becoming ineffective..means page down is not happening when '/OO'  is executed....can anybody help me out in what can be done in solving the problem...
    Regards.

    Hi Raju,
    But our requirement is to to do the recording only till all the items are filled in the pop up screen..As no page-down button is available in the screen...i guess that is why page-down activity done from key-board is not working fine......Any suggestions from ur side........
    Regards.

  • Problem in bdc for MB01

    We have developed a bdc for t-code MB01.  We want to genreate material documents in background.  For some reasons we are not in a position to use BAPI for MIGO (as we are not able to input data of two fields).  we are on ECC 6.0
    BDC for MB01 is working fine.  Only thing is we want to input "Goods recipient" also in this bdc.  But we are not able to find this field in MB01.  is it possible to get goods recipient also in MB01?  how to do it?
    Also is there any problem in using bdc for MB01 instead of MIGO?

    Hello,
    try LSMW with Object 0110 - Material movement.
    You can develop standard LSMW for this object in half an hour.
    Andrzej

  • Problem in BDC for MB1B

    Dear Experts ,
    I am doing a BDC for MB1B...
    In my selection screen I am having,
    Plant, Vendor No, text and and options to enter 5 different materials and its corresponding qauntity.
    When the user enter the above details and execute , these details should trigger in MB1B
    ( using BDC background ).
    My problem is i the final stage where the document needs to get saved, as in my case
    its getting saved and also if the user enters only 1 material the loop should happen only once, but here
    its getting looped with balnk values.
    I have pasted my code below, please have look and advice me.
    REFRESH: BDCDATA, MESSTAB.
      PERFORM DYNPRO USING:
      'X' 'SAPMM07M' '0400',
      ' ' 'RM07M-BWARTWA' '941',
      ' ' 'RM07M-WERKS'  itab-WERKS,
      ' ' 'RM07M-LGORT' itab-LGORT,
      ' ' 'MKPF-BKTXT'  itab-BKTXT,
      ' ' 'BDC_OKCODE' '/00',
      'X' 'SAPMM07M' '0421',
      ' ' 'MSEGK-UMWRK' itab-WERKS,
      ' ' 'MSEGK-LIFNR' itab-VEND,
      ' ' 'BDC_OKCODE' 'NLE',
      'X' 'SAPLKACB' '0002',
      ' ' 'BDC_OKCODE' '/00'.
      LOOP AT ITAB1.
      QAN = ITAB1-ERFMG.
      QTY = QAN+6(6).
      CNT = CNT + 1.
      CN = CNT.
      CONCATENATE 'MSEG-MATNR(' CN  ')' INTO FN1.
      CONCATENATE 'MSEG-ERFMG(' CN  ')' INTO FN2.
        PERFORM DYNPRO USING:
        'X' 'SAPMM07M' '0421',
        ' '  FN1 ITAB1-MATNR,
        ' '  FN2 QTY,
        ' ' 'BDC_OKCODE' '/00',
        'X' 'SAPLKACB' '0002',
        ' ' 'BDC_OKCODE' '=ENTE'.
      ENDLOOP.
      CALL TRANSACTION 'MB1B' USING BDCDATA MODE 'A'

    Hi Naga,
    Thanks a lot for ur valuable advice !!
    Now my document is getting posted , while using:
    *CALL TRANSACTION 'MB1B' USING BDCDATA MODE  'A' *
    but when I am using
    *CALL TRANSACTION 'MB1B' USING BDCDATA MODE  'N' *
    I am getting 'S' message  No batch input data for screen SAPLKACB 0002.
    I am pasting my code please have a look and advice me.
    REFRESH: BDCDATA, MESSTAB.
      PERFORM DYNPRO USING:
      'X' 'SAPMM07M' '0400',
      ' ' 'RM07M-BWARTWA' '941',
      ' ' 'RM07M-WERKS' S_WERKS,
      ' ' 'RM07M-LGORT' S_LGORT,
      ' ' 'MKPF-BKTXT'  S_BKTXT,
      ' ' 'BDC_OKCODE' '/00',
      'X' 'SAPMM07M' '0421',
      ' ' 'MSEGK-UMWRK' S_WERKS,
      ' ' 'MSEGK-LIFNR' S_VEND,
      ' ' 'BDC_OKCODE' 'NLE',
      'X' 'SAPLKACB' '0002',
      ' ' 'BDC_OKCODE' '/00'.
      LOOP AT ITAB.
        DELETE ITAB WHERE MATNR IS INITIAL.
        QAN = ITAB-ERFMG.
        QTY = QAN+6(6).
        CNT = CNT + 1.
        CN = CNT.
        CONCATENATE 'MSEG-MATNR(' CN  ')' INTO FN1.
        CONCATENATE 'MSEG-ERFMG(' CN  ')' INTO FN2.
        PERFORM DYNPRO USING:
        'X' 'SAPMM07M' '0421',
        ' '  FN1 ITAB-MATNR,
        ' '  FN2 QTY,
        ' ' 'BDC_OKCODE' '/00'.
      ENDLOOP.
      PERFORM BDC_FIELD       USING  'BDC_OKCODE'
                                  '=BU'.
      PERFORM BDC_FIELD       USING 'DKACB-FMORE'
                                    'X'.
      PERFORM DYNPRO          USING 'X' 'SAPLKACB' '0002'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=ENTE'.
      CALL TRANSACTION 'MB1B' USING BDCDATA MODE 'N'
      MESSAGES INTO MESSTAB.
    Rgds
    Karthik

  • Problem in BDC for CA02

    hello all,
             i am doing BDC for change routing (ca02) transaction.
    in that my need is to assign PRT allocation for operations.
    i have written a program for it but if suppose for a particlular operation i want to assign PRT and if there are no PRT assigned for that particular operation before that recording fails.and if already there is atleast one PRT assigned to that operation it runs fine. so i want to remove this error.for that may be i shd first record tha no of PRTS on screen and save that in particular counter and if suppose its greater than 0 then it will run the code and if not it will escape.
                    I know some of u will not understand the problem..in that case i have all screen shots and program ready for it ....plz send u r mail address to me and i will send u my problem with  all details on u r mail id.waiting for quick reply.
    Edited by: abhijeet shastri on Feb 5, 2008 9:01 AM

    hi,
    Here you have to take 2 perform statements, one is for PRT and another one is for without PRT
    After populating the input internal table, need check whether the particuler operation is having PRT values or not.
    if PRT values are available then go for PRT screen (Perform statement for PRT values).
    if not PRT values are available then go for not PRT screen.
    If the PRT screen is depedable on process operation values.
    then you have to make prevalidation . in prevalidation the appropriate operation containing any values for the same then call perform statement for the same. else skip that session through coding.
    Ask to your functional consultant regarding tables (In which table you will PRT screen values based on process operation fields) for PRT pre validation.
    I hope this message will clear your doubt
    Regards,
    Sreenivasa Babu

  • Problem in BDC for F-32

    Hi Experts,
    I m facing a problem while doing the BDC for F-32, i want to make Normal OI check field as Uncheck  through BDC , while recording i have uncheck the check box and the field value appears to be ' ' in the recording , but when i process the BDC the field remains CHECKED by Default.
    pls help how can i unchecked the field.
    I have tried it by puting the value of the field 'X' also but still it remains checked .
    pls help me how can i UNCHECKED the Normal OI  screen field .

    Hi
    The output format of an amonut is managed by the currency, you shouldn't have any particular problem,
    In BDC program the field to be used to transfer the amount has to be char, so probably the easier solution is to write it into the bdc field in according to the currency:
    WRITE <AMOUNT> CURRENCY <CUURENCY> TO <BDC FIELD>.
    Max

  • Problem in BDC for F-02 -- Currency Problem

    Dear Experts,
    I have written a BDC for F-02 to upload the opening balances of vendors.
    Problem is , this BDC is for Libya country,  where decimal places is 3.
    Now when i run my BDC, if the amount is  22.54, it will upload it as 22.540, which is ok, but if the amount is 22.543, it upload it as 22.540 instead of 22.543.
    can one provide some guidance in this....
    Regards,
    Maverick

    Hi
    The output format of an amonut is managed by the currency, you shouldn't have any particular problem,
    In BDC program the field to be used to transfer the amount has to be char, so probably the easier solution is to write it into the bdc field in according to the currency:
    WRITE <AMOUNT> CURRENCY <CUURENCY> TO <BDC FIELD>.
    Max

Maybe you are looking for

  • ITunes 7.7 crashes every time I try to play a song

    I installed iTunes 7.7 yesterday, no problems whatsoever. However, suddenly today when I was listening to some music, the application crashed. Since then, every time I try to play some tune it crashes. It launches properly, I can do everything and cl

  • Audio randomly popping out

    I recently aquired a 2012 MacBook Pro (Non-retina). I have my screen (Dell u2410) connected via a mini-displayport to displayport cable. I also run my audio via this cable en have my audio system connected to the displays audio out. Whenever I play m

  • Smooth Scrolling Doubts

    Hi, people I'd like to understand better how works the feature Smooth Scrolling. Because when I create a big page, ie: 1024 px (width) x 3000 px (height). This page, now, is portrait in Folio Builder, instead of landscape (1024 x 768 px) I have many

  • Aperture 3.6 - wrong image selected during import

    Aperture 3.6 OS X Yosemite 10.10.1 MacBook Air I run a program at a guest ranch where we import photos from our guests into Aperture. We see multiple devices and have this issue randomly on many of them. Lets choose an iPhone for the example. Connect

  • HD movies in itunes

    I bought a HD movie from itunes, SD version was already downloade but HD version does not start at all, please help...What should i do?