‎2011 Jan 07 5:09 AM
Hello friends,
I have written a code to convert internal table into XML and i have provided an option to Download it.
1. Once they download , the invoice no and date should store in a newly created table.
2. If they try to download it again it should show an error like "This has been Downloaded".
How to update by using reports.
Please someone help me on this.
Regards,
Vijay Vikram
‎2011 Jan 07 5:58 AM
Hi Naidu
Find whether Download is successfull or not. Using SY-SUBRC.
if it is success then check whether the values are already inserted there in the table by select statement
Ex: select single Inv_No from table where INV_No = INV_No.
if sy-subrc = 0.
message 'already inserted' type 'S'.
else.
insert required fieds into the table using INSERT statement.
endif.
with Regards,
Murthy
‎2011 Jan 07 5:58 AM
Hi Naidu
Find whether Download is successfull or not. Using SY-SUBRC.
if it is success then check whether the values are already inserted there in the table by select statement
Ex: select single Inv_No from table where INV_No = INV_No.
if sy-subrc = 0.
message 'already inserted' type 'S'.
else.
insert required fieds into the table using INSERT statement.
endif.
with Regards,
Murthy
‎2011 Jan 07 6:17 AM
Thanx Murty,
suppose if they have downloaded it ten days before then there should be an indication for them no...
Then how to provide an indication????
regards Vijay
‎2011 Jan 07 6:17 AM
Hi Naidu,
Hope you have created a database table ('Z') to maintain the downloaded invoice number and date.
If then you can update the invoice number and date to that table when download was successful, if sy-subrc equals 0. If again user prompts to download the invoice number should be same. So you can write a select query to find whether the same invoice exists or not. if it finds the you can show the error message.
select inv_no from zdown where inv_no = lv_inv_no.
if sy-subrc <> 0.
call function 'GUI_DOWNLOAD'
....
if sy-subrc <>0.
message e...
else.
update table zdown ...
else.
message e...
endif.
‎2011 Jan 07 6:26 AM
@pnkarthi Thank you Very Much, Thats a Very helpful answer.
I need to give them an indicator to show them that its downloaded like checkbox someting...
Regards,
Vijay Vikram