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: 

Create custom button on va02 item table control

former_member337526
Participant
0 Kudos

Hello All,

I have the requirement:

1. Transaction va02.

2. Create custom push button on Item table control  like this

right after standard buttons like this

3. Then I have to mark any item from item's control and to create code that copy

    marked item into next item.

How could I add custom push button to this table control ?

Where I have to write a code ?

Which function code I should use for the button ?

Or if I have to create my own function code in using vfbs transaction ?

Please, advice.

Thanks a lot,

Daniel.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

The pushbutton are in subscreen 4050 of program SAPMV45A, so you should change it in order to add a new button

but this is the easy part

then you should insert a your own control in the sequence control screen (see transaction VFBS): here you can define what has to be done as soon as an ok-code is triggered:

but it's not easy to do it.

Another option can be to use the screen-exit in order to insert what you need to to there:

I mean you can insert your button here, but user should be go to Additional data Tab of the item to be copied

Max

4 REPLIES 4

Former Member
0 Kudos

Hi

The pushbutton are in subscreen 4050 of program SAPMV45A, so you should change it in order to add a new button

but this is the easy part

then you should insert a your own control in the sequence control screen (see transaction VFBS): here you can define what has to be done as soon as an ok-code is triggered:

but it's not easy to do it.

Another option can be to use the screen-exit in order to insert what you need to to there:

I mean you can insert your button here, but user should be go to Additional data Tab of the item to be copied

Max

0 Kudos

Hello Max,

Thanks for your response.

When are you talking about "pushbutton are in subscreen 4050"  do you mean

changes in inculde MV45AF0B_BUTTON_AUSWAHL   ?

1. Does it means , that I have to do change this source code and enter

my own custom bushbutton code ?

2. It means that I have to insert my record into cua_exclude ?

3. Which function code I have to use ? Or it may be my own custom function code ?

4. When you mentioned about vfbs, do you mean insert here my own screen gropup and function code ? Or something else ?

Please, advice.

Daniel.

0 Kudos

When are you talking about "pushbutton are in subscreen 4050"  do you mean

changes in inculde MV45AF0B_BUTTON_AUSWAHL   ?

Yes, you need to change the subscreen 4050 in order to add a new button and and change the form BUTTON_AUSWAH (so include MV45AF0B_BUTTON_AUSWAHL) in order to hide or deactive your new buttom if user runs VA03 (so in display mode)


1. Does it means , that I have to do change this source code and enter

my own custom bushbutton code ?

Yes (see above) I suppose your button should be active only in "Create" and "Change" mode


2. It means that I have to insert my record into cua_exclude ?

I think it's better to add the code you need at the end of form BUTTON_AUSWAHL (you could create an enhancement), but here you have to insert the code to manage the status (active or deactive) of your button


3. Which function code I have to use ? Or it may be my own custom function code ?

You have to use an your own custom function code


4. When you mentioned about vfbs, do you mean insert here my own screen gropup and function code ? Or something else ?

Yes, you need to insert what your new code has to do by there:

try to check a standard function code in order to know how the setting has to be done

In VFBS you have to indicate the form to be called to copy the item, this form has to belong to standard program SAPMV45A, so you can define your routine in the include for user-exit  MV45AFZZ.

In this way you'll change the standard only tor change the dynpro 4050, the rest of objects could be enhanced:

- form BUTTON_AUSWAHL can be enhanced

- include  MV45AFZZ is for custom modification

In this way you can reduce the impact of changing of a standard program

See this discussion:

Max

0 Kudos

Hello Max,

Thanks a lot for your answer !

I suppose, I will go to implement this as per your advice.

It will take some time and I'll inform you anyway .

Regards,

Daniel.