<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic URGENT: BDC problem small one in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-bdc-problem-small-one/m-p/3297701#M789233</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everybody&lt;/P&gt;&lt;P&gt;I am new to BDC and I have created a BDC for MM01. It is working well. I am using it by call transaction method. But my problem is this when the last material is created it is good but it does not stop and starts the next material creation and every time when i run the bdc it will waste a material number.&lt;/P&gt;&lt;P&gt;and please tell me the code to stop the bdc in each method and to move to next method&lt;/P&gt;&lt;P&gt;follwoing is the bdc code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ZDEMO_ZCON&lt;/P&gt;&lt;P&gt;       no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of record OCCURS 0,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MATNR(018),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MBRSH_001(001),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MTART_002(004),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       WERKS_015(004),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        MAKTX(040),&lt;/P&gt;&lt;P&gt;        MEINS(003),&lt;/P&gt;&lt;P&gt;        MATKL(009),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       BISMT(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       EXTWG(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        EKGRP(003),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       XCHPF_025(001),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WEBAZ(003),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        DISGR(004),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       DISMM_030(002),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MINBE(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        DISPO(003),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       DISLS(002),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MABST(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       SOBSL(2),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       PLIFZ_034(003),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       FHORI_036(003),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MTVFP_039(002),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        BKLAS(004),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END OF RECORD.&lt;/P&gt;&lt;P&gt;include bdcrecx1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CODEPAGE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\BOOKS3'           " Name of the tab delimited flat file on desktop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ITEM = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILEMASK_MASK = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILEMASK_TEXT = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILETYPE_NO_CHANGE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILEMASK_ALL = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILETYPE_NO_SHOW = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LINE_EXIT = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USER_FORM = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USER_PROG = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SILENT = 'S'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILESIZE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CANCEL =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ACT_FILENAME =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ACT_FILETYPE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data_tab = record                   " Name of internal table with data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONVERSION_ERROR = 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INVALID_TYPE = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NO_BATCH = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UNKNOWN_ERROR = 5&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 6&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 7*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;LOOP AT RECORD.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0060'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMMG1-MATNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MBRSH'&lt;/P&gt;&lt;P&gt;                              'M'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MTART'&lt;/P&gt;&lt;P&gt;                              'ZCON'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MSICHTAUSW-DYTXT(13)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=P+'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(09)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(12)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(13)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MSICHTAUSW-DYTXT(08)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(04)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(05)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(06)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(07)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(08)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0080'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMMG1-LGORT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-WERKS'&lt;/P&gt;&lt;P&gt;                              'MFPL'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-LGORT'&lt;/P&gt;&lt;P&gt;                              'ccon'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4004'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARA-MATKL'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MATKL'&lt;/P&gt;&lt;P&gt;                              record-matKl.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-EKGRP'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-EKGRP'&lt;/P&gt;&lt;P&gt;                              record-ekgrp.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MATKL'&lt;/P&gt;&lt;P&gt;                              record-matkl.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-DISGR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-DISGR'&lt;/P&gt;&lt;P&gt;                              record-disgr.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-EKGRP'&lt;/P&gt;&lt;P&gt;                              record-ekgrp.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-DISMM'&lt;/P&gt;&lt;P&gt;                              'ND'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-DISPO'&lt;/P&gt;&lt;P&gt;                              record-dispo.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-WEBAZ'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=PB01'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLQPLS' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMQAM-ARGUMENT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=NEU'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLQPLS' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMQAM-AKTIV(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=WEIT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMQAM-ART(01)'&lt;/P&gt;&lt;P&gt;                              'ZCON'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMQAM-APA(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMQAM-AKTIV(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-LOSGR'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=YES'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-PERKZ'&lt;/P&gt;&lt;P&gt;                              'M'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-MTVFP'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-MTVFP'&lt;/P&gt;&lt;P&gt;                              '02'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-LOSGR'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=YES'.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'MM01'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz provide the solution&lt;/P&gt;&lt;P&gt;points wil b awarded&lt;/P&gt;&lt;P&gt;thanx and regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Feb 2008 04:47:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-02T04:47:14Z</dc:date>
    <item>
      <title>URGENT: BDC problem small one</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-bdc-problem-small-one/m-p/3297701#M789233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everybody&lt;/P&gt;&lt;P&gt;I am new to BDC and I have created a BDC for MM01. It is working well. I am using it by call transaction method. But my problem is this when the last material is created it is good but it does not stop and starts the next material creation and every time when i run the bdc it will waste a material number.&lt;/P&gt;&lt;P&gt;and please tell me the code to stop the bdc in each method and to move to next method&lt;/P&gt;&lt;P&gt;follwoing is the bdc code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ZDEMO_ZCON&lt;/P&gt;&lt;P&gt;       no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of record OCCURS 0,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MATNR(018),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MBRSH_001(001),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MTART_002(004),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       WERKS_015(004),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        MAKTX(040),&lt;/P&gt;&lt;P&gt;        MEINS(003),&lt;/P&gt;&lt;P&gt;        MATKL(009),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       BISMT(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       EXTWG(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        EKGRP(003),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       XCHPF_025(001),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        WEBAZ(003),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        DISGR(004),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       DISMM_030(002),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MINBE(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        DISPO(003),&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       DISLS(002),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MABST(18),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       SOBSL(2),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       PLIFZ_034(003),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       FHORI_036(003),&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       MTVFP_039(002),&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        BKLAS(004),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END OF RECORD.&lt;/P&gt;&lt;P&gt;include bdcrecx1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CODEPAGE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\BOOKS3'           " Name of the tab delimited flat file on desktop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ITEM = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILEMASK_MASK = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILEMASK_TEXT = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILETYPE_NO_CHANGE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILEMASK_ALL = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILETYPE_NO_SHOW = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LINE_EXIT = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USER_FORM = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;USER_PROG = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SILENT = 'S'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILESIZE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CANCEL =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ACT_FILENAME =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ACT_FILETYPE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data_tab = record                   " Name of internal table with data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONVERSION_ERROR = 1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INVALID_TYPE = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NO_BATCH = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;UNKNOWN_ERROR = 5&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 6&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 7*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;LOOP AT RECORD.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0060'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMMG1-MATNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MBRSH'&lt;/P&gt;&lt;P&gt;                              'M'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MTART'&lt;/P&gt;&lt;P&gt;                              'ZCON'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MSICHTAUSW-DYTXT(13)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=P+'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(09)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(12)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(13)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MSICHTAUSW-DYTXT(08)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(04)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(05)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(06)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(07)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(08)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0080'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMMG1-LGORT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-WERKS'&lt;/P&gt;&lt;P&gt;                              'MFPL'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-LGORT'&lt;/P&gt;&lt;P&gt;                              'ccon'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4004'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARA-MATKL'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MATKL'&lt;/P&gt;&lt;P&gt;                              record-matKl.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-EKGRP'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-EKGRP'&lt;/P&gt;&lt;P&gt;                              record-ekgrp.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MATKL'&lt;/P&gt;&lt;P&gt;                              record-matkl.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-DISGR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-DISGR'&lt;/P&gt;&lt;P&gt;                              record-disgr.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-EKGRP'&lt;/P&gt;&lt;P&gt;                              record-ekgrp.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-DISMM'&lt;/P&gt;&lt;P&gt;                              'ND'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-DISPO'&lt;/P&gt;&lt;P&gt;                              record-dispo.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-WEBAZ'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=PB01'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLQPLS' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMQAM-ARGUMENT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=NEU'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLQPLS' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMQAM-AKTIV(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=WEIT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMQAM-ART(01)'&lt;/P&gt;&lt;P&gt;                              'ZCON'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMQAM-APA(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMQAM-AKTIV(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-LOSGR'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=YES'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-PERKZ'&lt;/P&gt;&lt;P&gt;                              'M'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARC-MTVFP'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-MTVFP'&lt;/P&gt;&lt;P&gt;                              '02'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-WEBAZ'&lt;/P&gt;&lt;P&gt;                              record-webaz.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              record-meins.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARC-LOSGR'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              record-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;                              record-bklas.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;                              'V'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;                              '1'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=YES'.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'MM01'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz provide the solution&lt;/P&gt;&lt;P&gt;points wil b awarded&lt;/P&gt;&lt;P&gt;thanx and regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2008 04:47:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-bdc-problem-small-one/m-p/3297701#M789233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-02T04:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: BDC problem small one</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-bdc-problem-small-one/m-p/3297702#M789234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;**&amp;amp;#12288;Program ID &amp;amp;#65306; ZMAT_CREATE&lt;/P&gt;&lt;P&gt;**&amp;amp;#12288;Program Desc &amp;amp;#65306; Material Master Creation&lt;/P&gt;&lt;P&gt;**&amp;amp;#12288;Process Overview &amp;amp;#65306;&lt;/P&gt;&lt;P&gt;**&amp;amp;#12288;Created By &amp;amp;#65306; R. NAGARAJAN&lt;/P&gt;&lt;P&gt;**&amp;amp;#12288;Created Date &amp;amp;#65306; 22/08/2006&lt;/P&gt;&lt;P&gt;**&amp;amp;#12288;Company Name &amp;amp;#65306; Infoview Technologies Limited&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;REPORT ZMAT_CREATE&lt;/P&gt;&lt;P&gt;NO STANDARD PAGE HEADING LINE-SIZE 132 MESSAGE-ID ZBDCMSG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table definition * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;MATNR LIKE RMMG1-MATNR, " Material Number&lt;/P&gt;&lt;P&gt;MBRSH LIKE RMMG1-MBRSH, " Industry Sector&lt;/P&gt;&lt;P&gt;MTART LIKE RMMG1-MTART, " Material Type&lt;/P&gt;&lt;P&gt;WERKS LIKE RMMG1-WERKS, " Plant&lt;/P&gt;&lt;P&gt;LGORT LIKE RMMG1-LGORT, " Storage Location&lt;/P&gt;&lt;P&gt;VKORG LIKE RMMG1-VKORG, " Sales Organization&lt;/P&gt;&lt;P&gt;VTWEG LIKE RMMG1-VTWEG, " Distribution Channel&lt;/P&gt;&lt;P&gt;LGNUM LIKE RMMG1-LGNUM, " Warehouse Number&lt;/P&gt;&lt;P&gt;LGTYP LIKE RMMG1-LGTYP, " Storage Type&lt;/P&gt;&lt;P&gt;MAKTX LIKE MAKT-MAKTX, " Material Description&lt;/P&gt;&lt;P&gt;MEINS LIKE MARA-MEINS, " Base Unit of Measure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MATKL LIKE MARA-MATKL, " Material Group &lt;/P&gt;&lt;P&gt;SPART LIKE MARA-SPART, " Division&lt;/P&gt;&lt;P&gt;MTPOS_MARA LIKE MARA-MTPOS_MARA, "General item category group&lt;/P&gt;&lt;P&gt;GEWEI LIKE MARA-GEWEI, " Weight Unit&lt;/P&gt;&lt;P&gt;TAXKM1 LIKE MG03STEUER-TAXKM, " Tax classification material&lt;/P&gt;&lt;P&gt;TAXKM2 LIKE MG03STEUER-TAXKM, " Tax classification material&lt;/P&gt;&lt;P&gt;KONDM LIKE MVKE-KONDM, " Material Pricing Group&lt;/P&gt;&lt;P&gt;MTPOS LIKE MVKE-MTPOS , "ItemCategoryGroupFromMaterialMaster&lt;/P&gt;&lt;P&gt;MTVFP LIKE MARC-MTVFP, " Checking Group for AvailabilityCheck&lt;/P&gt;&lt;P&gt;TRAGR LIKE MARA-TRAGR, " Transportation group&lt;/P&gt;&lt;P&gt;LADGR LIKE MARC-LADGR, " Loading group&lt;/P&gt;&lt;P&gt;TDLINE LIKE RSTXT-TXLINE, " Text editor text line&lt;/P&gt;&lt;P&gt;EKGRP LIKE MARC-EKGRP, " Purchasing Group&lt;/P&gt;&lt;P&gt;DISMM LIKE MARC-DISMM, " MRP Type&lt;/P&gt;&lt;P&gt;BESKZ LIKE MARC-BESKZ, " Procurement Type&lt;/P&gt;&lt;P&gt;SOBSL LIKE MARC-SOBSL, " Special procurement type&lt;/P&gt;&lt;P&gt;PERKZ LIKE MARC-PERKZ, " Period indicator&lt;/P&gt;&lt;P&gt;PRMOD LIKE MPOP-PRMOD, " Forecast model&lt;/P&gt;&lt;P&gt;KZINI LIKE MPOP-KZINI, " Initialization indicator&lt;/P&gt;&lt;P&gt;AUTRU LIKE MARC-AUTRU, " Reset Forecast Model Automatically&lt;/P&gt;&lt;P&gt;MODAV LIKE MPOP-MODAV, " Model selection procedure&lt;/P&gt;&lt;P&gt;IPRKZ LIKE MARA-IPRKZ, " Period indicator for shelf life expiration date&lt;/P&gt;&lt;P&gt;BWTTY LIKE MBEW-BWTTY, " Valuation Category&lt;/P&gt;&lt;P&gt;BKLAS LIKE MBEW-BKLAS, " Valuation Class&lt;/P&gt;&lt;P&gt;EKLAS LIKE MBEW-EKLAS, " Valuation Class for Sales OrderStock&lt;/P&gt;&lt;P&gt;VPRSV LIKE MBEW-VPRSV, " Price Control Indicator&lt;/P&gt;&lt;P&gt;EKALR LIKE MBEW-EKALR, "MaterialIsCostedWithQuantityStructure&lt;/P&gt;&lt;P&gt;END OF ITAB,&lt;/P&gt;&lt;P&gt;*// TEXT HEADER&lt;/P&gt;&lt;P&gt;GT_HEAD LIKE THEAD,&lt;/P&gt;&lt;P&gt;*// Text lines&lt;/P&gt;&lt;P&gt;GT_TEXT LIKE STANDARD TABLE OF TLINE,&lt;/P&gt;&lt;P&gt;GW_TEXT LIKE TLINE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data definition * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;WS_REP_CNT(6) TYPE C,&lt;/P&gt;&lt;P&gt;SESSION(12) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.&lt;/P&gt;&lt;P&gt;PARAMETERS:&lt;/P&gt;&lt;P&gt;PA_GROUP LIKE APQI-GROUPID OBLIGATORY DEFAULT 'MMupload',&lt;/P&gt;&lt;P&gt;PA_FNAME LIKE IBIPPARMS-PATH OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Include statements * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;INCLUDE ZBDCREX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At Selection Screen definition * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*//GETTING FLAT FILE PATH&lt;/P&gt;&lt;P&gt;PERFORM FILE_PATH USING PA_FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start of Selection definition * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*//UPLOADING THE FLAT FILE&lt;/P&gt;&lt;P&gt;PERFORM DATA_UPLOAD TABLES ITAB USING PA_FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// BDC OPEN GROUP&lt;/P&gt;&lt;P&gt;PERFORM OPEN_GROUP USING PA_GROUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP 3.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_HEADING INVERSE ON.&lt;/P&gt;&lt;P&gt;WRITE 40 TEXT-001.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_HEADING INVERSE OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP 1.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;WRITE :/3 TEXT-002, 13 SY-MANDT, 104 TEXT-003, 113 SY-UNAME,&lt;/P&gt;&lt;P&gt;/3 TEXT-004, 13 SY-DATUM, 104 TEXT-005, 113 SY-UZEIT.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INVERSE OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;WS_REP_CNT = WS_REP_CNT + 1. "To Count no. of Records Processed&lt;/P&gt;&lt;P&gt;PERFORM MM_UPLOAD.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*//STATUS INDICATION&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;SESSION = PA_GROUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP 1.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_TOTAL INVERSE ON.&lt;/P&gt;&lt;P&gt;WRITE: /38 TEXT-006 , WS_REP_CNT.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_TOTAL INVERSE OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE S000 WITH SESSION.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// BDC CLOSE GROUP&lt;/P&gt;&lt;P&gt;PERFORM CLOSE_GROUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'ZMM01PF'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;WHEN 'SESSION'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'SM35'.&lt;/P&gt;&lt;P&gt;WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;WHEN 'CANCEL'.&lt;/P&gt;&lt;P&gt;LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;ENDCASE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;* &lt;/P&gt;&lt;P&gt;FORM MM_UPLOAD * &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;* &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM MM_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH BDCDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Create Material: Initial Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '0060'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RMMG1-MATNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-MATNR'&lt;/P&gt;&lt;P&gt;ITAB-MATNR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-MBRSH'&lt;/P&gt;&lt;P&gt;ITAB-MBRSH.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-MTART'&lt;/P&gt;&lt;P&gt;ITAB-MTART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Selection Views&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MSICHTAUSW-DYTXT(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'SELA'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MSICHTAUSW-DYTXT(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Organization Levels&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '0080'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-WERKS'&lt;/P&gt;&lt;P&gt;ITAB-WERKS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-LGORT'&lt;/P&gt;&lt;P&gt;ITAB-LGORT.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-VKORG'&lt;/P&gt;&lt;P&gt;ITAB-VKORG.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-VTWEG'&lt;/P&gt;&lt;P&gt;ITAB-VTWEG.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-LGNUM'&lt;/P&gt;&lt;P&gt;ITAB-LGNUM.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RMMG1-LGTYP'&lt;/P&gt;&lt;P&gt;ITAB-LGTYP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Basic Data 1: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4004'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP04'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;ITAB-MAKTX.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-SPART'&lt;/P&gt;&lt;P&gt;ITAB-SPART.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MTPOS_MARA'&lt;/P&gt;&lt;P&gt;ITAB-MTPOS_MARA.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MARA-GEWEI'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-BRGEW'&lt;/P&gt;&lt;P&gt;'9000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-GEWEI'&lt;/P&gt;&lt;P&gt;ITAB-GEWEI.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-NTGEW'&lt;/P&gt;&lt;P&gt;'8000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Sales: Sales Organization 1: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP05'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MG03STEUER-TAXKM(01)'&lt;/P&gt;&lt;P&gt;ITAB-TAXKM1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MG03STEUER-TAXKM(02)'&lt;/P&gt;&lt;P&gt;ITAB-TAXKM2.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4200'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP05'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Sales: Sales Organization 2: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP06'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MVKE-KONDM'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MVKE-KONDM'&lt;/P&gt;&lt;P&gt;ITAB-KONDM.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MTPOS_MARA'&lt;/P&gt;&lt;P&gt;ITAB-MTPOS_MARA.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MVKE-MTPOS'&lt;/P&gt;&lt;P&gt;ITAB-MTPOS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Sales: General / Plant Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP12'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-BRGEW'&lt;/P&gt;&lt;P&gt;'9000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-GEWEI'&lt;/P&gt;&lt;P&gt;ITAB-GEWEI.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-XCHPF'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-NTGEW'&lt;/P&gt;&lt;P&gt;'8000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-MTVFP'&lt;/P&gt;&lt;P&gt;ITAB-MTVFP.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MARC-LADGR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-TRAGR'&lt;/P&gt;&lt;P&gt;ITAB-TRAGR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-LADGR'&lt;/P&gt;&lt;P&gt;ITAB-LADGR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// MRP 1: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP13'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-EKGRP'&lt;/P&gt;&lt;P&gt;ITAB-EKGRP.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MARC-DISMM'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-DISMM'&lt;/P&gt;&lt;P&gt;ITAB-DISMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// MRP 2: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP14'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RMMG1_BEZ-WERKS_BEZ'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-BESKZ'&lt;/P&gt;&lt;P&gt;ITAB-BESKZ.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-SOBSL'&lt;/P&gt;&lt;P&gt;ITAB-SOBSL .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// MRP 3: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP16'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MARC-PERKZ'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-PERKZ'&lt;/P&gt;&lt;P&gt;ITAB-PERKZ.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-MTVFP'&lt;/P&gt;&lt;P&gt;ITAB-MTVFP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Forecasting Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP17'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MPOP-PRMOD'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MPOP-PRMOD'&lt;/P&gt;&lt;P&gt;ITAB-PRMOD.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-PERKZ'&lt;/P&gt;&lt;P&gt;ITAB-PERKZ.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MPOP-PERAN'&lt;/P&gt;&lt;P&gt;'60'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MPOP-ANZPR'&lt;/P&gt;&lt;P&gt;'12'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MPOP-KZINI'&lt;/P&gt;&lt;P&gt;ITAB-KZINI.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MPOP-SIGGR'&lt;/P&gt;&lt;P&gt;'4.000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-AUTRU'&lt;/P&gt;&lt;P&gt;ITAB-AUTRU.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MPOP-MODAV'&lt;/P&gt;&lt;P&gt;ITAB-MODAV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Work Scheduling Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP19'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MARC-FRTME'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Plant data / Stor. 1: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP20'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-IPRKZ'&lt;/P&gt;&lt;P&gt;ITAB-IPRKZ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Plant data / Stor. 2: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP21'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-BRGEW'&lt;/P&gt;&lt;P&gt;'9000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-GEWEI'&lt;/P&gt;&lt;P&gt;ITAB-GEWEI.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-NTGEW'&lt;/P&gt;&lt;P&gt;'8000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Warehouse Management 1: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP23'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-BRGEW'&lt;/P&gt;&lt;P&gt;'9000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-GEWEI'&lt;/P&gt;&lt;P&gt;ITAB-GEWEI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Quality Management Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP24'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Accounting 1: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP26'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-BWTTY'&lt;/P&gt;&lt;P&gt;ITAB-BWTTY.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-SPART'&lt;/P&gt;&lt;P&gt;ITAB-SPART.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MBEW-STPRS'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;ITAB-BKLAS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-EKLAS'&lt;/P&gt;&lt;P&gt;ITAB-EKLAS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;ITAB-VPRSV.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;'1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-VERPR'&lt;/P&gt;&lt;P&gt;'800'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-STPRS'&lt;/P&gt;&lt;P&gt;'800'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Costing 1: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SP27'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-EKALR'&lt;/P&gt;&lt;P&gt;ITAB-EKALR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MARC-LOSGR'&lt;/P&gt;&lt;P&gt;'1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Costing 2: Screen&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM' '4000'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=BABA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-BKLAS'&lt;/P&gt;&lt;P&gt;ITAB-BKLAS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-BWTTY'&lt;/P&gt;&lt;P&gt;ITAB-BWTTY.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-EKLAS'&lt;/P&gt;&lt;P&gt;ITAB-EKLAS.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-VPRSV'&lt;/P&gt;&lt;P&gt;ITAB-VPRSV.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-PEINH'&lt;/P&gt;&lt;P&gt;'1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-VERPR'&lt;/P&gt;&lt;P&gt;'800.00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'MBEW-STPRS'&lt;/P&gt;&lt;P&gt;'800.00'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=YES'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*//BDC INSERT&lt;/P&gt;&lt;P&gt;PERFORM BDC_TRANSACTION TABLES BDCDATA&lt;/P&gt;&lt;P&gt;USING 'MM01'. " MESSAGES INTO GT_MSG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Text Header Data&lt;/P&gt;&lt;P&gt;CONCATENATE ITAB-MATNR ' 000101'&lt;/P&gt;&lt;P&gt;INTO GT_HEAD-TDNAME .&lt;/P&gt;&lt;P&gt;GT_HEAD-TDOBJECT = 'MVKE' .&lt;/P&gt;&lt;P&gt;GT_HEAD-TDID = '0001' .&lt;/P&gt;&lt;P&gt;GT_HEAD-TDSPRAS = SY-LANGU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Sales Text&lt;/P&gt;&lt;P&gt;GW_TEXT-TDFORMAT = '00'.&lt;/P&gt;&lt;P&gt;GW_TEXT-TDLINE = ITAB-TDLINE .&lt;/P&gt;&lt;P&gt;APPEND GW_TEXT TO GT_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAVE_TEXT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;HEADER = GT_HEAD&lt;/P&gt;&lt;P&gt;INSERT = 'X'&lt;/P&gt;&lt;P&gt;SAVEMODE_DIRECT = 'X'&lt;/P&gt;&lt;P&gt;OWNER_SPECIFIED = ' '&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;LINES = GT_TEXT&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;ID = 1&lt;/P&gt;&lt;P&gt;LANGUAGE = 2&lt;/P&gt;&lt;P&gt;NAME = 3&lt;/P&gt;&lt;P&gt;OBJECT = 4&lt;/P&gt;&lt;P&gt;OTHERS = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC 0.&lt;/P&gt;&lt;P&gt;SKIP 2.&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INVERSE ON.&lt;/P&gt;&lt;P&gt;WRITE: / 'Unable to Insert Salestext for Material : ', ITAB-MATNR .&lt;/P&gt;&lt;P&gt;FORMAT COLOR COL_NEGATIVE INVERSE OFF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: GT_HEAD, GT_TEXT, GW_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "MM_UPLOAD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2008 04:55:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-bdc-problem-small-one/m-p/3297702#M789234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-02T04:55:42Z</dc:date>
    </item>
  </channel>
</rss>

