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
Praveen
Hi,
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
Similar Messages
-
Selection Screen Parameters in SQL statements
Very new ABAP programmer here, so sorry if this is a really dumb question.
I'm trying to use my selection screen parameters to limit what is pulled in by my SQL statement (which seems to me to be a very logical thing to do). But I'm having a problem, that when no values are entered in the parameters, no data is returned in the table instead of all the data being returned.
Here is the code I have now:
SELECT cname1 akostl aorgeh asname apernr bbegda bendda bstatu
bconfl bmedcf breasn breman b~rqday
INTO CORRESPONDING FIELDS OF TABLE it_record
FROM ( ( pa0001 AS a
INNER JOIN pa0672 AS b ON bpernr = apernr )
INNER JOIN t500p AS c ON cpersa = awerks )
WHERE b~reman in so_reman
AND a~kostl in so_kostl
AND a~orgeh = p_orgeh
AND b~begda = p_begda
AND b~statu = p_statu
AND b~confl = p_confl
AND b~medcf = p_medcf
AND b~reasn = p_reasn
AND b~rqday = p_rqday
AND c~name1 = p_name1.
Can anyone tell me what I'd need to do to make it return properly?When you use parameters and no value is entered, it is treated as initial value. and the select statement looks for the initial values for those fields in the tabl;e...
you can make the parameters mandatory..then the user would be forced to enter something....
also you could do the following..
instead of parameters, use select-options with the addition no intervals and no extension, then practically it looks like a parameter but internally it is a select-option...
and in the select statement, give conditions like....field1 in <s_option name>....in this case if the user is not entering a value ...it is treated as *...
Thnaks & Regards,
Renjith -
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. -
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 -
Hi its urgent...help on selection screen parameters
Hi all,
I need help on selection screen parameters.
requirement is that,
i am having input fields for material, plant ,start date and end date and a check box and an input field for getting the txt file.
when i select the checkbox, it should ignore the mandatory fileds in the selection screen.
and when i get the file input, it should take the input data material, plant, start date and end date from the flat file and populate the corresponding input fields in selection screen.
How to do this..
thanks in advance.Hi ..
While declare the Matnr, Plant etc dont use the OBLIGATORY addition.
instead of the based on the value of check box validate them .
AT SELECTION-SCREEN.
IF c_box = ' '.
<< validate for mandatory fields>>
endif.
<b>REWARD IF HELPFUL.</b> -
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
-
Submit program with selection screen parameters - getting blank values
Hi, I'm submitting a program with selection screen parameters. when I pass '000' (I_TPLSCN )value for Planning Scenario and when this goes to selection screen then I don't see value for Planning scenario as '000'(I_TPLSCN ) but the value is blank in selection screen. I'm using the below code for this.
SUBMIT RMCPAMRP WITH MATNR_GL EQ I_MATNR SIGN 'I'
WITH WERKS_GL EQ I_WERKS SIGN 'I'
WITH PLSCN EQ I_TPLSCN SIGN 'I'
via selection-screen AND RETURN.
Could anyone please help me how to display value '000' rather than blanks.
thanks in advance.If I_MATNR, I_TPLSCN and I_WERKS are variable then try with
SUBMIT rmcpamrp
WITH matnr_gl = i_matnr
WITH plscn = i_tplscn
WITH werks_gl = i_werks
via selection-screen
AND RETURN .
If I_MATNR, I_TPLSCN and I_WERKS are of type range then try with
SUBMIT rmcpamrp
WITH matnr_gl IN i_matnr
WITH plscn IN i_tplscn
WITH werks_gl IN i_werks
via selection-screen
AND RETURN
Edited by: Pawan Kesari on Dec 24, 2009 3:33 PM -
Get selection screen parameters from sap query
Hello. I use SAP Query Reporting, so I added a report assignment for detailing (sq01 -> Change button -> Goto -> Report Assignment -> Insert row -> Other type row -> Abap Report Program)
and put there ABAP program.
When I run query and press CtrlShiftF1 (or double click) It calls my abap program.
So the question is: how to get selection screen parameters in my program ?
to be more precise I want to get date parameter (begda, endda)
Thanks a lot.There is a Z query which I can see in sq01. I set reporting period and run the query; when I run it, it gives me the employee list.
So I wrote the abap report to get an employee details, customized query as I mentioned above.
The query calls my report and I need to get parameters.
SELECTION-SCREEN BEGIN OF BLOCK frm1 WITH FRAME TITLE text-001.
PARAMETER : p_pernr LIKE p0001-pernr OBLIGATORY MATCHCODE OBJECT prem.
PARAMETER : p_date LIKE sy-datum.
SELECTION-SCREEN END OF BLOCK frm1.
Parameter
p_pernr
passes normal. ALV Query contains it, but I'd like to get one more parameter from selection screen of the query and don't know how to get it. -
How to pass selection screen parameters in text elements?
how to pass selection screen parameters in text elements?
don't you mean he other way around. Assign text-elements (selection texts) to select options?
This you do in the menu where you can find text-elements, selection texts.
menu Goto->text elements->selection texts.
Edited by: Micky Oestreich on May 10, 2008 2:45 PM -
Print Selection Screen Parameters in ALV report only once
Does anyone know how to print the selection screen within a ALV report.
I've tried everything. I have the code to capture the selection parameters into a internal table. I can use top_of_page but I only want it printed once.Hi,
If you have captured the selection screen entries in an internal table, then you could display it once by using the BLOCK LIST ALV.
Check the function module.
REUSE_ALV_BLOCK_LIST_DISPLAY
Using this function module more than 1 alv could be display in the report.
In our case ..there will be two alvs ...one for the selection screen n other for the main report output.
Check the following example on the block List ALV....
<b>BALVBT01</b>.
Regards,
Vara -
Dynamic selection-screen parameters
Hi All,
Is it possible to create a dynamic selection-screen checkbox parameters at runtime. My requirement is :
I have Object parameter on the selection-screen, based on this it has to fetch the info structures and display it with checkboxes on the same selection-screen, so that the user can select which info structures to be processed and can save it as a variant.
Thanks,
Satya Priyaas per ur requirment....execute it and see
tables :DD02L,t002t,t002.
data : begin of itab occurs 0,
tabname like DD02L-TABNAME,
end of itab.
data : tabname1 like DFIES-TABNAME,
RSSELTEXTS1 type table of RSSELTEXTS with header line.
data : begin of RSSELTEXTS2 occurs 0,
RSSEL type RSSELTEXTS,
initial type c,
end of RSSELTEXTS2.
data : begin of imakt occurs 0 .
include structure t002.
data : end of imakt.
data : begin of ipara occurs 0,
name(132) type c,
text(132) type c,
end of ipara.
data :srch_str(10) TYPE c,
tot type i,
ind type sy-tabix.
select-options : s_lang for t002-spras.
*PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.
PARAMETERS showall1 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall2 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall3 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall4 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall5 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall6 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall7 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall8 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall9 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal10 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal11 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal12 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal13 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal14 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal15 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal16 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal17 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal18 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal19 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal20 AS CHECKBOX USER-COMMAND flag modif id sd.
initialization.
at selection-screen output.
if s_lang ne ' '.
select * from t002 into table imakt where spras in s_lang.
describe table imakt lines tot.
loop at screen .
if screen-group1 = 'SD'
and screen-group3 = 'PAR'.
ipara-name = screen-name.
ind = screen-group4.
read table imakt index ind.
ipara-text = imakt-laiso.
append ipara.
clear ipara.
endif.
endloop.
endif.
loop at ipara.
RSSELTEXTS1-name = ipara-name.
RSSELTEXTS1-kind = 'P'.
RSSELTEXTS1-text = ipara-text.
append RSSELTEXTS1.
clear RSSELTEXTS1.
endloop.
CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
EXPORTING
PROGRAM = sy-repid
TABLES
SELTEXTS = RSSELTEXTS1
EXCEPTIONS
PROGRAM_NOT_FOUND = 1
PROGRAM_CANNOT_BE_GENERATED = 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.
if s_lang ne ' '.
loop at screen .
if screen-group1 = 'SD'
and screen-group3 = 'PAR'
and screen-group4 > tot.
screen-input = '0'.
screen-active = '0'.
modify screen.
endif.
endloop.
endif.
if s_lang = ' '.
loop at screen .
if screen-group1 = 'SD'.
screen-input = '0'.
screen-active = '0'.
modify screen.
endif.
endloop.
endif. -
Condition on selection screen parameters
Hi friends,
I have an ABAP query. Here , I have a date field (ISEG_ZLDAT - Cycle count date ) in the selection screen which is a parameter (not a select option). I have to write a condition for the report to pull all the materials which have a cycle count date less than the value entered on the selection screen.
How do I give this condition in the code ? Is there a way to do it without using select options ?
Please help.
Thanks,
DikshithaHi Dikshitha,
as also said by others try it this way:
Parameters:
p_ZLDAT type ISEG-ZLDAT.
Data:
t_ISEG like standard table of ISEG.
select * from ISEG into table t_ISEG where ZLDAT lt p_ZLDAT.
if sy-subrc ne 0.
endif.
With luck,
Pritam. -
Transfer of selection screen parameters
Hi,
I have a program in classic ABAP which is actually 2 programs:
Program 1:
This program is the program that contains the selection-screen and it calls the related program by SUBMIT, see below:
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN COMMENT 1(40) text-s01 MODIF ID hdr.
SELECT-OPTIONS: s_werks FOR plko-werks,
s_plnnr FOR plko-plnnr.
PARAMETERS: p_write AS CHECKBOX,
p_update AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK bl1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'HDR'.
screen-intensified = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
EXPORT p_write to memory id cst_mem_id.
EXPORT p_update to memory id cst_mem_id.
SUBMIT zzpp_inspchar_update
VIA SELECTION-SCREEN
AND RETURN.
Program 2 contains the selection of data like this:
SELECT fwerks fplnty fplnnr fzaehl fverwe fstatu psteus pvornr
INTO CORRESPONDING FIELDS OF TABLE gt_tasks
FROM plko AS f INNER JOIN plpo AS p
ON fplnnr = pplnnr
AND fplnty = pplnty
WHERE f~werks IN s_werks "
AND f~statu = '4'
AND f~plnty = 'N'
AND p~plnnr IN s_plnnr
AND p~steus = 'ZP04'
The 2 select-option, s_werks and s_plnnr has to come from program 1 and I have tried to use SET/GET parameter for this, but without luck.
How can I get these values filled ? EXPORT / IMPORT or ....?Hello,
If s_werks and s_plnnr are part of the selection screen of the second program, you can change the SUBMIT :
SUBMIT zzpp_inspchar_update WITH s_werks IN s_werks
AND s_plnnr IN s_plnnr
VIA SELECTION-SCREEN
AND RETURN.
For your problem using EXPORT/IMPORT, you do not show us the code you use so it is difficult to help you.
Cordialement,
Chaouki. -
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
Maybe you are looking for
-
Mail crashes every time I open after 10.5.1 update
Every time I open mail it just crashes right away. I've tried repairing permissions, tried shift click, and also tried from a different/new user account. Any ideas? I have been having the same problem with iCal since I installed leopard but I don't u
-
While I was working on my Mac last night, I got a message that I needed to download an Adobe (I think an Acrobat X Pro) update. I did. That seems to be the time when I started having problems. Now I can't use the uninstaller for the program. I think
-
Multitouch Issues on MacBook Pro
I have a MacBook Pro 13-inch (early 2011 model) with a 2.3 GHz Intel Core i5 running OS X Lion 10.7.4 and today the 3 and 4 finger gestures were not functioning. They worked earlier today as well as last night when I installed the latest Safari updat
-
Xserve Raid Card battery conditioning
Good afternoon, I have observed that the raid controller on my Xserve run conditioning cycle the batery every 3 months... is that normal? I appreciate a clarification on this. Thanks. Hipolito Lopes
-
Tech Spech : OS : Windows 7 32b Adobe Acrobat 10 (full update OK) My old post on Acrobat Forum : Pb editing FORM Field on PDF document Hello Everybody, I have a problem for editing an PDF file. My PDF file contain some Form Field, i Can editing them