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

Selection screen processing

Former Member
0 Likes
914

Hello,

I have two questions for selection screen.

I have following case:

I have 3 parameters. When the parameters all are filled, the data should be written in an internal table.

But the user has to fill all the parameters, before the data is written to the internal table - and so long, the user should be able to see the other values in the parameters. How do I have to change my source code?

coding so far:

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

Selection-Screen begin of BLock Block1.

Parameters:

field TYPE char29,

erfmg TYPE CHAR6,

lgort type char4.

Selection-Screen end of Block Block1.

AT SELECTION-SCREEN ON Block Block1.

SPLIT field AT '-' INTO itab-matnr itab-charg.

itab-erfmg = erfmg.

itab-lgort = lgort.

CLEAR field.

clear erfmg.

clear lgort.

APPEND itab.

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

2. The inserted data is used in this program afterwards. Before this processing starts (later in the source code), the users asked me for a possibility to check all the data the inserted over the parameters. So does there a possibilty exists to create something like a button, on which the users could click on and which is showing a list of the internal table? (after this the program should continue).

I am sure there should be solutions for these two problems, but I haven´t done it before and don´t know where to search for.

Thanks for all your help,

Christoph

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
888

hi,

is this your req.......

1) making all parameters mandatory if so.....

Parameters:

field TYPE char29 obligatory,

erfmg TYPE CHAR6 obligatory,

lgort type char4 obligatory.

this ll do.

2) if u need input help ( when u press F4 ).

at-selection screen ON VALUE-REQUEST for field.

use this func module

'F4IF_FIELD_VALUE_REQUEST'

study the func modules documentation .

3) u can also validate the inputs in at selection-screen event........

9 REPLIES 9
Read only

Former Member
0 Likes
889

hi,

is this your req.......

1) making all parameters mandatory if so.....

Parameters:

field TYPE char29 obligatory,

erfmg TYPE CHAR6 obligatory,

lgort type char4 obligatory.

this ll do.

2) if u need input help ( when u press F4 ).

at-selection screen ON VALUE-REQUEST for field.

use this func module

'F4IF_FIELD_VALUE_REQUEST'

study the func modules documentation .

3) u can also validate the inputs in at selection-screen event........

Read only

0 Likes
888

Hej Will,

thanks for your answer, will start to read the docu now I know what I have to look for

Thanks for your help,

Christoph

Read only

0 Likes
888

Hi,

another question for this problem.

If I want to use the screen painter to modify my selection-screen following info message comes up:

'Selection screen: Report generation makes screen changes ineffective' - this means that each time I generate my report, the selection screen is generated new out of the source code (and not out of the code of the screen painter).

Does there a possibility exist to use the screen painter for my selection screen? Never worked with something like that before, please help me out.

Thanks,

Christoph

Read only

0 Likes
888

hi,

if u want to use dialog screen instead of sttd selection-screen u can always do that in a report.

remove all parameters declaration

write.

call screen <screen no say 100>.

double click on screen no....and create it using screen painter.....

Read only

0 Likes
888

Hi Will,

thanks, I tried it and it is nearly working.

The only thing that is not working at the moment is following.

I want to have all this data in the internal table - it is working that the parameter input is written in the internal table, but it is not working that there is a kind of loop on the internal table, so that the parameter input is appended on after the next in the internal table (like it was working before).

This is my coding for that. I guess I need something like an OK_Code for that.

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

call screen 0100.

loop at screen into wa.

SPLIT field AT '-' INTO itab-matnr itab-charg.

itab-erfmg = erfmg.

itab-lgort = lgort.

CLEAR field.

clear erfmg.

clear lgort.

APPEND itab.

endloop.

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

can you help me out with this please?

Thanks a lot for all your help.

christoph

Read only

0 Likes
888

Loop at screen is to change the attributes of the screen elements (say making I/O field uneditable or making it invisible ...like dat )

design a pushbutton in ur screen with func code say ENTER

in PAI event of ur FLOW logic within a module write this

CASE SY-UCOMM.

when 'ENTER'

SPLIT field AT '-' INTO itab-matnr itab-charg.

itab-erfmg = erfmg.

itab-lgort = lgort.

CLEAR field.

clear erfmg.

clear lgort.

APPEND itab.

