‎2009 Jan 22 12:10 PM
Hi all,
I am designing one module pool program , which contains 2 screens
screen1 :- Selection data,
screen2 :- Details data in Tab Con.
Now from screen1 data , I populate int table and display that in screen2.
Now my requirement is to block user to go to screen2 if int table is empty.
So I have given message in one module in PAI of screen1 , with message type 'E'.
But as soon as this condition is fulfilled i.e .int table is empty ,
message appears , and user cant go further BUT all INPUT fields turn in DISABLED (display only) Mode
and I want all inputs to be ENABLED even if MESSAGE occurs....
My code in flow logic is
PROCESS AFTER INPUT.
MODULE GET_DATA_TABCON.
MODULE VALIDATE_DATA.
MODULE USER_COMMAND_8000. In Module GET_DATA_TABCON , I get int table data and I check the same in
MODULE VALIDATE_DATA as below ..
MODULE validate_data INPUT.
IF IT_FORECAST[] IS INITIAL.
MESSAGE 'No data found for this selection' TYPE 'E'.
LEAVE TO SCREEN '8000'.
ENDIF.
ENDMODULE. " validate_data INPUT
Could anybody suggest me the solution................
Thanks.................
‎2009 Jan 22 12:12 PM
Hi,
1. Check by changing the error mesg type to 'W'
2. Add the error message in between CHAIN ENDCHAIN of those fields.
Once you hit enter after the error message, normally sap makes the fields editable.
Best regards,
Prashant
‎2009 Jan 22 12:48 PM
Dear Prashant,
thanks for replying,
I tried your way , but it does not work......one new problem has arisen bcoz of that.....
it does not takes the values of fields on the first screen..even if I make entries in those...i.e. the values of ZSTR_MONTH-ZMONTH,CE1GNPL-GJAHR, KNVV-KUNNR,KNVV-VWERK are initilised.........
My new Flow Logic is
PROCESS AFTER INPUT.
MODULE GET_DATA_TABCON.
CHAIN.
FIELD : ZSTR_MONTH-ZMONTH,
CE1GNPL-GJAHR,
KNVV-KUNNR,
KNVV-VWERK.
MODULE VALIDATE_DATA.
ENDCHAIN.
MODULE USER_COMMAND_8000.
and MODULE VALIDATE_DATA is as below.........
IF IT_FORECAST[] IS INITIAL.
MESSAGE 'No data found for this selection' TYPE 'W'.
EXIT.
ENDIF.
Could you suggest me a solution........
Thanksssssssssss.
‎2009 Jan 22 2:03 PM
Hi,
Try doing the following way.
Dont put chain - endchain.
In your previous code, keep the message type as 'I'.
Now if the itab is empty
Show message [type 'I' ].
else.
go to screen 2.
Hope this helps.
‎2009 Jan 22 2:07 PM
Try:
CHAIN.
FIELD : ZSTR_MONTH-ZMONTH,
CE1GNPL-GJAHR,
KNVV-KUNNR,
KNVV-VWERK.
MODULE VALIDATE_DATA ON CHAIN-REQUEST.
ENDCHAIN.
‎2013 May 28 7:14 AM
"Add the error message in between CHAIN ENDCHAIN of those fields ' This also works with message type 'E'.
Thanks prashant
‎2009 Jan 22 12:16 PM
hi,
u should not put error message as it stops the processing.Try doin like this
1.In the PAI after checking the validation u dispay the error message and exit
2.In the second method u can call the second screen explicitl only if the internal table has values, then give a success message and dont call the screen.
‎2009 Jan 27 6:33 AM