BDC to create SO(VA01) for multiple line items

Hi all,
My requirement is to create SO for multiple line items in ECC6.0
My recording for VA01 is like this.
start-of-selection.
perform open_group.
perform bdc_dynpro      using 'SAPMV45A' '0101'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBAK-AUART'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'VBAK-AUART'
                              'ZOR'.
perform bdc_field       using 'VBAK-VKORG'
                              '2000'.
perform bdc_field       using 'VBAK-VTWEG'
                              '10'.
perform bdc_field       using 'VBAK-SPART'
                              '05'.
perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'KUAGV-KUNNR'
                              '100000'.
perform bdc_field       using 'KUWEV-KUNNR'
                              '100000'.
perform bdc_field       using 'RV45A-KETDAT'
                              '29.01.2008'.
perform bdc_field       using 'RV45A-KPRGBZ'
                              'D'.
perform bdc_field       using 'VBKD-PRSDT'
                              '29.01.2008'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBAP-WERKS(01)'.
perform bdc_field       using 'RV45A-MABNR(01)'
                              'hrpocf'.
perform bdc_field       using 'VBAP-POSNR(01)'
                              '    10'.
perform bdc_field       using 'RV45A-KWMENG(01)'
                              '                 55'.
perform bdc_field       using 'VBAP-WERKS(01)'
                              '2010'.
perform bdc_dynpro      using 'SAPLCEI0' '0109'.
perform bdc_field       using 'BDC_CURSOR'
                              'RCTMS-MWERT(06)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACK'.
perform bdc_field       using 'RCTMS-MNAME(01)'
                              'A_THICK_MM'.
perform bdc_field       using 'RCTMS-MNAME(02)'
                              'A_WIDTH_MM'.
perform bdc_field       using 'RCTMS-MNAME(03)'
                              'A_EQUIVALENT_SPEC'.
perform bdc_field       using 'RCTMS-MNAME(04)'
                              'A_BATCH_WEIGHT_MAX_SI'.
perform bdc_field       using 'RCTMS-MNAME(05)'
                              'A_BATCH_WEIGHT_MIN_SI'.
perform bdc_field       using 'RCTMS-MNAME(06)'
                              'A_COIL_INNER_DIA_MM'.
perform bdc_field       using 'RCTMS-MWERT(01)'
                              '3.2'.
perform bdc_field       using 'RCTMS-MWERT(02)'
                              '1200'.
perform bdc_field       using 'RCTMS-MWERT(03)'
                              'IS_11513_GR_D_1985'.
perform bdc_field       using 'RCTMS-MWERT(04)'
                              '26.4'.
perform bdc_field       using 'RCTMS-MWERT(05)'
                              '26.4'.
perform bdc_field       using 'RCTMS-MWERT(06)'
                              '610'.
perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'KUAGV-KUNNR'
                              '100000'.
perform bdc_field       using 'KUWEV-KUNNR'
                              '100000'.
perform bdc_field       using 'RV45A-KETDAT'
                              '29.01.2008'.
perform bdc_field       using 'RV45A-KPRGBZ'
                              'D'.
perform bdc_field       using 'VBKD-PRSDT'
                              '29.01.2008'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai east'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBAP-WERKS(02)'.
perform bdc_field       using 'RV45A-MABNR(02)'
                              'hrpocf'.
perform bdc_field       using 'VBAP-POSNR(02)'
                              '    11'.
perform bdc_field       using 'RV45A-KWMENG(02)'
                              '                 66'.
perform bdc_field       using 'VBAP-WERKS(02)'
                              '2010'.
perform bdc_dynpro      using 'SAPLCEI0' '0109'.
perform bdc_field       using 'BDC_CURSOR'
                              'RCTMS-MWERT(06)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACK'.
perform bdc_field       using 'RCTMS-MNAME(01)'
                              'A_THICK_MM'.
perform bdc_field       using 'RCTMS-MNAME(02)'
                              'A_WIDTH_MM'.
perform bdc_field       using 'RCTMS-MNAME(03)'
                              'A_EQUIVALENT_SPEC'.
perform bdc_field       using 'RCTMS-MNAME(04)'
                              'A_BATCH_WEIGHT_MAX_SI'.
perform bdc_field       using 'RCTMS-MNAME(05)'
                              'A_BATCH_WEIGHT_MIN_SI'.
perform bdc_field       using 'RCTMS-MNAME(06)'
                              'A_COIL_INNER_DIA_MM'.
perform bdc_field       using 'RCTMS-MWERT(01)'
                              '3.1'.
perform bdc_field       using 'RCTMS-MWERT(02)'
                              '1250'.
perform bdc_field       using 'RCTMS-MWERT(03)'
                              'IS_11513_GR_D_1985'.
perform bdc_field       using 'RCTMS-MWERT(04)'
                              '20.084'.
perform bdc_field       using 'RCTMS-MWERT(05)'
                              '20.084'.
perform bdc_field       using 'RCTMS-MWERT(06)'
                              '610'.
perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PDE3'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'KUAGV-KUNNR'
                              '100000'.
perform bdc_field       using 'KUWEV-KUNNR'
                              '100000'.
perform bdc_field       using 'RV45A-KETDAT'
                              '29.01.2008'.
perform bdc_field       using 'RV45A-KPRGBZ'
                              'D'.
perform bdc_field       using 'VBKD-PRSDT'
                              '29.01.2008'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai east'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBAP-POSNR(01)'.
perform bdc_field       using 'RV45A-VBAP_SELKZ(01)'
                              'X'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\09'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-INCO2'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'VBKD-FKDAT'
                              '29.01.2008'.
perform bdc_field       using 'VBAP-TAXM1'
                              '1'.
perform bdc_field       using 'VBAP-TAXM2'
                              '1'.
perform bdc_field       using 'VBAP-TAXM3'
                              '0'.
perform bdc_field       using 'VBAP-TAXM4'
                              '0'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_DELETE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_CREATE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_DETAIL'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPLSTXX' '1100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSTXT-TXLINE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TXVB'.
perform bdc_field       using 'RSTXT-TXLINE(02)'
                              'FDGFDG'.
perform bdc_dynpro      using 'SAPLSTXX' '1100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSTXT-TXLINE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TXBA'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\10'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBACK'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-POSEX_E'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'VBAP-POSEX'
                              '108128'.
perform bdc_field       using 'VBKD-BSTKD_E'
                              '3011192'.
perform bdc_field       using 'VBKD-POSEX_E'
                              '000005'.
perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PDE3'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'KUAGV-KUNNR'
                              '100000'.
perform bdc_field       using 'KUWEV-KUNNR'
                              '100000'.
