This post is in continuation with Modify Syntax for change list line part ONE and going through that will give more comfort in understanding the present post.
Addition 3
... FIELD VALUE f1 FROM g1 ... fn FROM gn
Effect
Overwrites the contents of the fields f1 , f2 , ... in the list line with the current contents of the fields g1 , g2 , ... (type conversion as for MOVE g1 , g2 , ... to type C). The field contents of f1 , f2 , ... themselves remain unchanged.
If a field (e.g. f2 ) is output several times in the line to be modified, only the first occurrence is modified.
If the field is not output in the line at all, it is ignored.
You can omit the addition FROM g2 if the field f2 in the list line is to be modified from the current contents of f2 .
This means that ... FIELD VALUE f2 has the same effect as ... FIELD VALUE f2 FROM f2 .The return code value of SY-SUBRC is not affected by the addition FIELD VALUE and so only depends on the existence of the selected list line.
Addition 4
... FIELD FORMAT f1 fmt11 ... fmt1m
... fn fmtn1 ... fmtnm
Effect
Modifies the output format of the field f1 according to the format specifications fmt11 ... fmt1m . Similar to f2 , ..., fn . For a list of valid format specifications, see FORMAT . Fields that occur several times or not at all in the line are treated as in the addition FIELD VALUE .
If you combine the additions LINE FORMAT and FIELD FORMAT , the format set by LINE FORMAT is always valid for the whole line initially. After wards, it is changed by the format specifications for the individual fields.
Example
DATA: FLAG VALUE 'X',
TEXT(20) VALUE 'Australia',
I TYPE I VALUE 7.
FORMAT INTENSIFIED OFF.
WRITE: / FLAG AS CHECKBOX, TEXT COLOR
COL_NEGATIVE.
AT LINE-SELECTION.
MODIFY CURRENT LINE
LINE FORMAT INTENSIFIED
FIELD VALUE FLAG FROM SPACE
FIELD FORMAT FLAG INPUT OFF
TEXT COLOR = I.
When the user selects the displayed list line by double-clicking, the checkbox for FLAG is reset and can no longer accept values. The format of the entire line is set to "intensified" and TEXT is
displayed in a different color. (97.4)
Syntax for modify data in internal table
Addition 3
... FIELD VALUE f1 FROM g1 ... fn FROM gn
Effect
Overwrites the contents of the fields f1 , f2 , ... in the list line with the current contents of the fields g1 , g2 , ... (type conversion as for MOVE g1 , g2 , ... to type C). The field contents of f1 , f2 , ... themselves remain unchanged.
If a field (e.g. f2 ) is output several times in the line to be modified, only the first occurrence is modified.
If the field is not output in the line at all, it is ignored.
You can omit the addition FROM g2 if the field f2 in the list line is to be modified from the current contents of f2 .
This means that ... FIELD VALUE f2 has the same effect as ... FIELD VALUE f2 FROM f2 .The return code value of SY-SUBRC is not affected by the addition FIELD VALUE and so only depends on the existence of the selected list line.
Addition 4
... FIELD FORMAT f1 fmt11 ... fmt1m
... fn fmtn1 ... fmtnm
Effect
Modifies the output format of the field f1 according to the format specifications fmt11 ... fmt1m . Similar to f2 , ..., fn . For a list of valid format specifications, see FORMAT . Fields that occur several times or not at all in the line are treated as in the addition FIELD VALUE .
If you combine the additions LINE FORMAT and FIELD FORMAT , the format set by LINE FORMAT is always valid for the whole line initially. After wards, it is changed by the format specifications for the individual fields.
Example
DATA: FLAG VALUE 'X',
TEXT(20) VALUE 'Australia',
I TYPE I VALUE 7.
FORMAT INTENSIFIED OFF.
WRITE: / FLAG AS CHECKBOX, TEXT COLOR
COL_NEGATIVE.
AT LINE-SELECTION.
MODIFY CURRENT LINE
LINE FORMAT INTENSIFIED
FIELD VALUE FLAG FROM SPACE
FIELD FORMAT FLAG INPUT OFF
TEXT COLOR = I.
When the user selects the displayed list line by double-clicking, the checkbox for FLAG is reset and can no longer accept values. The format of the entire line is set to "intensified" and TEXT is
displayed in a different color. (97.4)
SAP BW TOPICS
Activating business content in SAP part three
Syntax for modify data in internal table
ABAP TOPIC WISE COMPLETE COURSE
BDC OOPS ABAP ALE IDOC'S BADI BAPI Syntax Check
Interview Questions ALV Reports with sample code ABAP complete course
ABAP Dictionary SAP Scripts Script Controls Smart Forms
Work Flow Work Flow MM Work Flow SD Communication Interface
No comments:
Post a Comment