ASSIGN COMPONENT <comp> OF STRUCTURE TO <FS>.系统将字符 串 的组件 <comp> 分配给字段 符号 <FS>。 可以指定 <comp> 为文字或变 量。如果 <comp> 属于类型 C 或字段串( 象组件一样 没有内表) ,它指定组 件的名称。 如果 <comp> 有任何其它 基本数据类 型,将被转 化为类型 ...
<F2>, <F3>. ASSIGN LINE TO <F1>. ASSIGN COMP TO <F2>. DO 3 TIMES. ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>. WRITE <F3>. ENDDO. ASSIGN COMPONENT <F2>
abap 动态指针理解加深ASSIGN COMPONENT "ASSIGN COMPONENT 运用 REPORT AA. TABLES:ZTFI029. TYPES:BEGIN OF ZTFI029, MANDT TYPE STRING, KUNRG TYPE STRING, MATNR TYPE STRING, CHARG TYPE STRING, Z_CPMC TYPE STRING, Z_GGXH TYPE STRING, Z_MEINS TYPE STRING, END OF ZTFI029. TYPES:BEGIN OF TY...
ASSIGN (ABAP Keyword) introduction & details ASSIGN Variants 1. ASSIGN f TO . 2. ASSIGN (f) TO. 3. ASSIGN TABLE FIELD (f) TO. 4. ASSIGN LOCAL COPY OF MAIN TABLE FIELD (f) TO. 5. ASSIGN COMPONENT idx OF STRUCTURE rec TO.
If comp is of type i, its value is interpreted as the position of the component in the structure. If the value of comp is 0, the memory area of the entire structure is assigned to the field symbol. If comp has a different type, a syntax error or runtime error occurs. Example...
type-pools ABAP . DATA: BEGIN OF LINE, COL1 TYPE I VALUE '11', COL2 TYPE I VALUE '22', COL3 TYPE I VALUE '33', END OF LINE. DATA COMP(5) VALUE 'COL3'. FIELD-SYMBOLS: <F1>, <F2>, <F3>. ASSIGN LINE TO <F1>. ASSIGN COMP TO <F2>. DO 3 TIMES. ASSIGN COMPONENT SY-...
ASSIGN COMPONENT 'ZSALEORD' OF STRUCTURE <fs1> TO <zsord>.ASSIGN COMPONENT 'ZCURR' OF STRUCTURE <fs2> TO <zCURR>. * I got the value in <ZSORD> as 73737 but I am trying to change it.Here I am getting dump<zsord> = '12323'. * I got the value in <ZCURR> as INR but I ...
The second implementation uses RTTI. A down cast of the type description object to the class CL_ABAP_STRUCTDESCR for the passed data object ensures that the object is a structure. A loop across the component table COMPONENTS assigns the components to the field symbol. METHOD meth. ...
SAP Managed Tags: ABAP Development Try something like this: LOOP AT ITAB. ASSIGN COMPONENT 'PROJ' OF STRUCTURE <F_HEAD> TO <F_FLD>. <F_FLD> = ITAB-PROJ. ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <F_HEAD> TO <F_FLD>. <F_FLD> = ITAB-KUNNR. ASSIGN COMPONENT ITAB-OPT OF STRUCTU...
SAP Managed Tags: ABAP Development Hi Sowjanya.. Try this. ASSIGN COMPONENT c_ordno OF STRUCTURE <wa_data> TO <l_field>. IF sy-subrc EQ 0. <l_field> = assign some value. ENDIF. where c_ordno is the field name. Best Regards, Pradeep. Reply Former Member 2009 Mar 27 3:35...