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: 

how to make a field display & change status in dialog program

Former Member
0 Kudos

Hello Friends,

Can any one tell me how to make fields display & change status in dialog program.( Not by changing field attributes ).

when a specific condition met. Means if country is 'IN' we need some fields in display mode only.

Please let me know.

Regards,

Phani

1 ACCEPTED SOLUTION

former_member1245113
Active Contributor
0 Kudos

HI

* In PBO

loop at itab with control tc. " If you are using Table Control
module modify_screen.
endloop.

module modify_screen. " If you are using normal fields

*   in Program.

module Modify_screen.
if country = 'N'.
loop at screen.  "  
if screen-name = 'YOUR_SCREEN_NAME'.
screen-input = 0.
modify screen.
endif.
endloop.

endmodule.

Cheers

Ram

6 REPLIES 6

sridhar_meesala
Active Contributor
0 Kudos

Hi,

It's simple. You need to code for it in the PBO of your screen.

Suppose that you are selecting IND from one of the radio buttons. When IND is selected you want suppose field1 and field2 to get disabled.

So you should give a group name for both these fields say 'G1'.

Now in PBO,

CASE SY-UCOMM.

 WHEN 'F_DD'.                " F_DD is the function code for the dropdown box from where you select IND

  IF R1 = 'X'.                      " R1 is the radio button name for IND

   LOOP AT SCREEN.
    IF screen-group1 = G1.
     Screen-Input = 0.
     Modify Screen.
    ENDIF.
   ENDLOOP.

  ENDIF.

ENDCASE.

Revert in case of any help.

Thanks,

Sri.

0 Kudos

Hi Sri,

Thanks for replying.... But my requirement is i am displaying material data

in that for country 'in' i need this..... it is not drop drown or esle in selection...

regards,

phani

0 Kudos

Hi,

Could you explain your requirement clearly so that I can help you.

Thanks,

Sri.

0 Kudos

Hi,

Thanks for responding....

We had created a Mod POOL program in that we have plant & ware house blocks are there,

Using this we are updating the tables like MM02 using BAPI.

What i want is for country "IN' we need some fields in display mode only....

regards,

pahni.

former_member1245113
Active Contributor
0 Kudos

HI

* In PBO

loop at itab with control tc. " If you are using Table Control
module modify_screen.
endloop.

module modify_screen. " If you are using normal fields

*   in Program.

module Modify_screen.
if country = 'N'.
loop at screen.  "  
if screen-name = 'YOUR_SCREEN_NAME'.
screen-input = 0.
modify screen.
endif.
endloop.

endmodule.

Cheers

Ram

0 Kudos

Thank you.... I am trying if it works i will give all points to you ......