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

Similar Messages

  • BAPI_SALESORDER_CREATEFROMDAT2 multiple items problem

    hi,
       experts ,I'm facing a problem when using  BAPI_SALESORDER_CREATEFROMDAT2 to creat SO,I create a sale order with six items and  one of the item has problem. It is possible for me to create the SO successfully with the the other three items ?

    Hi,
    When creating Sales Order with reference or without reference then you can do a test run and as per suggested by Maxim that if there is any issue with the particular line item then you can exclude that line and proceed to create order with the rest of the line items.
    There is no such restriction that if there is error in the line item then you cannot create order with rest of the line items.

  • Problem in multiple item for change document objects

    hi gurus,
    I have created change document object in tcode SCDO . It had giveN function module /TMW/CHG_OBJ1_WRITE_DOCUMENT.
    CDPOS AND CDHDR tables are updated with changed data. now i am trying to display all old and new data in se38 program.
    here my problem is when ever i changed multiple  item data , my program showing first item details only . I need to show all item data when ever i changed parallel . please help me where is my problem .
    thank you

    I think this is issue with function module generated thru SCDO Please check in your function module inside that the following function modules are used
    CALL FUNCTION 'CHANGEDOCUMENT_OPEN'
    CALL FUNCTION 'CHANGEDOCUMENT_MULTIPLE_CASE'
    CALL FUNCTION 'CHANGEDOCUMENT_CLOSE'
    if not then there may be issue with SCDO

  • Multiple Item Information - problem

    I updated to iTunes 8. Now, whenever I try to "Get Info" on more than one music file, the content in the "Multiple Item Information" window gets displaced. Please refer to this jpeg to understand what I mean:
    http://img.photobucket.com/albums/v294/mkeopong/iTunesscreen.jpg
    Any ideas why? Any help in resolving this problem would be greatly appreciated. Thanks.

    Actually I meant on the Appearances tab, not the Themes tab.
    You right-click on any blank space on your desktop, choose Properties, then click the Appearance tab.
    Anyway, worth a shot. Sorry to hear it didn't work!
    Sounds like there's some other bugs with itunes v8 needing a certain color resolution setting or else the whole screen is pink.
    In itunes 7, there was a huge bug where users were forced to set their display settings to 1024x768 in order to accept the iTunes license agreement. Nice, huh? Apparently that's fixed - haven't seen posts about that since v8 was released.
    From the screenshots posted on the Get Info for multiple tracks, it looks like more display settings hijinx from iTunes. I changed some stuff on my system, but never got a display like that.
    Message was edited by: Katrina S.

  • VL31N: multiple item Inbound is not allow

    Dear experts,
    I have customer's requirement: In VL31N, there is only 1 PO is refer. It means inbound delivery is single item, multiple item Inbound is not allow, could you know how to do or any user exit support to do that.
    Thanks

    Look at VTLA > (EL<>/DL/DZL )--> and item cat ELN --> Data transfer -> Item data routines.
    Can't remember which routine you can use, try it out. If not, ask abaper write a new routine and assign to it.

  • I have problem uploading tiff. or other images through artwork box in multiple item info in itune-images is not visible in folder!

    i noticed recently that once i uploading images with MULTIPLE ITEM  INFORMATION box in itunes and getting straight through the music folder i have no option to upload  tiff. and some jpeg. images connected with that album. the box don't allow me to upload them.i need help here,please.i know i can directly paste the artwork in small window in itunes left corner once i marked all the songs in multiple change.

    The following line tells me that this is not a template file, but a document created from a template called index.dwt
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
    This means that you saved a child document as a template file at some stage.
    If you go to Modify->Templates->Detach from Template, you can remove the template structure from your document. All you then need to do is to re-save the document as a template.

  • 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

  • Adding multiple items at once to a SharedCollection

    I'm playing around with Cocomo for the first time. I like it
    a lot, but haven't yet got enough understanding of the API. So I'm
    sure I'm missing something obvious.
    Anyway. I want to build an application that share an array of
    items between clients. The array should be persistent and when a
    new client connects it will get the latest data. At the startup of
    the first client I want to fill the shared array with default data.
    I also want to revert to this data from time to time in an
    applications lifecycle.
    I've been checking out the examples and I think a
    SharedCollection would be perfect for this scenario (not sure if it
    really is?).
    The problem I have is when I try to fill the SharedCollection
    with data, using the addItem method within a for loop, I only get
    an entry with the last item, instead of multiple entries (I'm
    checking what data that has been added by using the Dev Console).
    I'm doing all this in the SYNCHRONIZATION_CHANGE event (only the
    first time it's fired).
    I should also note that this happens the first time, when no
    CollectionNode already is created. When a CollectionNode already
    exist it works.
    Is this totally the wrong way to go? Am I missing something
    about how CollectionNodes should be created? Any help is highly
    appriciated!

    Hi ,
    I actually modified the SharedCollectionExample locally to
    have items added in the beginning in synchrinization change
    handler. It works fine for me , here is what I did
    In the SharedCollectionExample in the examples folder ,
    add this line
    _model.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE,onSynchronizationChang e);
    in the onCreationComplete() method where you first declare
    SharedCollection Class.
    And in the
    private function
    onSynchronizationChange(p_evt:CollectionNodeEvent):void
    if ( _model.isSynchronized ) {
    _model.addItem({State:"Nevada",Capital:"Carson City"});
    _model.addItem({State:"California",Capital:"Sacramento"});
    I can get multiple items( i.e. these two items i added) in
    the very beginning. If you check that the model ( SharedCollection)
    is synchronized and add within it the items it should work fine and
    will give you an initial set of items. Also, shared collection has
    a property called idField and it will index objects based on this
    field value with duplicates being overwritten.
    I hope this helps. Otherwise please copy fractions of code
    where you are still finding problem.
    Thanks
    Hironmay Basu

  • How do you use the Multiple Item Information dialog box ???

    How do you use the Multiple Item Information dialog box ???
    Where are the instructions on how the information in the Multiple Item Information dialog box equates to ...
    1. The way iTunes sorts tracks and albums
    2. The reason to select a leading check box
    3. Why there are Option selections (Yes /No) and leading check boxes.
    4. Why some changes remain in the track info, but do not "take effect" in iTunes (Part of a compilation is an example)
    Looked in Help, Support, went to the local Genius bar for an hour, even arrainged a call from apple support ...
    Thanks

    As Christopher says, it's a compilation. Different tracks are by different artists.
    Setting the *Album Artist* field to *Various Artists* and setting *Part of a compilation* to Yes should be all that is required. Depending on your *Group compilations when browsing* setting ( I recommend On ) either should suffice but I suggest doing both.
    Based on your commentary, I selected all the "O Brother" tracks, and checked the boxes for everything line that was blank in the Info and the Sort panes. Only exceptions were the album name and the disc number 1 of 1 and the artwork. I blanked and checked anything else.
    That's not what I meant. When you select multiple tracks, only those values which +are already common+ to all tracks are displayed. Typically these will include Artist, though not with compilation albums, Album Artist, Album, No. of Tracks, Genre plus various sort fields. A blank value may indicate that different tracks have different values or it may be that the value is blank for all tracks. For the drop down values on the Options tab the value shown may not reflect the information in every tag. If values you expect to be common, such as Album Artist or the Album title are not displayed you can simply type these in and click OK. This will often be enough to group the album.
    If you place a checkmark against the blank boxes and apply changes then you will clear those fields so you should only do this if that is the effect you want. Putting a checkmark next to an empty (representing different values) *Track No.* box, for example, will just clear the all the track numbers which is very rarely useful.
    Adding then removing extra text is for a specific problem where despite all common values being identical across the tracks of the album iTunes seems to "remember" that it should see two albums. A typical example would be when an album originally listed as *Album CD1* & *Album CD2* is given disc numbers X of Y and then has the Album name changed to Album. I've seen iTunes merge all but one track into the new album, but insist on listing one remaining track separately, despite both albums having the same title. In this case I've found overtyping the album title again has no effect whereas changing it to AlbumX and then back to Album does what I was trying to achieve in the first place.
    Don't forget that even properly organsied albums may still break up if you don't chose an album-friendly view. Sorting on the track name or track number columns can be useful in some circumstances but in general I revert to Album by Artist when browsing through my library.
    tt2

  • Is it possible to query multiple items in a single OPC read?

    I am trying to read several data items at one time via OPC. Is this possible? If so, how? I have tried passing multiple URLs to specific items and a single URL header with multiple variable names. Both methods return an OPC error about invalid items. I am trying to do this to speed up OPC access times. Reading each item one-at-a-time is a little time consuming for our application.

    The only way to read multiple datapoints via OPC is to build an OPC item that contains multiple pieces of information. I checked this here, and I had no problem reading an array of data from an OPC Server with DataSocket.
    I read the "opc:/Matrikon.OPC.Simulation/Random.ArrayOfReal8" data item from a Matrikon OPC Simulation Server that publishes an array data item. The OPC Demo server is available for free download at http://www.matrikon.com/opc/htdocs/simx.htm. You can read this as an array of doubles in LabVIEW.
    For your application all you will need to read your data multiple items at a time is a server that can publish arrays.
    Hope this helps.

  • Multiple Item Codes in a MRP Generated PR

    Dear Sir,
    We have a requirement to have "Multiple Item Codes" in a single PR . The PR are generated thru MRP . The criterion  to have multiple Items in a single PR is that a PR will contain multiple Items codes pertaining to the same Material-Group .
    We have come to know that for this MD15 tcode can be used . But the problem with this is that there is manual effort required for clubbing of multiple Items in a single PR from the planned order .
    We look forward for some automatic way for handling the above requirement .
    Request you to kindly help me on the above issue please .
    Regrds
    B Mittal

    If you are getting Currency key from file then before passing data to BAPI, Check the value of Currency key, if it is not USD then display error message.

  • Inbound Invoices (EDI 810) with multiple items that are the same keys.

    One of our Vendors just started sending us 810's that have multiple items with the same P.O., Delivery, P/N, Price, etc.  The reason is that they (and we) track inbound batches for the purpose of traceability, so the only difference between items on both the invoice and inbound delivery is the batch number.
    SAP will not allow the automatic creation of an SAP Invoice with these conditions.  The error message is M8321 - 'Document contains same order item more than once'.
    SAP Note 103051 says it cannot be done, and you must "Deactivate the billing of the batch sub-items in SD Customizing" in order to have an Invoice created that combines all items into one.
    Does anyone know how to do that?
    Thanks in advance!

    Nevermind. Fixed the problem. Two menu items both began with the letter S. Added an & before the second letter of the second menu item and now the problem is fixed. First items hotkey is S and the second items hotkey is now h (which is the second letter of the 2nd menu item).

  • How to autogenrate multiple items report of the SharePoint list and sent to the client id on daily basis

    Dear Support,
    As per customer requirement he want to send SharePoint list multiple items reports on daily basis by email autognrated workflow in SharePoint.
    I tried for that and created workflow for SharePoint list  on new item creation using SharePoint designer 2013 it’s working fine. But I am unable to send list multiple items report by work flow.
    Please let me know the process for SharePoint list multiple items report generation and how to sent mail to the client id on daily basis.
    Would request your support.

    Hi
    another approach
    use a powershell scheduled script which will get needed lists items, adn will sned the infos by email
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Copy multiple items from ical alters sorting order

    I use OSX leopard with iCal 3.0.1. I would like to select multiple items and copy-paste them into a text document or spreadsheet. I use iCal to keep track of people's working hours and I need to send the hours to salary admin at the end of each month.
    Using the "search" option within iCal, I can select all item concerning the working hours of, let's say, "George". If I copy-paste them into another application (Word, Mail, Numbers, Excel) the sorting order of the items altered. It looks like a rather random order. I want to have it ordered by date opbviously! Does anyone recognize this problem?

    Pieter,
    would send feedback to apple on this, recreated the behavior on both of my macs for multiple search results, and each time same thing, order is altered...
    http://www.apple.com/feedback/ical.html

  • Error while creating Multiple Items Shopping Cart with Asset Assignment

    Hi All,
    I am creating Shopping Cart with multiple items for different Assets.
    Example: I have Two Assets (Asset A with the budget of $1000 and Asset B with the Budget of $1500) in the back end system.
    Asset A assigned to Order 102649996 (value - $1000) and Asset B is assigned to Order 102645121 (Value - $1500).
    I am trying to create Shopping Cart with Two Items for Asset A and Asset B (which are available in Back End).
    I created First item (001) in the Shopping Cart for Asset A and Value $750.
    I copied the First Item Details to Second Item (002) and changed the Asset as B and Value $1000.
    When I click on Check tab in Shopping Cart Browser, the SRM System is giving the Error Message like
      Item 001 Order 102649996 budget exceeded 
      Item 002 Order 102649996 budget exceeded
    I am getting the above error, only when I copy the first item details to the second item while creating Shopping Cart.
    Actually the Budget is not exceeded (Asset A Budget is $1000 - First Item and Asset B Budget is $1500 - Second Item) and SRM system is taking the order 102649996 (which is assigned to the Asset A) for the Second Item 002 also.
    Kindly let me know the Solution or Please let me know do we have any OSS note to resolve the issue.
    Thanks a lot in advance.
    Best Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Aug 18, 2008 8:22 PM
    Edited by: KOYYA SUDARSANA NAIDU on Aug 19, 2008 6:29 AM

    Hi. It is a "feature" of SRM.
    I asked SAP about it and did not get a good response.
    If you enter Asset A, it will copy the internal order number from that asset into the cart. You can not see the internal order in the web, but you can see it in BBP_PD.
    If you then change the asset to asset B, it will not refresh the internal order number.
    This means you get internal order A on asset B.
    It happens any time you change asset number, so if you copy a line then change you will get this problem.
    We ended up using the BBP_DOC_CHANGE_BADI to RFC into R/3 and update the internal order number.
    Regards,
    Dave.

Maybe you are looking for

  • IMovie to VCR

    I am trying to make a VHS copy of a project I have completed in iMovie. It is not working. I have hooked a firewire from my computer to the DV input of a Canopus, and then have put AV wires in the OUT area of the Canopus into the IN of the VCR. I try

  • Shipping point to create delivery for purchase order

    Hai,       I have created PO in ME21N and I need to create delivery for this, so I have used VL10B Tcode, here it is asking for shipping point, which value we need to give for this. Actually I have given the plant which was given in ME21N, but I'm no

  • Using Jam Pack 1.0 on a new Mac?

    I have the original GB Jam Pack 1.0 but when I try and install it on my new MacBook I am told it can't be installed on this Mac. Is there a way around this?

  • Automated encoding of large number of video files

    I am trying to find some machine-friendly tools for video encoding. They must not require direct user interaction, e.g. through a GUI. Ideally, it will be something that I can control through an XML or command line interface. For example, I would lik

  • Compatible HD Camcorders

    I am in the market to purchase an HD Camcorder and can't figure out which ones are compatible with IMovie'08. Think the best is Sony since it stores in MPEG-2 format but does anyone have any suggestions? I want a seamless interface with IMovie. Thank