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: 

Module pool fields enable

Former Member
0 Kudos

hi abapers,

I developing a screen.

am using this screen to insert header and item tables to database.

in the initial display am making all fields in disable mode in PBO.

so wen i click on update or display i hav to enable some key fields.

am making enabling the particular fields in PAI but its showing in disable mode.

even when i click 'ADD LINE' button i have to make multiple entries to my line item table based on my header table.entries.

<<inapproprate text removed by moderator>>

Thanks & Regards,

Rajesh

Edited by: Matt on Nov 5, 2008 1:19 PM

6 REPLIES 6

Former Member
0 Kudos

You have to write the following code in PBO

group all the fields that you want to make enable.

i.e. gr1.

now,

loop at screen.

        if screen-group1 = 'gr1'.
            screen-active = 1.
        endif.

end loop.
modify screen.

Regards,

Mukund Parekh.

Edited by: mukund parekh on Nov 5, 2008 12:42 PM

Former Member
0 Kudos

Hi Rajesh,

I think many threads are there which is almost same with your requirement.

IN PAI when you CLICK on DISPLAY or UPDATE write this code.

Make sure you give the name of your I/O text field name as <TABLE NAME>-<field name>.

Case Sy-ucomm.

WHEN 'DISPLAY'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'ZORMA-ASLN'. "field which u want to make active

SCREEN-ACTIVE = 1.

SCREEN-INPUT = 1.

SCREEN-OUTPUT = 1.

MODIFY SCREEN.

ENDIF.

IF SCREEN-NAME = 'ZORMA-APLC'.

SCREEN-ACTIVE = 1.

SCREEN-INPUT = 1.

SCREEN-OUTPUT = 1.

MODIFY SCREEN.

ENDIF.

Endcase.

Cheers!!

VEnk@

Former Member
0 Kudos

Do the coding in PBO.

loop at screen.

....

modify screen.

endloop.

0 Kudos

thanks for all ...

but am using 4 push buttons..

based on that am able to enable and disable the fields.

0 Kudos

use flag...

declare variable flag1 ,flag2,flag3, flag4 type c....

in pai...

when push1.

flag1 = 1...

when push 2.

flag2 = 1.

etc......

in pbo....

if flag1 = 1.

loop at screen.

endloop.

endif.

if flag2 = 1.

loop at screen.

endloop.

endif.

etc....

Former Member
0 Kudos

Hi Rajesh,

I think that you are using a Table Control to input multiple lines of Item Data in the Database and a few fields of the Header Data.

So, in the PBO event, you have to handle the Table Control to make it Read-only. When the user presses the toggle display button, the remaining code in the PAI will take care of that.

In ABAP system, have a look at the ABAPDOCU. Also there are some demo code which will tell you the syntax and logic properly.

Have a look at them in SE38 using the following search string

*DYNPRO.*

Hope this will help.

Thanks,

Samantak.