07-20-2009 10:30 AM
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?
07-20-2009 10:44 AM
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
07-20-2009 10:35 AM
Hi,
Declare the field in the prgram with the same name.
Check for initial at PAI.
Regards,
Dhasarathy.
07-20-2009 10:36 AM
Hi ,
In PBO event check lgpla as initial.
e.g. if lgpla is initial.
endif.
Regards,
Vijay
07-20-2009 10:42 AM
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.
07-20-2009 10:49 AM
deaclare
Tables: LQUA. in TOP Include.
It won't give that error.
Regards,
Nitin.
07-20-2009 10:51 AM
Hi,
Declare
Data: LQUA-LGPLA like LQUA-LGPLA.
also in the module.
Regards,
Dhasarathy.
07-20-2009 10:53 AM
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.
07-20-2009 10:41 AM
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 .
07-20-2009 10:44 AM
Hi,
You can do like this,
If you want to check it after a button click then place it in PAI.
Thanks,
Sri.IF lqua-lgpla IS IS INITIAL
MESSAGE 'the field is initial' TYPE 'I'.
ENDIF.
Edited by: Sri on Jul 20, 2009 3:14 PM
07-20-2009 10:44 AM
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