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

field validation in table control

Former Member
0 Likes
2,283

hi,

i have a field in table control i want to validate that one .

i have write the code as bellow after PAI.

PROCESS AFTER INPUT.

CHAIN.

FIELD: TP1 .

MODULE CHAIN_1.

ENDCHAIN.

in module chain_1.i wrote the validation code.

but my problem is while activating this program its showing error :Invalid field assignment: Field "TP1" is not assigned to any loop.

how to solve this problem .

please any body help me.

thanks in advance.

9 REPLIES 9
Read only

andreas_mann3
Active Contributor
0 Likes
1,293

you must insert all fields, which you'll valuate, in the chain:

TP1-field1

TP1-field2...

A.

Read only

0 Likes
1,293

hi,

i am not able to understand what ur telling.

can you please tell me clearly.

thank u

Read only

Former Member
0 Likes
1,293

HOW TO DO CHAIN AND ENDCHAIN IN FLOWLOGIC

PLEASE TELL ME ANY BODY

Read only

0 Likes
1,293

JUST WRITE THE BELOW LOGIC IN PAI.

LOOP AT <INTERNAL TABLE>.

CHAIN.

FIELD: F1,F2,F3.

MODULE MODULE_FIRST ON CHAIN-REQUEST.

ENDCHAIN.

ENDLOOP.

Read only

Former Member
0 Likes
1,293

HI

While using table control we need to define a ITAB to send and retrive data from Table control and you will check the TAble control fields names are like this

ITAB-field1

ITAB-field2

So you need to code like this

Chain.

Field: Itab-field1.

module: check.

endchain.

regards

Aditya

Read only

Former Member
0 Likes
1,293

PROCESS AFTER INPUT.

*&SPWIZARD: PAI FLOW LOGIC FOR ABLECONTROL 'TC2'

LOOP AT G_TC2_ITAB.

CHAIN.

FIELD ZSDRBT_INELG_INV-VBELN.

FIELD ZSDRBT_INELG_INV-FKDAT.

FIELD ZSDRBT_INELG_INV-MATNR.

FIELD ZSDRBT_INELG_INV-FKIMG.

FIELD ZSDRBT_INELG_INV-NETWR.

FIELD ZSDRBT_INELG_INV-ZBLK_AMT.

FIELD ZSDRBT_INELG_INV-REASON.

FIELD ZSDRBT_INELG_INV-ZAPPR1_STA.

FIELD ZSDRBT_INELG_INV-ZAPPR1_REM.

FIELD ZSDRBT_INELG_INV-ZAPPR2_STA.

FIELD ZSDRBT_INELG_INV-ZAPPR2_REM.

FIELD ZSDRBT_INELG_INV-ZAPPR3_STA.

FIELD ZSDRBT_INELG_INV-ZAPPR3_REM.

MODULE TC2_MODIFY ON CHAIN-REQUEST.

ENDCHAIN.

ENDLOOP.

*&SPWIZARD: MODIFY TABLE

MODULE TC2_MODIFY INPUT.

*Do not allow the approver to input other than SPACE, R or A in approver

  • status field

IF ZSDRBT_INELG_INV-ZAPPR1_STA <> ' ' AND

ZSDRBT_INELG_INV-ZAPPR1_STA <> 'A' AND

ZSDRBT_INELG_INV-ZAPPR1_STA <> 'R'.

MESSAGE E011.

ELSEIF ZSDRBT_INELG_INV-ZAPPR2_STA <> ' ' AND

ZSDRBT_INELG_INV-ZAPPR2_STA <> 'A' AND

ZSDRBT_INELG_INV-ZAPPR2_STA <> 'R'.

MESSAGE E011.

ELSEIF ZSDRBT_INELG_INV-ZAPPR3_STA <> ' ' AND

ZSDRBT_INELG_INV-ZAPPR3_STA <> 'A' AND

ZSDRBT_INELG_INV-ZAPPR3_STA <> 'R'.

MESSAGE E011.

ELSE.

  • MOVE-CORRESPONDING ZSDRBT_INELG_INV TO G_TC2_WA.

MOVE : ZSDRBT_INELG_INV-ZAPPR1_STA TO G_TC2_WA-ZAPPR1_STA,

ZSDRBT_INELG_INV-ZAPPR1_REM TO G_TC2_WA-ZAPPR1_REM,

ZSDRBT_INELG_INV-ZAPPR2_STA TO G_TC2_WA-ZAPPR2_STA,

ZSDRBT_INELG_INV-ZAPPR2_REM TO G_TC2_WA-ZAPPR2_REM,

ZSDRBT_INELG_INV-ZAPPR3_STA TO G_TC2_WA-ZAPPR3_STA,

ZSDRBT_INELG_INV-ZAPPR3_REM TO G_TC2_WA-ZAPPR3_REM.

MODIFY G_TC2_ITAB

FROM G_TC2_WA

INDEX TC2-CURRENT_LINE.

ENDIF.

ENDMODULE. "TC2_MODIFY INPUT

Read only

0 Likes
1,293

Hi,

Thank you for your answer it is helpful.

but i have one more problem that is

after validation PAI & PBO are executing i don't want to execute pai &pbo .i want to display screen ready for input.

please tell me soon

thank you.

Edited by: tharangini kamatham on Mar 6, 2008 9:57 AM

Read only

0 Likes
1,293

Hi,

i am validating two fields using chain and endchain.

it is working but my problem is after displaying error message PAI &PBO are executing.

i want to avoid PAI & PBO .

please tell me any body.

thank you.

Read only

0 Likes
1,293

HI,

U mean after Error message, u need to come out of the screen??

if so then u can use EXIT statement.

Is that ur issue?

Revrt back,

Regrads,

Naveen