perform bdc_field       using 'RV45A-KETDAT'
                              '29.01.2008'.
perform bdc_field       using 'RV45A-KPRGBZ'
                              'D'.
perform bdc_field       using 'VBKD-PRSDT'
                              '29.01.2008'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai east'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBAP-POSNR(02)'.
perform bdc_field       using 'RV45A-VBAP_SELKZ(02)'
                              'X'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\09'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-INCO2'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'VBKD-FKDAT'
                              '29.01.2008'.
perform bdc_field       using 'VBAP-TAXM1'
                              '1'.
perform bdc_field       using 'VBAP-TAXM2'
                              '1'.
perform bdc_field       using 'VBAP-TAXM3'
                              '0'.
perform bdc_field       using 'VBAP-TAXM4'
                              '0'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_DELETE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_CREATE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_DETAIL'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPLSTXX' '1100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSTXT-TXLINE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TXVB'.
perform bdc_field       using 'RSTXT-TXLINE(02)'
                              'GFGFDG'.
perform bdc_dynpro      using 'SAPLSTXX' '1100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSTXT-TXLINE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TXBA'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\10'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-POSEX_E'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'VBAP-POSEX'
                              '108128'.
perform bdc_field       using 'VBKD-BSTKD_E'
                              '3011192'.
perform bdc_field       using 'VBKD-POSEX_E'
                              '000005'.
perform bdc_dynpro      using 'SAPMV45A' '4003'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBACK'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBAP-POSEX'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'VBAP-POSEX'
                              '108128'.
perform bdc_field       using 'VBKD-BSTKD_E'
                              '3011192'.
perform bdc_field       using 'VBKD-POSEX_E'
                              '5'.
perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '=KKAU'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'KUAGV-KUNNR'
                              '100000'.
perform bdc_field       using 'KUWEV-KUNNR'
                              '100000'.
perform bdc_field       using 'RV45A-KETDAT'
                              '29.01.2008'.
perform bdc_field       using 'RV45A-KPRGBZ'
                              'D'.
perform bdc_field       using 'VBKD-PRSDT'
                              '29.01.2008'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai east'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'BDC_CURSOR'
                              'RV45A-MABNR(01)'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\02'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-KONDA'.
perform bdc_field       using 'VBAK-AUDAT'
                              '29.01.2008'.
perform bdc_field       using 'VBAK-VKBUR'
                              'IN15'.
perform bdc_field       using 'VBAK-WAERK'
                              'INR'.
perform bdc_field       using 'VBKD-PRSDT'
                              '29.01.2008'.
perform bdc_field       using 'VBKD-KDGRP'
                              'CF'.
perform bdc_field       using 'VBKD-PLTYP'
                              '01'.
perform bdc_field       using 'VBKD-KONDA'
                              '01'.
perform bdc_field       using 'VBKD-BZIRK'
                              'NORTH'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\03'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-VSART'.
perform bdc_field       using 'VBAK-VSBED'
                              '01'.
perform bdc_field       using 'VBKD-KZAZU'
                              'X'.
perform bdc_field       using 'VBKD-VSART'
                              'ER'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\05'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-INCO2'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'VBKD-FKDAT'
                              '29.01.2008'.
perform bdc_field       using 'VBAK-TAXK1'
                              '1'.
perform bdc_field       using 'VBAK-TAXK3'
                              'l'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\09'.
perform bdc_field       using 'BDC_CURSOR'
                              'VBKD-ZLSCH'.
perform bdc_field       using 'VBKD-KTGRD'
                              '01'.
perform bdc_field       using 'VBKD-ZLSCH'
                              'c'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_DELETE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_CREATE'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TP_DETAIL'.
perform bdc_field       using 'LV70T-SPRAS'
                              'EN'.
perform bdc_dynpro      using 'SAPLSTXX' '1100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSTXT-TXLINE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TXVB'.
perform bdc_field       using 'RSTXT-TXLINE(02)'
                              'BDFBFDB'.
perform bdc_dynpro      using 'SAPLSTXX' '1100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSTXT-TXLINE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TXBA'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=T\11'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '=KSTC'.
perform bdc_dynpro      using 'SAPLBSVA' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'BDC_CURSOR'
                              'J_STMAINT-ANWS(02)'.
perform bdc_field       using 'J_STMAINT-ANWS(01)'
perform bdc_field       using 'J_STMAINT-ANWS(02)'
                              'X'.
perform bdc_dynpro      using 'SAPLBSVA' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'BDC_CURSOR'
                              'J_STMAINT-ANWS(03)'.
perform bdc_field       using 'J_STMAINT-ANWS(02)'
perform bdc_field       using 'J_STMAINT-ANWS(03)'
                              'X'.
perform bdc_dynpro      using 'SAPLBSVA' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'BDC_CURSOR'
                              'J_STMAINT-ANWS(04)'.
perform bdc_field       using 'J_STMAINT-ANWS(03)'
perform bdc_field       using 'J_STMAINT-ANWS(04)'
                              'X'.
perform bdc_dynpro      using 'SAPLBSVA' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACK'.
perform bdc_field       using 'BDC_CURSOR'
                              'JOSTD-OBJNR'.
perform bdc_dynpro      using 'SAPMV45A' '4002'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBACK'.
perform bdc_field       using 'BDC_CURSOR'
                              'RV45A-TXT_VBELN'.
perform bdc_dynpro      using 'SAPMV45A' '4001'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SICH'.
perform bdc_field       using 'VBKD-BSTKD'
                              'open SO'.
perform bdc_field       using 'VBKD-BSTDK'
                              '29.01.2008'.
perform bdc_field       using 'KUAGV-KUNNR'
                              '100000'.
perform bdc_field       using 'KUWEV-KUNNR'
                              '100000'.
perform bdc_field       using 'RV45A-KETDAT'
                              '29.01.2008'.
perform bdc_field       using 'RV45A-KPRGBZ'
                              'D'.
perform bdc_field       using 'VBKD-PRSDT'
                              '29.01.2008'.
perform bdc_field       using 'VBKD-INCO1'
                              'EXW'.
perform bdc_field       using 'VBKD-INCO2'
                              'mumbai'.
perform bdc_field       using 'VBKD-ZTERM'
                              '0001'.
perform bdc_field       using 'BDC_CURSOR'
                              'RV45A-MABNR(01)'.
