<?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: Performance Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914510#M938387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abuser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As suggested very well that u shld go through &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCI(t-code) : &lt;/P&gt;&lt;P&gt;and Sql trace also so that u can analyse which part of the code is performing what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also the declaration part When declaring go for types statement as declare a structure first&lt;/P&gt;&lt;P&gt;then go for the data declaration&lt;/P&gt;&lt;P&gt;example:Data:  begin  of &amp;lt;bdc table&amp;gt;.&lt;/P&gt;&lt;P&gt;                       occurs &amp;lt;occurs parameter&amp;gt;.&lt;/P&gt;&lt;P&gt;                       include structure bdcdata .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: end of &amp;lt;bdc table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types :begin of tab,&lt;/P&gt;&lt;P&gt; field1  type table-f1,&lt;/P&gt;&lt;P&gt;        end of tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : tab1 type of standard table tab.&lt;/P&gt;&lt;P&gt;wa_tab  type tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inspite of using table with header line and occurs zero syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Mohinder singh&lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;Mohinder Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jun 2008 10:29:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-02T10:29:34Z</dc:date>
    <item>
      <title>Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914508#M938385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;We have performance issue with this program, can anyone give suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************************************************************************************&lt;/P&gt;&lt;P&gt;data: bdcdata like bdcdata occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab3 occurs 0,&lt;/P&gt;&lt;P&gt;     num(10) type n,&lt;/P&gt;&lt;P&gt;     end of itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab4 occurs 0,&lt;/P&gt;&lt;P&gt;     num(10) type n,&lt;/P&gt;&lt;P&gt;     end of itab4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v1(10) type c,&lt;/P&gt;&lt;P&gt;      date(10) type c,&lt;/P&gt;&lt;P&gt;      grwt(10) type c,&lt;/P&gt;&lt;P&gt;      ntwt(10) type c,&lt;/P&gt;&lt;P&gt;      trwt(10) type c,&lt;/P&gt;&lt;P&gt;      v2(10) type c,&lt;/P&gt;&lt;P&gt;      count(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab like zsd_wb occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : truckno like vbak-zztruckno,&lt;/P&gt;&lt;P&gt;        mat like vbap-matnr,&lt;/P&gt;&lt;P&gt;        qty like vbap-ntgew,&lt;/P&gt;&lt;P&gt;        bags like vbap-kwmeng,&lt;/P&gt;&lt;P&gt;        materialname like makt-maktx,&lt;/P&gt;&lt;P&gt;        yesflag(1) type n,&lt;/P&gt;&lt;P&gt;        confirmflag(1) type n,&lt;/P&gt;&lt;P&gt;        salesno like vbak-vbeln,&lt;/P&gt;&lt;P&gt;        bagorto like vbap-vrkme,&lt;/P&gt;&lt;P&gt;        kgorto like vbap-gewei,&lt;/P&gt;&lt;P&gt;        nwtstr(13) type c,&lt;/P&gt;&lt;P&gt;        pdes like vbap-vbeln,&lt;/P&gt;&lt;P&gt;        pqtystr(13) type c,&lt;/P&gt;&lt;P&gt;        doctemp like mseg-mblnr,&lt;/P&gt;&lt;P&gt;        tarewt like zsd_wb-trwt,&lt;/P&gt;&lt;P&gt;        tareno(1) value 0,&lt;/P&gt;&lt;P&gt;        tareyes(1) value 0,&lt;/P&gt;&lt;P&gt;        grosswt like zsd_wb-grwt,&lt;/P&gt;&lt;P&gt;        grossno(1) value 0,&lt;/P&gt;&lt;P&gt;        grossyes(1) value 0,&lt;/P&gt;&lt;P&gt;        proddoc like zsd_wb-proddoc,&lt;/P&gt;&lt;P&gt;        timeinit like sy-uzeit,&lt;/P&gt;&lt;P&gt;        timenext like sy-uzeit,&lt;/P&gt;&lt;P&gt;        plant like lips-werks,&lt;/P&gt;&lt;P&gt;        strloc like lips-lgort.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block bk1 with frame title text-001.&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;parameters: poutdel like vbak-vbeln  matchcode object vmva.&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;parameters: ptruck like vbak-zztruckno modif id md2,&lt;/P&gt;&lt;P&gt;            pmat like lips-matnr modif id md2.&lt;/P&gt;&lt;P&gt;selection-screen comment 60(35) matname.&lt;/P&gt;&lt;P&gt;parameters: pqty like lips-lfimg modif id md2,&lt;/P&gt;&lt;P&gt;            pbags like lips-umvkz modif id md2,&lt;/P&gt;&lt;P&gt;            psalesno like lips-kdauf modif id md2.&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;parameters: ptrwt like likp-btgew modif id md1.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton 55(12)  but2 user-command cli2 modif id sc2.                "Tare weight&lt;/P&gt;&lt;P&gt;selection-screen comment /55(10) comm3.&lt;/P&gt;&lt;P&gt;selection-screen: pushbutton 70(7)  but8 user-command cli7 modif id sc7,                "Correct&lt;/P&gt;&lt;P&gt;                  pushbutton 79(7)  but9 user-command cli8 modif id sc8.                "Wrong&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;parameters:pgrwt like likp-btgew modif id md1.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton 55(12)  but1 user-command cli1 modif id sc1.                "Gross weight&lt;/P&gt;&lt;P&gt;selection-screen comment /55(10) comm2.&lt;/P&gt;&lt;P&gt;selection-screen: pushbutton 70(7)  but6 user-command cli5 modif id sc5,                 "Correct&lt;/P&gt;&lt;P&gt;                  pushbutton 79(7)  but7 user-command cli6 modif id sc6.                  "Wrong&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;parameters: pntwt like likp-ntgew modif id md1.&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;parameters: pdiff(10) type p decimals 2 modif id md1.&lt;/P&gt;&lt;P&gt;selection-screen skip .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: pmfbf like mseg-mblnr modif id md3,&lt;/P&gt;&lt;P&gt;            poutno like lips-vgbel modif id md3.&lt;/P&gt;&lt;P&gt;selection-screen: pushbutton /60(16)  but10 user-command cli10 modif id s10.                 "Generate Invoice&lt;/P&gt;&lt;P&gt;parameters: pinv like vbrp-vbeln modif id md3.&lt;/P&gt;&lt;P&gt;selection-screen end of block bk1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--&lt;/STRONG&gt;&lt;DEL&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="----------------------" /&gt;INITIALIZATION--&lt;HR originaltext="-----------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;  but1 = 'Gross Weight'.&lt;/P&gt;&lt;P&gt;  but2 = 'Tare Weight'.&lt;/P&gt;&lt;P&gt;  but6 = 'Correct'.&lt;/P&gt;&lt;P&gt;  but7 = 'Wrong'.&lt;/P&gt;&lt;P&gt;  but8 = 'Correct'.&lt;/P&gt;&lt;P&gt;  but9 = 'Wrong'.&lt;/P&gt;&lt;P&gt;  but10 = 'Print Invoice'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  poutno = ''.&lt;/P&gt;&lt;P&gt;  pmfbf = ''.&lt;/P&gt;&lt;P&gt;  ptruck = ''.&lt;/P&gt;&lt;P&gt;  pmat = ''.&lt;/P&gt;&lt;P&gt;  pqty = ''.&lt;/P&gt;&lt;P&gt;  pbags = ''.&lt;/P&gt;&lt;P&gt;  psalesno = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at screen.&lt;/P&gt;&lt;P&gt;    modify screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if screen-group1 = 'MD1'.                                   "Weight fields in display mode.&lt;/P&gt;&lt;P&gt;      screen-input = 0.&lt;/P&gt;&lt;P&gt;      modify screen.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if screen-group1 = 'MD2'.&lt;/P&gt;&lt;P&gt;      screen-input = 0.&lt;/P&gt;&lt;P&gt;      modify screen.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if screen-group1 = 'MD3'.&lt;/P&gt;&lt;P&gt;      screen-input = 0.&lt;/P&gt;&lt;P&gt;      modify screen.&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;    select single zztruckno from vbak into truckno where vbeln = poutdel.&lt;/P&gt;&lt;P&gt;    ptruck = truckno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SELECT SINGLE matnr kwmeng vrkme ntgew gewei FROM vbap INTO (mat , bags , bagorto , qty , kgorto) WHERE vbeln = poutdel.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    select single matnr kwmeng vrkme lsmeng gewei werks lgort from vbap into (mat , bags , bagorto , qty , kgorto , plant , strloc) where vbeln = poutdel.&lt;/P&gt;&lt;P&gt;    if strloc eq ''.&lt;/P&gt;&lt;P&gt;      strloc = 'FG01'.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if bagorto eq 'KG'.&lt;/P&gt;&lt;P&gt;      pqty = qty / 1000.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    if bagorto eq 'TO'.&lt;/P&gt;&lt;P&gt;      pqty = qty .&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    if bagorto eq 'BAG'.&lt;/P&gt;&lt;P&gt;      pqty = qty * 20.&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;    pqtystr = pqty.&lt;/P&gt;&lt;P&gt;    pmat = mat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if pqty is not initial.&lt;/P&gt;&lt;P&gt;      pbags = pqty * 20.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if pgrwt is not initial.&lt;/P&gt;&lt;P&gt;      pdiff = ( pqty * 1000 ) - pntwt.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single maktx from makt into materialname where matnr = mat.&lt;/P&gt;&lt;P&gt;    matname = materialname.&lt;/P&gt;&lt;P&gt;    salesno = poutdel.&lt;/P&gt;&lt;P&gt;    psalesno = salesno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if poutdel is not initial.&lt;/P&gt;&lt;P&gt;      select single vbeln  from lips into poutno where vgbel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select single salesdoc from zsd_wb into pmfbf where outdel = poutdel.                    "SALES DOCUMENT NUMBER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select single vbeln from vbrp into pinv where aubel = poutdel.                           "INVOICE NUMBER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     TARE WEIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      tarewt = 0.&lt;/P&gt;&lt;P&gt;      grosswt = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select single trwt from zsd_wb into tarewt where outdel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if tarewt ne '0.000'.                                           &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      elseif ptrwt is initial.                                                        &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      elseif tareno = 1.                                                            &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        tareno = 0.&lt;/P&gt;&lt;P&gt;      elseif tareyes = 1.                                                              &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        tareyes = 0.&lt;/P&gt;&lt;P&gt;      elseif ptrwt is not initial.                                                  &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    GROSS WEIGHT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      select single grwt from zsd_wb into grosswt where outdel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if grosswt ne '0.000'.                                                                    .&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      elseif pgrwt is initial and tarewt ne '0.000'.                                                        &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      elseif grossno = 1 .                                                           &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        grossno = 0.&lt;/P&gt;&lt;P&gt;      elseif grossyes = 1 .                                                            &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        grossyes = 0.&lt;/P&gt;&lt;P&gt;      elseif pgrwt is not initial and ptrwt is not initial.                                                  &lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&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;      if ptrwt is initial and pgrwt is initial.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if pgrwt is not initial and ( pmfbf is initial or poutno is initial ).&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;          screen-input = 1.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;          screen-input = 0.&lt;/P&gt;&lt;P&gt;          modify screen.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    else.                                                                                &lt;/P&gt;&lt;P&gt;if screen-group1 = 'SC1'.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;        modify screen.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if screen-group1 = 'SC2'.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;        modify screen.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if screen-group1 = 'SC5'.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;        modify screen.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if screen-group1 = 'SC6'.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;        modify screen.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if screen-group1 = 'SC7'.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;        modify screen.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if screen-group1 = 'SC8'.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;        modify screen.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      if screen-group1 = 'S10'.&lt;/P&gt;&lt;P&gt;        screen-input = 0.&lt;/P&gt;&lt;P&gt;        modify screen.&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;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if poutdel is not initial.&lt;/P&gt;&lt;P&gt;    select single vbeln from lips into poutno where vgbel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single mblnr from mseg into pmfbf where mat_kdauf = poutdel.&lt;/P&gt;&lt;P&gt;    pdes = poutdel.&lt;/P&gt;&lt;P&gt;    select single * from zsd_wb into itab where outdel = poutdel.&lt;/P&gt;&lt;P&gt;    if pgrwt is initial.&lt;/P&gt;&lt;P&gt;      pgrwt = itab-grwt.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    if ptrwt is initial.&lt;/P&gt;&lt;P&gt;      ptrwt = itab-trwt.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    pntwt = itab-ntwt.&lt;/P&gt;&lt;P&gt;    refresh itab.&lt;/P&gt;&lt;P&gt;    clear itab.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh itab.&lt;/P&gt;&lt;P&gt;  clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case sscrfields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'CLI1'.                                                                       &lt;/P&gt;&lt;P&gt;      perform grosswt.&lt;/P&gt;&lt;P&gt;      itab-grwt = pgrwt.&lt;/P&gt;&lt;P&gt;      if pgrwt gt ptrwt.&lt;/P&gt;&lt;P&gt;        pntwt = pgrwt - ptrwt.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        pntwt = ptrwt - pgrwt.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      itab-ntwt = pntwt .&lt;/P&gt;&lt;P&gt;      grwt = pgrwt.&lt;/P&gt;&lt;P&gt;      trwt = ptrwt.&lt;/P&gt;&lt;P&gt;      ntwt = pntwt.&lt;/P&gt;&lt;P&gt;      nwtstr = ntwt / 1000.&lt;/P&gt;&lt;P&gt;      pdiff = ( pqty * 1000 ) - ntwt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'CLI2'.&lt;/P&gt;&lt;P&gt;      perform tarewt.                                                                                &lt;/P&gt;&lt;P&gt;when 'CLI6'.                                                                                &lt;/P&gt;&lt;P&gt;confirmflag = 2.                                                                &lt;/P&gt;&lt;P&gt;      grossno = 1.&lt;/P&gt;&lt;P&gt;      pgrwt = 0.&lt;/P&gt;&lt;P&gt;      pdiff = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'CLI5'.                                                                                &lt;/P&gt;&lt;P&gt;itab-grwt = pgrwt.&lt;/P&gt;&lt;P&gt;      if pgrwt gt ptrwt.&lt;/P&gt;&lt;P&gt;        pntwt = pgrwt - ptrwt.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        pntwt = ptrwt - pgrwt.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      itab-ntwt = pntwt .&lt;/P&gt;&lt;P&gt;      grwt = pgrwt.&lt;/P&gt;&lt;P&gt;      trwt = ptrwt.&lt;/P&gt;&lt;P&gt;      ntwt = pntwt.&lt;/P&gt;&lt;P&gt;      nwtstr = ntwt / 1000.&lt;/P&gt;&lt;P&gt;      pdiff = ( pqty * 1000 ) - ntwt.&lt;/P&gt;&lt;P&gt;      itab-grtime = sy-uzeit.&lt;/P&gt;&lt;P&gt;      itab-grdate = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if ntwt gt 200.&lt;/P&gt;&lt;P&gt;        update zsd_wb set grwt = itab-grwt grdate = itab-grdate  grtime = itab-grtime ntwt = itab-ntwt diff = pdiff  where outdel = poutdel.&lt;/P&gt;&lt;P&gt;        clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        concatenate sy-datum&lt;EM&gt;6(2) sy-datum&lt;/EM&gt;4(2) sy-datum+0(4) into date separated by '.'.&lt;/P&gt;&lt;P&gt;        grossyes = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          message 'Gross Weight Saved' type 'I'.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        select single salesdoc from zsd_wb into doctemp where outdel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if doctemp = ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          perform mfbf.                                                                         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         timeinit = sy-uzeit.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         timenext = timeinit + 5.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          while doctemp = ''.&lt;/P&gt;&lt;P&gt;            select single mblnr from mseg into doctemp where mat_kdauf = poutdel.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           IF sy-uzeit GT timenext.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             MESSAGE 'Production Document Number generation Error' TYPE 'I'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          endwhile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          count = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       timeinit = sy-uzeit.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       timenext = timeinit + 5.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          while count lt 3.&lt;/P&gt;&lt;P&gt;            select count(*) from mseg into count where mblnr = doctemp.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         IF sy-uzeit GT timenext.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           MESSAGE 'Production Document Number generation Error' TYPE 'E'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          endwhile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          update zsd_wb set salesdoc = doctemp where outdel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          perform vl01n.                                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          timeinit = sy-uzeit.&lt;/P&gt;&lt;P&gt;          timenext = timeinit + 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          while proddoc = ''.&lt;/P&gt;&lt;P&gt;            select single vbeln from lips into proddoc where vgbel = poutdel.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         IF sy-uzeit GT timenext.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           MESSAGE 'Sales Document Number generation Error' TYPE 'E'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          endwhile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          update zsd_wb set proddoc = proddoc where outdel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          message 'Sales Document Number Generated' type 'I'.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        message 'Net Weight Less Than 200' type 'I'.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    when 'CLI7'.                                                                                &lt;/P&gt;&lt;P&gt;itab-outdel = poutdel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if ptrwt is not initial.&lt;/P&gt;&lt;P&gt;        itab-trwt = ptrwt.&lt;/P&gt;&lt;P&gt;        itab-trtime = sy-uzeit.&lt;/P&gt;&lt;P&gt;        itab-trdate = sy-datum.&lt;/P&gt;&lt;P&gt;        itab-material = pmat.&lt;/P&gt;&lt;P&gt;        append itab.&lt;/P&gt;&lt;P&gt;        insert into zsd_wb values itab.&lt;/P&gt;&lt;P&gt;        if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          message 'Tare Weight Saved' type 'I'.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        clear itab.&lt;/P&gt;&lt;P&gt;        tareyes = 1.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      leave to screen 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'CLI8'.                                                                                &lt;/P&gt;&lt;P&gt;tareno = 1.&lt;/P&gt;&lt;P&gt;      ptrwt = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'CLI10'.&lt;/P&gt;&lt;P&gt;      perform vf01.&lt;/P&gt;&lt;P&gt;&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;Points will be rewarded &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Ab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 08:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914508#M938385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T08:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914509#M938386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi AbUser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please mention to us the contents of your Z tables or &lt;/P&gt;&lt;P&gt;you yourself can determine what is causing the performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to SE38 and type isn your program name and do a code inspector check(T Code: SCI) and aslo extended program check(Tcode: SLIN) and next SQL Trace(Tcode ST05) from where you can determine errors and eliminate them and also fix any suggestions given through Code Inspector.&lt;/P&gt;&lt;P&gt;Through SQL Trace determine which data retrieval is taking a long time to run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so correct that particualr SQL Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should solve you performance issue.&lt;/P&gt;&lt;P&gt;If it helps then you can reward suitably.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Venugopal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 09:10:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914509#M938386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T09:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914510#M938387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abuser,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As suggested very well that u shld go through &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCI(t-code) : &lt;/P&gt;&lt;P&gt;and Sql trace also so that u can analyse which part of the code is performing what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also the declaration part When declaring go for types statement as declare a structure first&lt;/P&gt;&lt;P&gt;then go for the data declaration&lt;/P&gt;&lt;P&gt;example:Data:  begin  of &amp;lt;bdc table&amp;gt;.&lt;/P&gt;&lt;P&gt;                       occurs &amp;lt;occurs parameter&amp;gt;.&lt;/P&gt;&lt;P&gt;                       include structure bdcdata .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: end of &amp;lt;bdc table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types :begin of tab,&lt;/P&gt;&lt;P&gt; field1  type table-f1,&lt;/P&gt;&lt;P&gt;        end of tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : tab1 type of standard table tab.&lt;/P&gt;&lt;P&gt;wa_tab  type tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inspite of using table with header line and occurs zero syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Mohinder singh&lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;cheers &lt;/P&gt;&lt;P&gt;Mohinder Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 10:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914510#M938387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T10:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914511#M938388</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;I would suggest you to use [SE30|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7769] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;; &amp;amp; [ST05|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7205] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u update the custom database table frequently....is it possible for u to minimise it...say if u can combine them???!!!!&lt;/P&gt;&lt;P&gt;count * will be good for small records fetched from relatively smaller table. the same functionality can be acheived through&lt;/P&gt;&lt;P&gt;selecting the data into itab, and using sy-sbcnt or describe the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2008 10:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/3914511#M938388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-02T10:33:10Z</dc:date>
    </item>
  </channel>
</rss>

