‎2007 Jun 11 4:16 PM
hi friends, my requirement is:
types : begin of t_nonbonus,
sign type setleaf-valsign,
option type setleaf-valoption,
low type setleaf-valfrom,
high type setleaf-valto,
end of t_nonbonus.
DATA: nonbonus TYPE STANDARD TABLE OF t_nonbonus,
wa_nonbonus type t_nonbonus.
select * from setleaf into table nonbonus
where setname = 'znon_bonus'.
nonbonus-sign = setleaf-valsign .
nonbonus-option = setleaf-valoption.
nonbonus-low = setleaf-valfrom.
nonbonus-high = setleaf-valto.
append wa_nonbonus to nonbonus.
endselect.
When i ran the above code, it gave the following error
ERROR:
1)The work area "NONBONUS" is not long enough . .
2)Field "VALSIGN" is unknown. It is neither in one of the specified
tables nor defined by a "DATA" statement . . . . . . . . . .
3) For the statement "ENDSELECT",
there is no open structure introduced by SELECT.
can some one help plz.
‎2007 Jun 11 4:19 PM
Hello Saritha,
Use like this
select * from setleaf into corresponding fields of table nonbonus " Check here
where setname = 'znon_bonus'.
nonbonus-sign = setleaf-valsign .
nonbonus-option = setleaf-valoption.
nonbonus-low = setleaf-valfrom.
nonbonus-high = setleaf-valto.
append wa_nonbonus to nonbonus.
*endselect. " reomuve endselect.
Vasanth
‎2007 Jun 11 4:18 PM
Hi,
Please try this.
types : begin of t_nonbonus,
sign type setleaf-valsign,
option type setleaf-valoption,
low type setleaf-valfrom,
high type setleaf-valto,
end of t_nonbonus.
DATA: nonbonus TYPE STANDARD TABLE OF t_nonbonus,
wa_nonbonus type t_nonbonus.
select * from setleaf
into corresponding fields of table nonbonus
where setname = 'znon_bonus'.
nonbonus-sign = setleaf-valsign .
nonbonus-option = setleaf-valoption.
nonbonus-low = setleaf-valfrom.
nonbonus-high = setleaf-valto.
Regards,
Ferry Lianto
‎2007 Jun 11 4:19 PM
Hello Saritha,
Use like this
select * from setleaf into corresponding fields of table nonbonus " Check here
where setname = 'znon_bonus'.
nonbonus-sign = setleaf-valsign .
nonbonus-option = setleaf-valoption.
nonbonus-low = setleaf-valfrom.
nonbonus-high = setleaf-valto.
append wa_nonbonus to nonbonus.
*endselect. " reomuve endselect.
Vasanth
‎2007 Jun 11 4:21 PM
Hi
1. select * from setleaf into table nonbonus - <b>Instead of * use the fields which u have declared while creating the table or use Corresponding fields of.</b>
3. Remove ENDSELECT.
Regards
Haritha.
‎2007 Jun 11 4:32 PM
thank you friends,
now its not showing errors.
so we do not need those lines of assigning values and append stmt when we use into table. right?
thanks once again.