perform bdc_transaction using 'VA01'.
perform close_group.
if in excel file one row of records means i am succesfully creating SO.
But for multiple i am not getting idea to create SO.
My excel file details like this.In this excel file based on VBKD-BSTKD_E value i have to keep the records in line items.
VBAK-AUART    :Order Type
VBAK-VKORG    : Sales Org
VBAK-VTWEG    : Distri Channel
VBAK-SPART    : Division
VBAK-KUNNR    : Sold-to-Party
VBPA-KUNNAR   : Ship-to-Party
VBAK-BSTNK    : PO No
VBAK-BSTDK    : PO Date
VBAP-MATNR    : Material No
A_THICK_MM
A_WIDTH_MM
A_EQUIVALENT_SPEC
A_COIL_INNER_DIA_MM
A_BATCH_WEIGHT_MIN_SI
A_BATCH_WEIGHT_MAX_SI
VBAP-KWMENG    : Qty
VBAP-WERKS     : Delivery Plant
VBKD-INCO2     : Incoterm2
VBKD-KONDA     : Price Group
VBKD-VSART     : Shipping Type
VBAK-TAXK1     : Cust Tax-1
VBAK-TAXK2     : Cust Tax-2
VBAK-TAXK3     : Cust Tax-3
VBAK-TAXK4     : Cust Tax-4
VBKD-ZLSCH     : Payment Method
VBAP-TAXM1     : Mat tax clss-1
VBAP-TAXM2     : Mat tax clss-2
VBAP-TAXM3     : Mat tax clss-3
VBAP-TAXM4     : Mat tax clss-4
VBAP-POSEX     : IMPS Order No
VBKD-BSTKD_E   : old SO in 4.6c
VBKD-POSEX_E   : old SO Item  in 4.6c
Text Id        : TDC No
Text Id-ES10   : Special Inst(Unld const & Veh)
ZOR,2000,10,5,100000,100000,PO NO 125,19.01.2008,HRPOCF,3.1,1200,IS_11513_GR_D_1985,610,20.084,20.084
51,2010,Mumbai,01Freight-pre paid,ER,2,0,L,0,c,1,1,0,0,108128,3011192,     1,PO 444 AMD 1,Spl Inst
based on VBKD-BSTKD_E line items has to create.
if VBKD-BSTKD_E = 3011192 is like 4 records in excel means for these 4 should be one SO
if it is changed to 3011193 then only different SO.
PLs If any one knows solution pls write some sample code for me.
If u send that code to my mail id also  very thankful.
[email protected]
Pls help me this is urgent requirement.
Thanks & Regards,
J.Lokesh

HI,
Instead of using BDC , why dont you make use of BAPI.
As you are on ECC, you can make use of BAPI BAPI_SALESORDER_CREATEFROMDAT2
Collect all your records based on PO # and pass them into line item table structure ORDER_ITEMS_IN.
*--Logic something like this.
  loop at it_exceldata into l_line.
  loop at it_exceldata into l_so where bstkd_e eq l_line-bstkd.
  *This will loop at all the same  PO#
  *collect the data related into corr tables. and append
  endloop.
  *Now you are outside the loop.
  *Call the BAPI to update this SO
  delete it_exceldata where bstkd_e eq l_line-bstkd_e.
  endloop.
Also pass all the necessary data to header structure ORDER_HEADER_IN
Do not check for Sy-subrc at the end of execution.
Instead read the Return table with message type 'A' or 'E whichi means there is an error/abort in BAPI execution.
Remember to expicitly COMMIT_WORK after succesfull execution of BAPI using BAPI_TRANSACTION_COMMIT
Please let me know , if you need more help in this
Gary.

