Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table updation using reports.

Former Member
0 Likes
584

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
551

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

4 REPLIES 4
Read only

Former Member
0 Likes
552

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

Read only

0 Likes
551

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

Read only

Former Member
0 Likes
551

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.

Read only

0 Likes
551

@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