Application Development and Automation 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: 
Read only

F4 help

Former Member
0 Likes
653

Hi frnds,

I have a requirement where when i am pressinng f4

in the selection screen parameter. i need to have my default values to be populated.

like if i press f4 i need to have values A,B,C...

so frnds can anyone suggest how to get tht.

regards,

sanjay

4 REPLIES 4
Read only

Former Member
0 Likes
610

Two ways off the top of my head.

1. Set the values up in the Domain for the Data Element.

2. Use VRM to build and assign the drop downlist.

Something like this.


TYPE-POOLS             vrm.

DATA: ltype_field   TYPE vrm_id,
      ltype_result  TYPE STANDARD TABLE OF vrm_value,
      ltype_val     LIKE LINE OF ltype_result.


  REFRESH ltype_result. CLEAR ltype_result.
* Drop down values

  SELECT ltype ltypex
    INTO TABLE ltype_result
*    into ( ltype_val-key, ltype_val-text )
    FROM zlmltyp
    WHERE auth NE '9'.    "System Only
*    APPEND ltype_val TO ltype_result.
*  ENDSELECT.

* Field name to assign drop down values
  ltype_field = 'WK_LTYPE'.
  CALL FUNCTION 'VRM_SET_VALUES'
       EXPORTING
            id              = ltype_field
            values          = ltype_result
       EXCEPTIONS
            id_illegal_name = 1
            OTHERS          = 2.
  IF sy-subrc <> 0.

  ENDIF.

Read only

Former Member
0 Likes
610

Hi,

In the event at selection-screen on value-request for para_var.

type-pools: vrm.

data:

ws_cnt type i,

i_list_values type vrm_values,

ws_list_line like line of i_list_values.

SELECT * FROM tsact

INTO CORRESPONDING FIELDS OF TABLE i_tsact

WHERE langu = 'E'.

IF sy-subrc = 0.

LOOP AT i_tsact INTO ws_tsact.

ws_cnt = ws_cnt + 1.

ws_list_line-key = ws_cnt.

ws_list_line-text = ws_tsact-comm_text.

APPEND ws_list_line TO i_list_values.

ENDLOOP.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'PARA_VAR'

values = i_list_values.

Hope you can modify appropriately as per ur need.

Regards,

Subramanian

Read only

Former Member
0 Likes
610

go to se11 create searchhelp. (Collective or element)

for example say the search help name is zshelp.

in your report you can call this search help as follows :

parameter x type vbak-vbeln matchcode zshelp.

select-options x for vbak-vbeln matchcode zshelp.

reward if useful

thnks and rgrds,

raghul

Edited by: raghul kanna on Jul 10, 2008 6:15 PM

Read only

Former Member
0 Likes
610

HI


INITIALIZATION.
  SELECT * INTO CORRESPONDING FIELDS OF TABLE so_setheader
           FROM    setheader
           WHERE   setclass = '0000'.
  
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_kost-low.
* F4 uitvoeren
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'setname'
      dynprofield = 'so_kost'
      dynpprog    = sy-cprog
      dynpnr      = sy-dynnr
      value_org   = 'S'
    TABLES
      value_tab   = so_setheader.
 
AT SELECTION-SCREEN ON so_kost.
  READ TABLE so_setheader INTO wa_so_setheader WITH KEY setname = so_kost-low.
 
  IF sy-subrc NE 0.
    so_kost = space.
    MESSAGE e333(s1) WITH 'Does not exist!'.
    STOP.
 
  ENDIF.