2008 Apr 03 11:21 AM
Hi,
i have one requirement
on selection screen 2 radio button
1 for service
2 for account
Parameter FILE LOCALFILE Filename
If the radiobutton ACCOUNT is selected the default name for file will be:
Rev_acc_com_&system_time_stamp&.dat
Elseif the radiobutton SERVICE is selected the default name for file will be:
Rev_srv_com_&system_time_stamp&.dat
some body can give the logic for this.
2008 Apr 03 11:32 AM
This works
parameters:
rb1 radiobutton group rb1 default 'X' USER-COMMAND sel,
rb2 radiobutton group rb1,
zfile LIKE rlgrap-filename.
*____________________________________________ Screen Actions
AT SELECTION-SCREEN OUTPUT.
if rb1 = 'X'.
concatenate 'File Name 1_' sy-datum into zfile.
else.
concatenate 'File Name 2_' sy-datum into zfile.
endif.
2008 Apr 03 11:28 AM
Hi,
You write the code like this in initialization.
initialization.
if rad1 = 1. "service
write code for file name = Rev_srv_com_&system_time_stamp&.dat
elseif rad1 = 2. "account
write code for file name = Rev_acc_com_&system_time_stamp&.dat
endif.
Reward.
2008 Apr 03 11:29 AM
take the following solution
data: tstamp type TZNTSTMPS.
data: filename type string.
call function 'CONVERT_INTO_TIMESTAMP'
exporting
I_DATLO = sy-datum
I_TIMLO = sy-uzeit
importing
E_TIMESTAMP = tstamp.
if ACCOUNT is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
else if SERVICE is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
the filename variable will be containing ur required file name..
reward points if useful....
2008 Apr 03 11:30 AM
Hi,
try this code.
TABLES:sscrfields.
PARAMETER:service RADIOBUTTON GROUP rad default 'X',
account RADIOBUTTON GROUP rad.
PARAMETER FILE TYPE string.
AT SELECTION-SCREEN OUTPUT.
CASE 'X'.
WHEN account.
file = 'Rev_acc_com_&system_time_stamp&.dat'.
WHEN service.
file = 'Rev_srv_com_&system_time_stamp&.dat'.
ENDCASE.
rgds,
bharat.
2008 Apr 03 11:32 AM
This works
parameters:
rb1 radiobutton group rb1 default 'X' USER-COMMAND sel,
rb2 radiobutton group rb1,
zfile LIKE rlgrap-filename.
*____________________________________________ Screen Actions
AT SELECTION-SCREEN OUTPUT.
if rb1 = 'X'.
concatenate 'File Name 1_' sy-datum into zfile.
else.
concatenate 'File Name 2_' sy-datum into zfile.
endif.
2008 Apr 03 11:33 AM
Hi Jamshad,
Try with codes.
SELECTION-SCREEN BEGIN OF BLOCK B1 .
PARAMETERS: ACCOUNT RADIOBUTTON GROUP RAD1 DEFAULT ' Rev_acc_com_&system_time_stamp&.dat ' ,
service RADIOBUTTON GROUP RAD1 default 'service',
SELECTION-SCREEN END OF BLOCK B1.
if ACCOUNT = ' X '.
write your logic to process
elseif service = 'X'.
write
endif.
athanks ,
Manas
2008 Apr 03 11:34 AM
hi,
selection-screen begin of block b1 with frame title text-001.
selection-screen begin of line.
parameters : rb1 radiobutton group g1 default 'X'.
selection-screen end of line.
parameters : p_file like rlgrap-filename default 'c:\test'.
selection-screen end of block b2.
selection-screen begin of line.
parameters : rb2 radiobutton group g1.
selection-screen end of line.
parameters : p_file like rlgrap-filename default 'c:\test'.
selection-screen end of block b1.
reward if helpful,
N.Rekha
2008 Apr 03 1:14 PM
If not p_account is initial.
then u give your default name here
endif.
if not p_service is initial.
here give its respective condition.
endif.
Thanks