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

How to Disable VA02 Partner Screen Input (Header Data)

Former Member
0 Likes
8,136

Hi Experts,

Is it possible to gray-off Partner input field of Partners Tab in Header Data (as shown in the attached file) of VA02 only?

My SD colleague told me that it is possible to disable that field in config but it will be disabled in VA01 as well. She's asking if it's possible that the users can input the partner during creation (VA01) but they will not be allowed to change it using VA02 anymore.

Thanks in advance.

/f



1 ACCEPTED SOLUTION
Read only

Former Member
5,928

Hi,

It is possible to hide partners for specific conditions,

This logic worked out for me.

I am hiding ship to party and sold to party for specific condition like sales org etc.....

That conditions are written in Z_MV45AFZZ_ISG_012 and memory ID exported from there......

Sample code of mine ,

In include LV09CF63,

IF sy-tcode = 'VA01'.

   FREE MEMORY ID 'Z_SD_314_SORG'.

ELSEIF sy-tcode = 'VA02'

    AND ( gvs_tc_data-rec-parvw = 'AG'

     OR  gvs_tc_data-rec-parvw = 'WE')

    AND gvs_tc_parameters-pos = '000000'.

LOOP AT SCREEN.

         IF  screen-name = 'GVS_TC_DATA-REC-PARTNER'.

           screen-input = 0.

*Grey out header condition "AG" and "WE"

           MODIFY SCREEN.

         ENDIF.

       ENDLOOP.

For AG and WE it will grey out the screen only in change mode not in creation mode VA01.......

Please try it and let me know the results.......

Regards,

Ravi Shankar L


Message was edited by: Ravi Shankar

Hi Experts,

Is it possible to gray-off Partner input field of Partners Tab in Header Data (as shown in the attached file) of VA02 only?

My SD colleague told me that it is possible to disable that field in config but it will be disabled in VA01 as well. She's asking if it's possible that the users can input the partner during creation (VA01) but they will not be allowed to change it using VA02 anymore.

Thanks in advance.

/f



19 REPLIES 19
Read only

Former Member
0 Likes
5,928

Try this user exit: MV45ATZZ

but you need to know the screen number and field name.

code should be write like:

IF ( SY-TCODE EQ 'VA02' ).

     LOOP AT SCREEN.

       IF SCREEN-GROUP1 EQ 'A1' and  screen-name = 'ADRC'

         SCREEN-INPUT = 0. " Make the fiels input disabled

         MODIFY SCREEN.

       ENDIF.

     ENDLOOP.

ENDIF.

Read only

0 Likes
5,928

Hi Karthi,

I checked that exit you gave (MV45ATZZ), correct me if I'm wrong, I think it's only an Include for Data Declarations. Have you implemented such logic there? And did it work? Kindly let me know if you made it work. Thanks for the reply.

/f

Read only

Former Member
0 Likes
5,928

Hello

To realize your requirement, contact your ABAP team to do a Enhancement in the User Exit.

EXIT_SAPLV09A_001

EXIT_SAPLV09A_002

EXIT_SAPLV09A_003

EXIT_SAPLV09A_004

SD User Exit

http://wiki.sdn.sap.com/wiki/display/ERPLO/SD+User+exits

Regards

Read only

FredericGirod
Active Contributor
0 Likes
5,928

Hi Bueno,

have a look to the doc : http://help.sap.com/saphelp_46c/helpdata/fr/1c/f62c7dd435d1118b3f0060b03ca329/content.htm

there is a part about fields modification

regards

Fred

Read only

p291102
Active Contributor
0 Likes
5,928

dear,

SPRO->SALES&DISTRIBUTION->BASIC FUNCTIONS->PARTNER DETERMINATION->SET UP PARTNER DETERMINATION ->Set Up Partner Determination for Sales Document Header->PARTNER FUNCITON IN PROCEDURE ->

choose your partner function enable the check box for not modifiable

see the below image

Read only

Former Member
0 Likes
5,928

In config level it is not possible to write conditions better please control in user exit......

Read only

Former Member
5,929

Hi,

It is possible to hide partners for specific conditions,

This logic worked out for me.

I am hiding ship to party and sold to party for specific condition like sales org etc.....

That conditions are written in Z_MV45AFZZ_ISG_012 and memory ID exported from there......

