Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Search help with 3 return values

Former Member
0 Kudos
2,173

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.

10 REPLIES 10

Former Member
0 Kudos
306

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.

kesavadas_thekkillath
Active Contributor
0 Kudos
306

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.

0 Kudos
306

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.

0 Kudos
306

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.

0 Kudos
306

The search help name is CV01, check it in se11.

former_member1245113
Active Contributor
306

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

0 Kudos
306

It is working fine! Thank you!

Former Member
0 Kudos
306

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.

Former Member
0 Kudos
306

I solved it in a different way. Thanks for replying.

SuhaSaha
Product and Topic Expert
Product and Topic Expert
306

>

> 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