<?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 Re: what is wrong with my code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655549#M612320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you narrow down the code to where the problem is please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joirs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Aug 2007 20:49:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-13T20:49:37Z</dc:date>
    <item>
      <title>what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655548#M612319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone guide me what is wrong with my code... when the session is created i am getting the only last record into the session... it is processing the last record..it is updating the application with only the last record..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone guide me where i am going wrong....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eport ZCUSTTEST&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;*include bdcrecx1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: knvv, lfa1.&lt;/P&gt;&lt;P&gt;data: begin of it_ldata occurs 0,&lt;/P&gt;&lt;P&gt;      kunnr like knvv-kunnr,&lt;/P&gt;&lt;P&gt;      lifnr like lfa1-lifnr,&lt;/P&gt;&lt;P&gt;      end of it_ldata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_sdata occurs 0,&lt;/P&gt;&lt;P&gt;      kunnr like knvv-kunnr,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     lifnr like knvv-lifnr,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      vkorg like knvv-vkorg,&lt;/P&gt;&lt;P&gt;      vtweg like knvv-vtweg,&lt;/P&gt;&lt;P&gt;      spart like knvv-spart,&lt;/P&gt;&lt;P&gt;      end of it_sdata.&lt;/P&gt;&lt;P&gt;data : it_sldata like it_sdata occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include bdcrecx1.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                      = 'C:\cust.txt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HAS_FIELD_SEPARATOR           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DAT_MODE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IGNORE_CERR                   = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  REPLACEMENT                   = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CHECK_BOM                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VIRUS_SCAN_PROFILE            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_AUTH_CHECK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                      = it_ldata&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILE_READ_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_BATCH                      = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_TYPE                  = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_AUTHORITY                  = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNKNOWN_ERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BAD_DATA_FORMAT               = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER_NOT_ALLOWED            = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SEPARATOR_NOT_ALLOWED         = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HEADER_TOO_LONG               = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNKNOWN_DP_ERROR              = 12&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ACCESS_DENIED                 = 13&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DP_OUT_OF_MEMORY              = 14&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DISK_FULL                     = 15&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DP_TIMEOUT                    = 16&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                        = 17&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&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;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_ldata.&lt;/P&gt;&lt;P&gt;*refresh it_sdata.&lt;/P&gt;&lt;P&gt;if it_ldata-kunnr &amp;lt;&amp;gt; ' '.&lt;/P&gt;&lt;P&gt;refresh : it_sdata.&lt;/P&gt;&lt;P&gt;clear : it_sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kunnr vkorg vtweg spart from knvv into table it_sdata where kunnr = it_ldata-kunnr.&lt;/P&gt;&lt;P&gt;loop at it_sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move it_sdata to it_sldata.&lt;/P&gt;&lt;P&gt;append it_sldata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*write:/ it_ldata-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'V_EDSDC-KUNNR(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=NEWL'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'V_EDSDC-AUART(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=SAVE'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'V_EDSDC-KUNNR(01)'&lt;/P&gt;&lt;P&gt;                              it_sldata-kunnr.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'V_EDSDC-LIFNR(01)'&lt;/P&gt;&lt;P&gt;                              it_ldata-lifnr.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'V_EDSDC-VKORG(01)'&lt;/P&gt;&lt;P&gt;                              it_sldata-vkorg.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'V_EDSDC-VTWEG(01)'&lt;/P&gt;&lt;P&gt;                              it_sldata-vtweg.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'V_EDSDC-SPART(01)'&lt;/P&gt;&lt;P&gt;                              it_sldata-spart.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'V_EDSDC-AUART(01)'&lt;/P&gt;&lt;P&gt;                              'ZOR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'V_EDSDC-KUNNR(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=BACK'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'V_EDSDC-KUNNR(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=BACK'.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'VOE2'.&lt;/P&gt;&lt;P&gt;&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;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:31:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655548#M612319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655549#M612320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you narrow down the code to where the problem is please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joirs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:49:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655549#M612320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655550#M612321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;s joris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is some where here in this block of code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_ldata.&lt;/P&gt;&lt;P&gt;*refresh it_sdata.&lt;/P&gt;&lt;P&gt;if it_ldata-kunnr &amp;lt;&amp;gt; ' '.&lt;/P&gt;&lt;P&gt;refresh : it_sdata.&lt;/P&gt;&lt;P&gt;clear : it_sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kunnr vkorg vtweg spart from knvv into table it_sdata where kunnr = it_ldata-kunnr.&lt;/P&gt;&lt;P&gt;loop at it_sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move it_sdata to it_sldata.&lt;/P&gt;&lt;P&gt;append it_sldata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*write:/ it_ldata-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&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;&lt;/P&gt;&lt;P&gt;In the final session i am getting only one last record..... something problem in this block&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655550#M612321</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655551#M612322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;best thing to do is debug it to make sure you are infact uploading all your records and also your Select statement is populating correctly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:51:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655551#M612322</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655552#M612323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nitesha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove that Refresh : it_sdata. &lt;/P&gt;&lt;P&gt;This stmt will erase all the contents of your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655552#M612323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655553#M612324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont see where are you looping over it_sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please after the select loop over that inernal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select kunnr vkorg vtweg spart from knvv into table it_sdata where kunnr = it_ldata-kunnr.&lt;/P&gt;&lt;P&gt;loop at it_sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move it_sdata to it_sldata.&lt;/P&gt;&lt;P&gt;append it_sldata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*write:/ it_ldata-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&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;LOOP AT it_sdata .  "CHECK HERE&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;ENDLOOP.-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bYE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:53:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655553#M612324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655554#M612325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nitesha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the error , first open the session and use loop command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;within loop should not be bdc_open_group and BDC_CLOSE_GROUP Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once you done ,you will get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you need example one ,just goto se37 -&amp;gt; enter bdc_open_group -&amp;gt; click on where used list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take one program and do compare with your program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655554#M612325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655555#M612326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't use REFRESH. &lt;/P&gt;&lt;P&gt;When you use REFRESH on a table with header line it cleares th ewhole table (instead of the header line).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the cause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;additionally:&lt;/P&gt;&lt;P&gt;Using Tables with headerlines is discouraged.&lt;/P&gt;&lt;P&gt;use normal tables and workareas instead..&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 20:59:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655555#M612326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T20:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655556#M612327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thax seshu really its worked.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points assigned&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2007 21:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655556#M612327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-13T21:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: what is wrong with my code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655557#M612328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;first you need to concentrate coding standards that is dont use the select statement within loop so you need to avoid this one by using 'for all entries' conncept&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) if not it_ldata[] is initial.&lt;/P&gt;&lt;P&gt;select &lt;/P&gt;&lt;P&gt;kunnr &lt;/P&gt;&lt;P&gt;vkorg &lt;/P&gt;&lt;P&gt;vtweg &lt;/P&gt;&lt;P&gt;spart&lt;/P&gt;&lt;P&gt;from knvv into table it_sdata&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_ldata&lt;/P&gt;&lt;P&gt;where kunnr = it_ldata-kunnr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort it_ldata by kunnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while processing no nee for two internal tables are it_sdata and it_ldata .&lt;/P&gt;&lt;P&gt;and you need to use  OPEN_GROUP &amp;amp; CLOSE_GROUP perofamnceS without loop. Remaing  performances for processing data u can use with in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following code covers entire code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_ldata[] is initial.&lt;/P&gt;&lt;P&gt;select &lt;/P&gt;&lt;P&gt;kunnr &lt;/P&gt;&lt;P&gt;vkorg &lt;/P&gt;&lt;P&gt;vtweg &lt;/P&gt;&lt;P&gt;spart&lt;/P&gt;&lt;P&gt;from knvv into table it_sldata&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_ldata&lt;/P&gt;&lt;P&gt;where kunnr = it_ldata-kunnr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort it_sldata by kunnr.&lt;/P&gt;&lt;P&gt;endif.&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;&lt;/P&gt;&lt;P&gt;LOOP AT IT_SLDATA.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'V_EDSDC-KUNNR(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=NEWL'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'V_EDSDC-AUART(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=SAVE'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'V_EDSDC-KUNNR(01)'&lt;/P&gt;&lt;P&gt;it_sldata-kunnr.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'V_EDSDC-LIFNR(01)'&lt;/P&gt;&lt;P&gt;it_ldata-lifnr.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'V_EDSDC-VKORG(01)'&lt;/P&gt;&lt;P&gt;it_sldata-vkorg.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'V_EDSDC-VTWEG(01)'&lt;/P&gt;&lt;P&gt;it_sldata-vtweg.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'V_EDSDC-SPART(01)'&lt;/P&gt;&lt;P&gt;it_sldata-spart.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'V_EDSDC-AUART(01)'&lt;/P&gt;&lt;P&gt;'ZOR'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'V_EDSDC-KUNNR(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=BACK'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPL0VED' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'V_EDSDC-KUNNR(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=BACK'.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'VOE2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&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;REWARD me with points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2007 05:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-wrong-with-my-code/m-p/2655557#M612328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-14T05:34:02Z</dc:date>
    </item>
  </channel>
</rss>

