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

Control Excel options from SAP

0 Likes
541

Hi Experts,

In excel I want to add the expiry date from ABAP code.

I am generating the excel and at the time of generation I want it to restrict to some people which I am able to do

using function ADD of excel--> permission

In the F1 of function ADD it is mentioned that we can pass 3 variables

--> Email

--> permission type

--> expiration date

I tried various format of date but this is not working.

When i call the bewlo mentioned code, I am able to add the user restriction

CALL METHOD OF w_permission 'Add' = w_usrperm

EXPORTING

#1 = email

#2 = 1.

when i try to use the 3rd parameter, it fails and doesn't even add the user restriction.

CALL METHOD OF w_permission 'Add' = w_usrperm

EXPORTING

#1 = email

#2 = 1

#3 = sy-datum.

can you help me on this.

Regards,

Yadesh

2 REPLIES 2
Read only

franois_henrotte
Active Contributor
0 Likes
507

try to pass the date with the following format:

write sy-datum to lv_datum DD/MM/YYYY.

(change the format DD/MM/YYYY according to your regional settings)

if it doesnt work then try

concatentate '#' lv_datum '#' into lv_value.

in Excel some date values must be specified with # around... but I'm not sure if it is the case for you

Read only

0 Likes
507

I have already tried this, but this haven't solved the issue.