‎2007 May 08 2:51 PM
Hi
DATA: BEGIN OF wa_file,
matnr(15) TYPE c,
v1 TYPE c VALUE ',',
maktx(30) TYPE c,
v2 TYPE c VALUE ',',
v3(15) TYPE c VALUE '""',
END OF wa_file.
is correct this type of declaration with assignments?
thanks
‎2007 May 10 9:07 AM
Ok. thanks.
However, these values inserted are cancelled by a clear wa_file.
Is there a command that blocks these values inserted in the declarations(as constants for example)?
‎2007 May 08 2:54 PM
yes it looks ok , did u get any problem
REPORT ABC.
DATA: BEGIN OF WA_FILE,
MATNR(15) TYPE C,
V1 TYPE C VALUE ',',
MAKTX(30) TYPE C,
V2 TYPE C VALUE ',',
V3(15) TYPE C VALUE '""',
END OF WA_FILE.
WRITE : WA_FILE-V1.
‎2007 May 08 2:54 PM
‎2007 May 08 2:56 PM
the declaration is perfect...
u can go ahead writing ur additional code.
‎2007 May 08 2:56 PM
Hi Tony,
Use <b>TYPES</b> in place of <b>data</b> in declaration.
Refer this code :
Types: BEGIN OF wa_file,
matnr(15) TYPE c,
v1 TYPE c VALUE ',',
maktx(30) TYPE c,
v2 TYPE c VALUE ',',
v3(15) TYPE c VALUE '""',
END OF wa_file.
Reward points if helpful.
Regards,
Hemant
‎2007 May 08 2:56 PM
Hi Tony,
ya, Its Correct. You can Simplify your code like,
data : Begin of wa_file,
matnr(15), -
> System knows that its a type c.
v1 type c value ' ',
maktx(30),
v2 TYPE c VALUE ' ',
v3(15) TYPE c VALUE ' ',
end of wa_file.
Thanks.
Reward if Helpful.
‎2007 May 10 9:07 AM
Ok. thanks.
However, these values inserted are cancelled by a clear wa_file.
Is there a command that blocks these values inserted in the declarations(as constants for example)?
‎2007 May 10 9:27 AM
you can use a temporary workarea and use that
data : wa_file_temp type wa_file.
move-corresponding wa_file to wa_file_temp.
then use wa_file_temp for calculation purposes and u can use
CLEAR wa_file_temp.