‎2009 Mar 13 5:32 AM
Hello All,
I have four list box fields in the screen,
Example :
1. Section Head
2. Department Head
3. Group Head
4. Project Manager
Now I have used field statement for each field(except Section Head) to populate the below fields.
Section Head is populated manually thru FM VRM_SET_VALUES.
Depending upon the value of the above field the below field is populated.
It works well when Section head executes it.
But if Group head executes it then the Section head and department head should not be filled and group head and project head should be filled.
But this is not happening.
Actually basically.
I want to execute the field statement conditionally.
please help.
Thanks,
Kunal.
‎2009 Mar 13 5:49 AM
hi,
Firstly set a flag when group head executes, and then with the help of the flag value,
in the pbo set the condition accrodingly and free the values from section head and department head
Regards,
Siddarth
‎2009 Mar 13 5:49 AM
hi,
Firstly set a flag when group head executes, and then with the help of the flag value,
in the pbo set the condition accrodingly and free the values from section head and department head
Regards,
Siddarth
‎2009 Mar 13 6:03 AM
Hi,
I am doing this.
But the field statements executes in an order. Since the first two are not executed, hence nothing is executed. hence the logic for GM and PM ate not executed.
Is there any way that i can have condition field statements.
Thanks,
Kunal.
‎2009 Mar 13 6:08 AM
In this case you can do it like this
the place where you write code for section head,
write if condition in this way,
if group head is initial.
" Write your logic for clearing fields....
endif.
endmodule.
the similar way write the if codition for all the field statements where you are writing logic for those fields...
Regards,
Siddarth
‎2009 Mar 13 6:03 AM
hi... hope this this gives u an idea
try this way... consider the below example
in PAI.
CHAIN.
FIELD : ZVSTEL,
ZSERNR,
ZVBELN,
ZTDLNR,
ZTRGNO,
ZSDABW MODULE INPUT_CHECK.
ENDCHAIN.
IN MODULE INPUT_CHECK
you can validate the your screen field name whether it is initial or not
then you can popup the corresponding fields you want.
for ex :
if field1 is not initial.
... populate remaining fields..
if field2 is not initial.
popultate corr.. fields..
‎2009 Mar 13 6:15 AM
Here, the screen would process all the logic for all field at one go and not display the screen for the field turn by turn.
‎2009 Mar 14 9:22 AM
Hi,
Not a problem even if the logic is executed for all the fields...
use the condition as I mentioned... for eachfield....
the place where you write the logic for the field....
use if condition to execute the logic....
here is the sample logic for selection_head.....
" Field GROUP HEAD logic
if selection_head is not initial.
" write the logic which you have written for selection_head here.
endif.
" Field DEPARTMENT HEAD logic
if selection_head is not initial.
" write the logic which you have written for department_head here.
endif.
" Logic for FIELD Group Head
if group_head is not initial.
" write the logic which you have written for group_head here.
endif.
" Logic for FIELD Project Manager
if group_head is not initial.
" write the logic which you have written for Project_Manager here.
endif.Regards,
Siddarth