‎2016 Feb 12 8:42 AM
Hi,
first of all I'm sorry because probably this question has been answered in other threads but I don't find this.
I have this :
parameters: pidi like T002-spras obligatory default '1'.
but I would like to put a default value depending on sy-uname. If possible it would be something like this:
parameters: pidi like T002-spras obligatory if sy-uname eq 'usr1' default '1' elseif sy-uname eq 'usr2' default 'EN'.
Thanks in advantage.
Regards.
‎2016 Feb 12 8:58 AM
‎2016 Feb 15 8:02 AM
‎2016 Feb 15 1:49 PM
‎2016 Feb 16 8:25 AM
It could be another option.
But in my case, this abap code is for shipments and because most of the shipments are now for China it's necessary that the default language would be in Chinese.
Thansk Raymond.
‎2016 Feb 12 9:16 AM
Hi,
Sample Code:
parameters : pidi like T002-spras obligatory.
INITIALIZATION.
if sy-uname = 'usr1'."username1
pidi = 'DE'.
elseif sy-uname = 'usr2'."username2
pidi = 'EN'.
endif.
Regards,
Pallavi
‎2016 Feb 12 4:55 PM
And if sy-uname is not in that list?
PARAMETERS: pidi type sylangu obligatory default sy-langu.
Rob
‎2016 Feb 14 2:47 PM
Hi,
Of course in the else condition one may assign as:
else.
pidi = sy-spras." Or whatever language is required
endif.
Regards,
Pallavi