Problems Facing in BDC

Hi All,
         I want to know the problems facing in Uploading Xternal file in BDC.
Its very Urgent . Points will be rewarded to good ans.
Bye.

Hi
Many problems can occur while doing bdc like field mis match can occur,Data over lapping between fields etc
Regards
Shibin

Similar Messages

  • MULTIPLE ITEM PROBLEM IN VL31N BDC

    hI FRIENDS ,
        I AM POSTING A BDC OF TRANSACTION VL31N ,ie FOR SCHEDULE AGREEMENT INBOUND DELIVERY.I CREATE A FUNCTIONAL MODULE OF THE SAME AND CALL IT FROM AN ASP PAGE,IN THAT THERE IS PO NUMBER 5500000986 WHICH HAS TWO ITEMES 62 AND 95 RESPECTIVLY OF SAME MATARIAL NUMBER R010230123041002 AND DIE NUMBER 2304P,NOW THE PROBLEM IS THIS BDC IS WORKING WHEN THERE IS ONLY ONE ITEM BUT GIVES AN ERROR "CANT CREAT INBOUND DELIVERY FOR PO NO ...' WNEN IT HAS MULTIPLE ITEM.WHAT SHOULD I DO ? I ALSO USED LOOP BUT IT ALSO DOSENT WORK AS IT WILL ADD ALL OPEN QTY OF PO 986 AND UPDATE AGAINST ITEM NO 95.
    CODE IS AS FOLLOWS:.........
    FUNCTION y_synie_bdcinbdly.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(CTU) LIKE  APQI-PUTACTIVE DEFAULT 'X'
    *"     VALUE(MODE) LIKE  APQI-PUTACTIVE DEFAULT 'N'
    *"     VALUE(UPDATE) LIKE  APQI-PUTACTIVE DEFAULT 'L'
    *"     VALUE(GROUP) LIKE  APQI-GROUPID OPTIONAL
    *"     VALUE(USER) LIKE  APQI-USERID OPTIONAL
    *"     VALUE(KEEP) LIKE  APQI-QERASE OPTIONAL
    *"     VALUE(HOLDDATE) LIKE  APQI-STARTDATE OPTIONAL
    *"     VALUE(NODATA) LIKE  APQI-PUTACTIVE DEFAULT '/'
    *"     VALUE(EXTNID) LIKE  MAKT-MAKTG
    *"     VALUE(VENDORNO) LIKE  LFA1-LIFNR
    *"     VALUE(PONUMBER) LIKE  EKKO-EBELN
    *"     VALUE(ITEMNUMBER) LIKE  LIPS-VGPOS
    *"     VALUE(MATERIAL) LIKE  MAKT-MAKTG
    *"     VALUE(DLYQTY) LIKE  LIPS-LFIMG
    *"     VALUE(BTCHNO) LIKE  LIPS-CHARG
    *"     VALUE(POSLR) LIKE  EKES-EBELP OPTIONAL
    *"  EXPORTING
    *"     VALUE(SUBRC) LIKE  SYST-SUBRC
    *"     VALUE(INDELYNO) LIKE  SY-MSGV2
    *"     VALUE(MSG1) LIKE  SY-MSGV1
    *"     VALUE(MSG2) LIKE  SY-MSGV2
    *"     VALUE(MSG3) LIKE  SY-MSGV3
    *"     VALUE(MSG4) LIKE  SY-MSGV4
    *"  TABLES
    *"      MESSTAB STRUCTURE  BDCMSGCOLL
    *"      ERRTAB STRUCTURE  YSYNERRMSGS
    *"      INDLYTAB STRUCTURE  YSYN_QTYTAB
    Updated by ANAND SYNISE 19.1.2007
      DATA: BEGIN OF bdctab OCCURS 0.
              INCLUDE STRUCTURE bdcdata.
      DATA: END OF bdctab.
      DATA: datenow(10) TYPE c,
            fldvar(30)  TYPE c,
            fldno       TYPE i,
            flditoc(6)  TYPE c,
            qty(13)     TYPE c.
      DATA maxposnr LIKE lips-posnr.
      DATA testposnr TYPE posnr.
      DATA itemnoint TYPE i.
      CONCATENATE sy-datum6(2) '.' sy-datum4(2) '.' sy-datum+0(4) INTO datenow.
      CLEAR bdctab.
      REFRESH bdctab.
      PERFORM open_group      USING group user keep holddate ctu.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '4007'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'RV50A-VERUR_LA'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '/00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-LIFNR'.
           bdctab-fval = vendorno.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LV50C-BSTNR'.
           bdctab-fval = ponumber.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-VERUR_LA'.
           bdctab-fval = extnid.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=MKAL_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIKP-BLDAT'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=POPO_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-POSNR(01)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '0111'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'RV50A-PO_MATNR'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = 'WEIT'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-PO_MATNR'.
           bdctab-fval = material.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=POLO_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-POSNR(01)'.
           APPEND bdctab.
    *ADDED BY ANAND ON 22-01-2007
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval =  ITEMNUMBER .     "ITEMNUMBER = LIPS-VGPOS
           APPEND bdctab.
    ************ENDED***********************
    ADDED BY MILIND 19.01.2007
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval =  poslr .
           APPEND bdctab.
    *    ENDED * *
       CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LIPS_SELKZ(01)'.
           bdctab-fval = ''.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '/00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-CHARG(01)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
          QTY = INDLYTAB-DLYQTY.
            qty = dlyqty.
           bdctab-fnam = 'LIPSD-G_LFIMG(01)'.
           bdctab-fval = QTY.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIPS-CHARG(01)'.
    *     BDCTAB-FVAL = INDLYTAB-BTCHNO.
           bdctab-fval = btchno.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
       CLEAR bdctab.
           bdctab-program = 'SAPMV50A'.
           bdctab-dynpro = '1000'.
           bdctab-dynbegin = 'X'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_OKCODE'.
           bdctab-fval = '=SICH_T'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'LIKP-BLDAT'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_CURSOR'.
           bdctab-fval = 'LIPS-MATNR(02)'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFDAT_LA'.
           bdctab-fval = datenow.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'RV50A-LFUHR_LA'.
           bdctab-fval = '00:00'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
           CLEAR bdctab.
           bdctab-fnam = 'BDC_SUBSCR'.
           bdctab-fval = 'SAPMV50A'.
           APPEND bdctab.
      CALL TRANSACTION 'VL31N' USING bdctab MODE 'N'  MESSAGES INTO messtab.
      subrc = sy-subrc.
      PERFORM close_group USING     ctu.
      CLEAR bdctab.
      REFRESH bdctab.
      IF sy-subrc EQ 0.
        indelyno = sy-msgv2.
      ENDIF.
      LOOP AT messtab.
        MOVE: messtab-msgid TO errtab-msgid,
              messtab-msgnr TO errtab-msgnr,
              messtab-msgv1 TO errtab-msg1,
              messtab-msgv2 TO errtab-msg2,
              messtab-msgv3 TO errtab-msg3,
              messtab-msgv4 TO errtab-msg4.
        APPEND ERRtab.
      ENDLOOP.
      LOOP AT errtab.
        SELECT SINGLE text FROM t100
          INTO errtab-errmsg
          WHERE msgnr EQ errtab-msgnr AND arbgb EQ errtab-msgid
          AND sprsl EQ sy-langu.
        MODIFY errtab.
      ENDLOOP.
    ENDFUNCTION.

    Hi,
    Check this code:
    REPORT Z_CUSTOMER_UPLOAD .
                  D A T A         D E C L A R A T I O N S                *
    DATA:BEGIN OF IT_CUSTOMER OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_CUSTOMER.
    DATA:BEGIN OF IT_success OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_success.
    DATA:BEGIN OF IT_error OCCURS 0,
         KUNNR LIKE MV10A-KUNNR,
         VKORG LIKE MV10A-VKORG,
         VTWEG LIKE MV10A-VTWEG,
         MATNR LIKE MV10A-MATNR,
         KDMAT LIKE MV10A-KDMAT,
         MEGRU LIKE MV10A-MEGRU,
         SELKZ TYPE C value 'X',
         LPRIO LIKE MV10A-LPRIO,
         ANTLF LIKE MV10A-ANTLF,
         END OF IT_error.
    DATA: L_INDEX TYPE SY-TABIX.
    DATA:IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    IT_DATA TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    ERROR MESSAGE TABLE
    DATA:IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : C_S TYPE C VALUE 'S',
            C_E TYPE C VALUE 'E'.
    *DATA: IT_SUCCESS LIKE IT_CUSTOMER OCCURS 0,
         IT_ERROR LIKE IT_CUSTOMER  OCCURS 0.
    DATA : V_RECTOT TYPE I,
            V_RECERR TYPE I,
            V_RECSUC TYPE I.
                  S E L E C T I O N  -  S C R E E N                      *
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER        : P_FILE LIKE RLGRAP-FILENAME .
    SELECTION-SCREEN : END OF BLOCK B1.
               A T  S E L E C T I O N  -  S C R E E N                    *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    to get F4 help for p_file
      PERFORM F4_FILENAME USING P_FILE.
                S T A R T   O F   S E L E C T I O N                      *
    START-OF-SELECTION.
    Uploading data from flat file into it_tab
      PERFORM BDC_UPLOAD USING P_FILE.
      PERFORM PROCESS_DATA.
      PERFORM POPULATE_BDC.
                E N D  O F   S E L E C T I O N                           *
    *END-OF-SELECTION.
    PERFORM DISPLAY_REPORT.
    *&      Form  F4_FILENAME
          text
         -->P_P_FILE  text
    FORM F4_FILENAME USING    P_P_FILE.
    DATA:L_FILE TYPE IBIPPARMS-PATH.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = L_FILE .
       P_P_FILE = L_FILE.
    ENDFORM.                    " F4_FILENAME
    *&      Form  BDC_UPLOAD
          text
         -->P_P_FILE  text
    FORM BDC_UPLOAD USING    P_P_FILE.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = P_P_FILE
        I_BEGIN_COL                   = 1
        I_BEGIN_ROW                   = 1
        I_END_COL                     = 8
        I_END_ROW                     = 1000
      TABLES
        INTERN                        = IT_DATA
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 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.
    ENDFORM.                    " BDC_UPLOAD
    *&      Form  PROCESS_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM PROCESS_DATA.
    SORT IT_DATA BY ROW COL.
      LOOP AT IT_DATA.
    CASE IT_DATA-COL.
    WHEN 1.
    IT_CUSTOMER-KUNNR   = IT_DATA-VALUE.
    WHEN 2.
    IT_CUSTOMER-VKORG   = IT_DATA-VALUE.
    WHEN 3.
    IT_CUSTOMER-VTWEG   = IT_DATA-VALUE.
    WHEN 4.
    IT_CUSTOMER-MATNR   = IT_DATA-VALUE.
    WHEN 5.
    IT_CUSTOMER-KDMAT   = IT_DATA-VALUE.
    WHEN 6.
    IT_CUSTOMER-MEGRU   = IT_DATA-VALUE.
    WHEN 7.
    IT_CUSTOMER-LPRIO   = IT_DATA-VALUE.
    WHEN 8.
    IT_CUSTOMER-ANTLF   = IT_DATA-VALUE.
    APPEND IT_CUSTOMER.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    " PROCESS_DATA
    *&      Form  POPULATE_BDC
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_BDC.
    DATA:L_COUNTER TYPE N,
             L_STRING TYPE STRING.
    LOOP AT IT_CUSTOMER.
    AT NEW KUNNR.
    CLEAR L_COUNTER.
          L_INDEX = SY-TABIX.
          READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_dynpro      using 'SAPMV10A' '0100'.
    perform bdc_field       using 'MV10A-KUNNR'
                                  IT_CUSTOMER-KUNNR.
    perform bdc_field       using 'MV10A-VKORG'
                                  IT_CUSTOMER-VKORG.
    perform bdc_field       using 'MV10A-VTWEG'
                                  IT_CUSTOMER-VTWEG.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    L_COUNTER = L_COUNTER + 1.
        CLEAR L_STRING.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-MATNR(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                            IT_CUSTOMER-MATNR.
    CONCATENATE 'MV10A-KDMAT(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using     L_STRING
                                     IT_CUSTOMER-KDMAT.
    CONCATENATE 'MV10A-MEGRU(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using   L_STRING
                                    IT_CUSTOMER-MEGRU.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *-- For Page down in Call Transaction Mode
        IF L_COUNTER = 14.
          CLEAR L_COUNTER.
          PERFORM BDC_DYNPRO      USING 'SAPMV45A' '4001'.
          PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                                '=P+'.
        ENDIF.
    perform bdc_dynpro      using 'SAPMV10A' '0200'.
    CONCATENATE 'MV10A-SELKZ(' L_COUNTER ')' INTO L_STRING.
    perform bdc_field       using L_STRING
                              IT_CUSTOMER-SELKZ.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SELE'.
    perform bdc_dynpro      using 'SAPMV10A' '0300'.
    perform bdc_field       using 'MV10A-KDMAT'
                                  IT_CUSTOMER-KDMAT.
    perform bdc_field       using 'MV10A-LPRIO'
                                  IT_CUSTOMER-LPRIO.
    perform bdc_field       using 'MV10A-ANTLF'
                                  IT_CUSTOMER-ANTLF.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                        '/EBACK'.
    at end of kunnr.
    READ TABLE IT_CUSTOMER INDEX L_INDEX.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    CALL TRANSACTION 'VD51' USING IT_BDC MODE 'A' UPDATE 'S'
          MESSAGES INTO IT_MESSAGES.
          CLEAR IT_BDC.
          REFRESH IT_BDC.
    ENDAT.
      IF NOT IT_MESSAGES[] IS INITIAL.
        PERFORM FORMAT_MESSAGE.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    " POPULATE_BDC
    *&      Form  bdc_dynpro
          text
         -->P_0273   text
         -->P_0274   text
    FORM bdc_dynpro USING    VALUE(P_0273)
                             VALUE(P_0274).
    IT_BDC-PROGRAM = P_0273.
    IT_BDC-DYNPRO = P_0274.
    IT_BDC-DYNBEGIN = 'X'.
      APPEND IT_BDC.
      CLEAR IT_BDC.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
          text
         -->P_0278   text
         -->P_RECORD_KUNNR_001  text
    FORM bdc_field USING    VALUE(P_0278)
                           VALUE(P_0279).
    IT_BDC-FNAM = P_0278.
      IT_BDC-FVAL = P_0279.
      APPEND IT_BDC.
      CLEAR IT_BDC.
    ENDFORM.                    " bdc_field
    *&      Form  FORMAT_MESSAGE
          text
    -->  p1        text
    <--  p2        text
    FORM FORMAT_MESSAGE.
    DATA: L_MSG(100).
      LOOP AT IT_MESSAGES.
      READ TABLE IT_CUSTOMER INDEX L_INDEX.
        CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
                  ID        = IT_MESSAGES-MSGID
                  LANG      = SY-LANGU
                  NO        = IT_MESSAGES-MSGNR
                  V1        = IT_MESSAGES-MSGV1
                  V2        = IT_MESSAGES-MSGV2
                  V3        = IT_MESSAGES-MSGV3
                  V4        = IT_MESSAGES-MSGV4
             IMPORTING
                  MSG       = L_MSG
             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:/ l_msg.
      ENDLOOP.
    ENDFORM.                    " FORMAT_MESSAGE
    reward if helpful,
    keerthi

  • Problems faced by me using the 5700

    I bought the nokia 5700 a month ago and it has been this way since then. I face a few problems which i wish were added in a update for the firmware by nokia. Is there anyway to inform nokia about this?
    Problems faced by me:
    1)In the log after switchin the mobile on and after about a day or two when i call from the log i.e pressing green button on a contact or going into options and selecting voice call. Nothing happens. No call can be made from the log. It is very annoying cause everyone directly calls from the log upon seeing the miss call... Though the call can be made from the contacts list and everywhere else, u can dial a number and call. The problem is just with the log(fixed by turning the mobile off then on but eventually the same thing happens)
    2)The time and date when set as a screensaver does not appear all the time, the screen maybe blank or time maybe shown.
    3)This is going to be very weird, i have a habit of just seeing emergency numbers such as 911 and 112 appear when the phone is locked, when i dial these keys sometimes the numbers appear and sometimes they dont.(again fixed by turning the mobile off then on)
    4)This is the BIGGEST FLAW FOR THE 5700 FOR ME, if you have noticed (i dont know abt other 5700's but this is the case with mine) in the log if you have contacts having numbers which can be divided into home ,mobile,etc. When you see the log no matter wherever the call came from you see a mobile icon.This again is very annoying cause you dont come to know where the call came from and after a miss call, u would have to go in options, use number, edit number and then see it. Or by calling and seeing the number for a brief moment. So you can accidentally dial at someones home though you dont want to and even they didnt call from their home.
    Anyone having these problems?
    Nokia 5700 has been out for 3 months over here i guess we deserve updates for the firmware. Dont we?
    And though i get these problems i can still say with dignity that 5700 is cool.
    btw If i format do i lose any themes installed on the phone memory? Cause i downloaded this theme from nokia once and you dont get it any more for some odd reason.

    Go to Nokia Service nearet your location. Ask them for a solution.

  • Problem while doing bdc for fv60

    Hi frends,
       I got problem while doing BDC for fv60 tcode.i have given
    header items:
    vendor number
    invoice date
    posting date
    amount
    item data:
    g/l acc no: 100000
    amount 1000 whatever
    these are all given in recording
    in recording after all giving this data if we click on park it is telling "parking not possibe duiring batch input".
    can any body tell me the process for recording shdb and after that in bdc how can we give multiple line items for fv60
    thanks,
    naveen.

    I don't think you can use FV60 in batch input. Your options are to use transaction FBV1 or bapi BAPI_INCOMINGINVOICE_PARK.
    Rob

  • TWO VERY TOUGH SUPPORT PROBLEMS FACED AND SOLVED IN REAL TIME

    pls any body post two very tough support problems faced and solved in real time.
    my id is: [email protected]

    Hi Priya.,
    For example client wants his customer legacy number in XD01 master data which is not there in Standard SAP.we can satisfy the requirement with USER EXIT
    2) If the client wants customer Phone number in the sales order we can use user exit to satify the requirement
    These are not provided in Standard SAP & we should work out on alternative way
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • Problem in fv50 BDC  working  manually  giving err for BDC

    Hi all,
    I have one problem in fv50 BDC when I park document manually it works fine but when I try to park through  my BDC it gives error
    Parking not possible during batch input
    Message no. FP140
    Procedure
    In Customizing, you can control whether an error message is issued.
    my Question is.
    how can i make it a warning message?
    Thanks in Advance
    Sachin Gautam

    hi,
    have you tried F-63 too?
    A.

  • My iphone 5 is problem facing like that. when i switch off my iphone5 then plugh for charge with data cable or charger adapder or only data cable with no power connect phone is starting why? means on my phone Why? any one can explane this matter please. s

    my iphone 5 is problem facing like that. when i switch off my iphone5 then plugh for charge with data cable or charger adapder or only data cable with no power connect phone is starting why? means on my phone Why? any one can explane this matter please. switched off my phone but on without power button . what is the problem?
    Thanks
    s.m slim

    all iphone is same like that

  • Can i get some live problems faced on support for sap hr

    Can i get some live problems faced on support for sap hr and how were they resolved? Please give a step by step detail of the sol.
    Dear
    Member,  of all the  Issues raised in the forum some of the issues are support issues you can have a look at all these threads
    Please read the forum rules before Posting the Query

    Hi,
    Please be with this SDN.SAP Forum, you will get solutions of all types of queris.
    Regards,
    Ram Aware

  • Problem in the BDC Table Control for the T.Code VA01

    Hi,
      I faced probelm in the BDC of the VA01. In the Table Control
    the records are entered upto 12 line items. after 13th line item overwrites the first record. How to solve the Problem.
    Please help me.

    or use this
    Internal table definition *
    data : begin of bdcdata occurs 0.
            include structure bdcdata.
    data : end of bdcdata.
    data: begin of messtab occurs 0.
            include structure bdcmsgcoll.
    data: end of messtab.
    data: v_chr_opengrp type c,
          r_matnr like mara-matnr,                       "variable for material conversion
          r_werks like marc-werks,                       "variable for plant
          v_str_fname   type string.
    data: begin of count2,
          inrec(9) type n,                               " input I_MATERIAL count
          create(9) type n,                              " create count
          error(9) type n,                               " error count
          bdc(9) type n,                                 " count of BDC creates
          end of count2.
    types: begin of ty_source,
    partn_numb(10) type n ,"Customer Number 1
    ref(035),
    sales_org(4) , "Sales Organization
    distr_chan(2) , "Distribution Channel
    division(002), "DIVISION
    doc_type(4) , "Sales Document Type
    purch_no(020), "Purchase order
    material like vbap-matnr,
    reqqty(018),
    reqdate(010),
    end of ty_source,
    begin of ty_header ,
    partn_numb(10) ,"Customer Number 1
    ref(035),
    sales_org(4) , "Sales Organization
    distr_chan(2) , "Distribution Channel
    division(002), "DIVISION
    doc_type(4) , "Sales Document Type
    purch_no(020), "Purchase order
    end of ty_header,
    begin of ty_item,
    partn_numb(10) ,"Customer Number 1
    ref(035),
    material like vbap-matnr,
    reqqty(018),
    reqdate(010),
    end of ty_item.
    data : msg(240) type c, " Return Message
    e_rec(8) type c, " Error Records Counter
    rec_no(8) type c, " Records Number Indicator
    s_rec(8) type c, " Successful Records Counter
    t_rec(8) type c, " Total Records Counter
    v_matnr like mara-matnr.
    data: val(2) type n value 01.
    data : begin of bdc_itab occurs 0.
            include structure bdcdata.
    data : end of bdc_itab.
    data : t_source type standard table of ty_source   with header line,
    t_header type standard table of ty_header initial size 1,
    t_item type standard table of ty_item initial size 1,
    t_target type standard table of bdcdata initial size 1.
    data : w_source type ty_source,
    w_source1 type ty_source,
    w_header type ty_header,
    w_item type ty_item,
    w_target type bdcdata,
    count type i,
    count1 type n.
    Variable Declaration
    data: w_fname type string,
    fnam(20),
    date1(10),
    i(2) type n,
    v_count type i,
    v_group type apqi-groupid.
    *& selection screen
    selection-screen :begin of block bl1 with frame title  text-001.
    parameters : p_fname type rlgrap-filename,                         "Input file
                 p_update(1) default 'N',                              "Input for update mode
                 p_bdcgrp(12) default 'SD_ORDERS'.                     "Input for session name
    selection-screen end of block bl1.
    **&SELECTION SCREEN VALIDATIONS
    at selection-screen on value-request for p_fname.
      call function 'KD_GET_FILENAME_ON_F4'
        exporting
          program_name  = 'ZMATERIAL'
          dynpro_number = '1000'
          field_name    = 'P_FNAME'
        changing
          file_name     = p_fname.
    *& Start of selection
    start-of-selection.
      if  p_fname is initial.
        message i016(rp) with 'Please enter a file name'.
        leave list-processing.
      else.
        move p_fname to  v_str_fname.
      endif.
      call function 'GUI_UPLOAD'
        exporting
          filetype                = 'ASC'
          filename                = v_str_fname
          has_field_separator     = 'X'
        tables
          data_tab                = t_source
        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.
      sort t_source by ref partn_numb.
      loop at t_source into w_source.
        add 1 to count2-inrec.
        w_source1 = w_source.
       AT NEW PARTN_NUMB.  "10/31 KVB
        at new ref.
          w_header-doc_type = w_source1-doc_type..
          w_header-sales_org = w_source1-sales_org .            "'0001'
          w_header-distr_chan = w_source1-distr_chan.           "'01'
          w_header-division = w_source1-division.               " '01'
          w_header-purch_no = w_source1-purch_no.
          w_header-partn_numb = w_source1-partn_numb.
          w_header-ref = w_source1-ref.
          append w_header to t_header.
        endat.
        w_item-partn_numb = w_source1-partn_numb.
        w_item-material = w_source1-material.
        w_item-reqqty = w_source1-reqqty.
        w_item-ref = w_source1-ref.
        w_item-reqdate = w_source1-reqdate.
        append w_item to t_item.
        clear :w_item,w_header.
      endloop.
      loop at t_header into w_header.
        perform bdc_dynpro      using         'SAPMV45A'                  '0101'       .
        perform bdc_field       using         'BDC_CURSOR'                'VBAK-SPART'.
        perform bdc_field       using         'BDC_OKCODE'                '/00'.
        perform bdc_field       using         'VBAK-AUART'                w_header-doc_type.
        perform bdc_field       using         'VBAK-VKORG'                w_header-sales_org.
        perform bdc_field       using         'VBAK-VTWEG'                w_header-distr_chan.
        perform bdc_field       using         'VBAK-SPART'                w_header-division.
        perform bdc_dynpro      using         'SAPMV45A'                  '4001'     .
        perform bdc_field       using         'BDC_OKCODE'                '/00'.
        perform bdc_field       using         'BDC_CURSOR'               'VBKD-BSTKD'.
        perform bdc_field       using         'VBKD-BSTKD'                w_header-purch_no.
        perform bdc_field       using         'KUWEV-KUNNR'               w_header-partn_numb.
        i = 1.
        loop at t_item into w_item where partn_numb = w_header-partn_numb
                                         and ref = w_header-ref.
          at new partn_numb.
            clear count1.
            count = 0.
          endat.
          count = count + 1.
          if count gt 5.
            clear i.
            i = 2.
            perform bdc_dynpro      using 'SAPMV45A' '4001'      .
            perform bdc_field       using 'BDC_OKCODE' '=POAN'.
          endif.
          count1 = count1 + 1.
          concatenate 'VBAP-POSNR(' i ')' into fnam.
          perform bdc_field       using  fnam
                                        count1.
          concatenate 'RV45A-MABNR(' i ')' into fnam.
          perform bdc_field    using fnam                            w_item-material.
          concatenate 'RV45A-KWMENG(' i ')' into fnam.
          perform bdc_field       using  fnam                        w_item-reqqty..
          concatenate 'RV45A-ETDAT(' i ')' into fnam.
          perform bdc_field       using  fnam                         w_item-reqdate.
          concatenate 'VBKD-BSTKD_E(' i ')' into fnam.
          perform bdc_field       using  fnam                         w_item-ref.
          i = i + 1.
          clear:  w_item.
        endloop.
        clear w_header.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=SICH'.
        perform post_transaction.
        refresh bdc_itab.
        clear   bdc_itab.
      endloop.
    *endloop.
    end-of-selection.
      perform finalization.
           Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear bdc_itab.
      bdc_itab-program  = program.
      bdc_itab-dynpro   = dynpro.
      bdc_itab-dynbegin = 'X'.
      append bdc_itab.
    endform.                    "bdc_dynpro
           Insert field                                                  *
    form bdc_field using fnam fval.
      if fval <> ''.
        clear bdc_itab.
        bdc_itab-fnam = fnam.
        bdc_itab-fval = fval.
        append bdc_itab.
      endif.
    endform.                    "bdc_field
    **&      Form  get_filename
          text
    -->  p1        text
    <--  p2        text
    *form get_filename .
    *call function 'WS_FILENAME_GET'
       exporting
         def_filename     = space
         def_path         = file
         mask             = ',.,..'
         mode             = 'N'
         title            = text-015
       importing
         filename         = file
       exceptions
         inv_winsys       = 1
         no_batch         = 2
         selection_cancel = 3
         selection_error  = 4
         others           = 5.
    *endform.                    " get_filename
    *&      Form  post_transaction
          text
    -->  p1        text
    <--  p2        text
    form post_transaction .
      refresh messtab.
      clear   messtab.
      call transaction  'VA01' using bdc_itab
                  mode   p_update
                update  'S'
              messages into messtab.
      read table messtab with key msgtyp = 'E'.
      if sy-subrc eq 0.
        perform process_error_messages.
        add 1 to count2-bdc.
        if v_chr_opengrp is initial.
          perform bdc_open_group.
        endif.
        call function 'BDC_INSERT'
          exporting
            tcode          = 'VA01'
          tables
            dynprotab      = bdc_itab
          exceptions
            internal_error = 1
            not_open       = 2
            queue_error    = 3
            tcode_invalid  = 4
            others         = 5.
        if sy-subrc <> 0.
          case sy-subrc.
            when 1.
              write: / 'Internal error'.
            when 2.
              write: / 'Not open error'.
            when 3.
              write: / 'queue error'.
            when 4.
              write: / 'tcode invalid error'.
            when others.
              write: / 'other error'.
          endcase.
        endif.
      else.
        add +1 to count2-create.
        format intensified off.
        format color col_normal.
        format color col_normal off.
      endif.
      clear   bdc_itab.
      refresh bdc_itab.
    endform.                    " post_transaction
    *&      Form  finalization
          text
    -->  p1        text
    <--  p2        text
    form finalization .
      if v_chr_opengrp = 'X'.
        call function 'BDC_CLOSE_GROUP'
          exceptions
            not_open    = 1
            queue_error = 2
            others      = 3.
      endif.
      get time.
      skip 2.
      write: / 'Time', sy-uzeit.
      skip.
      format color col_total on.
      write: / 'Total Records: ',           40 count2-inrec.
      write: / 'PERNR not of Emp Group 6 ', 40 count2-error.
      write: / 'Records Created: ',         40 count2-create.
      write: / 'BDC Create in group: ',     40 count2-bdc.
      if v_chr_opengrp = 'X'.
        skip 1.
        format intensified on.
        format color col_negative on.
        write: / 'PLEASE USE TRANSACTION "SM35" ',
                 'TO PROCESS THE GENERATED BDC SESSION ... ',
                 p_bdcgrp.
      endif.
    endform.                    " finalization
    *&      Form  bdc_open_group
          text
    -->  p1        text
    <--  p2        text
    form bdc_open_group .
      call function 'BDC_OPEN_GROUP'
        exporting
          client              = sy-mandt
          group               = p_bdcgrp
          holddate            = sy-datum
          keep                = 'X'
          user                = sy-uname
        exceptions
          client_invalid      = 1
          destination_invalid = 2
          group_invalid       = 3
          group_is_locked     = 4
          holddate_invalid    = 5
          internal_error      = 6
          queue_error         = 7
          running             = 8
          system_lock_error   = 9
          user_invalid        = 10
          others              = 11.
      if sy-subrc eq 0.
        v_chr_opengrp = 'X'.
      endif.
    endform.                    " bdc_open_group
    *&      Form  process_error_messages
          text
    -->  p1        text
    <--  p2        text
    form process_error_messages .
      data: begin of loc_aux_message.
              include structure message.
      data: end of loc_aux_message.
      data : msgno type sy-msgno.
      loop at messtab.
        move messtab-msgnr to msgno.
        call function 'WRITE_MESSAGE'
          exporting
            msgid  = messtab-msgid
            msgno  = msgno
            msgty  = messtab-msgtyp
            msgv1  = messtab-msgv1
            msgv2  = messtab-msgv2
            msgv3  = messtab-msgv3
            msgv4  = messtab-msgv4
          importing
            messg  = loc_aux_message
          exceptions
            others = 1.
        if sy-subrc eq 0.
          format color col_negative on.
          write: /10 loc_aux_message.
          format color col_negative off.
        else.
          format color col_negative on.
          write: /10 t_source-partn_numb.
          write: / 'Error creating message'.
          format color col_negative off.
          exit.
        endif.
      endloop.
    endform.                    " process_error_messages

  • Problem in QP01 Bdc

    Hi,
    I am had made a BDC for the tcode QP01 few months back and i am facing a problem that it is not able to execute after 18 line items as i had commited a mistake by not presseing the Page down during recording. It is workng fine for the 18 lines items when there are more than that it is not uploading the data.
    I want to is it possible to do changes in the code so that Page Down Concept can be used rather than doing again recording.
    Please provide me guidelines for solving this problem.

    but i want to try it out by modifying the existing code.
    please provide me guidelines to solve this problem.

  • Problem facing in sender file adapter

    Hi XI gurus,
    I am facing a problem in sender file adapter communcation channel
    Is there any restriction in XI that XI picks max of 100 at a time .
    Actaully probolem here is My XI sender file adapter need to pick 2800 file from ftp.
    adapter need to file pick files ranging SAP_OUT_066581_280_INV.xml to SAP_OUT_SZ22TXN066581_2800_INV.xml
    to pick these we have given file name as u201CSAP_OUT_*_INV.xmlu201D when ever given this XI is coming with no messges.
    when ever file name is given as SAP_OUT_SZ22TXN066581_3*_INV.xml it XI has picked file from 300 to 399
    when eve tried with the options to pick all the message
    SAP_OUT_SZ22TXN066581_*_INV.xml  Failed with no messaege
    even atleast tried to pick 1000 mesaanges from 1000 to 1999
    i have given like this
    SAP_OUT_SZ22TXN066581_1*_INV.xml failed with no messages
    while trying with option xi picking file max 100 at a time
    SAP_OUT_SZ22TXN066581_1*_INV.xml
    SAP_OUT_SZ22TXN066581_11*_INV.xml
    SAP_OUT_SZ22TXN066581_12*_INV.xml
    like this I am increaing the number and picking maximum of 100 messages only
    Is there any way to auto mate this or nny file names need to be required
    waiting for your reply

    Check SAP Note 821267 - FAQ: XI 3.0 / PI 7.0/ PI 7.1 File Adapter.
    I guess point 8 might relate to your problem if the FTP adapter timeout occurs.
    check the note 849089 as well.
    Also check point 13 and 26.
    Gaurav Jain
    Points if answer is useful
    Edited by: Gaurav Jain on Jun 6, 2008 4:20 PM

  • Problem in the BDC program to upload the data from a flat file.

    Hi,
    I am required to write a BDC program to upload the data from a flat file. The conditions are as mentioned below:-
    1) Selection Screen will be prompted to user and user needs to provide:- File Path on presentation server (with F4 help for this obligatory parameter) and File Separator e.g. @,#,$,%,... etc(fields in the file will be separated by using this special character) or fields may be separated by tab(tab delimited).
    2) Finally after the data is uploaded, following messages need to be displayed:-
    a) Total Number of records successfully uploaded.
    b) Session Name
    c) Number of Sessions created.
    Problem is when each record is fetched from flat file, the record needs to be split into individual fields separated by delimiter or in case tab separated, then proceeding in usual manner.
    It would be great if you provide me either the logic, pseudocode, or sample code for this BDC program.
    Thanks,

    Here is an example program,  if you require the delimitor to be a TAB, then enter TAB on the selection screen, if you require the delimitor to be a comma, slash, pipe, whatever, then simply enter that value.  This example is simply the uploading of the file, not the BDC, I assume that you know what to do once you have the data into the internal table.
    REPORT zrich_0001.
    TYPES: BEGIN OF ttab,
            rec TYPE string,
           END OF ttab.
    TYPES: BEGIN OF tdat,
           fld1(10) TYPE c,
           fld2(10) TYPE c,
           fld3(10) TYPE c,
           fld4(10) TYPE c,
           END OF tdat.
    DATA: itab TYPE TABLE OF ttab.
    data: xtab like line of itab.
    DATA: idat TYPE TABLE OF tdat.
    data: xdat like line of idat.
    DATA: file_str TYPE string.
    DATA: delimitor TYPE string.
    PARAMETERS: p_file TYPE localfile.
    PARAMETERS: p_del(5) TYPE c.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      DATA: ifiletab TYPE filetable.
      DATA: xfiletab LIKE LINE OF ifiletab.
      DATA: rc TYPE i.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        CHANGING
          file_table = ifiletab
          rc         = rc.
      READ TABLE ifiletab INTO xfiletab INDEX 1.
      IF sy-subrc = 0.
        p_file = xfiletab-filename.
      ENDIF.
    START-OF-SELECTION.
      TRANSLATE p_del TO UPPER CASE.
      CASE p_del.
        WHEN 'TAB'.
          delimitor = cl_abap_char_utilities=>horizontal_tab.
        WHEN others.
          delimitor = p_del.
      ENDCASE.
      file_str = p_file.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename = file_str
        CHANGING
          data_tab = itab.
      LOOP AT itab into xtab.
        CLEAR xdat.
        SPLIT xtab-rec AT delimitor INTO xdat-fld1
                                         xdat-fld2
                                         xdat-fld3
                                         xdat-fld4.
        APPEND xdat to idat.
      ENDLOOP.
      LOOP AT idat into xdat.
        WRITE:/ xdat-fld1, xdat-fld2, xdat-fld3, xdat-fld4.
      ENDLOOP.
    Regards,
    Rich Heilman

  • Rep-0756 problem facing while opening the report in 10g

    Hi,
    I am facing problem while opening RDF in oracle 10g.
    I follow the next steps.
    1. Open the RDF in 10g.
    2. Open the PLL in report builder and compile that PLL and save in same path where report located.
    3. reattach the library with RDF.
    4. Close the RDF
    5. Reopen the RDF and facing the error.
    6. REP-0756- unable to open attached............
    7. I set the report_path in Registry also where PLL exists
    Please give me the solution for this problem
    Waiting for quick reply.
    ashok

    Thank you fs,
    I am also facing the similar issue in reports 10g, I am keeping the .pll file in my local machine say c:\me\reports\xyz.pll. When I am opening this pll, I am getting the error REP-0756 though the path 'c:\me\reports\' is added to the REPORTS_PATH. Your suggestion resolved the issue.
    Many thanks,
    Lokesh.

  • Problem faced in form while deleting a record-urgent

    we r in the testing stage of our project. we are facing a major problem. In one of the forms deletion is not working.
    we did migration from 6i to 10g. we migrated using migration assistant.
    in 6i code was working fine.
    in 10g record is not getting deleted from database and an error is shown as FRM_40510.
    We used the following code.
    if :BLK1_OBLIGOR.OBL_TNX_TYPE = 'D' then
    delete_record;
    kcheck_failure;
    else
    DO_APPRV;
    end if;
    commit_form;
    kcheck_failure;
    can u pls point out the mistake

    Hi,
    Code exists in pre-delete trigger as follows
    DELETE FROM grr_OBLGR_DATA
    WHERE grr_OBLGR_DATA.OBL_CAGID = :BLK1_OBLIGOR.OBL_CAGID AND
    grr_OBLGR_DATA.OBL_cntry_code = :blk1_OBLIGOR.obl_cntry_code;
    The delete allowed property for that block is set to 'YES'.
    Pls do help me to find out the problem. The issue is that the same code is working fine in 6i. The trouble is in 10g. Pls do advice me.

  • Problem in doing BDC for XK01

    Hi all,
    i am doing BDC for XK01 with Line Item for Bank Details(Table Control..)
    With 3 Internal table
    IT_dummy to get the flat file
    IT_vend  for Header details
    IT_bank  for Item Details
    in this there is a Nested loop
    Loop at it_vend.
    perform bdc
    loop at it_bank.
    concatenate................
    endloop.
    endloop.
    because of the above nested loops..it's bit slow..
    & i am trying to do with a single internal table..
    The problem is..
    with the header data it's not picking all the item data(it's picking only one..)..help me in resolving the problem..
    Below the code..
    REPORT  ZMM_BDCTC1 NO STANDARD PAGE HEADING LINE-SIZE 255.
    PARAMETER:P_FILE TYPE RLGRAP-FILENAME.
    DATA BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF IT_DUMMY OCCURS 0,
          TYP,
          DES(255) TYPE C,
          END OF IT_DUMMY.
    DATA:DELIMITER VALUE ',',
         cnt(4) TYPE N,
         L_FNAM(30) TYPE C,
         FILENAME TYPE STRING.
    TYPES:BEGIN OF TY_FINAL,
          N(4) TYPE C,
          LIFNR TYPE RF02K-LIFNR,
          BUKRS TYPE RF02K-BUKRS,
          EKORG TYPE RF02K-EKORG,
          KTOKK TYPE RF02K-KTOKK,
          NAME1 TYPE LFA1-NAME1,
          SORTL TYPE LFA1-SORTL,
          LAND1 TYPE LFA1-LAND1,
          AKONT TYPE LFB1-AKONT,
          FDGRV TYPE LFB1-FDGRV,
          WAERS LIKE LFM1-WAERS,
          M(4) TYPE C,
          BANKS TYPE LFBK-BANKS,
          BANKL TYPE LFBK-BANKL,
          BANKN TYPE LFBK-BANKN,
          KOINH TYPE LFBK-KOINH,
          END OF TY_FINAL.
    DATA: IT_FINAL TYPE TABLE OF TY_FINAL,
          WA_FINAL TYPE TY_FINAL.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
    IMPORTING
       FILE_NAME           = P_FILE.
         FILENAME = P_FILE.
         CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
             filename                      = FILENAME
            FILETYPE                      = 'ASC'
           tables
             data_tab                      = IT_DUMMY.
    START-OF-SELECTION.
    LOOP AT it_dummy.
        IF it_dummy-typ = 'H'.
          SPLIT  it_dummy-des AT delimiter INTO WA_FINAL-lifnr "Populating Header Table
                                                WA_FINAL-bukrs
                                                WA_FINAL-ekorg
                                                WA_FINAL-ktokk
                                                WA_FINAL-name1
                                                WA_FINAL-sortl
                                                WA_FINAL-land1
                                                WA_FINAL-akont
                                                WA_FINAL-fdgrv
                                                WA_FINAL-waers.
          WA_FINAL-N = WA_FINAL-N + 1.
          WA_FINAL-M = WA_FINAL-M + 1.
        ELSEIF it_dummy-typ = 'I'.
          SPLIT it_dummy-des AT delimiter INTO WA_FINAL-BANKS
                                               WA_FINAL-BANKL
                                               WA_FINAL-BANKN
                                               WA_FINAL-KOINH.
          APPEND WA_FINAL TO IT_FINAL.
        ENDIF.
      ENDLOOP.
    LOOP AT IT_FINAL INTO WA_FINAL.
    WRITE:/ WA_FINAL-N,
            WA_FINAL-LIFNR,
            WA_FINAL-BUKRS,
            WA_FINAL-EKORG,
            WA_FINAL-KTOKK,
            WA_FINAL-NAME1,
            WA_FINAL-SORTL,
            WA_FINAL-LAND1,
            WA_FINAL-AKONT,
            WA_FINAL-FDGRV,
            WA_FINAL-WAERS,
            WA_FINAL-M,
            WA_FINAL-BANKS,
            WA_FINAL-BANKL,
            WA_FINAL-BANKN,
            WA_FINAL-KOINH.
    ENDLOOP.
    data: WA_FINAL1 like line of IT_FINAL.
    clear WA_FINAL1.
    ******************BDC STARTS***********************
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT      = SY-MANDT
    GROUP       = 'ZMM_BDCTAB'
    KEEP        = 'X'
    USER        = SY-UNAME.
    Clear wa_final.
    LOOP AT IT_FINAL INTO WA_FINAL.
    WA_FINAL1 = WA_FINAL.
    CLEAR BDCDATA[].
    AT NEW N.
    cnt = 1.
    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'
                                  WA_FINAL1-LIFNR.
    perform bdc_field       using 'RF02K-BUKRS'
                                  WA_FINAL1-BUKRS.
    perform bdc_field       using 'RF02K-EKORG'
                                  WA_FINAL1-EKORG.
    perform bdc_field       using 'RF02K-KTOKK'
                                  WA_FINAL1-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'
                                  WA_FINAL1-NAME1.
    perform bdc_field       using 'LFA1-SORTL'
                                  WA_FINAL1-SORTL.
    perform bdc_field       using 'LFA1-LAND1'
                                  WA_FINAL1-LAND1.
    perform bdc_dynpro      using 'SAPMF02K' '0120'. "ERROR CLEARED
    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-KOINH(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    ENDAT.
    *ENDON.
    IF WA_FINAL1-N = WA_FINAL1-M.
    CONCATENATE  'LFBK-BANKS(' cnt ')'  INTO L_FNAM.
    perform bdc_field       using L_FNAM
                                  WA_FINAL1-BANKS.
    CONCATENATE  'LFBK-BANKL(' cnt ')'  INTO L_FNAM.
    perform bdc_field       using L_FNAM
                                  WA_FINAL1-BANKL.
    CONCATENATE  'LFBK-BANKN(' cnt ')'  INTO L_FNAM.
    perform bdc_field       using L_FNAM
                                  WA_FINAL1-BANKN.
    CONCATENATE  'LFBK-KOINH(' cnt ')'  INTO L_FNAM.
    perform bdc_field       using L_FNAM
                                  WA_FINAL1-KOINH.
    *ENDDO.
    cnt = cnt + 1.
    ENDIF.
    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'.
    *AT NEW LIFNR.
    perform bdc_field       using 'LFB1-AKONT'
                                  WA_FINAL1-AKONT.
    perform bdc_field       using 'LFB1-FDGRV'
                                  WA_FINAL1-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'
                                  WA_FINAL1-WAERS.
    perform bdc_dynpro      using 'SAPMF02K' '0320'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-LIFNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    AT END OF M.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE     = 'XK01'
    TABLES
    DYNPROTAB = BDCDATA.
    ENDAT.
    CLEAR WA_FINAL1.
    CLEAR WA_FINAL.
    ENDLOOP.
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    *********************BDC ENDS***********************
           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 <> NODATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
    ENDIF.
    ENDFORM.
    Flat File is..
    HAAA45,1000,1000,0002,NAME45,N,IN,31000,A1,USD
    IIN,1000,1021,Name45
    IIN,1000,1022,Name45
    HAAA50,1000,1000,0002,NAME50,N,IN,31000,A1,USD
    IIN,1000,1023,Name50
    IIN,1000,1024,Name50

    Regarding avoiding the loop I have a suggestion, though I have not tried this .
    SAP help says " Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions. " .
    Above implies you can load all records in the itab bdc_tab when doing call transaction. Say, your bdc_tabl has 30 records for 1 pass of the transaction. You need to update 10 vendor records. You simply load up all 300 records into bdc_tab. After every 30 record loads, you simulate a 'SAVE' press in your program but do not leave the transaction. Rather you simulate the keystroke that takes you to the first screen of XK01 after the save if not aready there, and start loading up the next transaction.

Maybe you are looking for