Similar Messages

  • Pls help me to create SO using BDC for multiple line items (VA01)

    Hi all,
    My requirement is to create SO for multiple line items in ECC6.0
    My recording for VA01 is like this.
    start-of-selection.
    perform open_group.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-AUART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  'ZOR'.
    perform bdc_field       using 'VBAK-VKORG'
                                  '2000'.
    perform bdc_field       using 'VBAK-VTWEG'
                                  '10'.
    perform bdc_field       using 'VBAK-SPART'
                                  '05'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-WERKS(01)'.
    perform bdc_field       using 'RV45A-MABNR(01)'
                                  'hrpocf'.
    perform bdc_field       using 'VBAP-POSNR(01)'
                                  '    10'.
    perform bdc_field       using 'RV45A-KWMENG(01)'
                                  '                 55'.
    perform bdc_field       using 'VBAP-WERKS(01)'
                                  '2010'.
    perform bdc_dynpro      using 'SAPLCEI0' '0109'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RCTMS-MWERT(06)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'RCTMS-MNAME(01)'
                                  'A_THICK_MM'.
    perform bdc_field       using 'RCTMS-MNAME(02)'
                                  'A_WIDTH_MM'.
    perform bdc_field       using 'RCTMS-MNAME(03)'
                                  'A_EQUIVALENT_SPEC'.
    perform bdc_field       using 'RCTMS-MNAME(04)'
                                  'A_BATCH_WEIGHT_MAX_SI'.
    perform bdc_field       using 'RCTMS-MNAME(05)'
                                  'A_BATCH_WEIGHT_MIN_SI'.
    perform bdc_field       using 'RCTMS-MNAME(06)'
                                  'A_COIL_INNER_DIA_MM'.
    perform bdc_field       using 'RCTMS-MWERT(01)'
                                  '3.2'.
    perform bdc_field       using 'RCTMS-MWERT(02)'
                                  '1200'.
    perform bdc_field       using 'RCTMS-MWERT(03)'
                                  'IS_11513_GR_D_1985'.
    perform bdc_field       using 'RCTMS-MWERT(04)'
                                  '26.4'.
    perform bdc_field       using 'RCTMS-MWERT(05)'
                                  '26.4'.
    perform bdc_field       using 'RCTMS-MWERT(06)'
                                  '610'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-WERKS(02)'.
    perform bdc_field       using 'RV45A-MABNR(02)'
                                  'hrpocf'.
    perform bdc_field       using 'VBAP-POSNR(02)'
                                  '    11'.
    perform bdc_field       using 'RV45A-KWMENG(02)'
                                  '                 66'.
    perform bdc_field       using 'VBAP-WERKS(02)'
                                  '2010'.
    perform bdc_dynpro      using 'SAPLCEI0' '0109'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RCTMS-MWERT(06)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'RCTMS-MNAME(01)'
                                  'A_THICK_MM'.
    perform bdc_field       using 'RCTMS-MNAME(02)'
                                  'A_WIDTH_MM'.
    perform bdc_field       using 'RCTMS-MNAME(03)'
                                  'A_EQUIVALENT_SPEC'.
    perform bdc_field       using 'RCTMS-MNAME(04)'
                                  'A_BATCH_WEIGHT_MAX_SI'.
    perform bdc_field       using 'RCTMS-MNAME(05)'
                                  'A_BATCH_WEIGHT_MIN_SI'.
    perform bdc_field       using 'RCTMS-MNAME(06)'
                                  'A_COIL_INNER_DIA_MM'.
    perform bdc_field       using 'RCTMS-MWERT(01)'
                                  '3.1'.
    perform bdc_field       using 'RCTMS-MWERT(02)'
                                  '1250'.
    perform bdc_field       using 'RCTMS-MWERT(03)'
                                  'IS_11513_GR_D_1985'.
    perform bdc_field       using 'RCTMS-MWERT(04)'
                                  '20.084'.
    perform bdc_field       using 'RCTMS-MWERT(05)'
                                  '20.084'.
    perform bdc_field       using 'RCTMS-MWERT(06)'
                                  '610'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PDE3'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-POSNR(01)'.
    perform bdc_field       using 'RV45A-VBAP_SELKZ(01)'
                                  'X'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\09'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-INCO2'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'VBKD-FKDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-TAXM1'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM2'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM3'
                                  '0'.
    perform bdc_field       using 'VBAP-TAXM4'
                                  '0'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DELETE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DETAIL'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXVB'.
    perform bdc_field       using 'RSTXT-TXLINE(02)'
                                  'FDGFDG'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXBA'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\10'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-POSEX_E'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-POSEX'
                                  '108128'.
    perform bdc_field       using 'VBKD-BSTKD_E'
                                  '3011192'.
    perform bdc_field       using 'VBKD-POSEX_E'
                                  '000005'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PDE3'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-POSNR(02)'.
    perform bdc_field       using 'RV45A-VBAP_SELKZ(02)'
                                  'X'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\09'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-INCO2'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'VBKD-FKDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-TAXM1'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM2'
                                  '1'.
    perform bdc_field       using 'VBAP-TAXM3'
                                  '0'.
    perform bdc_field       using 'VBAP-TAXM4'
                                  '0'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DELETE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DETAIL'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXVB'.
    perform bdc_field       using 'RSTXT-TXLINE(02)'
                                  'GFGFDG'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXBA'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\10'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-POSEX_E'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-POSEX'
                                  '108128'.
    perform bdc_field       using 'VBKD-BSTKD_E'
                                  '3011192'.
    perform bdc_field       using 'VBKD-POSEX_E'
                                  '000005'.
    perform bdc_dynpro      using 'SAPMV45A' '4003'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAP-POSEX'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAP-POSEX'
                                  '108128'.
    perform bdc_field       using 'VBKD-BSTKD_E'
                                  '3011192'.
    perform bdc_field       using 'VBKD-POSEX_E'
                                  '5'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KKAU'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai east'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(01)'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\02'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-KONDA'.
    perform bdc_field       using 'VBAK-AUDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAK-VKBUR'
                                  'IN15'.
    perform bdc_field       using 'VBAK-WAERK'
                                  'INR'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-KDGRP'
                                  'CF'.
    perform bdc_field       using 'VBKD-PLTYP'
                                  '01'.
    perform bdc_field       using 'VBKD-KONDA'
                                  '01'.
    perform bdc_field       using 'VBKD-BZIRK'
                                  'NORTH'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\03'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-VSART'.
    perform bdc_field       using 'VBAK-VSBED'
                                  '01'.
    perform bdc_field       using 'VBKD-KZAZU'
                                  'X'.
    perform bdc_field       using 'VBKD-VSART'
                                  'ER'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\05'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-INCO2'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'VBKD-FKDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBAK-TAXK1'
                                  '1'.
    perform bdc_field       using 'VBAK-TAXK3'
                                  'l'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\09'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-ZLSCH'.
    perform bdc_field       using 'VBKD-KTGRD'
                                  '01'.
    perform bdc_field       using 'VBKD-ZLSCH'
                                  'c'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DELETE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_CREATE'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TP_DETAIL'.
    perform bdc_field       using 'LV70T-SPRAS'
                                  'EN'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXVB'.
    perform bdc_field       using 'RSTXT-TXLINE(02)'
                                  'BDFBFDB'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXBA'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=T\11'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=KSTC'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'J_STMAINT-ANWS(02)'.
    perform bdc_field       using 'J_STMAINT-ANWS(01)'
    perform bdc_field       using 'J_STMAINT-ANWS(02)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'J_STMAINT-ANWS(03)'.
    perform bdc_field       using 'J_STMAINT-ANWS(02)'
    perform bdc_field       using 'J_STMAINT-ANWS(03)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'J_STMAINT-ANWS(04)'.
    perform bdc_field       using 'J_STMAINT-ANWS(03)'
    perform bdc_field       using 'J_STMAINT-ANWS(04)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLBSVA' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'JOSTD-OBJNR'.
    perform bdc_dynpro      using 'SAPMV45A' '4002'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-TXT_VBELN'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  'open SO'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '29.01.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '100000'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '29.01.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '29.01.2008'.
    perform bdc_field       using 'VBKD-INCO1'
                                  'EXW'.
    perform bdc_field       using 'VBKD-INCO2'
                                  'mumbai'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(01)'.
    perform bdc_transaction using 'VA01'.
    perform close_group.
    if in excel file one row of records means i am succesfully creating SO.
    But for multiple i am not getting idea to create SO.
    My excel file details like this.In this excel file based on VBKD-BSTKD_E value i have to keep the records in line items.
    VBAK-AUART    :Order Type
    VBAK-VKORG    : Sales Org
    VBAK-VTWEG    : Distri Channel
    VBAK-SPART    : Division
    VBAK-KUNNR    : Sold-to-Party
    VBPA-KUNNAR   : Ship-to-Party
    VBAK-BSTNK    : PO No
    VBAK-BSTDK    : PO Date
    VBAP-MATNR    : Material No
    A_THICK_MM
    A_WIDTH_MM
    A_EQUIVALENT_SPEC
    A_COIL_INNER_DIA_MM
    A_BATCH_WEIGHT_MIN_SI
    A_BATCH_WEIGHT_MAX_SI
    VBAP-KWMENG    : Qty
    VBAP-WERKS     : Delivery Plant
    VBKD-INCO2     : Incoterm2
    VBKD-KONDA     : Price Group
    VBKD-VSART     : Shipping Type
    VBAK-TAXK1     : Cust Tax-1
    VBAK-TAXK2     : Cust Tax-2
    VBAK-TAXK3     : Cust Tax-3
    VBAK-TAXK4     : Cust Tax-4
    VBKD-ZLSCH     : Payment Method
    VBAP-TAXM1     : Mat tax clss-1
    VBAP-TAXM2     : Mat tax clss-2
    VBAP-TAXM3     : Mat tax clss-3
    VBAP-TAXM4     : Mat tax clss-4
    VBAP-POSEX     : IMPS Order No
    VBKD-BSTKD_E   : old SO in 4.6c
    VBKD-POSEX_E   : old SO Item  in 4.6c
    Text Id        : TDC No
    Text Id-ES10   : Special Inst(Unld const & Veh)
    ZOR,2000,10,5,100000,100000,PO NO 125,19.01.2008,HRPOCF,3.1,1200,IS_11513_GR_D_1985,610,20.084,20.084
    51,2010,Mumbai,01Freight-pre paid,ER,2,0,L,0,c,1,1,0,0,108128,3011192,     1,PO 444 AMD 1,Spl Inst
    based on VBKD-BSTKD_E line items has to create.
    if VBKD-BSTKD_E = 3011192 is like 4 records in excel means for these 4 should be one SO
    if it is changed to 3011193 then only different SO.
    PLs If any one knows solution pls write some sample code for me.
    If u send that code to my mail id also  very thankful.
    Pls help me this is urgent requirement.
    [email protected]
    Thanks & Regards,
    J.Lokesh

    If u want to add Items data, u have to handle the Table control by writing the complete code.
    U have to write code for 2 items, when u press enter u will get new row to enter new record one by one.
    Narendra

  • To Record  J1IS BDC  For Multiple Line Items

    Hi,
      Iam trying to record BDC for J1IS transaction.
    while  recording  material document which contains more than  8 line items , Only 8 line items get saved and the rest of the items doesn't get saved ,
        But when I  do this manually then  all the line items get saved,
        Can anyone give the remedy for this Problem (to record J1IS for multiple line items).
      Thanks in Advance.
    Regards,
    S.Janani.

    Hi Janani / Leo
    The problem might be that the scroll down functionality after 8 line items is not recorded in your recording.
    In order to overcome the issue, you need to check OK__CODE whicle page down and add it in recording after Number of line items are greater than 8.
    Please check below link for details:
    http://scn.sap.com/thread/1106677
    http://scn.sap.com/thread/797827
    http://scn.sap.com/thread/2037271
    Best Regards,
    Sachin

  • "BDC for multiple line items of PO"

    I am using this code to move data for multiple line items of a PO. But only one is getting transferred. I am using BDC for this.
    FORM transaction_bdc .
      DATA :
      v_cnt(2) TYPE n,
      v_bst(2) TYPE n,
      v_bn TYPE i,
      v_bstpo(25),
      v_ebtyp(25),
      v_menge(25),
      v_eeind(25),
      v_xblnr(25),
      v_xblnr1(25),
      v_ebelp(2) TYPE n,
      v_ebelpt(2),
      v_menge1(11),
      v_ebt TYPE i,
      v_vebtyp LIKE ekes-ebtyp,
      v_eb(2) TYPE n,
      v_tcselflag(40),
      v_tem(2) TYPE n,
      v_correct TYPE i,
      v_file TYPE string.
      DATA: ls_outtab TYPE tb_struc.
      DATA: l_valid TYPE c,
            l_locked TYPE c.
      CALL METHOD g_grid->check_changed_data
        IMPORTING
          e_valid = l_valid.
      IF l_valid EQ 'X'.
        LOOP AT tb_output WHERE check EQ 'X' .
          MOVE-CORRESPONDING tb_output TO itab_output.
          APPEND itab_output.
          CLEAR itab_output.
        ENDLOOP.
        IF tb_output-check <> 'X'.
          MESSAGE e003 WITH text-004.
        ENDIF.
      ENDIF.
      IF itab_output[] IS NOT INITIAL.
        PERFORM open_group.
    ***looping at purchase order level.
        LOOP AT itab_output where ebelp is not initial .
          CLEAR v_bn.
          CLEAR v_ebt.
          PERFORM bdc_dynpro USING 'SAPMM06E' '0105'.
          PERFORM bdc_field USING 'BDC_CURSOR'
          'RM06E-BSTNR'.
          PERFORM bdc_field USING 'BDC_OKCODE'
          '/00'.
          PERFORM bdc_field USING 'RM06E-BSTNR'
          itab_output-ebeln.
    ***Changing alphanumeric fields and quantity fields to character type**
    *v_ebelp = tB_OUTPUT-ebelp.
    *clear v_ebelpt.
    *v_menge1 = tB_OUTPUT-menge.
    *v_ebelpt = v_ebelp.
    ***End Of Changing**
    *Checking for the exact number of the item**
          LOOP AT tb_output where ebeln = itab_output-ebeln.
            READ TABLE itab_output INDEX 1.
            IF tb_output-ebelp = itab_output-ebelp.
              exit.
            ELSE.
              v_bn = v_bn + 1.
            ENDIF.
          ENDLOOP.
    v_bst = v_bn + 1.
    *End Of Checking**
    **Mapping items**
            v_tem = 1.
            CONCATENATE 'RM06E-BSTPO(' v_bst ')' INTO v_bstpo.
            CONCATENATE 'RM06E-TCSELFLAG(' v_tem ')' INTO v_tcselflag.
            PERFORM bdc_dynpro USING 'SAPMM06E' '0120'.
            PERFORM bdc_field USING 'BDC_CURSOR'
            v_bstpo.
            PERFORM bdc_field USING 'BDC_OKCODE'
            '=DETA'.
            PERFORM bdc_field USING 'RM06E-EBELP'
            v_ebelpt.
            PERFORM bdc_dynpro USING 'SAPMM06E' '0111'.
            PERFORM bdc_field USING 'BDC_CURSOR'
            'EKPO-BSTAE'.
            PERFORM bdc_field USING 'BDC_OKCODE'
            '/00'.
            PERFORM bdc_dynpro USING 'SAPMM06E' '0120'.
            PERFORM bdc_field USING 'BDC_CURSOR'
            v_bstpo.
            PERFORM bdc_field USING 'BDC_OKCODE'
            '=BSTA'.
            PERFORM bdc_field USING 'RM06E-EBELP'
            v_ebelpt.
            PERFORM bdc_field USING v_tcselflag
            'X'.
    **Checking weather Confirmation category already exists**
            SELECT ebtyp FROM ekes INTO v_vebtyp WHERE ebelp =
            itab_output-ebelp AND ebeln = itab_output-ebeln.
            ENDSELECT.
            IF sy-dbcnt > 0.
              v_ebt = sy-dbcnt.
            ENDIF.
            v_eb = v_ebt + 1.
    **End Of Checking**
    **For Line items**
            CONCATENATE 'EKES-EBTYP(' v_eb ')' INTO v_ebtyp.
            CONCATENATE 'EKES-MENGE(' v_eb ')' INTO v_menge.
            CONCATENATE 'RM06E-EEIND(' v_eb ')' INTO v_eeind.
            CONCATENATE 'EKES-XBLNR(' v_eb ')' INTO v_xblnr.
    **End**
            PERFORM bdc_dynpro USING 'SAPLEINB' '0200'.
            PERFORM bdc_field USING 'BDC_CURSOR'
            v_xblnr.
            PERFORM bdc_field USING 'BDC_OKCODE'
            '=BU'.
            PERFORM bdc_field USING v_ebtyp
            itab_output-ebtyp.
            PERFORM bdc_field USING v_eeind
            itab_output-eindt.
            PERFORM bdc_field USING v_menge
            v_menge1.
            PERFORM bdc_field USING v_xblnr
            itab_output-xblnr.
    **End Of Mappings**
    *loop at itab_output.
            MOVE-CORRESPONDING itab_output TO ekes.
            modify ekes.
           MOVE-CORRESPONDING itab_output TO eket.
           MODIFY eket.
           MOVE-CORRESPONDING tb_output TO ekpo.
           MODIFY ekpo.
         ENDLOOP.
          CALL TRANSACTION 'ME22N'
          USING itbdc
          MODE   'E'.
          commit work.
    perform bdc_transaction using 'ME22N'.
    **End Of Purchase Order Loop**
        PERFORM close_group.
        endloop.
         endif.

    Hi Asha,
    check the below code once...
    LOOP AT tb_output where ebeln = itab_output-ebeln.
    READ TABLE itab_output INDEX 1.
    IF tb_output-ebelp = itab_output-ebelp.
    exit.
    ELSE.
    v_bn = v_bn + 1.
    ENDIF.
    ENDLOOP.
    Here you are reading the table itab_output with index 1, it means you alway reading the first record of that internal table.
    Regards,
    Satya.

  • How Can I Create One Entry Sheet For Multiple Line Items of A PO

    Please Tell Me How Can I Create One Entry Sheet For Multiple Line Items of A PO

    hi,
    It is not possible to create single Service Entry sheet for multiple PO line items. It is 1 to 1 relation.
    you have to make different service entry sheets for different item of service master.
    regards
    Manish Joshi

  • Legacy asset data upload for multiple line items

    Hello
    Legacy asset data upload for multiple line items- for example Building is an asset which is having different line items for purchasing of land,constructaion or renovation etc.........now to upload the legacy data what should be consider...only one line item for Building or numbers of line item.........
    which one is the proper way to do this exercise?
    regards

    Hi,
    It completely depends on clients requirement. but following are few approaches:
    1. Define Building as Asset Class.
    2. Create a Building at specific location at asset code and
    3. create asset sub numbers for other components.
    other approach would be:
    1. Define Building as Asset Class.
    2. Create a Building at specific location at asset code and
    3. create further asset codes for other components where field description will be used for relating each other.
    Regards,
    Sayujya

  • Changing Ship-To Parties for Multiple Line Items

    Hello!  I am wondering if there is a way to change the Ship-To party on a sales order at the line item, besides changing each line individually.  Is there a more efficient way to change the Ship-To party for multiple line items?  We are looking at creating a fast-change transaction to allow users to change the Ship-To party at the line item level for multiple lines.  Our particular transaction will make changes by delivery group.  Does anyone know if SAP version 6.0 will have functionality to allow users to change the Ship-To party for multiple lines at one time?  Thanks!

    HI ,
    Go to tcode MASS, enter the object BUS2032, then execte-enter, now select the mass odrer item data. Here u can change the req fields.
    cheers
    reward if helpful

  • How to draw horizontal line at the end of table for multiple line items

    Dear Experts,
                       Pls can anyone help me how to draw horizontal line at the end of table for multiple line items . kindly help me regarding this
    Thanks
    Ramesh Manoharan

    Hi
       I tried as per your logic but it is not solving my problem .  when i am gone to table painter it is showing line type 1 and line type 2
      is below format.. if u see here line type 1 bottom line and line type 2 top line both are same..  so how to avoid this ?
                              line type 1
                             line type 2

  • Different currencies for multiple line items in a AP invoice?

    Hi, Expert,
    Is it possible to assign different currencies for multiple line items in a AP invoice?
    Eg:
    One vendor is supplying raw materials from different regions, and we have to raise one invoice with different currency rate  to each items 
    regards,
    Sanju

    Hi Sanju,
    It is not possible to assign different currencies for multiple line items in a AP invoice.
    Try to book the different documents(different correncies for a single vendor in a A/P Invoice).
    Regards,
    Madhan.

  • How to create matreial document for ten line items (10 documents) by BAPI

    Hi
    how to create matreial document for ten line items (10 documents) by BAPI_goodsmvt_create
    i created but it gives error as "no ites were transferre
    and i need code also.
    thanks in advance

    Prabhu Peram wrote:>
    > >
    Gareth @ Atos Origin UK wrote:
    > > Prabhu,
    > >
    > > You have been on SDN a long time and have a decent amount of points - why do you feel the need to simply cut and paste standard SAP documentation? _-----> I least bother abt the Points, and i never ask somebody to give points to me , if u have any doubt on it , u can check all my postings ? All it does is fill up the SDN servers with replicated data which the original poster could quite easily access themselves via SE37----> Sorry I have seen ur Posting/Reply,dont assume that i do copy & paste for sake of Points.Njoy SAP.>
    > > Gareth.
    >
    >
    >
    > regards
    > Prabhu
    Prabhu.
    I didn't question you about points at all - I was making the point that you have been on SDN a long time and have a lot of points.  Therefore you should know better than to simply cut and paste standard SAP help.  If you don't copy and paste for sake of points, what do you do it for?  It serves no purpose other than to fill up the servers here on SDN.  The original poster appears to have access to a SAP system and SE37 and wants to know how to call a BAPI - they can easily go to SE37 and read the documentation themselves.  Posting it here just adds noise and makes searching harder, as well as taking up more and more space on SDN servers.
    Gareth.

  • BDC for multiple line items (VA01)

    Hi Experts,
      I create a BDC for VA01 transaction for single line item in that now i want to upload multiple line items also with  o/p of total no. of records uploaded, no. of records posted and the no. of error records...
    Can any body explain with sample code...

    Hi,
    if the flat file is containing header and item records...
    first split those records tooo two internal tables header and item..
    Loop at header ...
      process of recording steps for header....
    Loop at item...
    here create a varialbe with char 2 .. for index value....
      process of item recording steps..
      increment the index value by 1....
      here u have to pass  'p+'  OK_CODE..
    Endloop ..(item)
    Endloop...(header)
    for more info goo through this link...
    http://www.sap-img.com/bdc.htm
    hope helpful
    Raghunath.S

  • BDC for VA01 with multiple line items

    Hi,
    My client is 4.6c version, I have created a BDC program for transaction VA01 which will have multiple line items. I'm able to enter 12 items in the first instance, then 12 items next time. But I'm not doing any P+..System is automatically taking me to first item after reaching item 12 every time.
    But I have a doubt in production system also I will have only 12 items every time to enter..If not my program may not work..
    I'm calling BDC using following statment..
      CALL TRANSACTION 'VA01' USING BDCDATA
                        MODE 'N'
                        UPDATE 'S'
                        MESSAGES INTO lt_message.
    Please suggest me the solution.
    Regards
    Jaker.

    I had a similar problem with goods movements in a CO11N BDC I wrote.  Here's how it was fixed:
    DATA: lcl_opt     TYPE ctu_params.
    lcl_opt-defsize  = 'X'.
    CALL TRANSACTION 'CO11N' USING i_bdctbl OPTIONS FROM lcl_opt
                                 MESSAGES INTO messco11n.
    The option "defsize" makes sure that the screen always contains the same number of lines as it goes through the BDC.  That way, you can write in the paging logic without having to worry about the number of lines that appear on a user's screen as it may vary depending on how their screen resolution is set up.

  • Bdc for multiple line items

    hi all,
    i am developing bdc program to upload multiple line items for ml10.
    i am uploading folling fields
    spec_no
    astyp
    txz01,
    sort1,
    waers,
    matkl,
    ekorg,
    srvpos ' service number
    menge. 'quantity
    service number and quantity are multiple line items.
    i have developed a code which is taking single record only, it is not working for multiple service no and quantity.
    include bdcrecx1.
    parameters: filename like rlgrap-filename.
    data: begin of record,
    SPEC_NO(10),
    ASTYP(4),
    TXZ01(40),
    SORT1(20),
    WAERS(5),
    MATKL(9),
    EKORG(4),
    NEW_ROW(10),
    SRVPOS(18),
    MENGE(13),
    end of record.
    data: itab_program like record occurs 0 with header line.
    At Selection Screen
    at selection-screen on value-request for filename.
    perform query_filename changing filename.
    *START-OF-SELECTION
    start-of-selection.
    *-- Upload flat data to ITAB.
    perform upload_to_itab.
    *{ chg001 -- modified as per requirement
    perform open_group.
    loop at itab_program.
    perform upload_programs.
    endloop.
    perform close_group.
    FORM UPLOAD_TO_ITAB *
    form upload_to_itab.
    call function 'WS_UPLOAD'
    exporting
    CODEPAGE = ' '
    filename = filename
    filetype = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = itab_program
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    OTHERS = 10
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    write : 'File opening error.'.
    endif.
    endform.
    FORM QUERY_FILENAME *
    --> P_FILENAME *
    form query_filename changing p_filename.
    data : tmp_filename like filename.
    call function 'WS_FILENAME_GET'
    exporting
    def_filename = filename
    mask = ',.txt,.txt.'
    mode = 'O'
    title = 'Select the file to Upload'
    importing
    filename = tmp_filename
    exceptions
    inv_winsys = 01
    no_batch = 02
    selection_cancel = 03
    selection_error = 04.
    if sy-subrc = 0.
    filename = tmp_filename.
    endif.
    endform.
    *perform open_group.
    *& Form UPLOAD_programs
    text
    --> p1 text
    <-- p2 text
    form upload_programs.
    perform bdc_dynpro using 'SAPLMLSM' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'TEMP_SPEC-ASTYP'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'TMP_SPEC-SPEC_NO'
    ITAB_PROGRAM-SPEC_NO.
    perform bdc_field using 'TMP_SPEC-ASTYP'
    ITAB_PROGRAM-ASTYP.
    *****************************************************************SCREEN1
    perform bdc_dynpro using 'SAPLMLSM' '0200'.
    perform bdc_field using 'BDC_CURSOR'
    'TMP_SPEC-EKORG'.
    perform bdc_field using 'BDC_OKCODE'
    '=SRV'.
    perform bdc_field using 'TMP_SPEC-TXZ01'
    ITAB_PROGRAM-TXZ01.
    perform bdc_field using 'TMP_SPEC-SORT1'
    ITAB_PROGRAM-SORT1.
    perform bdc_field using 'TMP_SPEC-WAERS'
    ITAB_PROGRAM-WAERS.
    perform bdc_field using 'TMP_SPEC-MATKL'
    ITAB_PROGRAM-MATKL.
    perform bdc_field using 'TMP_SPEC-EKORG'
    ITAB_PROGRAM-EKORG.
    *****************************************************************END OF SCREEN2
    perform bdc_dynpro using 'SAPLMLSP' '0201'.
    perform bdc_field using 'BDC_OKCODE'
    '=BZE'.
    *perform bdc_field using 'RM11P-HEADTEXT'
    ITAB_PROGRAM-TXZ01.
    perform bdc_field using 'BDC_SUBSCR'
    'SAPLMLSP'.
    perform bdc_dynpro using 'SAPLMLSP' '0201'.
    perform bdc_field using 'BDC_OKCODE'
    '=BZE'.
    perform bdc_field using 'BDC_CURSOR'
    'ESLL-MENGE(01)'.
    perform bdc_field using 'ESLL-SRVPOS(01)'
    ITAB_PROGRAM-SRVPOS.
    perform bdc_field using 'ESLL-MENGE(01)'
    ITAB_PROGRAM-MENGE.
    perform bdc_dynpro using 'SAPLMLSP' '0201'.
    perform bdc_field using 'BDC_OKCODE'
    '=SAV'.
    perform bdc_field using 'BDC_SUBSCR'
    'SAPLMLSP'.
    perform bdc_transaction using 'ML10'.
    endform. " UPLOAD_programs
    can any body help me in this regard.
    thanks in advance
    siva

    Loop at itab_program.
    < Here will be your BDC Program>
    call transaction..... .
    endloop.
    and all the records in you internal table itab_program will get updated...
    Regards.
    Jayant
    <b>Please award if helpful</b>

  • Setting the value of a single attribute for multiple line items

    Hi all,
    I am working on a Web Dynpro application, I have created this applicaion for an accounting document so it has header data and multiple line item data. As per the requirement I have to put the following logic:
    1. When a user enters a value in the field KBLNR on the line item, all the other fields like cost centerm fund, functional area should populate from a database table based on the value of the KBLNR. to get this I have put the following code:
    TYPES: BEGIN OF t_kblp,
              fipos     TYPE kblp-fipos,
              kostl     TYPE kostl,
                      END OF t_kblp.
      DATA lv_kblnr TYPE wd_this->element_t_bseg-kblnr.
      DATA: lt_kblp TYPE STANDARD TABLE OF t_kblp,
            wa_kblp LIKE LINE OF lt_kblp,
            lt_bseg              TYPE STANDARD TABLE OF bseg,
            wa_bseg              TYPE bseg.
      DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
      DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
      DATA: ls_t_bseg TYPE wd_this->element_t_bseg,
            lo_api_controller    TYPE REF TO if_wd_controller,
            lo_message_manager   TYPE REF TO if_wd_message_manager,
            lo_nd_tbseg          TYPE REF TO if_wd_context_node,
             lo_el_tbseg          TYPE REF TO if_wd_context_element,
             lt_el_tbseg          TYPE wdr_context_element_set,
             lv_bseg              TYPE bseg.
      lo_nd_t_bseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
      lo_nd_tbseg = wd_context->path_get_node( path = `ZDATA.CHANGING.T_BSEG` ).
      lt_el_tbseg = lo_nd_tbseg->get_elements( ).
      LOOP AT lt_el_tbseg INTO lo_el_tbseg.
        lo_el_tbseg->get_static_attributes(
                               IMPORTING static_attributes = lv_bseg ).
      IF lv_bseg-kblnr NE ' '.
          SELECT belnr
                 fipos
                 kostl
                 PSPNR
                 geber
                 saknr
                 fkber
                 grant_nbr
                 gsber
                 FROM kblp
                 inTO corresponding fields of wa_kblp
                 WHERE belnr = lv_bseg-kblnr and
                      saknr = lv_bseg-saknr.
            ENDSELECT.
    lo_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
    * get element via lead selection
            lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
    lo_el_tbseg->set_static_attributes(
                               EXPORTING static_attributes = wa_kblp ).
       CLEAR: lv_bseg, wa_kblp.
      ENDLOOP.
    everything is working fine but now the problem is couple of fields that I have in wa_kblp are with different names in bseg table and hence they are not updating... I tried putting the following logic within the loop :
    lo_el_t_bseg->set_attribute(
        name =  `PROJK`
    value = wa_kblp-pspnr ).
    but it's only setting the value of the first line item and not working for the multiple line items, can you please tell me how can do this?
    Thanks,
    Rajat Garg
    Edited by: rajatg on Jun 24, 2011 5:09 PM

    Hi Chris,
    I tried your code and it worked fine but after I put this code I am getting another issue. within the loop I had a code to make the fields non modifiable on the screen and was working fine but now what's happening is it's making the all the lines uneditable except the one with data on it (which is completely opposite), this is what I have coded:
    LOOP AT lt_el_tbseg INTO lo_el_tbseg.
        lo_el_tbseg->get_static_attributes(
                               IMPORTING static_attributes = lv_bseg ).
    IF lv_bseg-kblnr NE ' '.
      SELECT belnr
                 fipos
                 kostl
                 PSPNR
                 geber
                 saknr
                 fkber
                 grant_nbr
                 gsber
                 FROM kblp
                 inTO corresponding fields of wa_kblp
                 WHERE belnr = lv_bseg-kblnr and
                      saknr = lv_bseg-saknr.
            ENDSELECT.
    move: wa_kblp-belnr to wa_bseg-kblnr,
    wa_kblp-fipos to wa_bseg-fipos,
    wa_kblp-kostl to wa_bseg-kostl,
    wa_kblp-pspnr to wa_bseg-projk,
    wa_kblp-geber to wa_bseg-geber,
    wa_kblp-saknr to wa_bseg-saknr,
    wa_kblp-fkber to wa_bseg-fkber,
    wa_kblp-grant_nbr to wa_bseg-grant_nbr,
    wa_kblp-gsber to wa_bseg-gsber,
    lv_bseg-dmbtr to wa_bseg-dmbtr.
    append wa_bseg to lt_bseg.
    lo_nd_edit_property = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG.EDIT_PROPERTY` ).
          get element via lead selection
          lo_el_edit_property = lo_nd_edit_property->get_element( ).
          lo_el_edit_property->set_attribute(
            name =  `EDIT_FIELD`
            value = 'ABAP_TRUE' ).
          lo_el_edit_property->set_attribute(
            name =  `EDIT_WBS`
            value = 'ABAP_TRUE' ).
    endif.
    endloop.
    o_nd_t_bseg = wd_context->path_get_node( path = `ZPRELIMINARY_POSTING.CHANGING.T_BSEG` ).
    get element via lead selection
            lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
      CALL METHOD lo_nd_t_bseg->bind_table
        EXPORTING
          new_items            = lt_bseg.
    Can you please see what I am doing it wrong here....

  • LT12 TO confirmation error for multiple line items

    Hi Experts,
    We recently upgraded to ECC 6 DIMP EP6. We are not able to confirm TO with multiple line items. It is failing with an error message VL 198 that 0 quantity of material is available. We are able to confirm TO line items one by one. This TO is created for a delivery picking request. We tried with a configuration change for the delivery line item category availability check as Y as mentioned in this note 1653018. But still not working fine. Please let me know any relevant SAP note for this issue. 
    Thanks
    Rijil

    Please run CO09 and enter material numbers to see the available quantity and see if there is some inconsistency there.
    Also check MD04 for those materials to see if there is something wrong there.
    If you can you can also post the screens here, if you are not sure about CO09 and MD04 interpretation.

Maybe you are looking for

  • HP Office Jet 4630 Printer seems to be installed correctly but doesn't print

    I have Windows Vista on my laptop and am trying to install a new HP OJ 4630 e-all-in-one wireless printer. Drivers installed completely. I can see the printer just fine on my network. I can scan from printer to laptop. But I cannot print from this la

  • Error -70038 occurred at Property Node in nimc.fb.power.power.coordinate.vi

    HI, I created a Real Time application with debugging enabled that only makes a straight line move and then finds center (using SoftMotion function blocks). When I run the VI from the project everything works fine. When I create the executable and run

  • Apple TV to my regular home TV help

    Just installed Apple TV. Now I don't get how to go back to watching my regular TV. What do I press to get back to normal TV ? Cheers, Penni

  • Is registration required for the touch apps?

    hey i have a quick question. how do you resgister any of the adobe touch apps? like proto, ideas, photo shop touch revel, readert. like how and wheres the searial number or is there none? i am guessing the ipad apps are differnt form the desktop apps

  • Tables are not being deployed completely from Dictionary

    hi, I created a Dictionary project and a table with two columns in it. Then i rebuilt the project and created the .SDA archive. After that, i went to the navigator view and left clicked on the previusly created SDA archive and selected deploy. Deploy