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

screen exit for va01 & va21

Former Member
0 Likes
1,349

Hi all,

I have a requirement to add two new fields in va01 header aditional datab and 4 fields in va21 additional datab. But when i created the screen for header in sapmv45a screen no 8309 for t-code va01, it is also reflecting in va21, but my va21 additional datab screen should be different. How shall i achieve this.

Useful information will be rewarded.

Thanks and Regards,

subbu.

9 REPLIES 9
Read only

Former Member
0 Likes
1,135

Hi

In the PBO of sapmv45a screen no 8309.

Check the SY-TCODE = 'VA01' or 'VA02' or 'VA03' and make the screen elements active or in active

Regards

MD

Read only

0 Likes
1,135

Hi madhan,

Thankx for ur tips. How shall i make the screen elements active or in-active by checking the t-code. Elaborate.

Thanx and Regards,

Subbu.

Read only

0 Likes
1,135

Hi ,

you can loop thru the SCREEN structure and set the SCREEN-ACTIVE = '0' for the items to be disabled.

Read only

0 Likes
1,135

Hi

if sy-tcode = 'VA01' or 'VA02' or 'VA03'.

loop at screen.

if screen-name = your field name.

screen-active = 0.

modify screen.

endif.

endloop.

endif.

Regards

MD

Read only

0 Likes
1,135

Hi,

You will have to loop at screen and set the screen-active to '0' for the fields you want to disable for input.

regards,

Advait

Read only

Sharadha1
Active Contributor
0 Likes
1,135

Hi,

Add the fields based on the sy-tcode.

If VA01

add fields for VA01

else if VA21

add fields for VA21.

Thanks,

Sharadha

Read only

Former Member
0 Likes
1,135

Hi,

Check for transaction code before calling the screen.

if t_code = VA01.

call screen for VA01.

elseif t_code = VA21.

call screen for VA21.

endif.

regards,

Advait

Read only

Former Member
0 Likes
1,135

you need to Differentiate both. accordingly you have to make certain elements visible related to VA01 , and Rest make them invisible. using the document category(VBTYP)

Group all the VA01 fields under one group name, same is for VA21.

you need to make use of the user exit MV45AFZZ

here routine userexit_field_modification

if vbak-vbtyp  = 'C' .
 loop at screen.
  if screen-group = 'VA01'.
  screen-active = 0.
  modify screen.
 endif.
endloop.
elseif vbak-vbtyp = 'B'.
  if screen-group = 'VA21'.
  screen-active = 0.
  modify screen.
 endif.
endif.

Read only

Former Member
0 Likes
1,135

self answered