2010 Feb 24 10:15 AM
Hi experts,
I have a screen with 3 input fields. The first input field has a search help. How can I do that, if I chose a value from the search help list, then the other fields on the screen should have receive some values according to the search help.
I mean: I have 3 fields on the screen f1, f2, f3
f1 has a search help, in the search help I see: date, f2, f3
f1 receives the date because this is the export parameter of it, and f2, f3 remains empty. I need to pass the values f2, f3 from the search help list.
2010 Feb 24 10:24 AM
Hi,
You are getting the value for f1 through search help.Now,
at selection-screen output.
if p_f1 is not initial.
Loop at screen.
if screen-name = 'P_F2'.
<here write ur logic to get the value for f2 based on f1.>
screen-input = 1.
modify screen.
elseif screen-name = 'P_F3'.
<here write ur logic to get the value for f3 based on f1.>
screen-input = 1.
modify screen.
endloop.
endif.
Check the F1 help on screen for more information.
Thanks.
ramya.
2010 Feb 24 8:11 PM
Hi you have to create a search help.
For example see the transaction CV01N, check the search help attached to the data element of first input field.
2010 Feb 25 9:48 AM
This is the exact fuctionality what I want, but I did not found any search help. It looks like a very complicated code behind the screen.
2010 Feb 25 10:05 AM
Name of the search help on this field is CV01
You can find it in the value table of domain. Search help is defined on field doknr.
2010 Feb 25 10:08 AM
2010 Feb 25 10:07 AM
Hi White,
"It would be great help for others who search for similar Issue,
" So please take some time in Providing details of how you managed it
Check the following
" Implement your own search Help as below
data : from_f4.
PARAMETERS : carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
fldate TYPE sflight-fldate.
DATA : itab TYPE TABLE OF sflight WITH HEADER LINE.
DATA : fmap TYPE TABLE OF dselc WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR carrid." If it is a selection Screen
else in PROCESS ON VALUE REQUEST
from_f4 = 'X'. " This indicates the Value come from F4 only
SELECT * FROM sflight INTO TABLE itab.
SORT itab BY carrid connid fldate.
DELETE ADJACENT DUPLICATES FROM itab
COMPARING carrid connid fldate.
fmap-fldname = 'CARRID'.
fmap-dyfldname = 'CARRID'.
APPEND fmap.
fmap-fldname = 'CONNID'.
fmap-dyfldname = 'CONNID'.
APPEND fmap.
fmap-fldname = 'FLDATE'.
fmap-dyfldname = 'FLDATE'.
APPEND fmap.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = 'SFLIGHT'
retfield = 'CARIID'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
DYNPROFIELD = 'CARRID'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = itab
* FIELD_TAB =
* RETURN_TAB =
dynpfld_mapping = fmap
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
." Just Execute this pilot program and verify
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Cheerz
Ram
2021 Dec 16 5:59 AM
2010 Feb 26 8:46 AM
Okay, I have a sample CV01 search help, but it looks like very difficult. It is a collective search help, with some elementary and collective search help included in its Include part And this included search helps has exits and additional included collective search helps. It like a tree with lots of branches.
2010 Mar 03 10:27 AM
2010 Apr 05 7:32 AM
>
> I solved it in a different way. Thanks for replying.
Hello Mr.White,
Is your solution copyrighted ? Can you please be kind enough to share it with fellow SDNers ?
Cheers,
Suhas