<?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: abap statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062916#M971177</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;This statement assigns the memory area specified using mem_area to the field symbol &amp;lt;fs&amp;gt;. You can assign a data object or a memory area calculated from the address of a data object. After the assignment, the field symbol refers to the assigned memory area and can be used in operand positions. When used in a statement, it behaves like a dereferenced data reference, meaning that the statement works with the content of the memory area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data type with which the assgigned memory area is treated, depends on the specifications in casting_spec. You can either execute an explicit casting or the field symbol takes on the data type of the data object specified in the assignment. A field symbol to which a memory area is assigned, has this data type after the assignment and behaves like a data object of this type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The assigned memory area mem_area must be at least as long as the data type specified in casting_spec and must have the same alignment. If the data type determined in casting_spec is deep, the deep components with their type and position must appear in the assigned memory area exactly like this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the specifications in range_spec to restrict the memory area that can be assigned to the field symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System Fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return value is set only for the dynamic variants of mem_area. &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 Meaning &lt;/P&gt;&lt;P&gt;0 Assignment successful. &lt;/P&gt;&lt;P&gt;4 Assignment not successful. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After an unsuccessful dynamic assignment, the field symbol keeps its previous state. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Obsolete Form: ASSIGN LOCAL COPY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions &lt;/P&gt;&lt;P&gt;Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_ASSIGN_CAST_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field and the target type do not exactly match in offset and type in those components that are strings, tables, or references. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CASTING_ILLEGAL_CAST (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_ASSIGN_CAST_UNKNOWN_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: A type specified dynamically after CASTING is unknown. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CASTING_UNKNOWN_TYPE (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_ASSIGN_OUT_OF_RANGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The data object in addition RANGE does not contain the assigned data object. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_FIELD_NOT_IN_RANGE (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Non-Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The field symbol is structured and the assigned field is shorter than the structure. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_BASE_TOO_SHORT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The alignment for field f is too short for the type of the field symbol. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_BASE_WRONG_ALIGNMENT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For TYPE, you can specify only simple types. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_COMPLEX_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The source field is longer than 16 bytes and can, therefore, not be interpreted as a type P field. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_P_TOO_LARGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The alignment of field f is too short for the type specified at TYPE. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_WRONG_ALIGNMENT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The length of field f does not match the type specified in TYPE. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_WRONG_LENGTH &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type specified at TYPE is unknown. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_WRONG_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Only up to 14 decimal places are allowed. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_DECIMALS_TOO_HIGH &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Decimal places are allowed only for type P. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_DECIMALS_WRONG_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, a length of 0 was specified. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_LENGTH_0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, a length less than 0 was specified. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_LENGTH_NEGATIVE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, an offset less than 0 was specified. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET_NEGATIVE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, offset or length was specified and the data type of the assigning field does not allow partial access. (This is the case for data types I, F, and P.) &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET_NOTALLOWED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The offset specified for field f exceeds the range of the ABAP variable. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET_TOOLARGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: In the area addressed in the offset and length specifications for field f, deep components exist (data references, object references, strings, internal tables), which may not be overwritten. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFF+LENGTH_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Offset and length specified for field f exceed the range of the ABAP variable. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET+LENGTH_TOOLARGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Field f is not a data reference. However, a data reference was expected. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_REFERENCE_EXPECTED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field and the target type do not match exactly in offset and type in those components that are strings, tables, or references. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_STRUCTURE_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: You cannot assign substrings to a field symbol. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_SUBSTRING_NOT_ALLOWED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The field symbol is typed and the type of the assigned field is incompatible to it. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_TYPE_CONFLICT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field contains strings, tables, or references. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_TYPE_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field is a structure and, under Unicode, not compatible to the target type. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_UC_STRUCT_CONFLICT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this might be helpful.&lt;/P&gt;&lt;P&gt;reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;siri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jul 2008 06:10:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-10T06:10:03Z</dc:date>
    <item>
      <title>abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062914#M971175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone tell me what does this statement do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; assign component &amp;lt;var&amp;gt; of structure &amp;lt;internaltable&amp;gt; to &amp;lt;field_label&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nazmul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:04:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062914#M971175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062915#M971176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Consider the following example :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    ASSIGN COMPONENT 1 OF STRUCTURE &amp;lt;wa_dyn&amp;gt; TO &amp;lt;fs&amp;gt;.

    &amp;lt;fs&amp;gt; = p_werks.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here in WA_dyn contains some n number of fields,after this statement the value what ever saved in &amp;lt;fs&amp;gt; will be automatically saved in field 1 of structure &amp;lt;WA_DYN&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:08:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062915#M971176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062916#M971177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;This statement assigns the memory area specified using mem_area to the field symbol &amp;lt;fs&amp;gt;. You can assign a data object or a memory area calculated from the address of a data object. After the assignment, the field symbol refers to the assigned memory area and can be used in operand positions. When used in a statement, it behaves like a dereferenced data reference, meaning that the statement works with the content of the memory area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data type with which the assgigned memory area is treated, depends on the specifications in casting_spec. You can either execute an explicit casting or the field symbol takes on the data type of the data object specified in the assignment. A field symbol to which a memory area is assigned, has this data type after the assignment and behaves like a data object of this type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The assigned memory area mem_area must be at least as long as the data type specified in casting_spec and must have the same alignment. If the data type determined in casting_spec is deep, the deep components with their type and position must appear in the assigned memory area exactly like this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the specifications in range_spec to restrict the memory area that can be assigned to the field symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System Fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The return value is set only for the dynamic variants of mem_area. &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 Meaning &lt;/P&gt;&lt;P&gt;0 Assignment successful. &lt;/P&gt;&lt;P&gt;4 Assignment not successful. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After an unsuccessful dynamic assignment, the field symbol keeps its previous state. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Obsolete Form: ASSIGN LOCAL COPY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions &lt;/P&gt;&lt;P&gt;Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_ASSIGN_CAST_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field and the target type do not exactly match in offset and type in those components that are strings, tables, or references. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CASTING_ILLEGAL_CAST (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_ASSIGN_CAST_UNKNOWN_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: A type specified dynamically after CASTING is unknown. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CASTING_UNKNOWN_TYPE (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_ASSIGN_OUT_OF_RANGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The data object in addition RANGE does not contain the assigned data object. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_FIELD_NOT_IN_RANGE (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Non-Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The field symbol is structured and the assigned field is shorter than the structure. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_BASE_TOO_SHORT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The alignment for field f is too short for the type of the field symbol. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_BASE_WRONG_ALIGNMENT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For TYPE, you can specify only simple types. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_COMPLEX_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The source field is longer than 16 bytes and can, therefore, not be interpreted as a type P field. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_P_TOO_LARGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The alignment of field f is too short for the type specified at TYPE. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_WRONG_ALIGNMENT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The length of field f does not match the type specified in TYPE. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_WRONG_LENGTH &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type specified at TYPE is unknown. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_CAST_WRONG_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Only up to 14 decimal places are allowed. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_DECIMALS_TOO_HIGH &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Decimal places are allowed only for type P. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_DECIMALS_WRONG_TYPE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, a length of 0 was specified. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_LENGTH_0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, a length less than 0 was specified. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_LENGTH_NEGATIVE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, an offset less than 0 was specified. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET_NEGATIVE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: For field f, offset or length was specified and the data type of the assigning field does not allow partial access. (This is the case for data types I, F, and P.) &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET_NOTALLOWED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The offset specified for field f exceeds the range of the ABAP variable. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET_TOOLARGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: In the area addressed in the offset and length specifications for field f, deep components exist (data references, object references, strings, internal tables), which may not be overwritten. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFF+LENGTH_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Offset and length specified for field f exceed the range of the ABAP variable. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_OFFSET+LENGTH_TOOLARGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Field f is not a data reference. However, a data reference was expected. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_REFERENCE_EXPECTED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field and the target type do not match exactly in offset and type in those components that are strings, tables, or references. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_STRUCTURE_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: You cannot assign substrings to a field symbol. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_SUBSTRING_NOT_ALLOWED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The field symbol is typed and the type of the assigned field is incompatible to it. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_TYPE_CONFLICT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field contains strings, tables, or references. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_TYPE_ILLEGAL_CAST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The type of the source field is a structure and, under Unicode, not compatible to the target type. &lt;/P&gt;&lt;P&gt;Runtime Error: ASSIGN_UC_STRUCT_CONFLICT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this might be helpful.&lt;/P&gt;&lt;P&gt;reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;siri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:10:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062916#M971177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062917#M971178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nazmul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN mainly comes under the concept called Field-Symbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax goes something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ASSIGN COMPONENT idx  OF STRUCTURE struc TO &amp;lt;fs&amp;gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ASSIGN COMPONENT name OF STRUCTURE struc TO &amp;lt;fs&amp;gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Extras:&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;1. ... CASTING ... or &lt;/P&gt;&lt;P&gt;2. ... TYPE type &lt;/P&gt;&lt;P&gt;3. ... DECIMALS dec &lt;/P&gt;&lt;P&gt;4. ... RANGE r &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;STRONG&gt;Effect&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;If the field name or idx has the type C or is a substructure that does not contain an internal table, it is regarded as a component name, otherwise is is regarded as a component number. The corresponding component of the structured field struc is assigned to the field symbol &amp;lt;fs&amp;gt;. &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;Assignment successful. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;The system could not assign the field to the field symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If idx has the value 0, the entire structure is assigned to the field symbol. &lt;/P&gt;&lt;P&gt;Before Release 6.10, assigning structure components to field symbols was the only way of accessing components of formal parameters or field symbols if these were typed unstructured. Since Release 6.10, you can also specify componenents of unstructured typed field symbols and formal parameters. when specifying a data object dynamically. &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;STRONG&gt;Example&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROGRAM P1MAIN. 
  DATA: BEGIN OF STR, 
          A VALUE 'a', 
          B VALUE 'b', 
          C VALUE 'c', 
          D VALUE 'd', 
        END   OF STR, 
        CN(5) VALUE 'D'. 
  FIELD-SYMBOLS &amp;lt;FS&amp;gt; TYPE ANY. 
  DO 3 TIMES. 
    ASSIGN COMPONENT SY-INDEX OF 
           STRUCTURE STR TO &amp;lt;FS&amp;gt;. 
    IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT. ENDIF. 
    WRITE &amp;lt;FS&amp;gt;. 
  ENDDO. 
  ASSIGN COMPONENT CN OF STRUCTURE STR TO &amp;lt;FS&amp;gt;. 
  WRITE &amp;lt;FS&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; a b c d &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To need more information on this please refer the following link :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062917#M971178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062918#M971179</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;Plz refer to this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062918#M971179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: abap statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062919#M971180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;assign component &amp;lt;var&amp;gt; of structure &amp;lt;internaltable&amp;gt; to &amp;lt;field_label&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement will assign the field VALUE of the field &amp;lt;VAR&amp;gt; of structure &amp;lt;internal table&amp;gt; to field symbol variable &amp;lt;field_label&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before assigning similar to clear, you should unassign &amp;lt;field_label&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 06:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-statement/m-p/4062919#M971180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T06:33:10Z</dc:date>
    </item>
  </channel>
</rss>

