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: 

To Capture the f4 value in selection-screen

Former Member
0 Kudos

Hi,

I have a problem with selection-option, when I am not giving any value in the select-option_low , then the value entered in the select-option_high has to be taken, i coded and it is taking also, but when i go for other value, the previous value has to be cleared and the current value has to take , but it doesn't happening, how can i clear the previous value, and also how can i capture the value when i press the f4 in the selection-screen.

Regards,

Narasimha

2 REPLIES 2

Former Member
0 Kudos

Hi,

To clear the previous value use:

CLEAR SSCRFILEDS. " Statement

To get F4 values use the Function module:

F4IF_INT_TABLE_VALUE_REQUEST.

The filed values which need to be displayed in F4 help need to be in an itab and pass it to this FM.After that call this FM at:At selction screen on value reuest event.

Regards,

Rama chary.P

Former Member
0 Kudos

Hi,

Here I am Pasting The Code

----


  • T A B L E S

----


TABLES: ekko.

----


  • T Y P E S

----


TYPES: BEGIN OF ty_ekko,

ebeln TYPE ekko-ebeln,

bukrs TYPE ekko-bukrs,

bstyp TYPE ekko-bstyp,

bsart TYPE ekko-bsart,

statu TYPE ekko-statu,

lifnr TYPE ekko-lifnr,

END OF ty_ekko.

DATA: it_ekko TYPE STANDARD TABLE OF ty_ekko,

wa_ekko TYPE ty_ekko.

----


  • D E C L A R A T I O N O F G L O B A L V A R I A B L E S

----


DATA : fnam(20),

g_index TYPE SY-TABIX .

DATA : fval TYPE ty_ekko.

DATA: pop_title TYPE string,

pop_text TYPE string,

pop_text1 TYPE string,

pop_t1 TYPE string,

pop_t2 TYPE string,

pop_t3 TYPE string,

pop_t4 TYPE string.

INITIALIZATION.

g_index = sy-tabix.

----


  • S E L E C T I O N - S C R E E N - D E C L A R A T I O N

----


SELECTION-SCREEN BEGIN OF BLOCK one WITH FRAME TITLE text-005.

SELECTION-SCREEN BEGIN OF BLOCK two WITH FRAME TITLE text-004.

SELECTION-SCREEN SKIP.

SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK two.

SELECTION-SCREEN END OF BLOCK one.

----


  • A T S E L E C T I O N - S C R E E N

----


AT SELECTION-SCREEN .

IF s_ebeln IS NOT INITIAL.

pop_t1 = s_ebeln-low.

pop_t2 = s_ebeln-high.

ELSE.

MESSAGE e005(z15728_msgclass).

  • Plz Select The Purchase Order Number

ENDIF.

  • process on value-request

  • FIELD s_ebeln-high MODULE mod.

IF pop_t1 IS INITIAL AND pop_t2 IS NOT INITIAL.

pop_t1 = - pop_t2.

s_ebeln-low = pop_t1.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = pop_t1

IMPORTING

output = pop_t1.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = s_ebeln-low

IMPORTING

output = s_ebeln-low.

MODIFY s_ebeln INDEX g_index FROM s_ebeln.

ENDIF.

IF pop_t2 IS INITIAL.

pop_t4 = pop_t1.

ELSE.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = pop_t1

IMPORTING

output = pop_t1.

pop_t3 = 'To'.

CONCATENATE pop_t1 space pop_t3 space pop_t2 INTO pop_t4

RESPECTING BLANKS.

ENDIF.

pop_text1 = 'Narasimha Has Selected The Purchase Order Number'(002).

CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'

EXPORTING

titel = text-007

textline1 = pop_text1

textline2 = pop_t4

start_column = 25

start_row = 6.

----


  • S T A R T - O F - S E L E C T I O N

----


START-OF-SELECTION.

PERFORM get_ekko.

----


  • A T L I N E - S E L E C T I O N

----


AT LINE-SELECTION.

IF sy-lsind EQ 1.

GET CURSOR LINE fnam VALUE fval.

IF fnam IS NOT INITIAL.

pop_title = 'Narasimha Selection'(003).

pop_text = 'Narasimha Has Selected The Record'(001).

CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'

EXPORTING

titel = pop_title

textline1 = pop_text

textline2 = fval

start_column = 25

start_row = 6.

EXPORT p1 = it_ekko p2 = fval TO MEMORY ID 'RAP'.

SUBMIT z15728_inttabimport AND RETURN.

ELSE.

MESSAGE e003(z15728_msgclass).

  • Narasimha Doesn't Selected Any Purchasing Document Record

ENDIF.

ELSE.

MESSAGE e001(z15728_msgclass).

  • Unable To Hold Line Data

ENDIF.

----


  • E N D - O F - S E L E C T I O N

----


END-OF-SELECTION.

PERFORM disp_ekko.

INCLUDE z15728_inttabexport_get_ekko.

INCLUDE z15728_inttabexport_disp_ekko.

The Two Includes were to get and display data.