<?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: Modify Read Describe in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-read-describe/m-p/3335445#M799346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change a database table&lt;/P&gt;&lt;P&gt;- MODIFY dbtab.&lt;/P&gt;&lt;P&gt;MODIFY *dbtab.&lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) ... .&lt;/P&gt;&lt;P&gt;- MODIFY dbtab FROM TABLE itab.&lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) FROM TABLE itab.&lt;/P&gt;&lt;P&gt;- MODIFY dbtab VERSION vers.&lt;/P&gt;&lt;P&gt;MODIFY *dbtab VERSION vers.&lt;/P&gt;&lt;P&gt;Change an internal table&lt;/P&gt;&lt;P&gt;- MODIFY itab [FROM wa] [INDEX idx].&lt;/P&gt;&lt;P&gt;Change a list line&lt;/P&gt;&lt;P&gt;- MODIFY LINE n.&lt;/P&gt;&lt;P&gt;- MODIFY LINE n OF CURRENT PAGE.&lt;/P&gt;&lt;P&gt;- MODIFY LINE n OF PAGE m.&lt;/P&gt;&lt;P&gt;- MODIFY CURRENT LINE.&lt;/P&gt;&lt;P&gt;Change the attributes of a screen field&lt;/P&gt;&lt;P&gt;- MODIFY SCREEN. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;P&gt;READ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read an internal table&lt;/P&gt;&lt;P&gt;- READ TABLE itab. / READ TABLE itab INTO wa.&lt;/P&gt;&lt;P&gt;Read a list line&lt;/P&gt;&lt;P&gt;- READ LINE lin.&lt;/P&gt;&lt;P&gt;- READ LINE lin OF CURRENT PAGE.&lt;/P&gt;&lt;P&gt;- READ LINE lin OF PAGE pag.&lt;/P&gt;&lt;P&gt;- READ CURRENT LINE.&lt;/P&gt;&lt;P&gt;Read a program&lt;/P&gt;&lt;P&gt;- READ REPORT prog INTO itab.&lt;/P&gt;&lt;P&gt;Read text elements&lt;/P&gt;&lt;P&gt;- READ TEXTPOOL prog ...INTO itab ...LANGUAGE lg.&lt;/P&gt;&lt;P&gt;Read a file&lt;/P&gt;&lt;P&gt;- READ DATASET dsn INTO f.&lt;/P&gt;&lt;P&gt;Read a database table&lt;/P&gt;&lt;P&gt;- READ TABLE dbtab.&lt;/P&gt;&lt;P&gt;Determine calendar information&lt;/P&gt;&lt;P&gt;- In R/2: READ CALENDAR.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt;Return attributes of a field&lt;/P&gt;&lt;P&gt;- DESCRIBE FIELD f.&lt;/P&gt;&lt;P&gt;Return attributes of an internal table&lt;/P&gt;&lt;P&gt;- DESCRIBE TABLE itab.&lt;/P&gt;&lt;P&gt;Determine distance between two fields&lt;/P&gt;&lt;P&gt;- DESCRIBE DISTANCE BETWEEN f1 AND f2 INTO f3.&lt;/P&gt;&lt;P&gt;Return attributes of a list&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST NUMBER OF LINES lin.&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST NUMBER OF PAGES n.&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST LINE lin PAGE pag.&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST PAGE pag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE DISTANCE BETWEEN f1 AND f2 INTO f3&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the distance between the fields f1 and f2 in f3.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TABLES LFA1.&lt;/P&gt;&lt;P&gt;    DATA DIS TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE DISTANCE BETWEEN LFA1-LAND1&lt;/P&gt;&lt;P&gt;                      AND     LFA1-NAME1&lt;/P&gt;&lt;P&gt;                      INTO    DIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: DIS contains the value 14, since exactly two fields lie between LAND1 and NAME1, namely LNRZA (10 bytes) and LOEVM (1 byte); additionally, the sub-field LAND1 is 3 bytes long. Therefore, the start of the sub-field LAND1 is exactly 14 bytes from the start of the sub-field NAME1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE - Supply attributes of a field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD f.&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Supplies the attributes of the field f . You must specify at least one of the additions:&lt;/P&gt;&lt;P&gt;Additions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... LENGTH len&lt;/P&gt;&lt;P&gt;2. ... TYPE typ&lt;/P&gt;&lt;P&gt;3. ... TYPE typ COMPONENTS n&lt;/P&gt;&lt;P&gt;4. ... OUTPUT-LENGTH len&lt;/P&gt;&lt;P&gt;5. ... DECIMALS n&lt;/P&gt;&lt;P&gt;6. ... EDIT MASK mask&lt;/P&gt;&lt;P&gt;Addition 1&lt;/P&gt;&lt;P&gt;... LENGTH len&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the length of the field f in the field&lt;/P&gt;&lt;P&gt;len .&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(8),&lt;/P&gt;&lt;P&gt;          LEN TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD LENGTH LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: LEN contains the value 8.&lt;/P&gt;&lt;P&gt;Addition 2&lt;/P&gt;&lt;P&gt;... TYPE typ&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the data type of f in the field typ&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(8) TYPE N,&lt;/P&gt;&lt;P&gt;          F_TYPE.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD TYPE F_TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Result:  F_TYPE  contains the value  'N' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Note&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Along with the elementary data types you can specify under&lt;/P&gt;&lt;P&gt;     DATA  (C, N, etc.), several other data types are created either&lt;/P&gt;&lt;P&gt;    with reference to Dictionary fields or during generation. These data&lt;/P&gt;&lt;P&gt;    types, which are also returned by  DESCRIBE , have the following&lt;/P&gt;&lt;P&gt;    type IDs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;h Internal table s 2-byte integer with leading sign b 1-byte integer without leading sign u Structure without internal table v Structure containing at least one internal table&lt;/P&gt;&lt;P&gt;For compatibility reasons, ... TYPE typ returns C rather than u or v with structures.&lt;/P&gt;&lt;P&gt;Addition 3&lt;/P&gt;&lt;P&gt;... TYPE typ COMPONENTS n&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Similar to ... TYPE typ except that, with structures in typ , u or v are returned and in the number of structure components is set in n . If f is not a structure, n is set to 0.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Recursive processing of the pages of an ABAP/4 data structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    FORM TEST USING F.&lt;/P&gt;&lt;P&gt;      DATA: TYP(1) TYPE C, N TYPE I.&lt;/P&gt;&lt;P&gt;      FIELD-SYMBOLS: &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT SY-INDEX OF STRUCTURE F TO &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;        DESCRIBE FIELD &amp;lt;F&amp;gt; TYPE TYP COMPONENTS N.&lt;/P&gt;&lt;P&gt;        IF N &amp;gt; 0. " Equivalent is TYP = 'u' OR TYP = 'v'&lt;/P&gt;&lt;P&gt;          PERFORM TEST USING &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          PERFORM DO_SOMETHING USING &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDDO.&lt;/P&gt;&lt;P&gt;    ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 4&lt;/P&gt;&lt;P&gt;... OUTPUT-LENGTH len&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Enters the output length of the field f in the variable len .&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(4) TYPE P,&lt;/P&gt;&lt;P&gt;          O_LEN TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD OUTPUT-LENGTH O_LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: O_LEN contains the value 8.&lt;/P&gt;&lt;P&gt;Addition 5&lt;/P&gt;&lt;P&gt;... DECIMALS n&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Enters the number of decimal places for the field f (defined in addition ... DECIMALS of the DATA statement or in the ABAP/4 Dictionary ) in the variable n .&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(8) TYPE P DECIMALS 2,&lt;/P&gt;&lt;P&gt;          DEC TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD DECIMALS DEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resultat: DEC contains the value 2.&lt;/P&gt;&lt;P&gt;Addition 6&lt;/P&gt;&lt;P&gt;... EDIT MASK mask&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;If the field f has a conversion routine in the ABAP/4 Dictionary , this is placed in the field mask in the form " ==conv ". " conv " stands for the name of the conversion routine, e.g. " ==ALPHA " in the conversion routine " ALPHA ". In this form, mask can then be used in the addition USING EDIT MASK mask of the WRITE statement.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Check whether there is a conversion routine for the field "customer number" in the table SBOOK :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TABLES SBOOK.&lt;/P&gt;&lt;P&gt;    DATA: CONV_EXIT(10).&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD SBOOK-CUSTOMID EDIT MASK CONV_EXIT.&lt;/P&gt;&lt;P&gt;    IF CONV_EXIT &amp;lt;&amp;gt; SPACE. ... ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: CONV_EXIT contains the value " ==ALPHA ". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Award points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2008 03:09:53 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2008-02-01T03:09:53Z</dc:date>
    <item>
      <title>Modify Read Describe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-read-describe/m-p/3335444#M799345</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;       Could anyone please give me syntax for &lt;/P&gt;&lt;P&gt;MODIFY&lt;/P&gt;&lt;P&gt;READ &lt;/P&gt;&lt;P&gt;DESCRIBE on hashed table and standard table.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 03:05:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-read-describe/m-p/3335444#M799345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T03:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Read Describe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-read-describe/m-p/3335445#M799346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change a database table&lt;/P&gt;&lt;P&gt;- MODIFY dbtab.&lt;/P&gt;&lt;P&gt;MODIFY *dbtab.&lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) ... .&lt;/P&gt;&lt;P&gt;- MODIFY dbtab FROM TABLE itab.&lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) FROM TABLE itab.&lt;/P&gt;&lt;P&gt;- MODIFY dbtab VERSION vers.&lt;/P&gt;&lt;P&gt;MODIFY *dbtab VERSION vers.&lt;/P&gt;&lt;P&gt;Change an internal table&lt;/P&gt;&lt;P&gt;- MODIFY itab [FROM wa] [INDEX idx].&lt;/P&gt;&lt;P&gt;Change a list line&lt;/P&gt;&lt;P&gt;- MODIFY LINE n.&lt;/P&gt;&lt;P&gt;- MODIFY LINE n OF CURRENT PAGE.&lt;/P&gt;&lt;P&gt;- MODIFY LINE n OF PAGE m.&lt;/P&gt;&lt;P&gt;- MODIFY CURRENT LINE.&lt;/P&gt;&lt;P&gt;Change the attributes of a screen field&lt;/P&gt;&lt;P&gt;- MODIFY SCREEN. &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------" /&gt;&lt;P&gt;READ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read an internal table&lt;/P&gt;&lt;P&gt;- READ TABLE itab. / READ TABLE itab INTO wa.&lt;/P&gt;&lt;P&gt;Read a list line&lt;/P&gt;&lt;P&gt;- READ LINE lin.&lt;/P&gt;&lt;P&gt;- READ LINE lin OF CURRENT PAGE.&lt;/P&gt;&lt;P&gt;- READ LINE lin OF PAGE pag.&lt;/P&gt;&lt;P&gt;- READ CURRENT LINE.&lt;/P&gt;&lt;P&gt;Read a program&lt;/P&gt;&lt;P&gt;- READ REPORT prog INTO itab.&lt;/P&gt;&lt;P&gt;Read text elements&lt;/P&gt;&lt;P&gt;- READ TEXTPOOL prog ...INTO itab ...LANGUAGE lg.&lt;/P&gt;&lt;P&gt;Read a file&lt;/P&gt;&lt;P&gt;- READ DATASET dsn INTO f.&lt;/P&gt;&lt;P&gt;Read a database table&lt;/P&gt;&lt;P&gt;- READ TABLE dbtab.&lt;/P&gt;&lt;P&gt;Determine calendar information&lt;/P&gt;&lt;P&gt;- In R/2: READ CALENDAR.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt;Return attributes of a field&lt;/P&gt;&lt;P&gt;- DESCRIBE FIELD f.&lt;/P&gt;&lt;P&gt;Return attributes of an internal table&lt;/P&gt;&lt;P&gt;- DESCRIBE TABLE itab.&lt;/P&gt;&lt;P&gt;Determine distance between two fields&lt;/P&gt;&lt;P&gt;- DESCRIBE DISTANCE BETWEEN f1 AND f2 INTO f3.&lt;/P&gt;&lt;P&gt;Return attributes of a list&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST NUMBER OF LINES lin.&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST NUMBER OF PAGES n.&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST LINE lin PAGE pag.&lt;/P&gt;&lt;P&gt;- DESCRIBE LIST PAGE pag. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE DISTANCE BETWEEN f1 AND f2 INTO f3&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the distance between the fields f1 and f2 in f3.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TABLES LFA1.&lt;/P&gt;&lt;P&gt;    DATA DIS TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE DISTANCE BETWEEN LFA1-LAND1&lt;/P&gt;&lt;P&gt;                      AND     LFA1-NAME1&lt;/P&gt;&lt;P&gt;                      INTO    DIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: DIS contains the value 14, since exactly two fields lie between LAND1 and NAME1, namely LNRZA (10 bytes) and LOEVM (1 byte); additionally, the sub-field LAND1 is 3 bytes long. Therefore, the start of the sub-field LAND1 is exactly 14 bytes from the start of the sub-field NAME1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE - Supply attributes of a field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD f.&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Supplies the attributes of the field f . You must specify at least one of the additions:&lt;/P&gt;&lt;P&gt;Additions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... LENGTH len&lt;/P&gt;&lt;P&gt;2. ... TYPE typ&lt;/P&gt;&lt;P&gt;3. ... TYPE typ COMPONENTS n&lt;/P&gt;&lt;P&gt;4. ... OUTPUT-LENGTH len&lt;/P&gt;&lt;P&gt;5. ... DECIMALS n&lt;/P&gt;&lt;P&gt;6. ... EDIT MASK mask&lt;/P&gt;&lt;P&gt;Addition 1&lt;/P&gt;&lt;P&gt;... LENGTH len&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the length of the field f in the field&lt;/P&gt;&lt;P&gt;len .&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(8),&lt;/P&gt;&lt;P&gt;          LEN TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD LENGTH LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: LEN contains the value 8.&lt;/P&gt;&lt;P&gt;Addition 2&lt;/P&gt;&lt;P&gt;... TYPE typ&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Returns the data type of f in the field typ&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(8) TYPE N,&lt;/P&gt;&lt;P&gt;          F_TYPE.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD TYPE F_TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Result:  F_TYPE  contains the value  'N' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Note&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Along with the elementary data types you can specify under&lt;/P&gt;&lt;P&gt;     DATA  (C, N, etc.), several other data types are created either&lt;/P&gt;&lt;P&gt;    with reference to Dictionary fields or during generation. These data&lt;/P&gt;&lt;P&gt;    types, which are also returned by  DESCRIBE , have the following&lt;/P&gt;&lt;P&gt;    type IDs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;h Internal table s 2-byte integer with leading sign b 1-byte integer without leading sign u Structure without internal table v Structure containing at least one internal table&lt;/P&gt;&lt;P&gt;For compatibility reasons, ... TYPE typ returns C rather than u or v with structures.&lt;/P&gt;&lt;P&gt;Addition 3&lt;/P&gt;&lt;P&gt;... TYPE typ COMPONENTS n&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Similar to ... TYPE typ except that, with structures in typ , u or v are returned and in the number of structure components is set in n . If f is not a structure, n is set to 0.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Recursive processing of the pages of an ABAP/4 data structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    FORM TEST USING F.&lt;/P&gt;&lt;P&gt;      DATA: TYP(1) TYPE C, N TYPE I.&lt;/P&gt;&lt;P&gt;      FIELD-SYMBOLS: &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;      DO.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT SY-INDEX OF STRUCTURE F TO &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT. ENDIF.&lt;/P&gt;&lt;P&gt;        DESCRIBE FIELD &amp;lt;F&amp;gt; TYPE TYP COMPONENTS N.&lt;/P&gt;&lt;P&gt;        IF N &amp;gt; 0. " Equivalent is TYP = 'u' OR TYP = 'v'&lt;/P&gt;&lt;P&gt;          PERFORM TEST USING &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          PERFORM DO_SOMETHING USING &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDDO.&lt;/P&gt;&lt;P&gt;    ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 4&lt;/P&gt;&lt;P&gt;... OUTPUT-LENGTH len&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Enters the output length of the field f in the variable len .&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(4) TYPE P,&lt;/P&gt;&lt;P&gt;          O_LEN TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD OUTPUT-LENGTH O_LEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: O_LEN contains the value 8.&lt;/P&gt;&lt;P&gt;Addition 5&lt;/P&gt;&lt;P&gt;... DECIMALS n&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;Enters the number of decimal places for the field f (defined in addition ... DECIMALS of the DATA statement or in the ABAP/4 Dictionary ) in the variable n .&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA: FLD(8) TYPE P DECIMALS 2,&lt;/P&gt;&lt;P&gt;          DEC TYPE P.&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD FLD DECIMALS DEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resultat: DEC contains the value 2.&lt;/P&gt;&lt;P&gt;Addition 6&lt;/P&gt;&lt;P&gt;... EDIT MASK mask&lt;/P&gt;&lt;P&gt;Effect&lt;/P&gt;&lt;P&gt;If the field f has a conversion routine in the ABAP/4 Dictionary , this is placed in the field mask in the form " ==conv ". " conv " stands for the name of the conversion routine, e.g. " ==ALPHA " in the conversion routine " ALPHA ". In this form, mask can then be used in the addition USING EDIT MASK mask of the WRITE statement.&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Check whether there is a conversion routine for the field "customer number" in the table SBOOK :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TABLES SBOOK.&lt;/P&gt;&lt;P&gt;    DATA: CONV_EXIT(10).&lt;/P&gt;&lt;P&gt;    DESCRIBE FIELD SBOOK-CUSTOMID EDIT MASK CONV_EXIT.&lt;/P&gt;&lt;P&gt;    IF CONV_EXIT &amp;lt;&amp;gt; SPACE. ... ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: CONV_EXIT contains the value " ==ALPHA ". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Award points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 03:09:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-read-describe/m-p/3335445#M799346</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-02-01T03:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Read Describe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-read-describe/m-p/3335446#M799347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the SAP Help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY - Change a database table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. MODIFY dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY *dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) ... .. &lt;/P&gt;&lt;P&gt;2. MODIFY dbtab FROM TABLE itab. or &lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) FROM TABLE itab. &lt;/P&gt;&lt;P&gt;3. MODIFY dbtab VERSION vers. or &lt;/P&gt;&lt;P&gt;MODIFY *dbtab VERSION vers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Inserts new lines or updates existing lines in a database table (s. relational database). If a line with the specified primary key already exists, an UPDATE is executed. Otherwise, an INSERT is performed. You can specify the name of the database table either in the program itself in the form MODIFY dbtab ... or at runtime as the contents of the field dbtabname in the form MODIFY (dbtabname) ... . In both cases, the database table must be defined in the ABAP Dictionary. Normally, records are inserted or updated only in the current client. Data can only be inserted or updated using a view, if the view refers to a single table and was created in the ABAP Dictionary with the maintenance status "No restriction". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY belongs to the Open SQL command set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the statement has been executed, the system field SY-DBCNT contains the number of edited lines. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;All lines were successfully inserted or updated. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;One or more lines could not be inserted or updated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;You cannot modify a line if there is already a line in the table with identical key field values in a UNIQUE index. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Automatic definition of INSERT and UPDATE is expensive. You should therefore use MODIFY only if you cannot define the INSERT and UPDATE cases yourself in the program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the MODIFY statement does not perform authority checks, you have to program them yourself. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding or changing lines with the MODIFY command is only completed after a database commit (see LUW) has been performed. Before the database commit has been performed, any database changes can be reversed with a database rollback (see Programming transactions). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Synchronization of simultanous accesses by several users to the same set of data cannot be guaranteed exclusively with the lock mechanism of the database system. In several cases, you are recommended to use the SAP lock mechanism. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 1 &lt;/P&gt;&lt;P&gt;MODIFY dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY *dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... FROM wa &lt;/P&gt;&lt;P&gt;2. ... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;See Short forms not allowed and * work areas not allowed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Inserts a new line or updates an existing line in a database table. If you specify the name of the database table yourself, the primary key for identifying the line to be inserted or updated and the relevant values are taken from the table work area dbtab or *dbtab (see TABLES). If you specify the name of the database table directly, the program must contain a corresponding TABLES statement. If the name of the database table is not determined until runtime, you need to use the addition ... FROM wa. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Insert or change data of the customer Robinson in the current client: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SCUSTOM. &lt;/P&gt;&lt;P&gt;SCUSTOM-ID        = '12400177'. &lt;/P&gt;&lt;P&gt;SCUSTOM-NAME      = 'Robinson'. &lt;/P&gt;&lt;P&gt;SCUSTOM-POSTCODE  = '69542'. &lt;/P&gt;&lt;P&gt;SCUSTOM-CITY      = 'Heidelberg'. &lt;/P&gt;&lt;P&gt;SCUSTOM-CUSTTYPE  = 'P'. &lt;/P&gt;&lt;P&gt;SCUSTOM-DISCOUNT  = '003'. &lt;/P&gt;&lt;P&gt;SCUSTOM-TELEPHONE = '06201/44889'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY SCUSTOM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1 &lt;/P&gt;&lt;P&gt;... FROM wa &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The values for the line to be inserted or updated are not taken from the table work area dbtab, but from the explicitly specified work area wa. When doing this, the data is read from left to right according to the structure of the table work area dbtab (see TABLES). Since the structure of wa is not taken into account, the work area wa must be at least as wide (see DATA) as the table work area dbtab and the alignment of the work area wa must correspond to the alignment of the table work area. Otherwise, a runtime error occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If a work area is not explicitly specified, the values for the line to be inserted or updated are also taken from the table work area dbtab if the statement is in a FORM or FUNCTION where the table work area is stored in a formal parameter or local variable of the same name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Switches off automatic client handling. This allows you to edit data across all clients even when dealing with client-specific tables. The client field is treated like a normal table field that can be programmed to accept values in the table work area dbtab or *dbtab where the line to be edited occurs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The addition CLIENT SPECIFIED must be specified immediately after the name of the database table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 2 &lt;/P&gt;&lt;P&gt;MODIFY dbtab FROM TABLE itab.or MODIFY (dbtabname) FROM TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Mass modify: Inserts new lines or updates existing lines of a database table. The primary keys for identifying the lines to be inserted or updated and the relevant values are taken from the internal table itab. The lines of the internal table itab must satisfy the same conditions as the work area wa in addition 1 to variant 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition &lt;/P&gt;&lt;P&gt;... CLIENT SPECIFIED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;As for variant 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 3 &lt;/P&gt;&lt;P&gt;MODIFY dbtab VERSION vers. or MODIFY *dbtab VERSION vers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variant is not allowed in an ABAP Objects context. See VERSION addition not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;This variant is obsolete. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Inserts a new line or updates an existing line in a database table, the name of which is taken from the field vers at runtime. If no line exists with the specified primary key, an INSERT is executed. Otherwise, an UPDATE is performed. The database table must be defined in the ABAP/4 Dictionary and its name must conform to the naming conventions for R/2 ATAB tables. These stipulate that the name must begin with 'T' and may contain up to four further characters. The field vers must contain the table name without the leading 'T'. Only lines in the current client are inserted or updated. The line to be inserted is taken from the statically specified table work area dbtab or *dbtab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC is set to 0 if the line is successfully inserted or updated. SY-SUBRC &amp;lt;&amp;gt; 0 is not possible since any other result causes a runtime error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ::::&lt;/P&gt;&lt;P&gt;Read statement will be only for  Internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ - Reading an Internal Table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;1. READ TABLE itab FROM wa [additions]. &lt;/P&gt;&lt;P&gt;2. READ TABLE itab WITH TABLE KEY k1 = v1 ... kn = vn &lt;/P&gt;&lt;P&gt;                                                 [ additions]. &lt;/P&gt;&lt;P&gt;3. READ TABLE itab WITH KEY k1 = v1 ... kn = vn &lt;/P&gt;&lt;P&gt;                             [BINARY SEARCH] [ additions]. &lt;/P&gt;&lt;P&gt;4. READ TABLE itab INDEX i [additions]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obsolete Variants &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 an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Short forms of line operations not allowed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Reads an entry from an DS:ABEN.ITAB&amp;gt;internal table, using either its key or its index. The return code SY-SUBRC specifies whether an entry could be read. If you specify a non-unique key (the table must have a NON-UNIQUE key for this to be valid) , the system returns the entry with the lowest index from the set of entries that meet the condition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;An entry was read. &lt;/P&gt;&lt;P&gt;SY-TABIX is set to the index of the entry. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 2: &lt;/P&gt;&lt;P&gt;An entry was read. &lt;/P&gt;&lt;P&gt;SY-TABIX is set to the index of the entry. This return code can only occur when you use the COMPARING addition. For further detauls, refer to the COMPARING section of the additions &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;No entry was read. &lt;/P&gt;&lt;P&gt;The value of SY-TABIX depends on the table type and whether the BINARY SEARCH addition was specified. &lt;/P&gt;&lt;P&gt;If the table is a SORTED TABLE or STANDARD TABLE with the BINARY SEARCH addition, SY-TABIX refers to the next-highest index. &lt;/P&gt;&lt;P&gt;Otherwise, SY-TABIX is undefined. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8: &lt;/P&gt;&lt;P&gt;No entry was read. &lt;/P&gt;&lt;P&gt;This return code only occurs with a SORTED TABLE or a STANDARD TABLE with the BINARY SEARCH addition. SY-TABIX is set to the number of all entries plus 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The READ TABLE statement also fills the system fields SY-TFILL, SY-TLENG, and SY-TOCCU. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 1 &lt;/P&gt;&lt;P&gt;READ TABLE itab FROM wa [ additions]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 2 &lt;/P&gt;&lt;P&gt;READ TABLE itab WITH TABLE KEY k1 = v1 ... kn = vn [additions]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The system uses the specified table key values to locate the correct line. If there is more than one entry with the same key, the system returns the first. The way in which the system looks for table entries depends on the table type: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STANDARD TABLE: &lt;/P&gt;&lt;P&gt;The system searches from the start of the table. The response time is in linear relation to the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORTED TABLE: &lt;/P&gt;&lt;P&gt;The response time is in logarithmic relation to the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HASHED TABLE: &lt;/P&gt;&lt;P&gt;The response time is constant. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;When you specify the table key using k1 = v1 ... kn = vn you must specify values for all of the key fields. If the type of a value is not compatible with the type of the corresponding key field,the system uses MOVE logic to convert it to the type of the key field before reading from the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not know the name of a component until runtime, you can use the expression WITH TABLE KEY ... (ni) = vi ... to specify it dynamically as the contents of the field ni. If ni is empty at runtime, the key specification is ignored. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the line type of the internal table contains object reference variables as components, or the entire line type is a reference variable, you can use the attirbutes of the objects to which the reference is pointing in a particular line as key values (see Attributes of Objects as the Key of an Internal Table). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a table has a non-structured line type, you can use the pseudocomponent TABLE_LINE to address the entire line as the table key (see also Pseudocomponent TABLE_LINE in Internal Tables). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify the key implicitly using FROM wa, the values for the table key are taken from the corresponding components of the (structured) field wa. wa must be compatible with the line type of itab. In this way, you can access a table using READ without having to know the table key statically. If the table key is empty, the system reads the first line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 3 &lt;/P&gt;&lt;P&gt;READ TABLE itab WITH KEY k1 = v1 ... kn = vn [BINARY SEARCH] [additions]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The system uses the specified key to identify the correct line. If the type of a value is not compatible with the type of the corresponding key field, the system uses MOVE logic to convert the value into the type of the component before reading the table. This is an asymmetric comparison logic, in which the component type takes precedence over the value type. &lt;/P&gt;&lt;P&gt;The way in which the system looks for an entry in the table depends on its table type: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STANDARD TABLE: &lt;/P&gt;&lt;P&gt;If you use the ... BINARY SEARCH addition, the system uses a binary search. Otherwise, the search is sequential. This assumes that the internal table is sorted in ascending order in the sequence of the specified key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORTED TABLE: &lt;/P&gt;&lt;P&gt;If the specified key fields form a left-justified extract of the table key, the search is binary, otherwise sequential. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HASHED TABLE: &lt;/P&gt;&lt;P&gt;Sequential search. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;The system reads the first entry in which the specified components k1 ... kn correspond with the values of v1 ... vn. If the type of a value and the type of the corresponding key are incompatible, the system uses MOVE logic to convert the value into the type of the component before reading the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your table has a non-structured line type, you can use the pseudocomponent TABLE_LINE to address the entire line as the key (see also Pseudocomponent TABLE_LINE with Internal Tables). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not know the name of a component until runtime, you can use the expression WITH KEY ... (ni) = vi ... to specify it dynamically as the contents of the field ni. If ni is empty at runtime, the system ignores the component. If ni contains an invalid component name, a runtime error occurs. If ni contains an empty name, the system ignores the key specification. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the line type of the internal table contains object reference variables as componetns or the entire line type is a reference variable, you can use the attributes of the object to which the reference is pointing in a particular line as key values (see Attributes of Objects as the Key of an Internal Tables). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify a completely empty key, the system reads the first entry from the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You restrict your specification using offset and length. This is valid for both the static and dynamic variant. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variant 4 &lt;/P&gt;&lt;P&gt;READ TABLE itab INDEX i [additions]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Accessing the table entry with the index i. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;Performance: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The quickest way to access a single line of an internal table is direct access using an index, because the response time is then not linked to the size of the table, and is restricted more or less to the transport costs for a single line. &lt;/P&gt;&lt;P&gt;For hashed tables, the response time is constant. Accessing a table using the hash administration makes the response time around 3 times slower than using index access. &lt;/P&gt;&lt;P&gt;If you use the key to access a table, the response time increase as the number of table entries and the size of the search key increase. Searching using a binary search is considerably quicker than using a linear search. Therefore, in many cases it can be quicker to sort the table and then use the BINARY SEARCH addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The runtime required to read a line from a table with 100 entries using the index is around ca. 7 msn (standard microseconds), to read a line using a key of 30 bytes using a binary search, around 25 msn, and without binary search, around 100 msn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using statements that use an explicit work area for internal tables with a header line can avoid unnecessary value assignments. Zuweisungen vermieden werden. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Runtime errors: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB_EMPTY_KEY: Key missing when reading a table using READ ...  WITH TABLE KEY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB_ILLEGAL_BINARY_SEARCH: When you read a SORTERD TABLE using the BINARY SEARCH addition, the specified key fields must make up a left-justified extract of the key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB_KEY_COMPONENT_MISSING: Key specification missing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB_KEY_ILLEGAL_COMPONENT: Invalid key specification when accessing a key table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional help &lt;/P&gt;&lt;P&gt;Reading Table Lines &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading Table Lines Using the Index &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Describe::DESCRIBE - Finding Out the Attributes of an Internal Table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form &lt;/P&gt;&lt;P&gt;DESCRIBE TABLE itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Gets the attributes of the internal table itab. &lt;/P&gt;&lt;P&gt;You must use at least one of the additions listed below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You cannot use the DESCRIBE statement for all ABAP types. In conjunction with ABAP Objects, SAP has introduced an RTTI system, based on global classes, that you can use to return type attributes at runtime. This system applies to all ABAP types, and so includes all of the functions available in the DESCRIBE TABLE statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additions: &lt;/P&gt;&lt;P&gt;1. ... LINES  n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... OCCURS n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... KIND   k&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;Addition 1 &lt;/P&gt;&lt;P&gt;... LINES n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Places the numebr of filled lines of the table itab into the field n. The value returned to n has type I. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: N    TYPE I, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ITAB TYPE TABLE OF I. &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;CLEAR ITAB. &lt;/P&gt;&lt;P&gt;APPEND 36 TO ITAB. &lt;/P&gt;&lt;P&gt;DESCRIBE TABLE ITAB LINES N. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: N contains the value 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... OCCURS n &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Places the value of the OCCURS or INITIAL SIZE parameter from the definition of itab (DATA) into the variable n. The value returned to n has the type I. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: N1    TYPE I, &lt;/P&gt;&lt;P&gt;      N2    TYPE I, &lt;/P&gt;&lt;P&gt;      ITAB1 TYPE TABLE OF I INITIAL SIZE 10, &lt;/P&gt;&lt;P&gt;      ITAB2 TYPE I OCCURS 5. &lt;/P&gt;&lt;P&gt;DESCRIBE TABLE ITAB1 OCCURS N1. &lt;/P&gt;&lt;P&gt;DESCRIBE TABLE ITAB2 OCCURS N2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result: n1 has the value 10, N2 has the value 5. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 3 &lt;/P&gt;&lt;P&gt;... KIND k &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Places the table type of itab into the field k. The value returned to k has the type C. The return value is one of the constants SYDES_KIND-STANDARD, SYDES_KIND-SORTED, or SYDES_KIND-HASHED from the type group SYDES. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Generic FORM routine for any table type: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: SYDES. &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;FORM GENERIC_FORM USING ITAB TYPE ANY TABLE. &lt;/P&gt;&lt;P&gt;  DATA: K TYPE C. &lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE ITAB KIND K. &lt;/P&gt;&lt;P&gt;  CASE K. &lt;/P&gt;&lt;P&gt;    WHEN SYDES_KIND-STANDARD. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;    WHEN SYDES_KIND-SORTED. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;    WHEN SYDES_KIND-HASHED. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;  ENDCASE. &lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Performance: The runtime for the DESCRIBE TABLE statement is around 4 msn (standard microseconds). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DESCRIBE TABLE statement also fills the system fields SY-TFILL, SY-TLENG, and SY-TOCCU. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional help &lt;/P&gt;&lt;P&gt;Retrieving Attributes ofInternal Tables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 03:15:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-read-describe/m-p/3335446#M799347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T03:15:22Z</dc:date>
    </item>
  </channel>
</rss>

