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

Not able to validate the field in Module pool PAI.

former_member196331
Active Contributor
0 Likes
2,493

Need Clarification,
My main aim is to add extra field at Co11n, So i was appended afru, then afrud is having afru, so, afrud is containing zzempid.

In Se51 I was Included the field In the Screen painter (Custom Exit) ( SAPLXCOF - 0900)

(Program and Screen no)


While saving, data is saving at AFRU, But in Pai of the above screen i need to validate the value of the emp id.
But while writing the code, It is saying that field is not exists. Could any body tell me what is the wrong in my code. I right to solve it.but could not find the problem.

13 REPLIES 13
Read only

Harel
Explorer
0 Likes
2,314

Hi Kali,

You need to declear the fileds in TOP Include.

Best Regards

Harel

Read only

0 Likes
2,314

May i know how could i declare, this is not z module program.

Data:f_field type afrud-zzempid.

then i can bind f_field to the Screen painter. (for z module program)

But Here In standard already afrud-zzempid is already there.

Can i declare like below.

data:afrud-zzempid type afru-zzempid.

If i proceed like above, error may get "AFRUD-ZZEMPID" has already been declared

Read only

DoanManhQuynh
Active Contributor
0 Likes
2,314

Hi there.

You need to check it in the function exit.

In your case I think it should be

EXIT_SAPLCORU_S_100 or EXIT_SAPLCORU_S_101 depend on your logic (you can read more detail in documentation of exit

CONFPP07 )

Read only

0 Likes
2,314

I understood, I can write it. Why this one is not working, I am thinking something wrong from my side, that's what requesting.

I declare 1 z table in top

Now in Pai i need to fetch into internal table .

Read only

0 Likes
2,314

Hello Kali.

Thats how screen exit work. You can read this link to understand the flow of screen exit:

http://sapignite.com/screen-exit-in-sap-abap-with-tutorial/

Read only

0 Likes
2,314

I declared in top my still error coming, normally it should not, May i know can i activate and user it and move it to the production. Do you think any error comes, in particular time. I check the flow of the screen i did not get any errors.

Read only

0 Likes
2,314

I think you missunderstand the point. You delcared in TOP but you still write check logic in PAI which should be write in funtion module exit. Please check the exit I posted last time.

Read only

0 Likes
2,314

I don't want to write in Function module, I need to show one error message, If i raise error message, the total screen is in disable mode.

I need only z field should validate, If the requirement not met i need to show error message, the validation i had written in Pai of the screen in chain block, So,. only this field only highlighted. Now please tell me how this possible, If i write the code in function module. total screen is in disable while error message showing. Hope you understood what is my point.

Read only

2,314

Did you try to active everything in your customize project yet? maybe in particular screen you get error but in general it is OK (but do not try to active and ignore the errors). And if you just need to check the field why dont you declare a local itab, or you can check directly like this:

select @abap_true from zco11nemplist where zzempid = @afrud-zzempid.
Read only

0 Likes
2,314

What is happening, i did not understood, Yesterday also still error i am facing, i try to activate the function group of the Screen, and I try to rebuild the function group rebuild object list, then i checked it, still error is coming.

Just i moved to quality server, just checking any error is coming or not, Now i open the development and try to check it,
No error message, In quality too, Where i did the mistake, Did not understood. Now no error message, Same declaration, NO changes, zco11nemplist too declared in top not in local.

Read only

0 Likes
2,314

Run that tcode like everyday work and if there is no dump you are fine 🙂

Read only

0 Likes
2,314

ok. I will Check it.

Read only

former_member185116
Active Participant
0 Likes
2,314

Hi,

you are trying to add a custom(z-field) to standard transaction,

in this case the corresponding table is AFRU, and its corresponding z-fields structure is CI_AFRU,

c1.jpg

try to add your z-field in CI_AFRU structure and then suitable write a screen exit for it..

please go through screen exit threads , already lot of information is available on this..