2006 Oct 05 3:08 PM
I have one simple problem.
TYPES: BEGIN OF t_account,
acc_no LIKE zztaccountheader-acc_no,
cust_id LIKE zztaccountheader-cust_id,
acc_type LIKE zztaccountheader-acc_type,
od_option LIKE zztaccountheader-od_option,
od_limit LIKE zztaccountheader-od_limit,
od_issue_date LIKE zztaccountheader-od_issue_date,
END OF t_account.
data: lwa_account TYPE t_account,
li_account TYPE STANDARD TABLE OF t_account,
bu scerrin i am inputing data :
i want modify updare or insert record into ztable by work area i put following thing
MOVE : zztaccountheader-acc_no TO lwa_account-acc_no,
zztcustomer-cust_id TO lwa_account-cust_id,
zztaccountheader-acc_type TO lwa_account-acc_type,
zztaccountheader-od_option TO lwa_account-od_option,
zztaccountheader-od_limit TO lwa_account-od_limit,
zztaccountheader-od_issue_date TO lwa_account-od_issue_date.
INSERT zztaccountheader CLIENT SPECIFIED FROM lwa_account .
CLEAR lwa_account.
ENDIF.
i am etting error
The type of the database table and work area (or internal table)
"LWA_ACCOUNT" are not Unicode convertible.
please solve it
2006 Oct 05 3:11 PM
Why cant you try out the MODIFY statement instead?
MODIFY ITAB FROM wa
2006 Oct 05 3:11 PM
Hi,
The work area should be the same type as the table into which you need to update it.
for this just do the following changes
<b>lwa_account TYPE zztaccountheader,</b>
<b>INSERT zztaccountheader CLIENT SPECIFIED FROM lwa_account .</b>
This should solve your problem
2006 Oct 05 3:12 PM
when you use insert statement to update database table both the structures should be different
TYPES: BEGIN OF t_account.
INCLUDE STRUCTURE zztaccountheader.
TYPES: END OF t_account.
data: lwa_account TYPE t_account.
2006 Oct 05 3:12 PM
hi,
decalre like this.
tables : zztaccountheader.
data : t_account like zztaccountheader occurs 0 with header line.
data: lwa_account TYPE t_account,
li_account TYPE STANDARD TABLE OF t_account,
MOVE : zztaccountheader-acc_no TO lwa_account-acc_no,
zztcustomer-cust_id TO lwa_account-cust_id,
zztaccountheader-acc_type TO lwa_account-acc_type,
zztaccountheader-od_option TO lwa_account-od_option,
zztaccountheader-od_limit TO lwa_account-od_limit,
zztaccountheader-od_issue_date TO lwa_account-od_issue_date.
INSERT zztaccountheader CLIENT SPECIFIED FROM lwa_account .
CLEAR lwa_account.
ENDIF.
rgss
anver
if hlped mark points
2006 Oct 05 3:16 PM
HI,
You have to put all data into your internal table from your workarea and then you have to apply modify command.
MOVE : '1'o TO lwa_account-acc_no,
'aaa' TO lwa_account-cust_id,
'abc' TO lwa_account-acc_type,
'Yes' TO lwa_account-od_option,
'10000' TO lwa_account-od_limit,
'01012006' TO lwa_account-od_issue_date.
append lwa_account to li_account
CLEAR lwa_account.
modify zztaccountheader from table li_account.
regards,
Raghav