Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Module pool screen(conditional field statement)

Former Member
0 Likes
1,761

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,057

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,058

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

Read only

0 Likes
1,057

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.

Read only

0 Likes
1,057

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

Read only

Former Member
0 Likes
1,057

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..

Read only

0 Likes
1,057

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.

Read only

0 Likes
1,057

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