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: 

SELECTION SCREN Parameters issue. Help!

Former Member
0 Kudos

Hi everyone,

I was wondering if somebody could help me out with this. Whenever I execute my ABAP program and press the select option parameter button, the dynpro screen freezes and i have to cancel the current transaction. Below is the code for the selection screen and the form needed. Is there anything I may have missed? I 'd really appreciate your help on this. Thanks a lot!!!

----


  • SELECTION-SCREEN *

----


SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-s01.

PARAMETERS: s_bukrs LIKE BSIK-BUKRS DEFAULT '0010' MODIF ID sc1.

SELECT-OPTIONS: s_belnr FOR bkpf-belnr,

s_gjahr FOR bkpf-gjahr.

SELECTION-SCREEN END OF BLOCK 1.

SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE text-s02.

SELECT-OPTIONS: s_blart FOR itab_blart-tipo_doc,

s_bldat FOR bkpf-bldat,

s_budat FOR bkpf-budat.

SELECTION-SCREEN END OF BLOCK 2.

SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE text-s03.

PARAMETERS: x_00 AS CHECKBOX DEFAULT '',

x_09 AS CHECKBOX DEFAULT '',

x_15 AS CHECKBOX DEFAULT ''.

SELECTION-SCREEN END OF BLOCK 3.

SELECTION-SCREEN BEGIN OF BLOCK 4 WITH FRAME TITLE text-s04.

PARAMETERS: "s_newdat LIKE j_1afpdo-newdat,

p_arch LIKE rlgrap-filename.

  • DEFAULT 'c:\agente.dgr'.

SELECTION-SCREEN END OF BLOCK 4.

----


  • SELECTION-SCREEN VALIDATION *

----


  • Hago que todos los campos asociados al grupo 'SC1' (en este caso el

  • parameter 's_bukrs') sea no modificable.

AT SELECTION-SCREEN on VALUE-REQUEST FOR s_blart-low. "s_blart matchcode personalizado

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'BLART'

WINDOW_TITLE = 'Tipo de Documento'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab_blart

RETURN_TAB = itab_match

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-input = '0010'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

-


----


  • FORM *

----


FORM init_sblart TABLES itab_blarts STRUCTURE itab_blart.

DATA: wa_blart TYPE t_blart.

MOVE: 'OP' TO wa_blart-tipo_doc.

APPEND wa_blart to itab_blarts.

MOVE: 'OT' TO wa_blart-tipo_doc.

APPEND wa_blart to itab_blarts.

MOVE: 'OE' TO wa_blart-tipo_doc.

APPEND wa_blart to itab_blarts.

ENDFORM.

13 REPLIES 13

surajarafath
Contributor
0 Kudos

I think, data type you defned has problem..

s_blart FOR itab_blart-tipo_doc,

try change this as,

s_blart FOR bkpf-blart,

0 Kudos

Thanks for the reply, playsuji, but I have already tried declarin s_blart FOR bkp-blart and I still have the same problem when pressing any of the buttons declared as PARAMETERS.

I have also tried deleting the dynpro and creating it again. Any suggestions? Thanks!

0 Kudos

Where are you calling your perform on value request for??

Nabheet

0 Kudos

Hello Nabheet,

I'm using the perform init_sblart from the initialization section, and the on value request perform from the Screen Include.

I hope I'm being clear, it's one of my first abap programs. Thanks!

0 Kudos

Can you please post your complete code.

Nabheet

0 Kudos

Here it is, thanks!

----


----


SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-s01.

PARAMETERS: s_bukrs LIKE BSIK-BUKRS DEFAULT '0010' MODIF ID sc1.

SELECT-OPTIONS: s_belnr FOR bkpf-belnr,

s_gjahr FOR bkpf-gjahr.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK 1.

SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE text-s02.

PARAMETERS: x_OP AS CHECKBOX DEFAULT 'OP',

x_OT AS CHECKBOX DEFAULT 'OT',

x_OE AS CHECKBOX DEFAULT 'OE'.

SELECT-OPTIONS: s_blart FOR bkpf-blart,

s_bldat FOR bkpf-bldat,

s_budat FOR bkpf-budat.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK 2.

SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE text-s03.

PARAMETERS: x_00 AS CHECKBOX DEFAULT '',

x_09 AS CHECKBOX DEFAULT '',

x_15 AS CHECKBOX DEFAULT ''.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK 3.

SELECTION-SCREEN BEGIN OF BLOCK 4 WITH FRAME TITLE text-s04.

PARAMETERS: s_newdat LIKE j_1afpdo-newdat,

p_arch LIKE rlgrap-filename.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN END OF BLOCK 4.

----


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

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_blart-low.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'BLART'

WINDOW_TITLE = 'Doc Type'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab_blart

RETURN_TAB = itab_match

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-input = '0010'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

0 Kudos

&----


*& FORM init_SBLART.

&----


FORM init_sblart. "TABLES itab_blarts STRUCTURE itab_blart.

DATA: s_blart TYPE t_blart.

MOVE: 'I' TO s_blart-sign,

'EQ' TO s_blart-option,

'OP' TO s_blart-low.

APPEND s_blart.

MOVE: 'I' TO s_blart-sign,

'EQ' TO s_blart-option,

'OT' TO s_blart-low.

APPEND s_blart.

MOVE: 'I' TO s_blart-sign,

'EQ' TO s_blart-option,

'OE' TO s_blart-low.

APPEND s_blart.

ENDFORM. "init_SBLART

0 Kudos

Can you change VALUE_ORG = C and try also please paste the structure of table passed to f4 function module

Nabheet

0 Kudos

Secondly is it necesary to pass range table to f4 can you pass an internal table containing only blart or what you can do is rather than coding use match code object for blart..

Please try and confirm

Nabheet

0 Kudos

Hi jromero80 ,

can we know what you are trying to achieve?

are you trying to fill the select options? or You want data to fetched by selecting f4?

i think you need not to use

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_blart-low. "<- you can change this as s_blart not s_blart-low

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

and what you want to do with this code..

AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-input = '0010'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.

if you are trying to fill the parameter data... then you can use DEFAULT in parameter or select options itself..

or else, you can code like this to fill

AT SELECTION-SCREEN OUTPUT.
MOVE: 'I' TO s_blart-sign,
'EQ' TO s_blart-option,
'OE' TO s_blart-low.
APPEND s_blart
x_OP = 'X'.

clearly descriibe wht u are trying to do? and give ur full code..

Former Member
0 Kudos

Have you tried debugging??

Rob

former_member777515
Participant
0 Kudos

check out the FM: SELECT_OPTIONS_RESTRICT

you can restrict the values that is allowed for s_blart and you can then remove the group of codings for 'ON VALUE REQUEST FOR S_BLART'

0 Kudos

Thanks Everyone for the answers. The button issue was caused by the perform init_sblart being called before loading the screen (newbie mistake, i know). And thanks everyone for the suggestions for the personalized matchcode and the functions related. Now it works like a charm!