‎2010 Apr 20 8:16 AM
Hi Gurus,
I have some records in module pool table control. i need to disable some rows based on condition(plant). For example if the plant in the table control record is 1000. i have to disable the rows. How to acheive this? Kindly help me out...
Regards,
Rao
‎2010 Apr 20 8:21 AM
Hi,
You can make one whole column inactive but making a row inactive i think is not possible.
‎2010 Apr 20 8:34 AM
hi,
Define Columns table based on table control in the TOP include.
CONTROLS TABC TYPE TABLEVIEW USING SCREEN 100.
DATA: COLS LIKE LINE OF TABC-COLS.
Write the below code in the PBO of the screen to hide certain fields
"At runtime as TABC is deep structure which has COLS table
"inside we have to do the following.
LOOP AT TABC-COLS INTO COLS.
IF COLS-SCREEN-NAME = 'ITAB-MATNR'. "Which is to be hidden
COLS-SCREEN-ACTIVE = '0'.
MODIFY TABC-COLS FROM COLS INDEX SY-TABIX.
ENDIF.
ENDLOOP.
cheers bhavana
‎2010 Apr 20 9:38 AM
Your code is for disable total column.. i have asked row wise disabling based on condition... can u help me?
‎2010 Apr 20 10:23 AM
hi ,
in PBO module
LOOP AT it_qty WITH CONTROL tabl
CURSOR tabl-current_line.
MODULE edit.
ENDLOOP.
create module edit in program
module edit output
if it_qty-plant = '7100 ' .
check if condition for plant and loop through screen with all table control fields and such as
LOOP AT SCREEN.
IF ( screen-name = 'IT_qty-QTY1' ) OR ( screen-name = 'IT_QTY-QTY2' )
OR ( screen-name = 'IT_QTY-QTY3' ) OR ( screen-name = 'IT_QTY-QTY4' )
OR ( screen-name = 'IT_QTY-QTY5' ) OR ( screen-name = 'IT_QTY-QTY6' )
OR ( screen-name = 'IT_QTY-QTY7' ) OR ( screen-name = 'IT_QTY-QTY8' ).
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
regards
Deepak .
endif.
endmodule .
‎2010 Apr 20 10:31 AM
HI,
"KIndly close this thread if your purpose is Served so that it will be useful for others with similar IssueCheck the below thread
In Place of ITAB-MARK use ITAB-WERKS = 1000.
And also check this one
"In Flow Logic In The Simplest Way,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT itab WITH CONTROL tc.
module disable_row. " This should be here only
ENDLOOP.
"In Program
MODULE disable_row OUTPUT.
IF itab-carrid = 'AA'. " Pass your Plant Value here
LOOP AT SCREEN.
IF screen-group1 = 'GRP'. " Create Screen Group
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'GRP'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE.Cheerz
Ram