Sample code of mine ,

In include LV09CF63,

IF sy-tcode = 'VA01'.

   FREE MEMORY ID 'Z_SD_314_SORG'.

ELSEIF sy-tcode = 'VA02'

    AND ( gvs_tc_data-rec-parvw = 'AG'

     OR  gvs_tc_data-rec-parvw = 'WE')

    AND gvs_tc_parameters-pos = '000000'.

LOOP AT SCREEN.

         IF  screen-name = 'GVS_TC_DATA-REC-PARTNER'.

           screen-input = 0.

*Grey out header condition "AG" and "WE"

           MODIFY SCREEN.

         ENDIF.

       ENDLOOP.

For AG and WE it will grey out the screen only in change mode not in creation mode VA01.......

Please try it and let me know the results.......

Regards,

Ravi Shankar L


Message was edited by: Ravi Shankar

Read only

0 Likes
5,928

Thanks for the reply Ravi. I'll try that and will let you know.

Read only

0 Likes
5,928

Welcome! If any issue tell me we are here to help you......

Read only

0 Likes
5,928

Hi Ravi,

It works as expected (see attached screenshot). I can't thank you enough. You're a genius. I made your reply the correct answer.

Million thanks.

/f

Read only

0 Likes
5,928

Ravi,

How do you get the sales area data for this include? Did you export from MV45AFZZ?

Read only

0 Likes
5,928

Hi,

Yes we need to export from include MV45AFZZ,

Please refer the below code for exporting it,

*If the delivery number  exist for sales order setting memory ID

           select single vbtyp_n

             from vbfa

             into l_vbtyp_n

            where vbelv = vbak-vbeln

              and vbtyp_n = k_j.

           if sy-subrc = 0.

               l_sorg_category_delstatus = k_x.

               export l_sorg_category_delstatus to memory id 'Z_SD_314_SORG'.

           endif.

And I will import the memory id in include LV09CF63

Using implicit enhancement write this following code.

if sy-tcode = k_va01.

   free memory id 'Z_SD_314_SORG'.

elseif sy-tcode = k_va02

    and ( gvs_tc_data-rec-parvw = k_ag

     or  gvs_tc_data-rec-parvw = k_we )

    and gvs_tc_parameters-pos = k_posnr.

*If application code "SD_314" maintained in ZTCOM102FR table

*If delivery status is set 'C' (Completely processed) or 'B' (Partially processed)

*for Sales Order in VBUK table

*If SD document category “C” (Orders) or “H” (Returns) in VBAK table

*If trtyp "V" Sales Change in T180 table memory ID Imported from Z_SD_314_SORG

import l_sorg_category_delstatus from memory id 'Z_SD_314_SORG'.

  if sy-subrc = 0.

    if l_sorg_category_delstatus = k_x.

    loop at screen.

     if screen-name = 'GVS_TC_DATA-REC-PARTNER'.

*Grey out header condition "AG" and "WE"

      screen-input = 0.

      modify screen.

      endif.

    endloop.

  endif.

  endif.

endif.


Read only

Former Member
0 Likes
5,928

Hi,

Try with include 'MV56AOZZ' as we can include our own modules in this.

Read only

Former Member
0 Likes
5,928

Thanks for your words.....It boost my mind

Read only

p291102
Active Contributor
0 Likes
5,928

Hi,

Goto tcode OBD2 and select account group and go inside and select appropriate field status and which field you want to suppress you can suppress it.

Read only

Former Member
0 Likes
5,928

Hi,

I have a same issue like above,but small change is here its, i want to disable the all partner function address data(except SHIP - to-Party), i tried with LSZA1O02 this include but its not disabling the title and names.

Please help on this issue.

Regards

Mahesh

Read only

Former Member
0 Likes
5,928

hi ravi, i also have that requirement to hide sold to party field from va02 so, i want to knw which exit ur used , will tell my steps...so plz tell me wer i m wrong...

se80 - package (cmod) -MV45AFZZ.  then wer should i write the code...let me knw as soon as possible..thx

Read only

p291102
Active Contributor
0 Likes
5,928

one way through SHDO transction variant

or else inside the include program we can give screen-input = 0 for the particular screen field

Read only

Former Member
0 Likes
5,928

This message was moderated.