Skip to Content
0
Former Member
Jul 26, 2012 at 11:13 AM

How to activate the custom push button at Menu bar in VA01/Va02?

437 Views

Hi

i have referred Petr plenkov answer for your reference i have pasted in the bottom of my question,

I have referred your steps ( 1 to 5) , and I have created 'Customized' button in VA02.

My customized button name is image upload.

ones user click the image upload button -> system will call the table control screen (SAPMZIMG) for upload the image path into 'Z-Table'.

and i have written the logic for image upload and its working fine.

if user click BACK button in table control of (SAPMZIMG) should return back to previous screen i mean 'VA02' screen.

I have written the code for returning main screen 'VA02' :

CASE : SY-UCOMM.

WHEN 'BACK'.

LEAVE PROGRAM.

ENDCASE.

Even this code is working. and its returning cursor back to VA02 screen.

After returning back to VA02 Error message displaying.

Error is : 'Requested function ZIMAGE is not available here'.

I have created button based on your steps.

how to solve this error ?

Can you explain the error and how to solve it?.



Petr plenkov answer is :

-------------------------------------------------------------------------

Hi!

I think it's impossible to do this with only settings applying. What I would сhoose is like this:

1) create new program (ZVA_GUI_STATUS for example)

2) copy GUI statuses A0 (for VA01) and A02 (for VA02) from SAPMV45B into ZVA_GUI_STATUS with the same names.

3) change those statuses however u want (create new function code for SEARCH button, &SEARCH for example)

4) create enhancement option in the end of CUA_SETZEN form in MV45AF0C_CUA_SETZEN include with code like this

if MODUL-POOL eq 'SAPMV45B'.

if T185V-STATUS eq 'A0' or

T185V-STATUS eq 'A02'.

SET PF-STATUS T185V-STATUS EXCLUDING CUA_EXCLUDE

OF PROGRAM 'ZVA_GUI_STATUS'.

endif.

endif.

5) u can handle this function code at the begin of FORM fcode_bearbeiten of MV45AF0F_FCODE_BEARBEITEN include

if fcode eq '&SEARCH'.

...

endif.

P.S.: if u suddenly forget about enhancing programs this is a hint to do this.

http://wiki.sdn.sap.com/wiki/display/ABAP/HowToDoImplicitEnhancement

all standard gui statuses for SAPMV45B are maintained in T185V.

be careful with function code choosing to avoid overriding of standard function codes handling.

Edited by: Petr.Plenkov on Apr 23, 2010 3:47 PM

---------------------------------------------------------------------------------------------

Regards,

Akshath and Ali.