‎2009 Jun 10 3:19 PM
Hi,
I need to create a Validation Function Module.
I have a ITAB into which data comes.
FIELD-SYMBOLS : <ITAB> TYPE ANY ,
key TYPE ANY,
char TYPE ANY.
<ITAB> = local_file.
there is a field KEY whose sum when becomes equal to 10.000 for every CHAR,system should show a popup in the below FM
CALL FUNCTION 'POPUP_WITH_WARNING_ALV'
EXPORTING
TEXTLINE1 = LT_POPUPTEXT
TEXTLINE2 = ' '
TITEL = 'Warnung'
Please let me know if the requirement is not clear.
Thank U very Much.
.
‎2009 Jun 10 3:31 PM
I will give an example.
for CHAR KEY
mat1 4.1
mat1 3.2
mat1 4.2
mat2 3.8
mat2 6.2
In the above case for mat1 the sum of all KEY is 11.5 (4.13.24.2) So a pop-up should come.
saying the KEY sum is not equal to 10.0
but in case of mat2 the sum of all KEY is 10.0 so it should not throw any pop-up.
Hope the req is clear.Please let me know if it isn't
‎2009 Jun 10 3:31 PM
I will give an example.
for CHAR KEY
mat1 4.1
mat1 3.2
mat1 4.2
mat2 3.8
mat2 6.2
In the above case for mat1 the sum of all KEY is 11.5 (4.13.24.2) So a pop-up should come.
saying the KEY sum is not equal to 10.0
but in case of mat2 the sum of all KEY is 10.0 so it should not throw any pop-up.
Hope the req is clear.Please let me know if it isn't
‎2009 Jun 10 3:38 PM
Hi annapurna ,
In your case even the KEY value is the most useful one right,
If so go about this way,
have another field flag set it when the sum of the KEY values exceeds 10.
Loop in an internla table.
Now the internal table will have all the data including the flag and now based on the flag (whether set or not) call the function module popup which should retrieve those matnr field where flag is set.
Display the error message saying that the KEY value fr this matnr exceeds 10.
Revert for further clarification.
Thanks and Regards
Srikanth.P
‎2009 Jun 10 4:34 PM
Hi Sri,
Thanks for the reply.'
I need to Calculate the sum for each MTNR ,ie., for matnr1 all the KEY filed should be added.
How can I do that ?