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: 

Activate the search Icon in VA02/ VA01

Former Member
0 Kudos
2,359

Hi all,

Is there a way to activate the SEARCH icon in the application toolbar in the create/ change sales order screen i.e. in VA01 or VA02? I have this requirement because the client wants to search for materials in the change sales order screen VA02.

Regards.

Thanks

Deepak Joshi

6 REPLIES 6

former_member194416
Contributor
0 Kudos
328

Hi,

No as far as I know it is not possible, they can use standard reports like va05 in a separate screen to check materials.

Regards

pepl
Active Participant
0 Kudos
328

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

Former Member
0 Kudos
328

Hi Petr plenkov,

I have reffed 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?.

Regards,

Akshath and Ali.

Former Member
0 Kudos
328

thanks

0 Kudos
328

Hi ,

i tried the same but after executing the button i get an error that the fcode is not registered in T185. Did i miss something?

Best Regards

Hannes

328

Hi Hannes,

After coming from your custom program system will throw the error. because your custom t-code not there in T185 table.

My self and Ali (alimohamed bazhir) faced same kind of issue in VA02.

we were getting error:-

After returning back to VA02 Error message displaying.

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

I have done bit trick to solve above issue. What i have done is

one you press back from your custom screen (where ever it is).

ok_code = 'V/01' or sy-code = 'V/01'.

ok_code = sy-code.

we have added above line. now we are not getting above error why because?

V/01 is 1st tab of sales order. more over this f-code (Function code already maintained standard table (i have forgot may its T185). so sy-subrc = 0. system wont throw any error.)

Regards.

Akshath