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: 

Value Request in Dynamic selection selection screen

Former Member
0 Kudos

Hello Gurus,

Please let me know whether we can add F4 - > Value request in Dynamic Selection screen.

If Yes please do let me know how to do it. If posssible please give me the code.

Thanks

Mac

5 REPLIES 5

Former Member
0 Kudos

Hello Mohan,

Can you explain the requirement of dynamic selection screen in detail so that we can send you the sample code.

Thanks,

Jyothi

0 Kudos

Hi jyothi,

Thanks for the reply. Here is my requirement.

I am having a selection screen and a push button for dynamic selection in application toolbar .

Once we click on the push button a dynamic screen is displayed which already consists of 5 fields in it.

These 5 fields are maintained in a Z-table. I need to add a new custom field in it. I have even done that.

But here comes the problem.

1) For that particular field I need it to display in format of an parameter. Since the default is select-options range. If possible Need to get drop down list.

2) Need to get F4 help for this field in the dynamic selection screen and need to select it. This is necessary.

Please do help me.

Regards

Mac

0 Kudos

Hi,

Create a search help for the particular field in SE11.

Assign this search help to your field in your report.

Ex: parameter : <variable> type <var_type> MATCHCODE OBJECT <search help name>

try this.

Thanks

Sumi

Former Member
0 Kudos

Hi Mac,

It is pssible to have F4 help for fields in dynamic selection screen.

Please find the sample code below.

PROGRAM ZTESTABC1 .

DATA : GV_VBELN LIKE VBAK-VBELN,

GV_AUART LIKE VBAK-AUART.

DATA : BEGIN OF I_VBAK OCCURS 0,

VBELN LIKE VBAK-VBELN,

AUART LIKE VBAK-AUART,

NETWR LIKE VBAK-NETWR,

END OF I_VBAK.

ranges : r_auart for vbak-auart.

data : begin of value_tab occurs 0,

vbeln like VBAK-VBELN,

end of value_tab.

data : ret_tab type ddshretval OCCURS 0 WITH HEADER LINE.

DATA : GV_REPID LIKE SY-REPID,

GV_DYNNR LIKE SY-DYNNR.

  • Static selection screen

SELECTION-SCREEN begin of block b1.

parameters : p_rb RADIOBUTTON GROUP G1,

p_gb RADIOBUTTON GROUP G1.

SELECTION-SCREEN end of block b1.

  • Dynamic selection screen

selection-screen:begin of screen 110.

parameter:P_VBELN type vbak-vbeln,

P_AUART type vbak-AUART.

selection-screen: end of screen 110.

INITIALIZATION.

GV_REPID = SY-REPID.

GV_DYNNR = SY-DYNNR.

at SELECTION-SCREEN.

if P_auart is not initial.

r_auart-low = gv_auart.

r_auart-sign = 'I'.

r_auart-option = 'EQ'.

append r_auart.

endif.

if p_rb = 'X'.

IF P_AUART IS INITIAL AND P_VBELN IS INITIAL.

call SELECTION-SCREEN 110 STARTING AT 10 10.

ENDIF.

endif.

at SELECTION-SCREEN on VALUE-REQUEST FOR p_VBELN.

SELECT VBELN FROM VBAK

INTO TABLE VALUE_TAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE =

RETFIELD = 'P_VBELN'

  • PVALKEY = ' '

DYNPPROG = 'ZTESTABC1' "Report name

DYNPNR = '0110' "Screen Number of dynamic Screen

DYNPROFIELD = 'VBELN'

  • STEPL = 0

  • WINDOW_TITLE = 'Sales Order'

  • VALUE =

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = 'X'

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

TABLES

VALUE_TAB = value_tab

  • FIELD_TAB =

RETURN_TAB = ret_tab

  • DYNPFLD_MAPPING =

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

.

IF SY-SUBRC = 0.

p_vbeln = ret_tab-fieldval.

CLEAR VALUE_TAB. REFRESH VALUE_TAB.

ENDIF.

START-OF-SELECTION.

SELECT VBELN AUART NETWR

FROM VBAK

INTO TABLE I_VBAK

WHERE VBELN = p_VBELN

AND AUART IN R_AUART.

END-OF-SELECTION.

READ TABLE I_VBAK INDEX 1.

WRITE:/ I_VBAK-VBELN, I_VBAK-AUART, I_VBAK-NETWR.

Thanks,

Jyothi

Former Member
0 Kudos

Solved myself