<?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: code check required... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202887#M763436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MATNR does not exist in VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, why would you do this block of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A~MANDT&lt;/P&gt;&lt;P&gt;A~ERDAT&lt;/P&gt;&lt;P&gt;A~KUNNR&lt;/P&gt;&lt;P&gt;A~VKGRP&lt;/P&gt;&lt;P&gt;B~MATNR&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF ITAB&lt;/P&gt;&lt;P&gt;from vbak AS A&lt;/P&gt;&lt;P&gt;INNER JOIN vbap AS B ON A&lt;SUB&gt;VBELN = B&lt;/SUB&gt;VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matnr from vbak into itab-MATNR &lt;/P&gt;&lt;P&gt;where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ERDAT from VBAK INTO itab-ERDAT&lt;/P&gt;&lt;P&gt;where erdat = itab-ERDAT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE VKGRP from VBAK INTO itab-VKGRP&lt;/P&gt;&lt;P&gt;where VKGRP = itab-ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE MATNR from VBAP INTO itab-MATNR&lt;/P&gt;&lt;P&gt;where MATNR = itab-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab index sy-tabix transporting MATNR ERDAT VKGRP. &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2007 14:22:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-18T14:22:06Z</dc:date>
    <item>
      <title>code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202885#M763434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello ...&lt;/P&gt;&lt;P&gt;Iam getting error in the loop , can one check the code and tell me, where I went worng &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: VBAP,VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      A1 type flag,&lt;/P&gt;&lt;P&gt;      A2 type flag,&lt;/P&gt;&lt;P&gt;      A3 type flag,&lt;/P&gt;&lt;P&gt;      B1 type flag,&lt;/P&gt;&lt;P&gt;      B2 type flag,&lt;/P&gt;&lt;P&gt;      B3 type flag,&lt;/P&gt;&lt;P&gt;      C1 type flag,&lt;/P&gt;&lt;P&gt;      C2 type flag,&lt;/P&gt;&lt;P&gt;      C3 type flag,&lt;/P&gt;&lt;P&gt;      DATEFROM TYPE date,&lt;/P&gt;&lt;P&gt;      DATETO type date,&lt;/P&gt;&lt;P&gt;      val1 like datefrom,&lt;/P&gt;&lt;P&gt;      val2 like dateto,&lt;/P&gt;&lt;P&gt;       box TYPE c.&lt;/P&gt;&lt;P&gt;*DATA begin of ZSD_01001_STAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: wa type STANDARD TABLE OF VBAK WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        itab TYPE ZSD_01001_STAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get CURSOR FIELD datefrom VALUE val1.&lt;/P&gt;&lt;P&gt;GET CURSOR FIELD dateto VALUE val2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A~MANDT&lt;/P&gt;&lt;P&gt;A~ERDAT&lt;/P&gt;&lt;P&gt;A~KUNNR&lt;/P&gt;&lt;P&gt;A~VKGRP&lt;/P&gt;&lt;P&gt;B~MATNR&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF ITAB&lt;/P&gt;&lt;P&gt; from vbak AS A&lt;/P&gt;&lt;P&gt;INNER JOIN vbap AS B ON A&lt;SUB&gt;VBELN = B&lt;/SUB&gt;VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matnr from vbak into itab-MATNR &lt;/P&gt;&lt;P&gt;where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; SELECT SINGLE ERDAT from VBAK INTO itab-ERDAT&lt;/P&gt;&lt;P&gt;   where erdat = itab-ERDAT. &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;  SELECT SINGLE VKGRP from VBAK INTO itab-VKGRP&lt;/P&gt;&lt;P&gt;   where VKGRP = itab-ERDAT.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   SELECT SINGLE MATNR from VBAP INTO itab-MATNR&lt;/P&gt;&lt;P&gt;   where MATNR = itab-MATNR.&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;   modify itab index sy-tabix transporting MATNR ERDAT VKGRP. &lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&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;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'STATUS_100'.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'CANCEL'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    when 'CLEAR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        A1 = ''.&lt;/P&gt;&lt;P&gt;        A2 = ''.&lt;/P&gt;&lt;P&gt;        A3 = ''.&lt;/P&gt;&lt;P&gt;        B1 = ''.&lt;/P&gt;&lt;P&gt;        B2 = ''.&lt;/P&gt;&lt;P&gt;        B3 = ''.&lt;/P&gt;&lt;P&gt;        C1 = ''.&lt;/P&gt;&lt;P&gt;        C2 = ''.&lt;/P&gt;&lt;P&gt;        C3 = ''.&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;          screen-input = '1'.&lt;/P&gt;&lt;P&gt;          modify screen.&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;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.                    "user_command_0100 INPUT&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MODULE user OUTPUT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If A1 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if    ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;         or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;         or ( screen-name ='B1' and B1 is initial )&lt;/P&gt;&lt;P&gt;         or ( screen-name ='C1' and C1 is initial ) .&lt;/P&gt;&lt;P&gt;&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF B1 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if   ( screen-name ='B2' and B2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B3' and B3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C1' and C1 is initial ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF C1 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;      if   ( screen-name ='C2' and C2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C3' and C3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B1' and B1 is initial ).&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF A2 = 'x'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if   ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B2' and B2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C2' and C2 is initial ).&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF B2 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;      if   ( screen-name ='B1' and B1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B3' and B3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C2' and C2 is initial ).&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF C2 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF   ( screen-name ='C1' and C1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C3' and C3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B2' and B2 is initial ).&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF A3 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF   ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B3' and B3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C3' and C3 is initial ).&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF B3 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF   ( screen-name ='B1' and B1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B2' and B2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C3' and C3 is initial ).&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;    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;  IF C3 = 'X'.&lt;/P&gt;&lt;P&gt;    loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF   ( screen-name ='C1' and C1 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='C2' and C2 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;        or ( screen-name ='B3' and B3 is initial ).&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;    endloop.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;    when  'A1'.&lt;/P&gt;&lt;P&gt;      A1 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if    ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;           or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;           or ( screen-name ='B1' and B1 is initial )&lt;/P&gt;&lt;P&gt;           or ( screen-name ='C1' and C1 is initial ) .&lt;/P&gt;&lt;P&gt;&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'B1'.&lt;/P&gt;&lt;P&gt;      B1 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if   ( screen-name ='B2' and B2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B3' and B3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C1' and C1 is initial ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'C1'.&lt;/P&gt;&lt;P&gt;      C1 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;        if   ( screen-name ='C2' and C2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C3' and C3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B1' and B1 is initial ).&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'A2'.&lt;/P&gt;&lt;P&gt;      A2 = 'x'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        if   ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B2' and B2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C2' and C2 is initial ).&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'B2'.&lt;/P&gt;&lt;P&gt;      B2 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;        if   ( screen-name ='B1' and B1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B3' and B3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C2' and C2 is initial ).&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'C2'.&lt;/P&gt;&lt;P&gt;      C2 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF   ( screen-name ='C1' and C1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C3' and C3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B2' and B2 is initial ).&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'A3'.&lt;/P&gt;&lt;P&gt;      A3 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF   ( screen-name ='A1' and A1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A2' and A2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B3' and B3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C3' and C3 is initial ).&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'B3'.&lt;/P&gt;&lt;P&gt;      B3 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF   ( screen-name ='B1' and B1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B2' and B2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C3' and C3 is initial ).&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;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      when'C3'.&lt;/P&gt;&lt;P&gt;      C3 = 'X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF   ( screen-name ='C1' and C1 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='C2' and C2 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='A3' and A3 is initial )&lt;/P&gt;&lt;P&gt;          or ( screen-name ='B3' and B3 is initial ).&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;      endloop.&lt;/P&gt;&lt;P&gt;      CLEAR save_ok.&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " user_command_0100  OUTPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 13:56:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202885#M763434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T13:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202886#M763435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you'd care to enlighten us as to the nature of the error you're getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 14:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202886#M763435</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2007-12-18T14:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202887#M763436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MATNR does not exist in VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, why would you do this block of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A~MANDT&lt;/P&gt;&lt;P&gt;A~ERDAT&lt;/P&gt;&lt;P&gt;A~KUNNR&lt;/P&gt;&lt;P&gt;A~VKGRP&lt;/P&gt;&lt;P&gt;B~MATNR&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF ITAB&lt;/P&gt;&lt;P&gt;from vbak AS A&lt;/P&gt;&lt;P&gt;INNER JOIN vbap AS B ON A&lt;SUB&gt;VBELN = B&lt;/SUB&gt;VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matnr from vbak into itab-MATNR &lt;/P&gt;&lt;P&gt;where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE ERDAT from VBAK INTO itab-ERDAT&lt;/P&gt;&lt;P&gt;where erdat = itab-ERDAT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE VKGRP from VBAK INTO itab-VKGRP&lt;/P&gt;&lt;P&gt;where VKGRP = itab-ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE MATNR from VBAP INTO itab-MATNR&lt;/P&gt;&lt;P&gt;where MATNR = itab-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab index sy-tabix transporting MATNR ERDAT VKGRP. &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 14:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202887#M763436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T14:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202888#M763437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;error :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'itab'  is neither specified under ''tables'' nor defined as an internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 14:31:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202888#M763437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T14:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202889#M763438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello  Martin Shinks  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;... this my program with details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write a report program 3x3 matrix which should display MANDT,customer number, material number, Sales Group, ERDAT, Create a structure which should be used in the program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection critria:&lt;/P&gt;&lt;P&gt;VBAK-ERDAT and order of display should be according to selection of the user, using check box in the selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;___________________ 1 _______ 2 _________ 3&lt;/P&gt;&lt;P&gt;Customer number &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sala org &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;display should be &lt;/P&gt;&lt;P&gt;1. mandt 2.erdat---&amp;gt; 3.4.5 should sort according to the user &lt;/P&gt;&lt;P&gt;who selects in the selection in matrix....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 14:40:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202889#M763438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T14:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202890#M763439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT SINGLE VKGRP from VBAK INTO itab-VKGRP&lt;/P&gt;&lt;P&gt;where VKGRP = itab-ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will not work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not know why you are using this loop and then selecting the data again from VBAK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You initial read should read the data into the table itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 14:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202890#M763439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-18T14:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202891#M763440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've defined ITAB as type ZSD_01001_STAT.  I'd guess you've defined ZSD_01001_STAT as a transparent table or structure in SE11. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA itab TYPE ZSD_01001_STAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defines itab as a STRUCTURE with the same fields asZSD_01001_STAT.  You need to define it as a table.  You can't loop at a structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So: DATA itab TYPE tabletype TABLE OF zsd_01001_stat...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 15:00:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202891#M763440</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2007-12-18T15:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: code check required...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202892#M763441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did as you said,&lt;/P&gt;&lt;P&gt;then i got an error '' tabletype'' is not a valid table type. you can use ''Standard'', '' Sorted ''  or  '' Hashed'',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what should  I now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 10:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-check-required/m-p/3202892#M763441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T10:14:38Z</dc:date>
    </item>
  </channel>
</rss>

