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

Call Transaction VA03 changing function

Former Member
0 Likes
5,331

Hello All,

We have the following code in our program:

SET PARAMETER ID 'AUN' FIELD ztab-vbeln.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

The user is then dropped off in VA03 for the specified order.

This opens the order in the default view from TVAK-UEVOR (UER2)

When you are accessing orders using VA03, you have the option to choose which view to open the order with using buttons/function keys for either UER1, UER2, or UBST. These will then supersede the value from TVAK-UEVOR.

Is it possible to pass which of these functions you wish to use in the Call Transaction command? Our business desires that we open the orders in the UER1 (Sales) view.

Thank you for the help.

Regards,

Bret

3 REPLIES 3
Read only

Former Member
0 Likes
2,354

You can do a small trick here doing actual BDC transaction in MODE = 'E', which will allow you to skip screens and take you to the last screen directly, showing tab (UER1).

Copy the below report in SE38 and replace order number 5046 with your own order number in below code and you can execute this report which will directly open Sales tab (UER1) on the given order

MODE = 'E' is used to skip successful screens and take directly to error screen or to completion of BDC. In this case since there are no errors anywhere it will take you to the end that is to display order.

REPORT ztv_va03.

INCLUDE bdcrecxy.

DATA: messtab TYPE TABLE OF bdcmsgcoll WITH HEADER LINE.

START-OF-SELECTION.


  PERFORM bdc_dynpro      USING 'SAPMV45A' '0102'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'VBAK-VBELN'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=UER1'.
  PERFORM bdc_field       USING 'VBAK-VBELN'
                                '5046'.

  CALL TRANSACTION 'VA03' USING bdcdata
                          MODE   'E'
                          UPDATE 'L'
                          MESSAGES INTO messtab.

Read only

Former Member
0 Likes
2,354

A suggestion only...in similar cases, I have created a transaction that constructs a small BDC session and executes it. There is no okcode for the last screen, so user ends up there. You can record the transaction entry and navigation to screen you want....

There may be other ways to make the screen you want the default.

Read only

0 Likes
2,354

Thanks for the answers, I'll pass them along to my development team to see what they think.

I'm also wondering, as an alternate solution, if there is a user exit where you can set the value that is used instead. We could then possibly use the Parameter IDs (e.g. AUN, but I'm not sure I can create my own "Z" parameter ID) or just specify it by Sales Org in a table and then redirect the transaction that way.