‎2010 Apr 05 9:26 AM
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
‎2010 Apr 05 12:08 PM
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 .
‎2010 Apr 05 9:49 AM
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
‎2010 Apr 05 11:32 AM
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
‎2010 Apr 05 11:49 AM
‎2010 Apr 05 12:08 PM
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 .