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

endchain in table control

Former Member
0 Likes
688

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

4 REPLIES 4
Read only

Former Member
0 Likes
605

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.

Read only

Former Member
0 Likes
605

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.

Read only

0 Likes
605

Okie. Understand.

Can you provide me a EXAMPLE for the check module.

many thank.

Read only

0 Likes
605

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