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

Table control logic

Karan_Chopra_
Active Participant
0 Likes
603

I have a table control in which if some values are already displayed (exist In the internal table) then those rows need to be in display mode only and rest rows in edit mode to add more values, how to do it , I am usig below logic but it is doing for all fields as there is no check for existing values

IF ( screen-name = 'GI_PMPB_BCHID-SEL' ).

screen-input = 1.

ELSEIF ( screen-name = 'GI_PMPB_BCHID-PMPB'

OR screen-name = 'GI_PMPB_BCHID-BATCHID' ).

screen-input = 0.

ENDIF.

Here first col is enables and rest two disabled but i want forst col in eit mode thru out and rest two disabled for filled values only

1 ACCEPTED SOLUTION
Read only

deepak_dhamat
Active Contributor
0 Likes
559

hi ,

Karan

Please check what this logic does is

i have quantity fields if in internal table it_qty-qty1 have value 0 then it will be editable else it will be in display mode

Do like this in PBO module

call module and put this logic in it .

loop at screen.

if ( screen-name = 'IT_QTY-QTY1' and it_qty-qty1 = 0 ) or ( screen-name = 'IT_QTY-QTY2' and it_qty-qty2 = 0 )

or ( screen-name = 'IT_QTY-QTY3' and it_qty-qty3 = 0 ) or ( screen-name = 'IT_QTY-QTY4' and it_qty-qty4 = 0 )

or ( screen-name = 'IT_QTY-QTY5' and it_qty-qty5 = 0 ) or ( screen-name = 'IT_QTY-QTY6' and it_qty-qty6 = 0 )

or ( screen-name = 'IT_QTY-QTY7' and it_qty-qty7 = 0 ) or ( screen-name = 'IT_QTY-QTY8' and it_qty-qty8 = 0 ).

screen-input = 1.

modify screen.

endif.

endloop.

Regards

Deepak .

4 REPLIES 4
Read only

Former Member
0 Likes
559

HI Karan,

For more info Check the below thread and feel free to come back if needed

"To continue with your code_
IF ( screen-name = 'GI_PMPB_BCHID-SEL' ).
screen-input = 1.
modify screen " This needs to be added
ELSEIF ( screen-name = 'GI_PMPB_BCHID-PMPB'
OR screen-name = 'GI_PMPB_BCHID-BATCHID' ).
screen-input = 0.
modify screen " This needs to be added
ENDIF.
Otherwise 

in PBO


module status_100.

in program.
describte table itab lines tc-lines. " this makes all the filled Filled Rows greyed out

if tc-lines > 0.
tc-lines = tc-lines + 10. " You can increase this based on your requirement
endif.

Cheerz

Ram

Read only

Karan_Chopra_
Active Participant
0 Likes
559

still not able to solve entries with values are enbled and blank fields are disbled

i want opposite , just wanna know how to catch table fields with values

Read only

Karan_Chopra_
Active Participant
0 Likes
559

plz help

Read only

deepak_dhamat
Active Contributor
0 Likes
560

hi ,

Karan

Please check what this logic does is

i have quantity fields if in internal table it_qty-qty1 have value 0 then it will be editable else it will be in display mode

Do like this in PBO module

call module and put this logic in it .

loop at screen.

if ( screen-name = 'IT_QTY-QTY1' and it_qty-qty1 = 0 ) or ( screen-name = 'IT_QTY-QTY2' and it_qty-qty2 = 0 )

or ( screen-name = 'IT_QTY-QTY3' and it_qty-qty3 = 0 ) or ( screen-name = 'IT_QTY-QTY4' and it_qty-qty4 = 0 )

or ( screen-name = 'IT_QTY-QTY5' and it_qty-qty5 = 0 ) or ( screen-name = 'IT_QTY-QTY6' and it_qty-qty6 = 0 )

or ( screen-name = 'IT_QTY-QTY7' and it_qty-qty7 = 0 ) or ( screen-name = 'IT_QTY-QTY8' and it_qty-qty8 = 0 ).

screen-input = 1.

modify screen.

endif.

endloop.

Regards

Deepak .