cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass parameters and skip first screen for webgui service restricted to one transaction

Former Member
0 Kudos

Hello,

  I have a business requirement to display SAP data (e.g. transaction VA05) via webgui.  I have created a service zwebgui by copying service webgui and added parameters ~singletransaction = 1 and ~transaction = VA05.  This launches transaction VA05 and users navigation is restricted within that transaction.  I need to pass value to screen field sold-to party VBCOM-KUNDE as URL parameter and skip first screen.

  I have tried passing parameters to service webgui

http://server-name:8000/sap/bc/gui/sap/its/webgui/!?~transaction=*va05 VBCOM_KUNDE=100000 and it works. However I have read that passing OKCODE value  DYNP_OKCODE = XXXX is obsolete.   What is the alternative?

When we create a new service to restrict access to single transaction? How to pass parameters to that service?

http://server-name:8000/sap/bc/gui/sap/its/test/zwebgui/!?~transaction=*va05 VBCOM_KUNDE=100000  does not pass the customer value.


Accepted Solutions (1)

Accepted Solutions (1)

JK
Contributor
0 Kudos

i am using &~OKCODE=ENTE and this works fine

Former Member
0 Kudos

Jorg,

Thanks for the reply.

It appears that when you set service parameter ~transaction you can not pass screen fields.  In order for the service to work correctly I had to set service parameter ~singletransaction = 1 and remove parameter ~transaction (or leave it blank) and then pass it in URL along with screen field and OK code value to skip the screen.

The URL that worked is

http://server-name:8000/sap/bc/gui/sap/its/webgui/!?~transaction=*va05 &~VBCOM_KUNDE=100000 &~OKCODE=ENTE

By the way how to get the list of all allowed parameters for a web service?

Sanjay

JK
Contributor
0 Kudos

very good.
you will find n oveview of the parameters in sap help:

http://help.sap.com/saphelp_470/helpdata/en/5f/1fbaa04aee11d189740000e8322d00/content.htm

former_member194364
Active Contributor
0 Kudos

Hi Sanjay,

You might need to adjust the syntax of your URL slightly. See the WIKI:

How to prefill fields and skip first screen with webgui? - Wiki - SCN Wiki

http://WAS_HOST:WAS_PORT/sap/bc/gui/sap/its/webgui?~transaction=*VA05 VBCOM_KUNDE=100000;DYNP_OKCODE=ENTE

Regards,

Oisin

Former Member
0 Kudos

Thank you Jorg.

The URL for service parameters is very useful.

Former Member
0 Kudos

Oisin,

Ideally I would prefer creating a z-service and provide parameter ~transaction in GUI configuration of that service. Also restrict the service to a single transaction.  This avoids URL manipulation to launch other transactions.

However with such setting I am not able to pass screen inputs and OK code value successfully via URL.  How can I accomplish this?


JK
Contributor
0 Kudos

i did the following:

create Service zva03 in sicf

assing gui Parameters ~Transaction VA03 and ~webgui 1

activate service

use URL with Parameter &VBAK-VBELN=2&~OKCODE=ENTE&~singletransaction=1

now the Parameters are taken over from the url

and you cannot select another transaction

former_member194364
Active Contributor
0 Kudos

further to Jorg's post.

The following note is useful regarding restricting okcode's

1501768 - ITS: Config. permitted or prohibited OK codes during start

Regards,

Oisin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mark,

Thank you. I just copied VBCOM-KUNDE from the above posts and was wondering as i dint see it in my ERP. As i have a higher version, the screen feild in VA05 in our system is SPARTNER-LOW which i am using, i am able to pass the customer ID into the 'Partner felid'.

I am stuck at executing the transaction, the transaction doesnt get executed unless i select manually. Is there anycode where i can execute the transaction using the code directly after passing the partner number in VA05?

Regards

Shiva

JK
Contributor
0 Kudos

The Selection Screen of VA05 depends on some customizing Setting and EHP Release. on the old screen

the field names have been Different.

as you are now on the new selection, the OKCODE =ONLI should work for you! (or also /08 for F8 Execute)

Former Member
0 Kudos

Hi,

We are facing the same issue.

I tried the URL,

http://xxx.xx:8000/sap/bc/gui/sap/its/webgui?~transaction=*va05 VBCOM_KUNDE=xxxxxx;DYNP_OKCODE=ENTE

but the customer ID is not getting passed into the feild, Also, the field is VBAK-KUNNR in Va05, how is this VBCOM_KUNDE? Can somebody help in this matter?

Regards

SHiva

Former Member
0 Kudos

Shiva, field name is VBCOM-KUNDE with a hyphen not an underscore.  You get the field name by pressing F1 in Sold-to Party, then click technical information icon.  Field name is at bottom in Screen Field.

Regards,

Mark