endloop.

endcase.

Read only

0 Likes
888

Hi Will,

once again thanks for your help.

I tried the thing you told me, not working at the moment, just want to be sure that I did all in the way you were thinking about.

The source code:

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

REPORT ZTEST9999.

TYPES:

BEGIN OF itabstruk,

matnrfield TYPE char16,

matnr TYPE matnr,

chargfield TYPE char16,

charg TYPE charg_d,

erfmgfield TYPE char16,

erfmg TYPE CHAR6,

lgortfield type char16,

lgort type char4,

END OF itabstruk.

DATA:

itab TYPE TABLE OF itabstruk WITH HEADER LINE,

bdc LIKE STANDARD TABLE OF bdcdata WITH HEADER LINE,

count TYPE char3,

n TYPE i,

transaction type char4,

wa type screen.

data FIELD(29) type c.

data ERFMG(6) type c.

data lgort(4) type c.

TABLES sscrfields.

data ok_code type sy-ucomm.

call selection-screen 0100.

...

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

I created a PAI-Module:

module %_INPUTPROCESSING input.

CASE SY-UCOMM.

when 'ENTER'.

SPLIT field AT '-' INTO itab-matnr itab-charg.

itab-erfmg = erfmg.

itab-lgort = lgort.

CLEAR field.

clear erfmg.

clear lgort.

APPEND itab.

endcase.

endmodule. " %_INPUTPROCESSING INPUT

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

The Flowlogic of my Dynpro: (Including a table control I want to have in my dynpro, but it´s also not working because of no data in the table - it´s not filled...)

PROCESS BEFORE OUTPUT.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'ITABCONTROL'

MODULE ITABCONTROL_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE ITABCONTROL_CHANGE_COL_ATTR.

LOOP AT ITAB

WITH CONTROL ITABCONTROL

CURSOR ITABCONTROL-CURRENT_LINE.

MODULE ITABCONTROL_GET_LINES.

*&SPWIZARD: MODULE ITABCONTROL_CHANGE_FIELD_ATTR

ENDLOOP.

MODULE %_INIT_PBO.

MODULE %_PBO_REPORT.

MODULE %_PF_STATUS.

MODULE %_END_OF_PBO.

PROCESS AFTER INPUT.

MODULE %_INPUTPROCESSING.

*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'ITABCONTROL'

LOOP AT ITAB.

CHAIN.

FIELD ITAB-MATNR.

FIELD ITAB-CHARG.

FIELD ITAB-ERFMG.

FIELD ITAB-LGORT.

endchain.

FIELD ITAB-MATNRFIELD

MODULE ITABCONTROL_MARK ON REQUEST.

ENDLOOP.

MODULE ITABCONTROL_USER_COMMAND.

*&SPWIZARD: MODULE ITABCONTROL_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE ITABCONTROL_CHANGE_COL_ATTR.

MODULE %_BACK AT EXIT-COMMAND.

MODULE %_INIT_PAI.

CHAIN.

FIELD MB1A .

FIELD MB1B .

FIELD MB1C .

MODULE %_RADIOBUTTON_GROUP_RAD1 .

ENDCHAIN.

FIELD !FIELD MODULE %_FIELD .

FIELD !ERFMG MODULE %_ERFMG .

FIELD !LGORT MODULE %_LGORT .

CHAIN.

FIELD MB1A .

FIELD MB1B .

FIELD MB1C .

FIELD FIELD .

FIELD ERFMG .

FIELD LGORT .

MODULE %_BLOCK_1000000.

ENDCHAIN.

CHAIN.

FIELD MB1A .

FIELD MB1B .

FIELD MB1C .

FIELD FIELD .

FIELD ERFMG .

FIELD LGORT .

MODULE %_END_OF_SCREEN.

MODULE %_OK_CODE_1000.

ENDCHAIN.

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

Would be great if you could help me out again.

Thanks,

Christoph

Read only

0 Likes
888

make sure that the func code for ur push button is ENTER.

place a break-point in case sy-ucomm statement and see when u press dat push button its commin der.......

if it comes check sy-ucomm value proceed by pressin F5

Read only

0 Likes
888

Thanks Will,

it is working now, Don´t know why it wasn´t working before, but now it is

Regards,

Christoph