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: 

how to given conditional search helps ?

Former Member
0 Kudos

i have a table control in which there is a field ( PO no)

and is directly taken from dictionary table ekko

GR no is another field of the TC which is also taken from ddic ( MBLNR )

GR no already has a search help which shows all the GR nos

now depending on the PO no chosen the search help of a GR no should change.

that search help should show only those GR no which are related to the PO chosen

7 REPLIES 7

hymavathi_oruganti
Active Contributor
0 Kudos

then u need to go for search_help_exit.

it is a fn module in which u can write logic and attch it to the search help.

or else, programmatically u can build ur own f4 help to the field by using fn module f4if_int_table_vale_disply.

former_member184569
Active Contributor
0 Kudos

Hi Tarang,

This describes Vendor search helps in the IMG, but this can all be done in

SE11 as well ............... for any search help.

OB50 > 'maintain in Logon Language' > goto 'included search helps'

Pick one - say, KREDA - double-click it > switch to 'change' - 'maintain

in logon language' again.

Click on Selection Method = M_KREDA - at this point, you may have to

register the object with OSS - goto Selection Conditions tab.

Insert a condition -

Table KNA1 - Field LOEVM - Operator EQ or '=' - Compare value 'X'

Save.

This describes adding a condition in a standard search help - best if you

create your own Z version of the search help to replace the standard.

http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/displaying-selected-entries-in-a-sea...

Regards,

Susmitha

Dont forget to reward points for all useful answers.

Former Member
0 Kudos

HI

GOOD

GO THROUGH THIS LINK

http://72.14.203.104/search?q=cache:c2GazS6w-JQJ:fuller.mit.edu/tech/search_helps.pptCONDITIONALSEARCHHELP,+SAP&hl=en&gl=in&ct=clnk&cd=9

THANKS

MRUTYUN

Former Member
0 Kudos

Hai Tarang Shah

go through the following Code

You just change the fields & Tables and Check the code

DATA: T_FIELD LIKE DFIES OCCURS 0 WITH HEADER LINE,

T_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE,

L_RETFIELD TYPE DFIES-FIELDNAME.

CLEAR CABNT.

SELECT ATINN INTO CABNT-ATINN UP TO 1 ROWS FROM CABNT

WHERE ATBEZ = CHARACTERISTIC_IN.

ENDSELECT.

MOVE: 'AUSP' TO T_FIELD-TABNAME,

'ATWRT' TO T_FIELD-FIELDNAME.

APPEND T_FIELD. CLEAR T_FIELD.

CLEAR CAWN.

SELECT ATWRT INTO T_VALUETAB-VAL FROM CAWN

WHERE ATINN = CABNT-ATINN.

APPEND T_VALUETAB.

ENDSELECT.

L_RETFIELD = 'ATWRT'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = L_RETFIELD

TABLES

VALUE_TAB = T_VALUETAB

FIELD_TAB = T_FIELD

RETURN_TAB = T_RETURN

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

.

READ TABLE T_RETURN INDEX 1.

IF SY-SUBRC = 0.

D_VALUE = T_RETURN-FIELDNAME.

ELSE.

CLEAR D_VALUE.

ENDIF.

Thanks & regards

Sreeni

0 Kudos

Dear srini ,

i am using the following code

read table itab_ctrl index ztabctrl-current_line into wa5_ctrl.

MOVE: 'MBLNR' TO T_FIELD-TABNAME,

'MJAHR' TO T_FIELD-FIELDNAME.

APPEND T_FIELD. CLEAR T_FIELD.

select mblnr from mseg into table t_valuetable

where ebeln = wa5_ctrl-ebeln.

L_RETFIELD = 'MBLNR'.

if sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = L_RETFIELD

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

  • VALUE_ORG = 'C'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = T_VALUETABLE

FIELD_TAB = T_FIELD

RETURN_TAB = T_RETURN

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 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.

endif.

where depending on the PO no entered (itab_ctrl-ebeln)in the table control corresponding GR nos are taken(mblnr) and stored in t_valuetable

but the above FM is giving a dump : ASSIGN_LENGTH_0

Regards,

Tarang

Former Member
0 Kudos

Hello tarang,

If you have ur own TC then I would suggest u can use Process on value-request and then manipulate what result you would want to disply.

former_member480923
Active Contributor
0 Kudos

Try this Sample cod ein F4..

REPORT SELECTION_SCREEN_F4_DEMO.

PARAMETERS: P_CARR_1 TYPE SPFLI-CARRID,
            P_CARR_2 TYPE SPFLI-CARRID.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CARR_2.

  CALL SCREEN 100 STARTING AT 10 5
                  ENDING   AT 50 10.

MODULE VALUE_LIST OUTPUT.

  SUPPRESS DIALOG.
  LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
  SET PF-STATUS SPACE.
  NEW-PAGE NO-TITLE.

  WRITE 'Star Alliance' COLOR COL_HEADING.
  ULINE.

  P_CARR_2 = 'AC '.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'Air Canada'.
  HIDE P_CARR_2.

  P_CARR_2 = 'LH '.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'Lufthansa'.
  HIDE P_CARR_2.

  P_CARR_2 = 'SAS'.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'SAS'.
  HIDE P_CARR_2.

  P_CARR_2 = 'THA'.
4  WRITE: / P_CARR_2 COLOR COL_KEY, 'Thai International'.
  HIDE P_CARR_2.

  P_CARR_2 = 'UA '.
  WRITE: / P_CARR_2 COLOR COL_KEY, 'United Airlines'.
  HIDE P_CARR_2.

  CLEAR P_CARR_2.

ENDMODULE.

AT LINE-SELECTION.

  CHECK NOT P_CARR_2 IS INITIAL.
  LEAVE TO SCREEN 0.

There you can change ur condition for displaying restricted values

Hope this Helps

Anirban