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: 

AT SELECTION-SCREEN ON VALUE-REQUEST FOR D

Former Member
0 Kudos

I have four Select options A,B,C,D

For A value is entered

For B value is entered

For C value is entered

For D , i need to create a custom search help.i will develop that in the event

AT SELECTION-SCREEN ON VALUE-REQUEST FOR D.while generating the search help here

i need to access the values that are entered in A,B,C.

Plz any help ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I want the values entered in A,B,C when i execute the REPORT .I know how to use the FM

thanks

Raghunandan

8 REPLIES 8

Former Member
0 Kudos

Hi,

You can use the Function module 'F4IF_INT_TABLE_VALUE_REQUEST' to display your custom values in search help. Refer the below sample code on how to use this function module.

REPORT ZTAB_SHELP.

parameters: p_ebeln type ekko-ebeln.

TYPES: BEGIN OF t_ekko,

ebeln TYPE ekpo-ebeln,

ebelp TYPE ekpo-ebelp,

statu TYPE ekpo-statu,

aedat TYPE ekpo-aedat,

matnr TYPE ekpo-matnr,

menge TYPE ekpo-menge,

meins TYPE ekpo-meins,

netpr TYPE ekpo-netpr,

peinh TYPE ekpo-peinh,

END OF t_ekko.

DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,

wa_ekko TYPE t_ekko,

it_return type STANDARD TABLE OF DDSHRETVAL,

wa_return like line of it_return.

**************************************************************

*at selection-screen

at selection-screen on value-request for p_ebeln.

select *

up to 10 rows

from ekko

into CORRESPONDING FIELDS OF TABLE it_ekko.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = 'EKKO'

RETFIELD = 'EBELN'

  • PVALKEY = ' '

  • DYNPPROG = sy-repid

  • DYNPNR = sy-dynnr

  • DYNPROFIELD = 'EBELN'

  • STEPL = 0

WINDOW_TITLE = 'Ekko Records'

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = 'X' "allows you select multiple entries from the popup

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET = ld_ret

TABLES

VALUE_TAB = it_ekko

  • FIELD_TAB = lt_field

RETURN_TAB = it_return

  • DYNPFLD_MAPPING =

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

READ TABLE it_return into wa_return index 1.

p_ebeln = wa_return-fieldval.

Regards,

Murali

Edited by: murali krishnan Rajendran on Jan 27, 2011 8:03 AM

Former Member
0 Kudos

I want the values entered in A,B,C when i execute the REPORT .I know how to use the FM

thanks

Raghunandan

0 Kudos

hi raghu,

use the Fm 'DYNP_VALUES_READ' to read the values of A , B and C and then use F4IF_FIELD_VALUE_REQUESTfunction module..

regards,

syed

Edited by: SYED_ibbu on Jan 27, 2011 8:14 AM

0 Kudos

Hi,

Use the FM 'DYNP_VALUES_READ' and read the values of the fields where the value is entered and then call the FM F4IF_INT_TABLE_VALUE_REQUEST.

sample code




  lit_df-fieldname = <field1>'.
  APPEND lit_df.
  lv_repid = sy-repid.
  lv_scrnr = '1000'.

  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname               = lv_repid
      dynumb               = lv_scrnr
    TABLES
      dynpfields           = lit_df
    EXCEPTIONS
      invalid_abapworkarea = 1
      invalid_dynprofield  = 2
      invalid_dynproname   = 3
      invalid_dynpronummer = 4
      invalid_request      = 5
      no_fielddescription  = 6
      invalid_parameter    = 7
      undefind_error       = 8
      double_conversion    = 9
      stepl_not_found      = 10
      OTHERS               = 11.

  LOOP AT lit_df.
    EXIT.
  ENDLOOP.

You need to write the logic in the event

AT SELECTION-SCREEN ON VALUE-REQUEST FOR D.

Regards,

Nagaraj

Former Member
0 Kudos

Hi,

If you want to display your own F4 help then there is a function module that can be used :

AT SELECTION-SCREEN ON VALUE-REQUEST FOR D

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' "for displaying the F4 help

EXPORTING

retfield = database field (of which D is a type)

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = D

value_org = 'S'

TABLES

value_tab = i_valtab[].

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

here populate the value of i_valtab with your own values.

Moreover if you want a search help for D then create a custom search help according to your requirement in SE11 and assign it to D as

select-options : D TYPE vbpa-kunnr MATCHCODE OBJECT zsearchhelp.

0 Kudos

Hi

I know this.Plz tell how get values entered in A,B,C. in the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR D.

thanks

0 Kudos

If the values entered in A.B and C are required then you can capture the values entered by the user in an internal table

and then use that internal table in the FM. I think that will solve the purpose.

Former Member
0 Kudos

Hi

To read a value for a screen use GET_DYNP_VALUE FM

IMPORT parameters

I_FIELD LIKE DYNPREAD-FIELDNAME " Your Field A, B. C

I_REPID LIKE SY-REPID "Report

I_DYNNR LIKE D020S-DNUM "Dynpro Number

EXPORT

O_VALUE " " Value

Hope , the help