Check for entries on the selection screen
if one of the select options is obligatory with no default value then the radio buttons does not work. Can anybody please let me know why. it is the same if i dont make the field obligatory but write code in at selection-screen on block with a error message.
REPORT ZSELECT1 .
tables : ekko.
data: group_id(3) type c.
SELECTION-SCREEN BEGIN OF BLOCK MAIN WITH FRAME TITLE TEXT-001.
PARAMETERS: p_out RADIOBUTTON GROUP RADI DEFAULT 'X' USER-COMMAND
CHECK,
p_file RADIOBUTTON GROUP RADI.
SELECTION-SCREEN END OF BLOCK MAIN.
SELECTION-SCREEN BEGIN OF BLOCK output WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: so_ekgrp FOR EKKO-EKGRP obligatory MODIF ID OUT,
so_ekorg FOR EKKO-EKORG MODIF ID OUT.
SELECTION-SCREEN END OF BLOCK OUTPUT.
SELECTION-SCREEN BEGIN OF BLOCK UPLOAD WITH FRAME TITLE TEXT-003.
PARAMETERS: p_pcfile LIKE rlgrap-filename MODIF ID UPL,
p_dismod(1) TYPE c DEFAULT 'N' MODIF ID UPL.
SELECTION-SCREEN END OF BLOCK UPLOAD.
AT SELECTION-SCREEN OUTPUT.
CASE 'X'.
WHEN P_OUT. GROUP_ID = 'UPL'.
WHEN P_file. GROUP_ID = 'OUT'.
ENDCASE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = GROUP_ID.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
You cannot have it as mandatory. Instead, you can write the validations in START-OF-SELECTION. Here is the modified code.
REPORT ZSELECT1 .
tables : ekko.
data: group_id(3) type c.
SELECTION-SCREEN BEGIN OF BLOCK MAIN WITH FRAME TITLE TEXT-001.
PARAMETERS: p_out RADIOBUTTON GROUP RADI DEFAULT 'X' USER-COMMAND CHECK,
p_file RADIOBUTTON GROUP RADI.
SELECTION-SCREEN END OF BLOCK MAIN.
SELECTION-SCREEN BEGIN OF BLOCK output WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: so_ekgrp FOR EKKO-EKGRP MODIF ID OUT,
so_ekorg FOR EKKO-EKORG MODIF ID OUT.
SELECTION-SCREEN END OF BLOCK OUTPUT.
SELECTION-SCREEN BEGIN OF BLOCK UPLOAD WITH FRAME TITLE TEXT-003.
PARAMETERS: p_pcfile LIKE rlgrap-filename MODIF ID UPL,
p_dismod(1) TYPE c DEFAULT 'N' MODIF ID UPL.
SELECTION-SCREEN END OF BLOCK UPLOAD.
AT SELECTION-SCREEN OUTPUT.
CASE 'X'.
WHEN P_OUT. GROUP_ID = 'UPL'.
WHEN P_file. GROUP_ID = 'OUT'.
ENDCASE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = GROUP_ID.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
IF p_out = 'X' and so_ekgrp[] is initial.
MESSAGE e000 WITH text-e01.
ENDIF.
Regards,
Srinivas
Similar Messages
-
Input help required for parameter on the selection screen
hi all,
i have created two parameters on the selection screen.
1. deptno
2.empname
so my requirement is if i input any deptno then i should get all
the empname corresponding to that deptno in the parameter empname
ie for deptno 10 there should be f4 help for empname.
here i am pasting my code plz check where i am doing wrong--
*& Report ZTEST10
*& Developer
*& Date: &DATE
REPORT ZTEST10.
tables: zemployee1.
parameters: p_deptno like zemployee1-deptno,
p_empnam like zemployee1-empname.
Data: begin of itab occurs 0,
deptno like zemployee1-deptno,
empname like zemployee1-empname,
empno like zemployee1-empno,
end of itab.
At selection-screen on value-request for p_empnam.
select empname
from zemployee1
into corresponding fields of table itab
where deptno = p_deptno.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'empname'
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'p_empnam'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = itab
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I will award ur efforts.
Thanks
sanjeevHi Sanjeev,
If you input any deptno and you should get all the empname corresponding then first you need to use CALL FUNCTION 'DYNP_VALUES_READ'.
EXPORTING
DYNAME = sy-repid
DYNUMB = sy-dynnr
TRANSLATE_TO_UPPER = ' '
REQUEST = 'A'
PERFORM_CONVERSION_EXITS = ' '
PERFORM_INPUT_CONVERSION = ' '
DETERMINE_LOOP_INDEX = ' '
TABLES
DYNPFIELDS = gt_dynp
declare: DATA : gt_dynp LIKE dynpread OCCURS 0.
loop at gt_dynp into wt_dynp where fieldname = 'P_SUPRID-LOW'.
lv_low = wt_dynp-fieldvalue.
endloop.
Then while selecting use this p_superid-low instead of p_deptno.
Then :
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
After this funtion module:
write:
IF sy-subrc = 0.
READ TABLE itab
INDEX 1.
'p_empnam' = return_tab-fieldval.
Declare return_tab as:
DATA: return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
Thanks,
Shweta
ENDIF. -
How to add one column for entry in the TLB screen?
Hi all,
Does anybody know how to add a customised column for free text in the TLB header screen? The reason is user needs to add ship or container no. This info will be later on interfaced via CIF exit to R/3.
I think many of you have the same requirement.
Thanks heaps!Thanks Digambar,
Can you help to work out more detail on how to customize the code in the TLB screen?
Are you thinking of adding one field in the table and making the ALV grid control editable? If you have any reference doc/link to do it, it would great!
Cheers, -
Check the user's entry from query selection screen
Hi,
Is there a way to check the user's entry at the selection screen? I created an exit variable and did some code to default a date to the selection screen. What if the user enters some other date, and I would want to check the value of this entry, where would I do this?
Thanks,
RTRT,
This can easily be done. You can read the variable after the user has entered some different value.
I_STEP = 2.
Read table i_t_var_range with key vnam =<your variable name >
Hope it helps.
Thx,
Soumya -
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'. -
FISCAL year from Date in the Selection Screen.
Hi Folks,
Is there any function module which returns the Fiscal year if we provide the date in ranges.
I mean, I have a select option for date in the selection screen.So,if a user enters the date say 01042007 01042007 it should return the corresponding fiscal year.
Kindly let me know if anyone here has any idea regarding this.
Thanks,
K.Kiran.Hello,
Check these FM's
FTIS
FTI_FISCAL_YEAR_MONTH_GET
KBPA Budget/Plan - application-specific
KBPA_GET_START_FISCAL_YEAR Determine Start Year for Funds Management
KBPA_GET_START_FISCAL_YEAR_OPT
Vasanth -
F4 help in the selection screen from a int table
I collected the datas from the function module. and the internal table is populated.
the internal table contains manny fields.
among these fields i need to take only one field and this field value to be used for F4 help in the selection screen ( not a dynpro)
for example : in the selection screen
I have to select the PO.
based on the user i have filtered the PO. (determined dynamically by using the user name this i have done it)
then i have to assign the PO the selection screen.
which FM will be better to use for this type of scenario and help me out with some example codes particularly for my req
ThanksHi ,
use the FM 'F4IF_INT_TABLE_VALUE_REQUEST'
This example is for search help for material type .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_mtart-low .
select all material types you want to display in search help into table i_mtart.
PERFORM select_material_type.
PERFORM help_material_type.
*& Form help_material_type
text
--> p1 text
<-- p2 text
FORM help_material_type .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MTART'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'S_MTART-LOW'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = i_mtart
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " help_material_type
Regards,
Balaji. -
Possibele entries are not populating for the fields on the selection screen
Hi,
Possible entries are not populating for the fields on the selection screen for the query.But its working fine in Development and Quality Systems.
Can any body help me out
Regards,
Amit.Hi,
In the Selection screen,go to Settings->Value Restrictions tab->Read Mode Settings->Custom radio button and select the options Values in Master Data or Only Values in InfoProv or Only Posted values for navigation.
After this setting,check whether you are getting the data or not.
Rgds,
Murali -
Error when generating the selection screen "1000" for Report ztest
Hi Experts,
I am getting this strange error while trying to activate my report. I simply copy paste report from my other system to new system it was working fine there. I also created all include program etc.
While I am trying to create "Selection-text" it is giving message that "Program contain some serious syntax error" while checking syntax saying that "Program is syntactically right".
Any idea how to solve this???
Regards,
GouravHere is the code::::
SELECTION-SCREEN BEGIN OF BLOCK select WITH FRAME TITLE text-sl1.
Component
SELECT-OPTIONS:
s_xcide FOR gw_zsmmess_compo-xcide
NO INTERVALS
MATCHCODE OBJECT zsm_xcide_oi.
SELECTION-SCREEN END OF BLOCK select.
SELECTION-SCREEN BEGIN OF BLOCK prcopt WITH FRAME TITLE text-sl2.
Default severity code
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-dsc.
SELECTION-SCREEN POSITION 33.
PARAMETERS: p_dfsevc LIKE gw_zsmglob_sever-sevco
OBLIGATORY
MATCHCODE OBJECT zsm_sevco
DEFAULT '3'.
SELECTION-SCREEN COMMENT 37(30) pt_sevtx.
SELECTION-SCREEN END OF LINE.
Minutes to wait before re-issuing alert
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-ria.
SELECTION-SCREEN POSITION 33.
PARAMETERS: p_aleexp(3) TYPE n
OBLIGATORY
DEFAULT '45'.
SELECTION-SCREEN COMMENT 37(10) text-min.
SELECTION-SCREEN END OF LINE.
Use component specific parameters Yes/No
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-cpu.
SELECTION-SCREEN POSITION 33.
PARAMETERS: p_usecsp RADIOBUTTON GROUP rg1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 35(10) text-rby FOR FIELD p_usecsp.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 33.
PARAMETERS: p_dnucsp RADIOBUTTON GROUP rg1.
SELECTION-SCREEN COMMENT 35(10) text-rbn FOR FIELD p_dnucsp.
SELECTION-SCREEN END OF LINE.
Create/update component specific parameters automatically
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(32) text-cpc.
SELECTION-SCREEN POSITION 33.
PARAMETERS: p_updcsp RADIOBUTTON GROUP rg2.
SELECTION-SCREEN COMMENT 35(10) text-rby FOR FIELD p_updcsp.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 33.
PARAMETERS: p_dnccsp RADIOBUTTON GROUP rg2 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 35(10) text-rbn FOR FIELD p_dnccsp.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-afo.
SELECTION-SCREEN POSITION 33.
Fire one alert per component/error type combination
PARAMETERS: p_afrerr RADIOBUTTON GROUP rg3 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 35(50) text-afe FOR FIELD p_afrerr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 33.
Fire one alert per component (= outbound XI interface)
PARAMETERS: p_afrcom RADIOBUTTON GROUP rg3.
SELECTION-SCREEN COMMENT 35(50) text-afc FOR FIELD p_afrcom.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 33.
Fire one alert per run
PARAMETERS: p_afrrun RADIOBUTTON GROUP rg3.
SELECTION-SCREEN COMMENT 35(50) text-afr FOR FIELD p_afrrun.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-sel.
SELECTION-SCREEN POSITION 33.
Select messages since last run
PARAMETERS: p_lstrun RADIOBUTTON GROUP rg4 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 35(40) text-slr FOR FIELD p_lstrun.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 33.
Select messages in selected interval
PARAMETERS: p_mintvl RADIOBUTTON GROUP rg4.
SELECTION-SCREEN COMMENT 35(40) text-sin FOR FIELD p_mintvl.
SELECTION-SCREEN END OF LINE.
Message selection interval
SELECTION-SCREEN BEGIN OF BLOCK msgfilt WITH FRAME TITLE text-msf.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) text-icr.
SELECTION-SCREEN COMMENT 14(05) text-ifr.
SELECTION-SCREEN COMMENT 25(05) text-dat FOR FIELD p_stadat.
Select messages - start date
PARAMETERS: p_stadat TYPE d.
SELECTION-SCREEN COMMENT 46(05) text-tim FOR FIELD p_statim.
Select messages - start time
PARAMETERS: p_statim TYPE t.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 14(05) text-ito.
SELECTION-SCREEN COMMENT 25(05) text-dat FOR FIELD p_enddat.
Select messages - end date
PARAMETERS: p_enddat TYPE d DEFAULT sy-datum.
SELECTION-SCREEN COMMENT 46(05) text-tim FOR FIELD p_endtim.
Select messages - end time
PARAMETERS: p_endtim TYPE t DEFAULT sy-timlo.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK msgfilt.
SELECTION-SCREEN END OF BLOCK prcopt.
SELECTION-SCREEN BEGIN OF BLOCK testopt WITH FRAME TITLE text-tso.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) text-tst.
SELECTION-SCREEN POSITION 33.
List only, no updates
PARAMETERS: p_lstonl RADIOBUTTON GROUP rg5 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 35(14) text-tsl FOR FIELD p_lstonl.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 33.
Execute updates
PARAMETERS: p_update RADIOBUTTON GROUP rg5.
SELECTION-SCREEN COMMENT 35(14) text-tsu FOR FIELD p_update.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK testopt.
*eject
INITIALIZATION. -
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'. -
Calling the selection screen of report with data for the selection field
I have the selection screen with 2 fileds.
sales order and payment terms.
My requirement is to update the payment terms into the ztable for the given order.
Sometimes the payment terms will be there ie already maintained ,in that case i need to show to the user the existing payment term ,so that he can modify and save that one.If the payment term is not existing then simply i can go inside the program and update the payment term.
What I thought of doing is , writing a report program and then after the user inputs the selection screen ie order number , I Will check in the ztable and if the payment terms is found then i will use the key word leave list processing. But i dont know how to populate the payement term in the selection screen oncegaing from the programHi shiva,
when the user enters sales order number on screen, in parameter 1,
you want to show payment term, on selection screen itself, in parameter 2.
We can use the event
AT SELECTION-SCREEN.
Eg. PO Number <----
> User
Below is sample code for same.
If you enter PO Number, the system will show the corresponding user in parameter2.
Just copy paste.
REPORT YAM_TEMPA09.
PARAMETERS : EBELN LIKE EKKO-EBELN.
PARAMETERS : ERNAM LIKE EKKO-ERNAM.
AT SELECTION-SCREEN.
ERNAM = ''.
SELECT SINGLE ERNAM
FROM EKKO
INTO ERNAM
WHERE EBELN = EBELN.
regards,
amit m. -
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. -
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_tabHi,
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 -
To use the selection screen entry in another program
dear all,
i have a requirement that i want to use the selection screen entry of my zmodule pool to the selection screen of a zreport and want to use its output in my module pool.
how could i do this in my module pool programing??
i hope u get my question, i want to use the output of my zreport in my module pool with the same selection screen as given in module pool.,directly in my module pool output without opening my zreport seperately for this same selection screen dataHi,
You can use SUBMIT statement in your module program to call the zreport program in background.
Press F1 on Submit statement and you will find required detials of this statement. For using submit statement
you have to create an internal table of type RSPARAMS and pass it in the submit statement.
eg.
DATA :
* table to be passed to background report 'ZREPORT1'
int_rspar TYPE TABLE OF rsparams,
ws_rspar TYPE rsparams.
CONSTANTS: c_include TYPE rsparams-sign VALUE 'I',
c_kind TYPE rsparams-kind VALUE 'S',
c_between TYPE rsparams-option VALUE 'BT'.
*Preparing the table to be passed to the background report.
*populating SELECT-OPTION for knb1-kunnr (Customer Number)
CLEAR : ws_rspar.
ws_rspar-selname = 'S_KUNNR'. "Should be the name of select option as in the called report
ws_rspar-kind = c_kind.
ws_rspar-sign = c_include.
ws_rspar-option = c_between.
ws_rspar-low = '1'.
ws_rspar-high = '100'.
APPEND ws_rspar TO int_rspar.
*populating SELECT-OPTION for knb1-bukrs (Company code)
CLEAR : ws_rspar.
ws_rspar-selname = 'S_BUKRS'.
ws_rspar-kind = c_kind.
ws_rspar-sign = c_include.
ws_rspar-option = c_between.
ws_rspar-low = 'a'.
ws_rspar-high = 'z'.
APPEND ws_rspar TO int_rspar.
submit zreport
with selection-table int_rspar
EXPORTING LIST TO MEMORY
and return.
The above code will execute the zreport in backgournd.
Now to get the output of the zreport :-
*This internal table stores the value
*Of output listed to memory
DATA BEGIN OF itab_list OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA END OF itab_list
* To read from the memory. The output of the program that is executed in background is then populated in the itab_list table.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list
EXCEPTIONS
not_found = 4
OTHERS = 8.
* To write it onto the output
CALL FUNCTION 'WRITE_LIST'
EXPORTING
WRITE_ONLY = 'X'
TABLES
listobject = itab_list
EXCEPTIONS
EMPTY_LIST = 1
OTHERS = 2
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Bhavesh. -
Modify the selection screen for the transaction VF04
Hi all,
My requirement is as follow . I need to modify the selection screen (1000) in such a way that I need to add three more fields to te existing selection screen and make some check boxes checked by default which are unchecked . I have found out all the exits in this development clas VF . I am listing them out here .
J_3RSINV Export Sales
SDVFX001 User exit header line in delivery to accounting
SDVFX002 User exit for A/R line (transfer to accounting)
SDVFX003 User exit: Cash clearing (transfer to accounting)
SDVFX004 User exit: G/L line (transfer to accounting)
SDVFX005 User exit: Reserves (transfer to accounting)
SDVFX006 User exit: Tax line (transfer to accounting)
SDVFX007 User exit: Billing plan during transfer to Accounting
SDVFX008 User exit: Processing of transfer structures SD-FI
SDVFX009 Billing doc. processing KIDONO (payment reference number)
SDVFX010 User exit item table for the customer lines
SDVFX011 Userexit for the komkcv- and kompcv-structures
V05I0001 User exits for billing index
V05N0001 User Exits for Printing Billing Docs. using POR Procedure
V60A0001 Customer functions in the billing document
V60P0001 Data provision for additional fields for display in lists
V61A0001 Customer enhancement: Pricing
Going with the descrition I dont see any of them suits my requirement . But there should be an approach . Can anyone please help me to find out an exit or explain me how do we identify an exit to modify the selection screen of an standard ransaction .
Regards,
Varun .Hello,
I would suggest you to go for BADI,
Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
1) Goto se24 (Display class cl_exithandler)
2) Double click on the method GET_INSTANCE.
3) Put a break point at Line no.25 (CASE sy-subrc).
Now
4) Execute SAP standard transaction
5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
7) This way you will find all the BADIs called on click of any button in any transaction.
Regs,
Venkat
Maybe you are looking for
-
Accounting total value of item conditions
Dear Experts, I have a scenario where rebates(volume discounts) are accrued at an item level through an item condition and are hence released to accounts also at an item level. As a result of this there are too many accrual entries getting posted for
-
Private Browsing Tab is not opening in a New Window
<pre><i>Locking duplicate thread. Please continue here: [[/questions/969549]] </i></pre> I have a issue When ever i click to private browsing All the open windows are close and make one only one window which is private Browsing i don't want this I us
-
I can't see my Library any more!
I wanted to create a new calander for 2014, so I created a new catalog and started to import 25 images which were in my library in various folders. once I was done with the selections I could see that there are several catalogs set up from each folde
-
Seeing transitions, effects, presets in bins
Hi, new user just upgraded from ELements. Loving all the new features and trying to get accustomed to the subtle differences that affect the way I work. One thing I'm wondering is there any way to have the thumbnail view (and motion preview) of the t
-
HT4864 Can I change iCloud account or password of iCloud I'd
Dear community team of Apple as my device register as premmobilegallery And I forget my iCloud I'd as well as password so that I wanted to Knew that is it possible to change the iCloud I'd or reset It . If yes then how kindly reply me Regards premmob