Application Development 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: 

To capture the value of the field in screen painter

Former Member
0 Kudos

Hi,

I have added a field lgpla from lqua table in the screen painter.I have taken it from dictionary of that table.In the flow logic of that sceen I want to check whether that field is empty or not .How can I capture the value of that field?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Abaper12345,

Declare table lqua as tables in top include.

tables : lqua -- in TOP include.

Then if you want to put any validation on this field, you can write your validation in PAI event.

FIELD lqua-lgpla MODULE check_1 ON REQUEST.

In module, check_1, check whether lqua-lgpla is initial and give your processing logic as per requirement.

IF lqua-lgpla is initial.

      • Processing logic

endif.

Regards,

Anil Salekar

9 REPLIES 9

Former Member
0 Kudos

Hi,

Declare the field in the prgram with the same name.

Check for initial at PAI.

Regards,

Dhasarathy.

Former Member
0 Kudos

Hi ,

In PBO event check lgpla as initial.

e.g. if lgpla is initial.

endif.

Regards,

Vijay

0 Kudos

Hi Vijay,

In the screen painter I can see the name of the field as LUQA-LGPLA as I have taken it from the dictionary of that table.In the flow logic of that screen in the PAI i have given in the following way.

DATA: V_LGPLA TYPE LQUA-LGPLA.

IF LQUA-LGPLA IS NOT INITIAL.

V_LGPLA = LQUA-LGPLA.

But it is giving error as field LQUA-LGPLA is unknown.

0 Kudos

deaclare

Tables: LQUA. in TOP Include.

It won't give that error.

Regards,

Nitin.

0 Kudos

Hi,

Declare

Data: LQUA-LGPLA like LQUA-LGPLA.

also in the module.

Regards,

Dhasarathy.

0 Kudos

Hi,

Give this in your TOP include file.



TABLES: LQUA.

This is the reason for the error. This statement is required so that data can be transferred between the screen fields and ABAP dictionary and the program.

Former Member
0 Kudos

HI ,

Please check the value in PAI process after INPUT in any module Or Create a module in PAI CHECK_INPUT .

implementation part of module as below.

Module CHeck _INPUT INPUT.

ID Field = ' ' .

Then put your logic here.

leave to screen dy-nnr.

ENDIF

END MODULE.

Thanks ,

Deepanker Dwivedi .

sridhar_meesala
Active Contributor
0 Kudos

Hi, You can do like this,

IF lqua-lgpla IS IS INITIAL
 MESSAGE 'the field is initial' TYPE 'I'.
ENDIF.
If you want to check it after a button click then place it in PAI. Thanks, Sri.

Edited by: Sri on Jul 20, 2009 3:14 PM

Former Member
0 Kudos

Hi Abaper12345,

Declare table lqua as tables in top include.

tables : lqua -- in TOP include.

Then if you want to put any validation on this field, you can write your validation in PAI event.

FIELD lqua-lgpla MODULE check_1 ON REQUEST.

In module, check_1, check whether lqua-lgpla is initial and give your processing logic as per requirement.

IF lqua-lgpla is initial.

      • Processing logic

endif.

Regards,

Anil Salekar