‎2008 Jun 03 2:14 PM
hi all,
i have a module pool program where in pai after checking one field if it is blank i am throwing an error message so that the field will be in editable mode.
but the problem is that i want to remove the description also for that field when the field is blank and message is shown.
plz help.
Rgds,
Avijit
‎2008 Jun 03 2:16 PM
‎2008 Jun 03 2:17 PM
Hi
Clear the field value before displaying the error message.
Thanks
Shakir
‎2008 Jun 03 2:24 PM
Hi,
clear screenfield name.
example
if < condition >
Clear VBAP-vbeln " screenname-fieldname.
Message Message' type 'E'.
endif.
regards,
muralidhar.
‎2008 Jun 03 4:09 PM
hi all,
i cleared that screen-field before E message but the screen is still showing that value as mesage E is fired before PBO.
plz suggest wht to do.
rgds,
Avijit
‎2008 Jun 03 4:34 PM
hi all,
there are 2 screen fields - one is for code which is in editable mode and the other is for description of this code which is in display mode. when user enters code corresponding description is displayed. the problem is if after entering once user deletes the code program shows error message that the field should not be blank. but at this time i also need to clear the description field as now there is no code.
for better understanding plz check with tcode ME21N where after entering pur.org. corresponding description is shown but then if u remove the value description is also removed and error msg is coming.
i tried to debug this tcode but fails.
plz help.
rgds,
Avijit
‎2008 Jun 03 5:23 PM
Hi Avijit,
Can u show me the code?..Show the code for Modules called in sequence PAI and the validation module where u are throwing an error message.
One more way to clear the description when the code value is changed or cleared. is like this.
Process After Input.
FIELD code1 MODULE val_code on-request.
Module val_code input.
if code1 is initial.
clear code_desc.
else.
select desc from table1 into code_desc
where code = code1.
Endif.
ENDMODULE.
NOTE:Dont call the FIELD statement for Description field next to code field. like this...
Process After Input.
FIELD code1 MODULE val_code on-request.
FIELD code_desc.
if you put field statement for the code_desc next to code1 just like above in BOLD,then the value which you cleared in Module val_code input will be overwritten by the screen value for code_desc field.
Regards,
Vigneswaran S
‎2008 Jun 04 6:45 AM
hi all,
thnks 4 ur suggestions. but till now i am unable 2 get d desired result.
i am giving d code part below:
2 screen fields CODE and DESC
CODE input field
DESC output only
PAI
FIELD CODE MODULE VALID_CODE.
MODULE VALID_CODE.
IF CODE IS INITIAL.
CLEAR DESC.
ERROR MESSAGE.
ELSE.
SHOW DESC FOR CODE ENTERED.
ENDMODULE.
Effect on screen:
initially if user presses ENTER message is showing. if valid code is entered desc is showing. now if user removes code and presses enter error message is showing but desc is not blank. i want desc should also be blank at this time.
this is d same functionality as in tcode ME21N purchase org. field.
plz advice wht 2 do.
rgds,
Avijit
‎2008 Jun 04 7:12 AM
‎2008 Jun 04 8:14 AM
‎2008 Jun 04 7:30 PM
Hi Avjit,
Sorry.I saw your reply very late..Here you go...
You have to use to put a module within a CHAIN ENDCHAIN .
Process After Input.
CHAIN.
FIELD code_desc .
FIELD code1 MODULE val_code on-request.
ENDCHAIN.
Note:the code_desc should be above the code1 field as mentioned in the above statement.
Regards,
Vigneswaran S
Edited by: Vigneswaran S on Jun 4, 2008 8:36 PM
‎2008 Jun 05 6:28 PM
hi vignes,
thnks 4 ur reply. but i think u r not getting my problem.
i dont want d DESC field in editable mode when CODE field is blank.
my requirement is if CODE is not blank then after pressing ENTER, DESC will come automatically. but if CODE is blank and user presses ENTER then DESC will be blank and ERROR message will come below and CODE will be in editable mode.
plz help.
rgds,
Avijit
‎2008 Jun 05 10:19 PM
Hi Avjit,
I have included CODE_DESC in FIELD statement of CHAIN ENDCHAIN block.But that does not mean that CODE_DESC field should be an Editable field in the Screen.
I think you didnt test the code which i put in my previous post.The same code is working well (meaning that if code field is initial and pressing 'ENTER" the error message is coming with code_desc field vaule gets cleared and code_desc always be an display only ) for me eventhough the Code_desc field is either Display only or Editable field.
Do Test with the code which i sent in previous post and let me know if it not works....
Thanks,
Vigneswaran S
‎2008 Jun 06 6:35 AM
hi vignes,
thnks 4 ur valuable help. want 2 b in touch later also. give me ur mail id.
P.S. assigning u points also.
rgds,
Avijit
Edited by: AVIJIT SIKDAR on Jun 6, 2008 7:35 AM
‎2008 Jun 08 6:15 AM
‎2008 Jun 10 11:03 AM
hi vignesh,
how to achieve d same functionality when d first field is of a table control and d next field is not belongs to table control.
that means depending upon value in d field of table control d other field should b changed w/o firing PBO.
plz help.
rgds,
Avijit
‎2008 Jun 10 7:38 PM
Hey Avjit,
Answer me to the following question.
How do you know which line(row) of the table control field to be considered for making the Non-Table control field either editable or non-editable.I can enter value for a table control field in any line ....
Regards,
Vigneswaran S
‎2008 Jun 11 6:26 AM
hi vignesh,
table control has one field VALUE in editable mode.
below there is TOTAL in display mode. TOTAL will show sum of VALUEs entered in table control.
when user deletes any row's VALUE and presses enter system will show ERROR msg and TOTAL will be updated accordingly. (TOTAL = TOTAL - this row's previous VALUE).
plz help.
rgds,
Avijit
‎2008 Jun 11 4:27 PM
Hi,
I am sorry to say that up to me it is not possible to do that. Instead ,I can suggest one alternative solution that If the user can change the amount value in any one of the row of the table control and still you want to re-calculate the total based on the new values,if it is a case,then why are you populating the Error message to the user.Instead you can populate one warning message and let the user to carry forward the action (means PBO can be triggered after warning message and your total will automatically recalculated).
Regards,
Vigneswaran S
‎2008 Jun 03 6:03 PM
hi,
try this.
PAI.
chain.
fields : code.
module validate_code.
endchain.
module validate_code.
if code is initial.
message 'shud not be blank' type 'E'.
clear : description.
else.
""""your code""""
endif.
regards
Sandeep REddy
‎2008 Jun 10 11:03 AM