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: 

Select option in modular programming...?

aarif_baig
Active Participant
0 Kudos

Hi Abapers,

I have a problem where in i want to use select options in modullar programming.....

and one more thing that when ever i am using an EXECUTE button which has been defined manually by me..

the report show the output but wen i am coming back to the screen and again i am using EXECUTE butto

the value are repeated..

so can anyone answer to both of my questions pls......

1 ACCEPTED SOLUTION

Former Member
0 Kudos

for answer to ur first Question

Best option is to go for a report program

If still you need to go for module pool there is one solution.

1. Define a subscreen on ur screen.

2. Define The screen as we do in report program but with addition 'AS SUBSCREEN' .

3.call the subscreen in ur flow logic of main screen.

Following code may help.

define this in ur top include.


SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECT-OPTIONS:
                s_vkorg1  FOR zadvhead-vkorg  NO-EXTENSION NO INTERVALS,
SELECTION-SCREEN END OF SCREEN 200.

in screen flow logic


PROCESS BEFORE OUTPUT.
CALL SUBSCREEN subscr_is1 INCLUDING sy-repid dynnr_is1.
"dynnr_is1 = 0200 & subscr_is1 = subscreen area name
 
PROCESS AFTER INPUT.
 CALL SUBSCREEN subscr_is1.

for more info

Edited by: mrugesh phatak on Oct 1, 2008 12:23 PM

8 REPLIES 8

Former Member
0 Kudos

.

Use clear.

Regards,

Midhun Abraham

0 Kudos

thanks,

I am using clear for inetrnal table as well as for screen

bUt its not working...

0 Kudos

hey,

try putting a break-point ok and check.

Regards,

Midhun Abraham

Former Member
0 Kudos

Use Clear

Regards,

Midhun Abraham

Former Member
0 Kudos

create two i/o field and make a range table to use select option

& plz clear header line as well as body when u execute.

check this

https://www.sdn.sap.com/irj/sdn/forums

hope it help you.

thanks

Edited by: vikalp on Oct 1, 2008 12:07 PM

Former Member
0 Kudos

use refresh itab.

before populating values to itab.

Regards

MD

Edited by: Madhan Doraikannan on Oct 1, 2008 11:57 AM

Former Member
0 Kudos

for answer to ur first Question

Best option is to go for a report program

If still you need to go for module pool there is one solution.

1. Define a subscreen on ur screen.

2. Define The screen as we do in report program but with addition 'AS SUBSCREEN' .

3.call the subscreen in ur flow logic of main screen.

Following code may help.

define this in ur top include.


SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECT-OPTIONS:
                s_vkorg1  FOR zadvhead-vkorg  NO-EXTENSION NO INTERVALS,
SELECTION-SCREEN END OF SCREEN 200.

in screen flow logic


PROCESS BEFORE OUTPUT.
CALL SUBSCREEN subscr_is1 INCLUDING sy-repid dynnr_is1.
"dynnr_is1 = 0200 & subscr_is1 = subscreen area name
 
PROCESS AFTER INPUT.
 CALL SUBSCREEN subscr_is1.

for more info

Edited by: mrugesh phatak on Oct 1, 2008 12:23 PM

Former Member
0 Kudos

make a selection screen as subscreen assigning a dynnr eg. 100

at selection-screen output.

*write as if it is PBO

at selection-screen.

*write as if it is PAI

Now in your module pool program

call this subscreen on the subscreen area on your screen

like:

PBO.

call subscreen sub_area including sy-repid 100.

PAI.

call subscreen sub_area.

add any no of select opitons on your selection screen. no need to fill ranges manualy