‎2008 Feb 04 7:07 AM
Hi all.
i gt a problem in enable the field in the table control.
I gt a validation check for duplicate record in the field, therefore i use chain. The message class was display, but the field is not enable to input. What is the problem? Below is my flow logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_9001.
LOOP AT I_FINAL INTO ZTABLE WITH CONTROL TABCONT.
ENDLOOP.
PROCESS AFTER INPUT.
CHAIN.
FIELD:
ZTABLE-NAME,
ZTABLE-AGE.
MODULE UPDATE_TAB_CONTROL1.
ENDCHAIN.
ENDLOOP.
MODULE USER_COMMAND_9001.
thanks
‎2008 Feb 04 7:16 AM
hi
try to do this in this way...
PROCESS BEFORE OUTPUT.
MODULE STATUS_0102.
MODULE GET_DATA .
loop at T_BANK with control table_control
cursor table_control-current_line.
MODULE SET_LINE_ATTRIBUTES.
endloop.
PROCESS AFTER INPUT.
FEILD <F name> module module name.
LOOP AT T_BANK.
MODULE POP_I_TAB.
ENDLOOP.
MODULE USER_COMMAND_0102.
reward if helpful..
GAURAV J.
‎2008 Feb 04 7:31 AM
Try the folowing code:
PROCESS AFTER INPUT.
Loop at <itab>.
CHAIN.
FIELD:
ZTABLE-NAME,
ZTABLE-AGE.
MODULE <CHECK > ON CHAIN-REQUEST.
ENDCHAIN.
MODULE UPDATE_TAB_CONTROL1.
ENDLOOP.
MODULE USER_COMMAND_9001.
And you should write your conditions and message in this <CHECK> module.
‎2008 Feb 04 7:35 AM
Okie. Understand.
Can you provide me a EXAMPLE for the check module.
many thank.
‎2008 Feb 04 2:09 PM
hi,
i have an example in which i am doing exactly like this...
I have table control and getting bill date and amount from entered bill number.
first of all make that fields output only, which should automatically calculate. ( in my case bill amount and date)
PROCESS AFTER INPUT.
MODULE exit_1000 AT EXIT-COMMAND.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
LOOP AT itab_det.
CHAIN.
FIELD itab_det-comp_code.
FIELD itab_det-bill_no.
FIELD itab_det-bill_date.
FIELD itab_det-vend_cust_code.
FIELD itab_det-bill_amt.
MODULE tab1_modify ON CHAIN-REQUEST.
ENDCHAIN.
FIELD itab_det-mark
MODULE tab1_mark ON REQUEST.
ENDLOOP.
then in PAI, make one module, tab1_modify.
MODULE tab1_modify INPUT.
IF itab_det-bill_no ' '. ( Bill number should not initial)
CLEAR:net_pr,tax,bil_amt,bil_dt.
SELECT SINGLE fkdat netwr mwsbk FROM vbrk INTO (bil_dt,net_pr,tax)
WHERE vbeln = itab_det-bill_no AND kunag = cust .
bil_amt = net_pr + tax.
itab_det-bill_date = bil_dt.
itab_det-bill_amt = bil_amt.
ENDIF.
MODIFY itab_det
FROM itab_det
INDEX tab1-current_line.
APPEND itab_det.
ENDMODULE. "TAB1_MODIFY INPUT
reward if usefull