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

module pool help

Former Member
0 Likes
1,063

hello genius

friend i want that

PBO process before output i.e screen is displaced then some of text boxes should not be displayed and after clicking it should be displayed on the screen

i mean to say i want code for Hide condition in a module pool

Their must be such condition

Please help me out

With Best Regards

Ruby

Thanx in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,031

Hi,

In the PBO of that screen we can write the Code, Using the LOOP AT SCREEN statment we can write this logic.

Look at the sample DEMO porgram <b>demo_dynpro_modify_simple</b>

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm

Regards

Sudheer

9 REPLIES 9
Read only

Former Member
0 Likes
1,031

You can use the sample code

FORM MODIFY_SCREEN .

LOOP AT SCREEN.

IF SCREEN-NAME CS 'P_OPENLY' OR SCREEN-NAME CS 'XBLNR_HW' OR

SCREEN-NAME CS 'P_BLART' OR SCREEN-NAME CS 'P_ALLDIS' OR

  • screen-name CS 'P_RSTGR' or

SCREEN-NAME CS '%C012012_2000'.

IF P_HIDE = ' '.

IF SCREEN-NAME = '%_S_EDATE_%_APP_%-OPTI_PUSH'.

SCREEN-INPUT = 0.

SCREEN-INVISIBLE = 1.

ENDIF.

MOVE 'Chosen selections'(H06) TO SSCRFIELDS-FUNCTXT_01.

ELSE.

SCREEN-INPUT = 0.

SCREEN-INVISIBLE = 1.

MOVE 'All selections'(H07) TO SSCRFIELDS-FUNCTXT_01.

ENDIF.

MODIFY SCREEN.

ENDIF.

Read only

0 Likes
1,031

Friend plz can u explain me in details that

First of how do i hide them before i come to a screen and after hitting a button or so how do i recall them

i m new to this so please explain

as mu screen no is 3000

lets take a table zabc which have three fields

aa bb cc

i want that after hitting button bb cc display or visible on screen

Hope u got my point

With Best Regards

Ruby

Read only

Former Member
0 Likes
1,031

Hi

You can use the following type of sample code using LOOP AT SCREEN..ENDLOOP

IF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-group1 = gc_abc.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_def.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_upd EQ gc_x.

*For Reprocessing

LOOP AT SCREEN.

IF screen-group1 = gc_def.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_abc.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
1,031

hi,

In PAI,

use

Loop at screen.

screen-active = 1.

modify screen.

endloop.

Read only

Former Member
0 Likes
1,032

Hi,

In the PBO of that screen we can write the Code, Using the LOOP AT SCREEN statment we can write this logic.

Look at the sample DEMO porgram <b>demo_dynpro_modify_simple</b>

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm

Regards

Sudheer

Read only

gopi_narendra
Active Contributor
0 Likes
1,031

If you want dynamically change the attributes of the screen / screen fields at runtime. Follow this.

In the PBO of the screen module just write these lines of codes

loop at screen.
if screen-name = 'field1' or
   screen-name = 'field2'.
if sy-ucomm = <Function code of the button pressed>
screen-invisible = 1.
modify screen.
endif. <Condition>
endif.
endlooop.

Regards

Gopi

Read only

0 Likes
1,031

friend lets say i had a input output field in module pool

in its properties display property i had set it to

INVISIBLE

now i want that i had a button and on clicking that that input / output field should be displayed

Now wat u say

wat i should do

With Best Regards

Ruby

Read only

Former Member
0 Likes
1,031
REPORT demo_dynpro_modify_simple.
 
DATA: ok_code TYPE sy-ucomm,
      save_ok TYPE sy-ucomm.
 
DATA flag(1) TYPE c.
 
CALL SCREEN 100.
 
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'SCREEN_100'.
LOOP AT SCREEN.
    IF screen-group1 = 'MOD'.
        screen-input = '1'.
      ELSEif  screen-group1 = 'DEL'.
      screen-input = '0'.
      ENDIF.
     MODIFY SCREEN.
 
ENDLOOP.
ENDMODULE.
 
MODULE cancel.
  LEAVE PROGRAM.
ENDMODULE.
 
MODULE user_command_0100 INPUT.
      IF SY-TABIX  GT 1.
    LOOP AT SCREEN.
        IF screen-group1 = 'DEL'.
        screen-input = '1'.
         ENDIF.
         MODIFY SCREEN.
    ENDLOOP.
ENDIF.
ENDMODULE.

reward points if it is usefull ...

Girish

Read only

former_member196299
Active Contributor
0 Likes
1,031

hi Ruby ,

Try like this :

in TOP include , declare a global variable like :

data : init type c.

In PBO of the screen ..at the end of all logical operations are over ,

pass a value X to INIT .

In PAI of your screen ....

if init = 'X'

module modify_screen .

endif .

module modify_screen.

Pass the text field value to the text field of the screen ..

endmodule . " modify_screen

This logic should work ..

Regards,

Ranjita