Application Development 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: 

How to add custoim fields on the additiondata b tab of va01 and va02

Former Member
0 Kudos

Hi All,

i want to add the field on the Additional data B tab of the VA01 and VA02 at header level.

Already one field is there now i want to add one more field.How to proceed.

I think i have to go with screen exits.Can you help me in proceeding further and where should i write the code.

It is urgetn.Please help me

6 REPLIES 6

former_member221770
Contributor
0 Kudos

Hi Kumar,

Go to transaction SPRO. Then menu Sales and Distribution->System Modifications->User Exits->User Exits in Sales-> User Exits in Sales Document Processing.

But before you click on the "Execute" button click on the Document Help button next to it. This should get you an overview of the user exits available and help you get started.

Cheers,

Pat.

Former Member
0 Kudos

When you say already there is one field, then you must have already used the screen exit and there must be a project out there for those changes. Go to CMOD and search for all Z projects and see if you find one there that includes changes to this screen. If it is there, then all you have to do is modify the screen and add your screen logic. Since the project is already active, you don't have to do anything in CMOD.

0 Kudos

Hi

I will modify the subscreen by defining one more new field.Now i have to write the logic then where should i write.I am thinking that i have to write in the pai module of the subscreen. is it correct or not?

Please help.

0 Kudos

Kumar,

That is correct.

Pat.

0 Kudos

I have to move the updated fields to the vbak table

The code is like this

If VBAK-ZZGrswgh less than ZTRKLMT-ZZweight OR

VBAK-ZZCubTot less than ZTRKLMT-ZZCube OR

VBAK-ZZPaltot less than ZTRKLMT-ZZPallet

CLEAR VBAK_ZZTRKLMT.

Else

MOVE ‘X’ TO VBAK_ZZTRKLMT.

End if

should i write this code in the USEREXIT_MOVE_FIELD_TO_VBAK of program MV45AFZZ ?

This user exit should trigger when

VBAK-AUART Equals 'ZWH' OR

VBAK-AUART Equals 'ZFV'

Reply soon

0 Kudos

You can use that. You will have to add the following IF statement around your code.


IF VBAK-AUART Equals 'ZWH' OR
   VBAK-AUART Equals 'ZFV'.
  IF VBAK-ZZGrswgh < ZTRKLMT-ZZWEIGHT OR
     VBAK-ZZCubTot < ZTRKLMT-ZZCUBE   OR
     VBAK-ZZPaltot < ZTRKLMT-ZZPALLET.
    CLEAR VBAK_ZZTRKLMT. 
  ELSE.
    MOVE ‘X’ TO VBAK_ZZTRKLMT.
  ENDIF.
ENDIF.