Search help on select optionbased on other select ooption entered
hi,
I need to know search help for selection screen based on value entered in another select options
SELECT-OPTIONS : s_bukrs FOR bkpf-bukrs OBLIGATORY,
s_belnr FOR bkpf-belnr,
s_gjahr FOR bkpf-gjahr OBLIGATORY,
s_budat FOR bkpf-budat OBLIGATORY,
s_akont FOR lfb1-akont,
s_saknr FOR bseg-saknr. """"""""""
*PARAMETERS : p_akont type lfb1-akont.
here i need to get the vaues of s_akont based on values entered in s_bukrs,
In event at selection screeen for s_akont i am writing
SELECT a~bukrs
a~saknr
a~mitkz
b~txt50
FROM skb1 AS a
INNER JOIN skat AS b
ON asaknr = bsaknr
INTO CORRESPONDING FIELDS OF TABLE lt_skb1
WHERE bukrs IN s_bukrs
AND mitkz = 'K'
AND b~spras = 'EN'.
but not getting value of s_bukrs at this point of execution. I requir the fiels in select statement in F4 of s_akont.
what are the function modules to call and what is the way to do??
thanks..
Check the below solution for your issue - The FM "'RS_SELECTIONSCREEN_READ" is used to get the S_BUKRS values. Even though the FM returns single values of the Select options ( Low & High ) it fits the requirement.As the trick part is...If user enters multiple values or even enters sign for select options, S_BUKRS itself will have the value. That's why we have If else S_BUKRS[] is initial and R_BUKRS. Let me know if you have any issues with the solution provided.
TABLES: bkpf, lfb1.
DATA lt_fieldvalues TYPE STANDARD TABLE OF rsselread.
DATA ls_fieldvalue TYPE rsselread.
DATA r_bukrs TYPE RANGE OF bkpf-bukrs.
DATA ls_bukrs LIKE LINE OF r_bukrs.
SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs,
s_akont FOR lfb1-akont.
INITIALIZATION.
ls_fieldvalue-name = 'S_BUKRS'.
ls_fieldvalue-kind = 'S'.
ls_fieldvalue-position = 'LOW'.
APPEND ls_fieldvalue TO lt_fieldvalues.
ls_fieldvalue-name = 'S_BUKRS'.
ls_fieldvalue-kind = 'S'.
ls_fieldvalue-position = 'HIGH'.
APPEND ls_fieldvalue TO lt_fieldvalues.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_akont-low.
refresh r_bukrs.
clear ls_bukrs.
IF s_bukrs[] IS INITIAL.
CALL FUNCTION 'RS_SELECTIONSCREEN_READ'
EXPORTING
program = sy-repid
dynnr = '1000'
TABLES
fieldvalues = lt_fieldvalues.
IF NOT lt_fieldvalues[] IS INITIAL.
ls_bukrs-sign = 'I'.
READ TABLE lt_fieldvalues INTO ls_fieldvalue WITH KEY position = 'LOW'.
IF sy-subrc EQ 0.
ls_bukrs-low = ls_fieldvalue-fieldvalue.
ENDIF.
READ TABLE lt_fieldvalues INTO ls_fieldvalue WITH KEY position = 'HIGH'.
IF sy-subrc EQ 0.
ls_bukrs-high = ls_fieldvalue-fieldvalue.
ENDIF.
IF ls_bukrs-high IS NOT INITIAL.
ls_bukrs-option = 'BT'.
ELSE.
ls_bukrs-option = 'EQ'.
ENDIF.
if ls_bukrs-low is not initial or ls_bukrs-high is not initial.
APPEND ls_bukrs TO r_bukrs.
endif.
ENDIF.
ELSE.
r_bukrs[] = s_bukrs[].
ENDIF.
SELECT a~bukrs a~saknr a~mitkz b~txt50 FROM skb1 AS a
INNER JOIN skat AS b
ON a~saknr = b~saknr
INTO CORRESPONDING FIELDS OF TABLE lt_skb1
WHERE bukrs IN r_bukrs " Changed to r_burks
AND mitkz = 'K'
AND b~spras = 'EN'.
Similar Messages
-
Search help to a field of a selection screen
how do we add a search help to a field of a selection screen..??
refer this code - reward if helpfull
*& Report ZGILL_VALUE_REQUEST *
REPORT ZGILL_VALUE_REQUEST .
data: begin of lt_all occurs 0.
include structure DYNPREAD.
data end of lt_all.
data: begin of lt_selected occurs 0.
include structure DDSHRETVAL.
data: end of lt_selected.
DATA: BEGIN OF lt_code OCCURS 0,
code LIKE zgill_main-PERNR,
END OF lt_code.
data no_dyn like sy-dynnr.
Parameters : ECODE like zgill_main-PERNR.
*parameters: pernr like pa0001-pernr .
no_dyn = sy-dynnr. "give the scren no directly or sy-dynnr in case of report.
At selection-screen on value-request for ECODE.
select PERNR into table lt_code from zgill_main.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ECODE'
dynpprog = sy-repid
dynpnr = no_dyn
dynprofield = 'ECODE'
window_title = 'Employee Details'
value_org = 'S'
DISPLAY = 'F'
TABLES
value_tab = lt_code
RETURN_TAB = lt_selected.
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
*if sy-subrc eq '0' .
write: 'success'.
*endif.
read table lt_selected index sy-tabix.
move lt_selected-fieldval to ECODE. -
Using SEARCH HELP exit in dependency of other parameters from my dynpro.
Hello experts,
how can I access the values of input fields (parameters or select-options) from my dynpro?
I need to build a F4-help in dependencie of another field on the screen with help of the F4 - exit. I think this should be possible.
If I do test the search help with SE11 it works fine. All parameters from screen are given in SHLP_TAB[1]-INTERFACE (the parameter of my f4-help-exit)
The short example explains the problem more detailed.
REPORT test_dynpro_events_ck.
PARAMETERS ea1 TYPE my_char_10_ck DEFAULT 'here I push F4' MATCHCODE OBJECT MY_F4_HELP_CK.
PARAMETERS ea2 TYPE my_char_10_ck DEFAULT 'this is the value I need to generate the F4 help of field ea1'.
MY_F4_HELP_CK:
import: EA1 and EA2
export EA1
Many Thanks
ChristianThank you so far.
But how are these parameters passed to the search help without using global set/get parameters or DYNPRO_READ_VALUE? Why can I put these parameters to my search help as input parameters ... seems to be useless if I use search help on Selection-Dynpros?
Is there not a better way to deal with search-helps which are dependent from other input fields? Btw. I need the value without passing PAI and PBO.
In my Example:
doing some text inputs in field EA2 -> hit search help on EA1 -> need a selection dialog in dependency of the input in EA2. This can not be that complicated?
Many thanks
Christian -
Search help is not coming while using select-options?
Hi All,
I am using select options in my selection screen, i used wdr_select_options, also i coded some parameter values also
( non select-options ). For that field i am not getting search help. If i create as normal i am getting? Suggestions pelase?
Thanks,
Venkat.HI
what kind of search help is associated with the field.
ADD_SELECTION_FIELD method has some specific parametrs for value_help
give the input there and try again.
these parameters are
I_VALUE_HELP_TYPE
I_VALUE_HELP_ID
I_VALUE_HELP_MODE
I_VALUE_HELP_STRUCTURE
thanks
sarbjeet dingh -
Search help for a field using a selection method which has a text table.
Hello all,
I am trying to create a search help for one of the fields in a structure say RFCDEST. Now for this i am giving the selection method as the DB table where all the RFCDEST are maintained. However there is a text table which is also comes up for this selection method and the description of the filed RFCDEST is in that text table and the description is not stored in the main table which i specified as the selection method.
My query is that on F4 now all the rfc destinations are being shown however the description i am not able to show them because there is no field in the table specified in the selectionmethod which hold s the description but instead it is there in the text table, how can i fetch the description from there and display in the search help.
Warm Regards,
Naveen Mlook at search help FC_RFCDEST. that problem has already been solved with this search help.
-
F4 ( Search Help ) for date field on the selection screen
Hi Freinds,
i have used WDR_SELECT_OPTIONS In my component, i have one date field on selection screen(BUDAT), for this date field i want seach help
this is my code
create a range table for Posting Date
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'BUDAT' ).
add Posting Date to the selection
wd_this->m_handler->add_selection_field( i_id = 'BUDAT'
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
I_VALUE_HELP_ID = '??????'
I_DESCRIPTION = 'Posting Date'
it_result = lt_range_table ).
can any one help me
Thanks
Srinihi sarbjeet
i created search help in dictionary and i used that search help in my program, but still its now working , any other ideas
Thnx
srini -
How to add search help to customer field of field selection on ESS Screen?
Hi all,
I am able to get customer field CUSTOMER01 from field selection customization on leave application ESS Screen. How to attach search help which contains Holiday date & its description to this field?
Thanks,
SwapnaliHi,
This is for working time -> leave request screen
In field selection there is one field 'code for description of illness'. I have done required config for getting this field on ESS Screen. This field already has standard search help. So I m able to view the values of this field on ESS screen .
So I thought to try assigning custom search help to this CUSTOMER0 field. Is there any method in BADI PT_ABS_REQ through which I can achieve the same. Please help.
-Swapnali -
Selecting multiple values from a search help
Hi Experts
Anyone knows if it is possible to select multiple values from a search help?
Thanks
GauravHi,
You cannot select mutiple values from search help as it is linked to inputfield and hence it will accept single value only. But at the same time, you may able to pass row of values to different inputfields.
Refer http://help.sap.com/saphelp_dm40/helpdata/en/3d/e53642e2a3ab04e10000000a1550b0/content.htm
Thanks,
Chandra -
Regarding Search help on selection-screen field
Hi there,
I am working on custom tables.
I have a requirement to maintain search pattern on a selection-screen field.
selection-screen parameter: p_name which is company name filed from Z table.
By giving a string like Holl* and by pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
Thanks in advance.
-TulasiHi
Go through the link given below :
How to create a search help for my own fields in selection screen
F4 search help on report selection screen
also try :
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'VKORG'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_VKORG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
TABLES
VALUE_TAB = T_TABLE1
FIELD_TAB = field_tab
RETURN_TAB = RET_TAB
DYNPFLD_MAPPING = DYN_TAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
With Regards
Nikunj shah -
Search help for A field in select option which doesnt have search help in c
u have table in QM which is QMFE in whihc field FECOD which doesnt have search help , but my requirement is that in select option in report to have users to see its search help, anyone there to help me
Hi sridhar loganathan,
For this goto SE11 and create a ZFECOD Search help for that field. In Defination Tab enter table name
QMFE and Enter Z_F4_FECOD_EXIT in Search help Exit.
Then create a FM in SE37 as Z_F4_FECOD_EXIT under a FG. And then write code as follows for example:
FUNCTION Z_F4_REG_EXIT.
""Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
TYPES: begin of ty_code,
dam_code type QMFE-FECOD ,
end of ty_code.
DATA : tw_code type ty_code,
ta_code type table of ty_code.
IF "callcontrol-step <> 'SELONE' AND
callcontrol-step <> 'SELECT' AND
callcontrol-step <> 'DISP'.
EXIT.
ENDIF.
IF callcontrol-step = 'SELECT'.
CALL FUNCTION 'F4UT_PARAMETER_ALLOCATE'
EXPORTING
PARAMETER = 'FECOD'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
OTHERS = 3.
ENDIF.
IF callcontrol-step = 'DISP'.
Get the Region
CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
EXPORTING
PARAMETER = 'FECOD'
FIELDNAME = 'FECOD'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
RESULTS_TAB = ta_code
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
PARAMETER_UNKNOWN = 1
OTHERS = 2.
IF SY-SUBRC = 0.
SORT TA_CODE BY DAM_CODE.
Deleting duplicate damage codes in Internal Table ta_code
DELETE ADJACENT DUPLICATES FROM TA_CODE COMPARING DAM_CODE.
Passing changed Internal table to FM
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
PARAMETER = 'REGION'
FIELDNAME = 'REGION'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
SOURCE_TAB = ta_code
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
PARAMETER_UNKNOWN = 1
OTHERS = 2.
ENDIF.
ENDIF.
ENDFUNCTION.
Revert me for any clarifications.
Regards,
Suneel G. -
How to attach search help to a particular feild in the selection screen..
Hi all,
how can we put a search help for a field in the selection screen.
i have to attach search help for this.
SELECT-OPTIONS: s_xabln FOR qals-mblnr. "GRS NoFind out the respective search help and use like this...
Parameters : p_pernr type pa0001-pernr MATCHCODE OBJECT prem .
Here PREM is the search help for PERNR -
Search help for selection screen field
Hi ,
steps for creating search help for a key field in selection screen..
tables is a userdefined from which the field is taken..
thxs,
vindhi,
c this.
REPORT ZXYZ_0002 .
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
PARAMETERS: P_BUKRS type T001-BUKRS.
selection-screen comment 30(20) BUTXT for field p_bukrs.
selection-screen end of line.
selection-screen end of block b1.
at selection-screen output.
if butxt is initial.
select single butxt into butxt
from t001
where bukrs = p_bukrs.
endif.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
read table return with key fieldname = 'P_BUKRS'.
Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
Get the company code from db and add to dynpro
data: xt001 type t001.
clear xt001.
select single * into xt001
from t001
where bukrs = return-fieldval.
dynfields-fieldname = 'BUTXT'.
dynfields-fieldvalue = xt001-butxt.
append dynfields.
Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.
rgsds
anver
if hlped mark points -
Skip standard select method in search help exit
Hi experts,
how to skip standard select method in search help exit? Currently I'm selecting my custom data with select statement in 'DISP' section, but still text: 'more than 500 results were found' is shown. I just want to skip/disable standard selection. Thank you.
BR
PaulHi check my weblog: https://wiki.sdn.sap.com/wiki/x/du0
-
Selection screen: PNP database or other selection criteria
I received a specification of a new to be developed program where they defined a selection screen with a with 2 radio buttons:
1. Use the logical database PHP for data selection (rb1);
2. Use other criteria for data selection (rb2).
My question is, is this possible?
Or should I add the other criteria between the GET PERNR and the following code with?
Sample:
GET PERNR
IF rb2 = X.
[Check other criteria]
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDIF.
nullWhen either pnp OR other selection :
Create program 1 with 2 radiobuttons ==> pnp-selection (rb1)or other selection (rb2). When rb1 is selected go to pgm1 with pnp ; when rb2 is selected go to pgm2 with other selection criteria. Copy pgm1 to pgm2 and add extra selections en delete pnp-statements.
When pnp WITH extra selections : 1 pgm can be used as you described. -
Creating search help for a field in AdHoc Query
Hi
We have created an infoset based on LDB PCH.
(The infoset contains object type O only).
For the object-id field the users want search help when choosing this field for selection.
Using "start via selection screen" does not give a good solution.
Can anyone explain how I can create search help for fields in an infoset?
Regards
KirstenHi
We have created an infoset based on LDB PCH.
(The infoset contains object type O only).
For the object-id field the users want search help when choosing this field for selection.
Using "start via selection screen" does not give a good solution.
Can anyone explain how I can create search help for fields in an infoset?
Regards
Kirsten
Maybe you are looking for
-
Got syntax error while releasing transport
Hi all, we have a requirement that we need to create customer exit variable. i created method ZBW_ZCM_WEEK12 for the class ZBW_XRSR and collected under the TR. when i try to release the TR,Its giving an error that Class ZBW_XRSR Method ZBW_ZC
-
Query to find out the list of user who have delete access
Hi, I need a query to find out the list of users who have delete access on perticular folder/universe/ reports in infoview. Please advice. Regards, Neo.
-
I think my hard disk is spoiled but I'm not sure?
I have a Macbook Pro bought in 2012. I am a heavy Mac user because I am in college and I both study and entertain myself using my Macbook. So 2 months ago my battery spoiled. I took it to a Mac store and they said I reached my cycle and I have to pay
-
Is there anyway to organize my video files in iPhoto? I hate that when I am looking through an album one picture at a time it just skips over the video files when I arrow over. I would love to just have a single album with all my videos, does anyone
-
Sharepoint 2013 Datasheet View Navigation performance Issues on large lists
I was recently upgraded to SharePoint 2013. In SharePoint 2010 Datasheet View, one could scroll through and bulk select 100s of line items in Datasheet view very easily. Navigating the datasheet view was just like navigating through a worksheet in