Problem with Selection screen values of an authorization variable
hi Gurus,
I have an authorization variable for Division in my queries....Now whenever a user tries to run the query...a list of divisions is available to him....All divisions for which he/she has proper roles assigned.
Now the problem is that these values are not restricted to the ones relevant to that query (namely the multi provider)
Eg. for a Flowers Query (divisions relevant to Flowers only) all the divisions (including the ones for Vegetables, Crops etc.) are also visible only because these roles are also assigned to the same user. This needs to be avoided.
In a nutshell....
Is their any way by which i can restrict the number of values popping up for an authorization variable in the selection screen, to only those values which are relevant to the info-provider on which the queries are based ???
hi Deepu,
I did go through that SAP note. I just have one concern regarding that. The check at the Info provider level is clear enough and i already have that in place. Now there are 2 more checks required a) at the info object level and b) at the BEX designer level.
Are all three checks required???
and also how do you place the check at the BEX level??? i could not quite figure that one out...
Any inputs would be welcome.
Thanks,
Nikhil
Similar Messages
-
JOB_SUBMIT with Selection Screen Value
I have a requirement :
with other select-options and parameters, i have two radio button, Foreground and Background:
when Background radio button will be selected program should be scheduled as a background job.
How i will pass selection screen value in JOB_SUBMIT ??
Cheers.
SrikantaHi ,
Try This
*& Report ZMMVB_PG_SL_CHANGE_BDC
REPORT zmmvb_pg_sl_change_bdc.
TABLES : mara,t133a,marc.
DATA i_t133a LIKE t133a OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE marc-matnr,
werks LIKE marc-werks,
ekgrp LIKE marc-ekgrp,
END OF itab.
DATA : BEGIN OF itab1 OCCURS 0,
matnr LIKE marc-matnr,
werks LIKE marc-werks,
dispo LIKE marc-dispo,
END OF itab1.
DATA : fname LIKE ibipparms-path ,
ename TYPE string,
mode.
DATA: BEGIN OF it_t133a OCCURS 0,
bilds LIKE t133a-bilds,
pstat LIKE t133a-pstat,
guifu LIKE t133a-guifu,
auswg LIKE t133a-auswg,
END OF it_t133a.
DATA: ctr TYPE i,
ctr_s(2) TYPE n,
wrk(35),
ch(1),
viewno(2) TYPE n,
guifu LIKE t133a-guifu.
DATA: BEGIN OF it_views OCCURS 30.
INCLUDE STRUCTURE mbildtab. " Selection Views
DATA: END OF it_views.
DATA bdc_data LIKE bdcdata OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-000.
PARAMETERS : ek RADIOBUTTON GROUP rg1 ,
sl RADIOBUTTON GROUP rg1
SELECTION-SCREEN END OF BLOCK b.
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-001.
PARAMETERS : fg RADIOBUTTON GROUP rg2 DEFAULT 'X',
bg RADIOBUTTON GROUP rg2.
SELECTION-SCREEN END OF BLOCK c.
START-OF-SELECTION.
IF fg = 'X'.
mode = 'A'.
ELSEIF bg = 'X'.
mode = 'E'.
ENDIF.
IF ek = 'X'.
guifu = 'SP09'.
PERFORM bdc_ekgrp_change.
ELSEIF sl = 'X'.
guifu = 'SP12'.
PERFORM bdc_mrpcontroller_change.
ENDIF.
*& Form BDC_EKGRP_CHANGE
* text
* --> p1 text
* <-- p2 text
FORM bdc_ekgrp_change .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = sy-repid
dynpro_number = sy-dynnr
field_name = ' '
IMPORTING
file_name = fname.
IF NOT ( fname IS INITIAL ) .
ename = fname .
ENDIF.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = ename
filetype = 'DAT'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
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 itab[] IS NOT INITIAL.
LOOP AT itab.
REFRESH bdc_data.
IF itab-matnr NA sy-abcde AND itab-matnr NA '/*-_.'.
UNPACK itab-matnr TO itab-matnr.
ELSE.
TRANSLATE itab-matnr TO UPPER CASE.
ENDIF.
SELECT SINGLE * FROM mara WHERE matnr = itab-matnr.
IF sy-subrc NE 0.
CONTINUE.
ENDIF.
PERFORM view_routine.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RMMG1-MATNR'
itab-matnr.
CONCATENATE 'MSICHTAUSW-DYTXT(' viewno ')' INTO wrk.
CONDENSE wrk NO-GAPS.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
wrk. "'MSICHTAUSW-DYTXT(08)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
CONCATENATE 'MSICHTAUSW-KZSEL(' viewno ')' INTO wrk.
CONDENSE wrk NO-GAPS.
PERFORM bdc_field USING wrk "'MSICHTAUSW-KZSEL(08)'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-WERKS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'RMMG1-WERKS'
itab-werks.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
* PERFORM bdc_field USING 'MAKT-MAKTX'
* '"HEX BOLT M16X1.5X100,B8.8,BP"'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-EKGRP'.
* PERFORM bdc_field USING 'MARA-MEINS'
* 'NOS'.
PERFORM bdc_field USING 'MARC-EKGRP'
itab-ekgrp.
* PERFORM bdc_field USING 'MARA-MATKL'
* '1702'.
* PERFORM bdc_field USING 'MARC-USEQU'
* '3'.
* PERFORM bdc_field USING 'MARC-KORDB'
* 'X'.
CALL TRANSACTION 'MM02' USING bdc_data MODE mode UPDATE 'S'.
ENDLOOP.
ENDIF.
ENDFORM. " BDC_EKGRP_CHANGE
*& Form BDC_MRPCONTROLLER_CHANGE
* text
* --> p1 text
* <-- p2 text
FORM bdc_mrpcontroller_change .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = sy-repid
dynpro_number = sy-dynnr
field_name = ' '
IMPORTING
file_name = fname.
IF NOT ( fname IS INITIAL ) .
ename = fname .
ENDIF.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = ename
filetype = 'DAT'
TABLES
data_tab = itab1
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
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 itab1[] IS NOT INITIAL.
LOOP AT itab1.
REFRESH bdc_data.
IF itab1-matnr NA sy-abcde AND itab1-matnr NA '/*-_.'.
UNPACK itab1-matnr TO itab1-matnr.
ELSE.
TRANSLATE itab1-matnr TO UPPER CASE.
ENDIF.
SELECT SINGLE * FROM mara WHERE matnr = itab1-matnr.
IF sy-subrc NE 0.
CONTINUE.
ENDIF.
PERFORM view_routine.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RMMG1-MATNR'
itab1-matnr.
CONCATENATE 'MSICHTAUSW-DYTXT(' viewno ')' INTO wrk.
CONDENSE wrk NO-GAPS.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
wrk. "'MSICHTAUSW-DYTXT(11)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
CONCATENATE 'MSICHTAUSW-KZSEL(' viewno ')' INTO wrk.
CONDENSE wrk NO-GAPS.
PERFORM bdc_field USING wrk "'MSICHTAUSW-KZSEL(11)'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-WERKS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'RMMG1-WERKS'
itab1-werks.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
* PERFORM bdc_field USING 'MAKT-MAKTX'
* '"HEX BOLT M16X1.5X100,B8.8,BP"'.
* PERFORM bdc_field USING 'MARA-MEINS'
* 'NOS'.
* PERFORM bdc_field USING 'MARC-DISGR'
* '701'.
* PERFORM bdc_field USING 'MARC-EKGRP'
* 'A00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARC-DISPO'.
* PERFORM bdc_field USING 'MARC-DISMM'
* 'PD'.
PERFORM bdc_field USING 'MARC-DISPO'
itab1-dispo.
* PERFORM bdc_field USING 'MARC-DISLS'
* 'MB'.
CALL TRANSACTION 'MM02' USING bdc_data MODE mode UPDATE 'S'.
ENDLOOP.
ENDIF.
ENDFORM. " BDC_MRPCONTROLLER_CHANGE
*& Form bdc_dynpro
* text
* -->PROGRAM text
* -->DYNPRO text
FORM bdc_dynpro USING program dynpro.
CLEAR bdc_data.
bdc_data-program = program.
bdc_data-dynpro = dynpro.
bdc_data-dynbegin = 'X'.
APPEND bdc_data.
ENDFORM. "BDC_DYNPRO
* Insert field *
FORM bdc_field USING fnam fval.
CLEAR bdc_data.
bdc_data-fnam = fnam.
bdc_data-fval = fval.
APPEND bdc_data.
ENDFORM. "BDC_FIELD
*& Form VIEW_ROUTINE
* text
* --> p1 text
* <-- p2 text
FORM view_routine .
CLEAR viewno.
SELECT * FROM t133a INTO CORRESPONDING FIELDS OF TABLE i_t133a
WHERE bilds = '21' AND guifu LIKE 'SP%' .
LOOP AT i_t133a .
ch = i_t133a-pstat.
IF mara-vpsta NA ch .
DELETE i_t133a .
CONTINUE .
ENDIF .
ENDLOOP.
SORT i_t133a BY guifu ASCENDING .
LOOP AT i_t133a .
viewno = viewno + 1 .
IF i_t133a-guifu = guifu .
EXIT .
ENDIF .
ENDLOOP .
ENDFORM. " VIEW_ROUTINE
Regards, -
Performance Issue with Selection Screen Values
Hi,
I am facing a performance issue(seems like a performance issue ) in my project.
I have a query with some RKFs and sales area in filters (single value variable which is optional).
Query is by default restricted by current month.
The Cube on which the query operates has around 400,000 records for a month.
The Cube gets loaded every three hours
When I run the query with no filters I get the output within 10~15 secs.
The issue I am facing is that, when I enter a sales area in my selection screen the query gets stuck in the data selection step. In fact we are facing the same problem if we use one or two other characteristics in our selection screen
We have aggregates/indexes etc on our cube.
Has any one faced a similar situation?
Does any one have any comments on this ?
Your help will be appreciated. ThanksHi A R,
Goto RSRT--> Give ur query anme --> Execute =Debug
--> No a pop up ill come with many check boxes select "Display Aggregates found" option --> now give ur
selections in variable screen > first it will give the already existing aggregate names> continue> now after displaying all the aggregates it will display the list of objects realted to cube wise> try to copy these objects into notepad> again go with ur drill downs now u'll get the already existing aggregates for this drill down-> it will display the list of objects> copy them to notepad> now sort all the objects related to one cube by deleting duplicate objects in the note pad>goto that Infocube> context>maintain aggregates> create aggregate on the objects u copied into note pad.
now try to execyte the report... it should work properly with out delays for those selections.
I hope it helps you...
Regards,
Ramki. -
Problem with Select Filter value.......
HI all
We have created a report on Sales cube,and Inserted the Report into work book.
In the report we have 2 Commission codes 1.Customer,2.material.
when we are trying to select filter values for customer Commission code,we are Gatting the Pop-up window but the system is Getting hanged, it is not showing any values also.
We thought it is a Bex problem, but when tried other reports it is working fine.
Suggest me any possible solution to resolve the issue
Thanks in advanceLittle more improvement
After deleting and re creating the indexes, the Filter values are comming but it is taking almost 10-12 min to display the values. -
Problem with selection screen input
my problem is when i enter l2_gr or l1_vbeln or l2_vbeln, in the selection screen, the output should come according to that.I am not getting the correct result.
form summ_report.
data: l2gr like ekbe-belnr.
select fs_plant fv_plant f~r_plant
fl1_sto pl1_delivery p~l1_gr
pl2_sto pl2_delivery p~bsl_err_message
kebeln pl1_pgi p~l2_pgi
into (dochdr-swerks, dochdr-vwerks, dochdr-rwerks,
dochdr-l1sto, docitem-l1xblnr, docitem-l1gr,
docitem-l2sto, docitem-l2xblnr, docitem-err_msg,
tabekko-ebeln, docitem-l1pgi, docitem-l2pgi)
from zdochdr as f inner join zdocitem as p
on fl1_sto = pl1_sto inner join
ekko as k on pl1_sto = kebeln
where f~s_plant in s_werks and
f~v_plant in v_werks and
f~r_plant in r_werks and
f~l1_sto in l1_sto and
p~l1_delivery in l1_xblnr and
p~l1_gr in l1_gr and
p~l2_sto in l2_sto and
p~l2_delivery in l2_xblnr and
k~aedat in s_aedat.
move : dochdr-swerks to final_data-i_swerks,
dochdr-vwerks to final_data-i_vwerks,
dochdr-rwerks to final_data-i_rwerks,
dochdr-l1sto to final_data-i_l1sto,
docitem-l1xblnr to final_data-i_l1xblnr,
docitem-l1gr to final_data-i_l1gr,
docitem-l2sto to final_data-i_l2sto,
docitem-l2xblnr to final_data-i_l2xblnr,
docitem-l2pgi to final_data-i_l2pgi,
docitem-l1pgi to final_data-i_l1pgi,
docitem-err_msg to final_data-i_errmsg.
append final_data.
endselect.
L2 Goods receipt
loop at final_data.
select single belnr from ekbe into l2gr
where ebeln = final_data-i_l2sto and
belnr in l2_gr and
bwart = '101' and
bewtp = 'E' and
vgabe = '1'.
if sy-subrc eq 0.
move l2gr to final_data-i_l2gr.
endif.
leg1 Billing document
select vbeln from vbfa into (tabvbfa-vbeln)
where vbeln in l1_vbeln and vbelv in (final_data-i_l2xblnr,final_data-i_l1xblnr).
select single vbeln from vbrk into tabvbrk-vbeln
where vbeln = tabvbfa-vbeln and fkart = 'IV'.
if sy-subrc eq 0.
move tabvbrk-vbeln to final_data-i_l1vbeln.
endif.
endselect.
leg2 Billing document
select vbeln from vbfa into (tabvbfa-vbeln1)
where vbeln in l2_vbeln and
vbelv in (final_data-i_l2xblnr,
final_data-i_l1xblnr).
select single vbeln from vbrk into tabvbrk-vbeln1 where
vbeln = tabvbfa-vbeln1 and fkart = 'ZTYS'.
if sy-subrc eq 0.
move tabvbrk-vbeln1 to final_data-i_l2vbeln.
endif.
endselect.
<b>if not l2_gr is initial or
not l1_vbeln is initial or
not l2_vbeln is initial.</b> modify final_data.
else.
delete final_data.
endif.
endloop.
endform.
please help....
Thanks,
fractal.I think the code in bold is what you are trying to do.
form summ_report.
data: l2gr like ekbe-belnr.
select f~s_plant f~v_plant f~r_plant
f~l1_sto p~l1_delivery p~l1_gr
p~l2_sto p~l2_delivery p~bsl_err_message
k~ebeln p~l1_pgi p~l2_pgi
into (dochdr-swerks, dochdr-vwerks, dochdr-rwerks,
dochdr-l1sto, docitem-l1xblnr, docitem-l1gr,
docitem-l2sto, docitem-l2xblnr, docitem-err_msg,
tabekko-ebeln, docitem-l1pgi, ocitem-l2pgi)
from zdochdr as f inner join zdocitem as p
on f~l1_sto = p~l1_sto inner join ekko as k
on p~l1_sto = k~ebeln
where f~s_plant in s_werks
and f~v_plant in v_werks
and f~r_plant in r_werks
and f~l1_sto in l1_sto
and p~l1_delivery in l1_xblnr
and p~l1_gr in l1_gr
and p~l2_sto in l2_sto
and p~l2_delivery in l2_xblnr
and k~aedat in s_aedat.
move: dochdr-swerks to final_data-i_swerks,
dochdr-vwerks to final_data-i_vwerks,
dochdr-rwerks to final_data-i_rwerks,
dochdr-l1sto to final_data-i_l1sto,
docitem-l1xblnr to final_data-i_l1xblnr,
docitem-l1gr to final_data-i_l1gr,
docitem-l2sto to final_data-i_l2sto,
docitem-l2xblnr to final_data-i_l2xblnr,
docitem-l2pgi to final_data-i_l2pgi,
docitem-l1pgi to final_data-i_l1pgi,
docitem-err_msg to final_data-i_errmsg.
append final_data.
endselect.
* L2 Goods receipt
loop at final_data.
select single belnr from ekbe
into l2gr
where ebeln = final_data-i_l2sto
and belnr in l2_gr
and bwart = '101'
and bewtp = 'E'
and vgabe = '1'.
if sy-subrc eq 0.
move l2gr to final_data-i_l2gr.
endif.
* leg1 Billing document
select vbeln from vbfa
into tabvbfa-vbeln
where vbeln in l1_vbeln
and vbelv in (final_data-i_l2xblnr,final_data-i_l1xblnr).
select single vbeln from vbrk
into tabvbrk-vbeln
where vbeln = tabvbfa-vbeln
and fkart = 'IV'.
if sy-subrc eq 0.
move tabvbrk-vbeln to final_data-i_l1vbeln.
endif.
endselect.
* leg2 Billing document
select vbeln from vbfa
into tabvbfa-vbeln1
where vbeln in l2_vbeln
and vbelv in (final_data-i_l2xblnr, final_data-i_l1xblnr).
select single vbeln from vbrk
into tabvbrk-vbeln1
where vbeln = tabvbfa-vbeln1
and fkart = 'ZTYS'.
if sy-subrc eq 0.
move tabvbrk-vbeln1 to final_data-i_l2vbeln.
endif.
endselect.
if not <b>final_data-i_l2gr</b> is initial or
not <b>final_data-i_l1vbeln</b> is initial or
not <b>final_data-i_l2vbeln</b> is initial.
modify final_data.
else.
delete final_data.
endif.
endloop.
endform. -
I have a first parameter which is P_PERNR,
IF I enter It and I push enter the others parameters assigned.
I want the others parameters to be avalaible to modify.
If I use AT SELECTION-SCREEN OUTPUT fto assign the fields :
I can modify them but if I push enter they are overwrited by the fields selected with P_PERNR
If I use AT SELECTION-SCREEN ON P_PERNR to assign the fields :
I can modify them but if I change the parameter P_PERNR I doesn't overwrite the others parameters with the new fields selected with P_PERNR.
Could you help me please?
I joined a copy of my code.
Thanks and regards
AT SELECTION-SCREEN ON p_pernr.
IF NOT p_pernr IS INITIAL.
SELECT SINGLE pernr FROM pa0003
INTO pa0003-pernr
WHERE pernr EQ p_pernr.
IF sy-subrc NE 0.
MESSAGE e319(01) WITH text-e01 p_pernr text-e02.
ENDIF.
Vérification de l'existence du NT user
CLEAR w_userid.
SELECT usrid UP TO 1 ROWS
FROM pa0105
INTO w_userid
WHERE subty EQ '0003'
AND pernr EQ p_pernr
AND endda GT sy-datum.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e319(01) WITH text-e01 p_pernr text-e03.
ENDIF.
Vérification de l'existence de l'addresse mail
CLEAR p_mail.
SELECT usrid_long UP TO 1 ROWS
FROM pa0105
INTO p_mail
WHERE subty EQ '0010'
AND pernr EQ p_pernr
AND endda GT sy-datum.
ENDSELECT.
IF sy-subrc NE 0 OR p_mail IS INITIAL.
MESSAGE e319(01) WITH text-e08 text-e09.
ENDIF.
ELSE.
MESSAGE e319(01) WITH text-e04.
ENDIF.
*AT SELECTION-SCREEN OUTPUT.
SELECT nachn vorna UP TO 1 ROWS
FROM pa0002
INTO (p_nachn, p_vorna)
WHERE pernr = p_pernr.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR p_nachn.
CLEAR p_vorna.
ENDIF.
SELECT usrid_long UP TO 1 ROWS
FROM pa0105
INTO p_mail
WHERE pernr = p_pernr
AND subty = '0010'
AND endda GT sy-datum.
ENDSELECT.
IF sy-subrc NE 0.
CLEAR p_mail.
ENDIF.
Détermination de la start date et de la last date pour l'affectation des roles
Ici cette détermination provisoire ne sert qu'à l'affichage.
SELECT begda endda UP TO 1 ROWS
FROM pa0001
INTO (p_begda, p_endda)
WHERE pernr = p_pernr
ORDER BY begda DESCENDING.
ENDSELECT.
Si la date de début est dans le passé on fixe la date de début en date du jour
IF p_begda LT sy-datum AND NOT p_begda IS INITIAL.
MOVE sy-datum TO p_begda.
ENDIF.
END-OF-SELECTION.With this following FM call I don't catch the informations.
Do you know why ?
Thanks and regards.
AT SELECTION-SCREEN ON p_pernr.
*AT SELECTION-SCREEN output.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = ' '
request = ' '
perform_conversion_exits = ' '
perform_input_conversion = ' '
determine_loop_index = ' '
TABLES
dynpfields = wt_dynp
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Problem with selection-screen of program RFEBKA00
Hi,
When i execute the program RFEBKA00, some the text appear weir, or better, some texts does not appear... Like it misses some translation or something, but i check the data elements of the fields and everything is fine...
Does anybody have any idea of what is happening?
Best Regards,
Luís SilvaHi Luis Silva,
I've the same problem.
How do you do to resolve the problem?
Thanks in advance.
Luigi Massa -
Problem in passing selection screen values using CALL TRANSACTION.
Hi All
I am facing problem in transfering selection screen values to the called transaction. I am trying to pass the path of the transaction filer but to no avail. The variable for filepath is not empty.
Below is my code:
DATA: lt_bdcdata TYPE TABLE OF bdcdata,
wa_bdcdata TYPE bdcdata,
opt TYPE ctu_params.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'RFBASM00'.
wa_bdcdata-dynpro = '1000'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_CURSOR'.
wa_bdcdata-fval = 'RFPDO1-FEBUMSF'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'RFPDO1-FEBUMSF'.
wa_bdcdata-fval = gv_filepath.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'PASS'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.
opt-dismode = 'E'.
opt-updmode = 'S'.
CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
Please help.
HarshHi Harsh,
I think you have entered wrong main program for tcode 'FF_5' and wrong screen field for the file name. Use the below code instead of yours.
DATA: lt_bdcdata TYPE TABLE OF bdcdata,
wa_bdcdata TYPE bdcdata,
opt TYPE ctu_params,
gv_filepath type char128 value 'C:\testfile.txt'.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'RFEBKA00'.
wa_bdcdata-dynpro = '1000'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_CURSOR'.
wa_bdcdata-fval = 'UMSFILE'.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'UMSFILE'.
wa_bdcdata-fval = gv_filepath.
APPEND wa_bdcdata TO lt_bdcdata.
CLEAR wa_bdcdata.
*wa_bdcdata-fnam = 'BDC_OKCODE'.
*wa_bdcdata-fval = 'PASS'.
*APPEND wa_bdcdata TO lt_bdcdata.
*CLEAR wa_bdcdata.
opt-dismode = 'A'.
opt-updmode = 'S'.
CALL TRANSACTION 'FF_5' USING lt_bdcdata OPTIONS FROM opt.
Thanks.
Regards,
Jey -
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 -
WAD template with BSP Application - how to read selection screen values
Hello,
I've created Web template with Web Application Designer (WAD).
I would like to extend that page with BSP Application...
Purpuse of this application is to read some information from tables
on BW transaction server and display them within Web page.
Question: How to read selection screen values from a Web template ?
Thanks for any help,
Pawel BorowiecHi,
The selection screen parameters will be on an inputField, so try and get the is of the inputfield generated by doing View source...
And once you get the inputfield Id, you can read the value in the InputField(InF) by
using the following code...!
data : if_value type ref to cl_htmlb_inputfield.
data : variable type string.
if_value ?= cl_htmlb_manager=>get_data( request = request
name = 'inputField'
id = 'InF_ID_here'
if if_value->value is not initial.
variable = if_value->value.
endif.
Hope this helps.
<b><i>Do reward each useful answer..!</i></b>
Thanks,
Tatvagna. -
Dashboard having same query with different selection screen values
Hi,
I want to create a dashboard by including different versions (different selection screen values, like yesterday, last week, last month) of same query. Is it possible to achieve it by without creating separate queries? We are in BI 7.
Thanks in advance
NishaHi,
I want to create a dashboard by including different versions (different selection screen values, like yesterday, last week, last month) of same query. Is it possible to achieve it by without creating separate queries? We are in BI 7.
Thanks in advance
Nisha -
Problem in Selection Screen.
Dear Experts,
I am facing a problem in Selection Screen.
<b>I have 2 radio buttons ,</b>
<b>Radio Button 1</b> - Choosing the file from desktop and
<b>Radio Button 2</b> - Executing from Database
Under Option1 - i have a <b>FILE</b> parameter which is <b><u>Mandatory.</u></b>
Problem Case -
<b>when I choose option 2, Option 1 should be disabled. in the sense the file name which is mandatory here should not be mandatory . Currently, when i choose option 2 - i have to provide some dummy characters in the file parameter because the file parameter is mandatory, and <u><b>I want to avoid this.</b></u>
Please see the entire code .</b>
REPORT ZTEST.
DATA: LV_FILE_PATH(20) TYPE C.
DATA: LV_MASK(20) TYPE C VALUE ',*.XLS ,*.XLS. '.
*-- Macro to put radiobutton on selection screen
*-- &1 - radiobutton parameter name
*-- &2 - text element (description)
*-- &3 - radiobutton group
DEFINE MAKE_RADIOBUTTON.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: &1 RADIOBUTTON GROUP &3.
SELECTION-SCREEN COMMENT 3(60) &2.
SELECTION-SCREEN END OF LINE.
END-OF-DEFINITION.
SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
* From Config File
MAKE_RADIOBUTTON RB_1 ALL_DATA SRC.
SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
* Config file from Presentation server
PARAMETERS: P_FILE1 LIKE T390D-DBNAME OBLIGATORY. "
SELECTION-SCREEN END OF BLOCK A1.
* From database table
MAKE_RADIOBUTTON RB_2 INC_DOWN SRC.
SELECTION-SCREEN END OF BLOCK A0.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
CALL FUNCTION 'WS_QUERY'
EXPORTING
QUERY = 'CD' "// Current Directory
IMPORTING
RETURN = LV_FILE_PATH.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = 'TA_DOWNLOAD.MDB'
DEF_PATH = LV_FILE_PATH
MASK = LV_MASK
MODE = 'O'
IMPORTING
FILENAME = P_FILE1
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
INITIALIZATION.
ALL_DATA = 'From Desktop : ? '.
INC_DOWN = 'From Database : ?'.
T000 = 'Configuration Upload'.
Please help
ThanksHi
You should do some modifications like these:
DEFINE MAKE_RADIOBUTTON_1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: &1 RADIOBUTTON GROUP &3 USER-COMMAND &4.
SELECTION-SCREEN COMMENT 3(60) &2.
SELECTION-SCREEN END OF LINE.
END-OF-DEFINITION.
DEFINE MAKE_RADIOBUTTON_2.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: &1 RADIOBUTTON GROUP &3.
SELECTION-SCREEN COMMENT 3(60) &2.
SELECTION-SCREEN END OF LINE.
END-OF-DEFINITION.
SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
From Config File
MAKE_RADIOBUTTON_1 RB_1 ALL_DATA SRC AAA.
SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
Config file from Presentation server
PARAMETERS: P_FILE1 LIKE T390D-DBNAME MODIF ID FIL. "
SELECTION-SCREEN END OF BLOCK A1.
From database table
MAKE_RADIOBUTTON_2 RB_2 INC_DOWN SRC.
SELECTION-SCREEN END OF BLOCK A0.
AT SELECTION-SCREEN OUTPUT.
IF RB_2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'FIL'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Max -
At selection-screen value- help
Hi All,
I have a requirement that based on a radio button one at selection-screen value-help is triggered and on based on a different radio button another at selection-screen value-help should be triggered.
can it be achieved.
Regards,
JeetuAT SELECTION-SCREEN - selscreen_event
Syntax
| { ON {para|selcrit} }
| { ON END OF selcrit }
| { ON BLOCK block }
| { ON RADIOBUTTON GROUP radi }
| { }
| { ON {HELP-REQUEST|VALUE-REQUEST}
| FOR {para|selcrit-low|selcrit-high} }
| { ON EXIT-COMMAND }.
Alternatives:
1. ... OUTPUT
2. ... ON {para|selcrit}
3. ... ON END OF selcrit
4. ... ON BLOCK block
5. ... ON RADIOBUTTON GROUP radi
6. ... { }
7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
{para|selcrit-low|selcrit-high} }
8. ... ON EXIT-COMMAND
Effect
These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
Alternative 1
... OUTPUT
Effect
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
Note
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
Alternative 2
... ON {para|selcrit}
Effect
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
Note
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
Alternative 3
... ON END OF selcrit
Effect
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
Alternative 4
... ON BLOCK block
Effect
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
Alternative 5
... ON RADIOBUTTON GROUP radi
Effect
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
Note
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
Alternative 6
Effect
The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
Alternative 7
... ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }
Effect
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
Notes
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
Alternative 8
... ON EXIT-COMMAND
Effect
This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
Example
In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
REPORT demo_at_selection_screen.
Global data
DATA: sflight_tab TYPE TABLE OF sflight,
sflight_wa LIKE LINE OF sflight_tab.
Selection screens
PARAMETERS p_carrid TYPE spfli-carrid.
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF sy-dynnr = '0500'.
IF s_conn IS INITIAL.
MESSAGE 'Please enter values' TYPE 'W'.
ELSE.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid IN s_conn.
IF sy-subrc <> 0.
MESSAGE 'No flights found' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Main program
START-OF-SELECTION. -
How can I get selection screen values from outside of program?
Hi. all.
Now. I'm developing moritoring systems and I have problems. for getting selection screen values in runtime. Is there any function, methods or structure to know this?
I'd like to get selection screen values while several programs working in runtime and update these values to table to show current system's status and input values for users in real time.
For example.
Now. 3 PGMs are working on systems.
each PGM is ZAAA01, ZAAA02, ZAAA03.
and ZAAA01 needs input parameter P01, ZAAA02 needs input parameter P02, ZAAA03 needs input parameter P03.
In this case, I have to know values of P01, P02 and P03.
The mornitoring systems will show current working status of PGMs(ZAAA01~03)' and these PGMs' input values.
As fas as I know, the structure 'SCREEN' can be used in each PGM for runtime. Is there any SAP system structure or something else for this purpose?
I hope your hopeful repsponse.
Thanks.Umm..I need to explain more about this.
of course I know SET, GET PARAMETERS.
But I'd like to minimize coding for each PGM level.
I have over hundreds PGMs and I have to develop the PGM(including tables and structures) that mornitor
all of those PGMs on a report in real-time.
This PGM is kind of Process Manager.
First I should know dialogue job PGM and background job that pass parameters using SAP(ABAP) Memory.
And then I have to update those PGMs' input values via screens into tables in real-time.
So, I couldn't use SET,GET PARAMETERS for this PGM.
I want to know methods that can be used for getting information about runtime PGMs' selection screen field values in SAP systems wide.
Please help me some one knows this. -
Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
Statements in called form (Form name: FORM_CHILD):
go_block('display_block') ;
do_key('execute_query') ;
-- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
-- from TABLE_A.
-- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
-- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
if user_choice = 'YES' then
commit ;
else
rollback ;
end if ;
Statements in calling forms:
There are two calling forms having following statements and it is going to call the above said called form.
CALLING FORM 1
Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...; Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
CALLING FORM 2:
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...;
insert into table_b ...;
Our understanding:
Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
Actual happenings or Mis-behavior:
Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
Our mail ID: [email protected]
Thanks a lot in advance.You have several problems:
1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.
Maybe you are looking for
-
Is it possible to mirror the display on the Macbook pro which is two years old to my iMac which is four years old? Macbook pro is running OS X Lion 10.7.5 and the iMac is running OS X 10.6.8 (10K549). Neither of them have Thunderbolt ports.
-
Hi, This question is related to ADF table filters. Let us take an example of a View Object that is being dropped in a jspx page as a "ADF Table" with filters. Whenever user applies a filter on a column, will the data for view object be queried from d
-
i use AS2 and wish to start using AS3, however i fid it confusied with CLASSES. is it possible to learn and use AS3 without classes?
-
How to stop sound of video?
Hi, I have an issue. In the landing page of my site I have loaded a video with standard html5 code. When I click on an anchor link I would like to mute the video, or even better set it to the last frame. (In the video I have removed the controls it i
-
Is this a real e-mail/offer?
Dear Jackie, Thank you for choosing Verizon. We never overlook the fact that you've trusted us to keep you connected to what's important to you. Your continued loyalty inspires us to deliver more. More value. More savings. More choices. More of every