Checking the Selection Screen Parameters
Dear All,
We are uploading data from various excel sheets into SAP tables. Now at selection screen I just want to check if the location specified exists or not ie. if I have created one variant on one system & then if I am running that report from other system using the variants, since the files does not exists it should throw the error and should return to the selection screen to enter the new parameters.
Please help me in the code, I am attaching my code herewith.
Waiting for ur responses,
Nishu
*********************CODE***************************
tables: bseg, zfi_tbl_qty, t001, tgsb.
data:
t_excel like alsmex_tabline occurs 0 with header line,
l_excelfile(128) type c,
l_excelfile1(128) type c,
l_excelfile2(128) type c,
l_excelfile3(128) type c.
data: begin of t_bukrs_tmp occurs 0,
bukrs like t001-bukrs,
end of t_bukrs_tmp.
data: begin of t_gsber_tmp occurs 0,
gsber like tgsb-gsber,
end of t_gsber_tmp.
ranges: r_bukrs_tmp for t001-bukrs,
r_gsber_tmp for tgsb-gsber.
data: begin of t_type,
bukrs like bseg-bukrs,
gsber like bseg-gsber,
count type i,
end of t_type.
data: l_charlen1 type i,
l_charlen2 type i.
data: t_type2 like t_type occurs 0 with header line,
t_type2_tmp like t_type occurs 0 with header line.
data: l_end_row type i,
l_endrow1 type i,
l_count type i,
v_bukrs like bseg-bukrs.
data : q_count type i value 1,
v_flag type i value 0,
v_gsber like t_type2-gsber.
data: l_var type c.
selection-screen begin of block b1 with frame title text-001.
parameter : p_file1 type rlgrap-filename obligatory,
p_file2 type rlgrap-filename obligatory,
p_file3 type rlgrap-filename obligatory,
p_file4 type rlgrap-filename obligatory.
selection-screen end of block b1.
*perform updation_tbl.
*clearing the contents of database table before uploading a new file everytime
delete from zfi_tbl_qty.
*selection-screen
at selection-screen on value-request for p_file1.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file1
changing
file_name = p_file1.
at selection-screen on value-request for p_file2.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file2
changing
file_name = p_file2.
at selection-screen on value-request for p_file3.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file3
changing
file_name = p_file3.
at selection-screen on value-request for p_file4.
call function 'KD_GET_FILENAME_ON_F4'
exporting
field_name = p_file4
changing
file_name = p_file4.
at selection-screen.
l_excelfile = p_file1.
l_excelfile1 = p_file2.
l_excelfile2 = p_file3.
l_excelfile3 = p_file4.
if l_excelfile = l_excelfile1 or l_excelfile = l_excelfile2 or l_excelfile = l_excelfile3
or l_excelfile1 = l_excelfile2 or l_excelfile1 = l_excelfile3 or l_excelfile2 = l_excelfile3.
message e010(zn) with 'Files with the same name found Please enter again. '.
endif.
start-of-selection.
select bukrs
from t001
into corresponding fields of table t_bukrs_tmp.
loop at t_bukrs_tmp.
r_bukrs_tmp-sign = 'I'.
r_bukrs_tmp-option = 'EQ'.
r_bukrs_tmp-low = t_bukrs_tmp-bukrs.
append r_bukrs_tmp.
endloop.
select gsber
from tgsb
into corresponding fields of table t_gsber_tmp.
loop at t_gsber_tmp.
r_gsber_tmp-sign = 'I'.
r_gsber_tmp-option = 'EQ'.
r_gsber_tmp-low = t_gsber_tmp-gsber.
append r_gsber_tmp.
endloop.
perform upload_table using l_excelfile 5 2 6 4000.
perform upload_table using l_excelfile1 5 2 6 4000.
perform upload_table using l_excelfile2 5 2 6 4000.
perform upload_table using l_excelfile3 5 2 6 4000.
if sy-subrc = 0.
message i010(zn) with 'Files Uploaded Successfully.'.
if sy-subrc <> 0.
message e398(00) with 'Files Not Found'.
leave to screen 0.
endif.
************Calling the other program
SUBMIT ZFI_REP_IS_CHARGES_POST1.
*and return.
*******************Calling the subroutine.
form upload_table using filename
i_begin_col type i
i_begin_row type i
i_end_col type i
i_end_row type i.
clear : t_excel.
refresh : t_excel.
v_flag = v_flag + 1.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = filename
i_begin_col = 5
i_begin_row = 2
i_end_col = 6
i_end_row = 4000
tables
intern = t_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
case v_flag.
when '1'.
perform fill_int_tab.
when '2'.
perform fill_int_tab.
when '3'.
perform fill_int_tab.
when '4'.
perform fill_int_tab.
endcase.
endform. "upload_table
*uploading data from internal table into database table
*& Form fill_int_tab
text
--> p1 text
<-- p2 text
form fill_int_tab .
clear : t_type2, q_count.
refresh : t_type2.
describe table t_excel lines l_endrow1.
l_endrow1 = l_endrow1 / 2.
do.
loop at t_excel where row = q_count.
if t_excel-col = 1.
t_type2-gsber = t_excel-value.
elseif t_excel-col = 2.
t_type2-bukrs = t_excel-value.
endif.
endloop.
l_charlen1 = strlen( t_type2-bukrs ).
l_charlen2 = strlen( t_type2-gsber ).
if ( t_type2-bukrs <> ' ' and t_type2-gsber <> ' ' ).
if ( l_charlen1 = 4 and l_charlen2 = 4 ).
append t_type2. clear t_type2.
endif.
endif.
q_count = q_count + 1.
if q_count > l_endrow1.
exit.
endif.
enddo.
t_type2_tmp[] = t_type2[].
clear t_type2.
refresh t_type2.
loop at t_type2_tmp where bukrs in r_bukrs_tmp
and gsber in r_gsber_tmp.
move-corresponding t_type2_tmp to t_type2.
append t_type2.
endloop.
sort t_type2 by bukrs gsber.
loop at t_type2.
clear v_gsber.
l_count = l_count + 1 .
v_gsber = t_type2-gsber.
at end of gsber.
at end of bukrs.
zfi_tbl_qty-company_code = t_type2-bukrs.
zfi_tbl_qty-barea = v_gsber.
zfi_tbl_qty-comb = l_count.
if v_flag = 1.
zfi_tbl_qty-type = 'A'. " Item 1
endif.
if v_flag = 2.
zfi_tbl_qty-type = 'B'. " Item 2
endif.
if v_flag = 3.
zfi_tbl_qty-type = 'C'. " Item 3
endif.
if v_flag = 4.
zfi_tbl_qty-type = 'D'. " Item 4
endif.
insert zfi_tbl_qty from zfi_tbl_qty.
clear l_count.
endat.
endat.
endloop.
endform. " fill_int_tab
Hi,
After calling this FM:
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = filename
i_begin_col = 5
i_begin_row = 2
i_end_col = 6
i_end_row = 4000
tables
intern = t_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
*-> try following code:
if sy-subrc = '2'.
message 'File not Found' type 'I'.
leave list-processing.
endif.
Regards,
Kalyan
Similar Messages
-
Auto-populating the selection screen parameters for web report
hello
i am having a scenario where my web report is a link to another internet application (a BSP application) and it is called by clicking some link or button on the BSP page.
can i pass the selection values for BW Web report directly from BSP application through a query string or by setting some cookie values so that the user will directly view the report on click of that link?
Thanks in advance.
Regards
Rajeevwe can do this by adding a URL as the query-string with web template_id and with the selection screen parameters as key value pairs
-
Hi Developer,
i have issues that i need stop or restrict the same entries provided in the selection screen parameters it should no display that data but it should give an alert message by saying the data all ready viewed or displayed.
example: organisation :getha pvt.td.
name :ramesh.
start date:10.2.2013.
these are parameter which has been displayed by clicking execute ,if provide the same value to display again it should give waring message.
Please guide me in solve the problem.
thanks.
ravi.Hi Somendra,
Thanks for your response sir , i have provided the according to your provided information sir but it was not displaying the data first time also its giving message which i have provided ,my issues is if i provide data from time should display if i provide same data next time then only it should restrict the data and give a message.
example:
types:BEGIN OF str1,
ROOMNO type zROOMNO,
NAME TYPE zname3,
BRANCH type zBRANCH,
PHONENUMBER type zPHONENUMBER,
END OF str1.
data:it_str1 type TABLE OF str1,
wa_str1 type str1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
skip.
PARAMETERS:s_roomno type ZTABLE_2-roomno.
skip.
parameters:s_name type ztable_2-name.
skip.
PARAMETERS:s_branch type ztable_2-branch.
skip.
PARAMETERS:s_pho type ztable_2-phonenumber.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT roomno
name
branch
phonenumber from ztable_2 into TABLE it_str1
WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
READ TABLE it_str1 INTO wa_str1 with KEY roomno = s_roomno name = s_name branch = s_branch phonenumber = s_pho.
if sy-subrc eq 0.
MESSAGE 'THE DATA IS ALL READY VIEWED' TYPE 'E'.
RETURN.
ENDIF.
START-OF-SELECTION.
SELECT roomno
name
branch
phonenumber from ztable_2 into TABLE it_str1
WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
loop at it_str1 into wa_str1.
WRITE:/1 wa_str1-roomno,
10 wa_str1-name,
30 wa_str1-branch,
60 wa_str1-phonenumber.
ENDLOOP.
please guide me in solving the issue sir.
thanks,
Ravi -
ABAP Query Selection screen parameters
I need to add an additional selection screen parameter in existing ABAP Query. How to modify the selection screen fields in existing ABAP query ? Kindly help me.
Hi,
GO to info set transaction SQ02
Give the infoset
Press change
Press the selections button..Shift F7
In the right hand side you will get a table control to enter the selection screen parameters..
Press create button on top of the table control to create new parameters
Thanks,
Naren -
How to clear all selection screen parameters before calling transaction?
Hi Experts
I have a ABAP report that displays data using ALV.
When I double click a cell it calls transaction MB51. Before calling the transaction I need to set some parameters of the selection screen of the transaction.
My code is like below:
<UL>
<LI>FREE MEMORY ID 'MAT'. <I>"material</I>
<LI> FREE MEMORY ID 'WRK'. <I>"plant</I>
<LI> FREE MEMORY ID 'CHA'. <I>"batch</I>
<LI><I>* Get the selected ALV row data</I>
<LI>READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
<LI><I>* If link MB51 is clicked then open tcode MB51</I>
<LI> IF p_selfield-sel_tab_field+8(4) = 'MB51'.
<LI><I>* Pass material, plant to the corresponding tcode</I>
<LI> SET PARAMETER ID 'MAT' FIELD x_recon-matnr.
<LI> SET PARAMETER ID 'WRK' FIELD p_plant.
<LI> CALL TRANSACTION 'MB51' AND SKIP FIRST SCREEN.
</UL>
The problem is:
<UL> <LI> 1. First, I run the given transaction before running the report in a separate session with some set of values in the selection screen. For example: plant = AB01, Material = 990001 and Batch = 10001.</LI>
</UL>
<UL>
<LI> 2. Then in another session I run my report. In the report ALV I have selected a record where plant = AB01, Material = 990001 but Batch is blank. But it opens the transaction with plant = AB01, Material = 990001 and Batch = 10001.
Even though in my ALV record the batch is blank yet it uses the batch value from the memory. That is, the batch value that was given in the transaction earlier. Why it is not getting cleared? I have also used FREE MEMORY ID code in the beginning. But still it is not clearing the values in the memory.
</UL>
<UL>
<LI>What shall I do to clear all the selection screen parameters before calling the transaction?</LI>
</UL>
<UL>
<LI>
Thanks
Gopal
</LI>
</UL>
Edited by: gopalkrishna baliga on Aug 11, 2010 10:29 AMIts because sap memory is globally shared.
Do it like this.
READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
IF p_selfield-sel_tab_field+8(4) = 'MB51'.
perform bdc_dynpro using 'RM07DOCS' '1000'.
perform bdc_field using 'BDC_OKCODE' '=ONLI'.
perform bdc_field using 'MATNR-LOW' x_recon-matnr.
perform bdc_field using 'WERKS-LOW' p_plant.
perform bdc_field using 'CHARG-LOW' p_batch.
perform bdc_field using 'DATABASE' 'X'.
call transaction 'MB51' with i_bdcdata mode 'E'.
endif.
form bdc_dynpro using program dynpro.
clear la_bdcdata.
la_bdcdata-program = program.
la_bdcdata-dynpro = dynpro.
la_bdcdata-dynbegin = 'X'.
append la_bdcdata to i_bdcdata.
endform.
form bdc_field using fnam fval.
clear la_bdcdata.
la_bdcdata-fnam = fnam.
la_bdcdata-fval = fval.
append la_bdcdata to i_bdcdata.
endform. -
Reset selection screen parameters.
Hi,
I enter values in parameters on screen and generte output(add values to table/view report). After I return to originial screen, the fields should be reset to initial empty status.
How do I do that.
Thanks
PraveenHi,
U Clear the Selection Screen Parameters in At Selection Screen event, before clearing the value pass the Parameter value to some global variable for further use.
eg:
PARAMETERS : p_matnr TYPE matnr.
DATA : gv_matnr TYPE matnr.
AT SELECTION-SCREEN.
gv_matnr = p_matnr. "Passing the P_matnr value to global variable gv_matnr
CLEAR : p_matnr.
START-OF-SELECTION.
WRITE : gv_matnr.
Hope it helps!!
Rgds,
Pavan -
How to get a check box on the selection screen
Hi all
can any body tell me how to get a check box on the selection screenparameter: pa_check as checkbox.
To define the input field of a parameter as a checkbox, you use the following syntax:
PARAMETERS <p> ...... AS CHECKBOX ......
Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
REPORT DEMO.
PARAMETERS: A AS CHECKBOX,
B AS CHECKBOX DEFAULT 'X'. -
Too many Parameters in the Selection Screen
Hi all,
I have a requirement to include too many parameters in the selection screen. Let me explain the scenario.
1. There is an option for Output File name previously. But now i need to provide fields for 5 to 8 file names in the same Selection Screen.
2. There will be 8 more check boxes coming to the selection screen. Could you please provide me the best & Optimal way to incorporate them in the same selection screen.
Already the screen is overcrowded with many fields & What need is that 'Is there any option to utilise the Screen at most without using Tab Strip?'
Pleas Help me in this crucial regard.
Thanks & Best Regards,
VishnuHi,
Use the below logic.
selection-screen: begin of block blk1 with frame.
selection-screen: begin of line.
parameters: p_chk1 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm1.
selection-screen position 10.
parameters: p_file1 like rlgrap-filename.
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_chk2 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm2.
selection-screen position 10.
parameters: p_file2 like rlgrap-filename.
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_chk3 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm3.
selection-screen position 10.
parameters: p_file3 like rlgrap-filename.
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_chk4 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm4.
selection-screen position 10.
parameters: p_file4 like rlgrap-filename.
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_chk5 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm5.
selection-screen position 10.
parameters: p_file5 like rlgrap-filename.
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_chk6 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm6.
selection-screen position 10.
parameters: p_file6 like rlgrap-filename.
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_chk7 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm7.
selection-screen position 10.
parameters: p_file7 like rlgrap-filename.
selection-screen: end of line.
selection-screen: begin of line.
parameters: p_chk8 as checkbox.
SELECTION-SCREEN COMMENT 4(5) comm8.
selection-screen position 10.
parameters: p_file8 like rlgrap-filename.
selection-screen: end of line.
selection-screen: end of block blk1.
initialization.
comm1 = 'File1'.
comm2 = 'File2'.
comm3 = 'File3'.
comm4 = 'File4'.
comm5 = 'File5'.
comm6 = 'File6'.
comm7 = 'File7'.
comm8 = 'File8'. -
Adding Standard Text to the Selection Screen obtained using PARAMETERS
Hi all,
I have a report program which has the selection screen declared by the key word PARAMETERS.
Now I need to make the changes to this program such that a Text Editor appears on the Selection Screen and has a Standard text that should be displayed.
How can I do it?
I saw the screen number of the Selection Screen and went to screen painter and tried to add the Text Editot..but it did not let me dou2026.Why?
How should I add a standard text to a selection screen? The standard text should not be on top , but some where on the screen.
Regards,
Jessica SamHi Sam,
I dont want to create a new screen for this. On the existing screen whihc was built using PARAMETERS key word..i should insert a blokc of text whihc is mpre than 5-6 lines..how should i do it.
I navigated to Text Elements---->Selection Texts
it is now asking for Name and Text and i see in Name column the name of the parametsr that they used for Check box, radio button etc and in Text i see the text that is appearing on the screen
Now i am not sure what is should do next
My req is..i should display a block of standard text that doesnt change and whihc is of 4-6 lines?
how should i do it?
please also help me with what data declartions that i should do in parametrs key word in program?
Regards,
Jessica Sam -
Handling Check Boxes in the selection screen
Hi All,
I have defined 3 Check Boxes in the selection screen and one box will be ticked as 'X" by default.
I need to put restriction so that only any one should be selected as 'X' whenever user wish to select.
Hence any time, when user selects a box, other two should be unchecked.
How to put this kind of control?
Regards
PavanI think you should go for 'Radiobutton'
But if U want check box then
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF cb_option1 = 'X'.
CLEAR cb_option2.
MODIFY SCREEN.
ELSEIF cb_option2 = 'X'.
CLEAR cb_option1.
MODIFY SCREEN.
ENDIF.
ENDLOOP. -
How to remove the underline in the parameters in the selection screen?
how to remove the underline from the parameters in the selection screen?
i came through the comment statements in the forum is there any other ways like setting some fields in the declarattion of the parameter itself?
like
parameter:p1 type string .......?I dont think there is an alternative to removing the underlines other than to go for COMMENT. In the selection texts (of text elements) we can just give the parameter name or take the standard text from dictionary, but theres no option to remove the underlines.
SELECTION-SCREEN BEGIN OF BLOCK rbg WITH FRAME TITLE tit.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-001 MODIF ID sc1.
PARAMETERS:
p_param TYPE vbak-vbeln.
SELECTION-SCREEN END OF LINE.
PARAMETERS:
p_posnr TYPE vbap-posnr.
SELECTION-SCREEN END OF BLOCK rbg. -
Dynamic Parameters in the Selection screen
Hi,
I want to have a pair of Parameters (Source & Target Field) in the Selection Screen. Is it possible to create more pairs of Parameters by click of a Button or something else?
Sinanhi,
Dynamic generation of selection-screen is bit confusing.
I have a sample program which takes an integer as an input. After giving input, click on the button on selection screen. You can make a similar logic in your case also.
Create a program with name 'Z_13317_DYN_CHKBOX' and paste the following code in it. Also make ensure that an include with name 'Z_13317_DYN_INCL' is not existing earlier because this program will be overwritten each and everytime.
Suppose, if you have given 3 as input and if you have clicked the button, then 3 checkboxes will be generated on your selection screen.
REPORT Z_13317_DYN_CHKBOX.
types :begin of t_itab1,
line(72),
end of t_itab1.
data: incl type table of t_itab1 with header line.
parameters: p_tab type i,
p_frst type c no-display.
selection-screen begin of line.
selection-screen: pushbutton 2(20) but1 user-command cli1.
selection-screen end of line.
include z_13317_dyn_incl if found.
initialization.
at selection-screen output.
if p_frst = ' '.
p_frst = 'X'.
perform crt_dyn_incl.
endif.
at selection-screen.
case sy-ucomm.
when 'CLI1'.
perform crt_dyn_incl.
endcase.
*& Form crt_dyn_incl
* text
form crt_dyn_incl .
perform populate_incl.
perform del_incl.
insert report 'Z_13317_DYN_INCL' from incl.
commit work.
submit z_13317_dyn_chkbox via selection-screen with p_frst = p_frst.
endform. " crt_dyn_incl
*& Form del_incl
* text
form del_incl .
call function 'RS_DELETE_PROGRAM'
exporting
program = 'Z_13317_DYN_INCL'
suppress_checks = 'X'
suppress_popup = 'X'
with_cua = ' '
with_documentation = ' '
with_dynpro = 'X'
with_includes = ' '
with_textpool = ' '
with_variants = ' '
if sy-subrc <> 0.
endif.
endform. " del_incl
*& Form populate_incl
* text
form populate_incl .
data: v_cnt type n.
do p_tab times.
v_cnt = v_cnt + 1.
incl-line = 'parameters: '.
concatenate incl-line 'p_chk' v_cnt into incl-line.
concatenate incl-line 'as checkbox.' into incl-line separated by space.
append incl.
clear incl.
enddo.
endform. " populate_incl
Regards
Sailaja. -
Check the file extension in the selection screen
hi,
in the selection screen i am giving a file path. the file should be of type PDF only.
how to validate it ?
i am splitting the file path at "." and checking for the last three letters , if it pdf or not.
but it is throwing error for pdf format also.
throw some light on it and let me know.
thanks and regards.
sukihi,
You need to pass only COMPLETE_FILENAME
say C:\ABC\A\ABC.TXT
data : v_filename type PCFILE-PATH.
v_filename = "C:\ABC\A\ABC.TXT".
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
COMPLETE_FILENAME = v_FILENAME
IMPORTING
DRIVE = v_DRIVE
EXTENSION = v_EXTENSION
NAME = v_name
NAME_WITH_EXT = v_namewithtxt
PATH = PATH_VALUE
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5.
you will get the output as
DRIVE C
EXTENSION TXT
NAME ABC
NAME_WITH_EXT ABC.TXT
PATH \ABC\A\
Hope this helps.
Regards,
Richa -
Issuing of remuneraton statement on the checking of selection screen field
Hi Experts ,
Verify the field XYZ in the selection screen.
- If the field is not checked, the remunerations statements should be issued in this sequence order:
u2022 PA code
u2022 PSA code
u2022 Cost Center code (KOSTL)
u2022 Employee number (PERNR
please help to write code for the above requirement .
thanks
Harishsolved
-
Problem with checkbox in the selection screen
Hi guys,
I have a problem with the check box in the selection screen.When i select a check box then a field in the selection screen should be enabled for entering a value.Again if i unselect the checkbox then the field should be disabled for entering a value.I have written the code in at selection-screen output.
The problem is when i select the check box ,the field is not enabled.But when i press enter after selecting the checkbox then the field is enabled for input.It is the same when i unselect the checkbox,after i press enter only the field is getting disabled.What could be the problem.Any suggestions please?
Thanks.Hi d p
Please try this code . I think this code have some way that you would like.
REPORT zdownload_to_application_server.
TABLES : caufvd, jest.
I N C L U D E P R O G R A M *
*INCLUDE znrpstnd.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
PARAMETERS: p_outb RADIOBUTTON GROUP g1 USER-COMMAND outb DEFAULT 'X' ,
p_inb RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETERS : p_werks LIKE caufvd-werks MODIF ID a. " Plant "OBLIGATORY
SELECT-OPTIONS : s_auart FOR caufvd-auart MODIF ID a, " Order Type
s_aufnr FOR caufvd-aufnr MODIF ID a. " Order number
PARAMETERS: p_path TYPE string DEFAULT 'C:\SchedulerInterface-OutboundTextFile\' MODIF ID a,
p_actual AS CHECKBOX MODIF ID a. " Transfer Actual
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETERS : p_werks2 LIKE caufvd-werks MODIF ID b, " Plant "OBLIGATORY
p_path2 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
p_path3 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
p_sessio TYPE apqi-groupid MODIF ID b. " BDC Session
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
IF p_outb EQ 'X'. " Outbound --> Hide inbound
LOOP AT SCREEN.
"IF screen-name = '%BT02011_BLOCK_1000'.
IF screen-group2 = 'BLK'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'A'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'B'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
"IF screen-name = '%BT01004_BLOCK_1000'.
IF screen-group3 = 'BLK'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'A'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'B'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path2.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = 'C:\SchedulerInterface-InboundTextFile\'
mask = ',Text Files,.txt,All files,.*.'
IMPORTING
filename = p_path2
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path3.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = 'C:\SchedulerInterface-InboundTextFile\'
mask = ',Text Files,.txt,All files,.*.'
IMPORTING
filename = p_path3
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
TOP-OF-PAGE.
START-OF-SELECTION.
Regards
Wiboon
Maybe you are looking for
-
Hi All If we assign wrong Account group in FS00 is there any impact in SAP . Thanks, Hani
-
Structure won't let me add characteristics
Hi, I have 2 structures in a query but now when I try to add some particular restricted key figures it refuses to accept them? What could be the problem? Thanks
-
Hi, can anyone advise why some item category cannot be saved once the SO is saved? E.g Make to Order scenario. Is there a way to make this item category editable even after SO has been saved before? Thanks Peter
-
Weekly Kernel Panic on brand new MacbookPro. Help!
I bought a new Macbook Pro a month ago. Every single week I get a Kernel Panic. Once I was surfing the Internet, another time I was writing a document with Word, and the last I was using Logic Pro. I have no idea what can be causing it but I read tha
-
Center a panel in another panel
Good day: I am trying to center align (horizontal & vertical centering) a panel in another panel. How would I go about doing this? I have tried a few different layout managers, but they have not produced the results I am looking for. The parent panel