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: 

call tarnsaction using set paremeter

Former Member
0 Kudos

Hi all,

i have to use the below code that when i click on vbap-vbeln then it shuld show me va03 transaction.

i m getting that but when i click on vbap-posnr also its going to va03 transaction so i want to restrict it to only wa_vbap-vbeln.

plzz advice.

WHEN 'FLOW'.

*

GET CURSOR FIELD F VALUE wa_vbap-VBELN.

SET PARAMETER ID 'AUN' FIELD wa_vbap-VBELN.

*

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

Thanks,

sanjay

9 REPLIES 9

Former Member
0 Kudos

try like this

GET CURSOR FIELD F VALUE wa_vbap-VBELN.

if f = 'ITAB-VBELN' " suppose the int table you are showing is ITAB.

  • or check in debug mode what is the value of F here.

SET PARAMETER ID 'AUN' FIELD wa_vbap-VBELN.

*

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

endif.

regards

shiba dutta

0 Kudos

hi shiba,

i have done that still i m not getting.

regards,

sanjay

0 Kudos

Hi

how it is possible? Parameter id 'AUN' is for the field VBELN only

POSNR field doesn't have any parameter ID

Check the data elements.

Check for the field and field value clearing before reading the values.

Reward if useful

Anji

0 Kudos

just check in debug mode when you are dbl clicking on VBELN an POSNR what is the value of F you are getting.

And then restrict it in if condition for VBELN.

regards

shiba dutta

0 Kudos

Hi anji,

this is bit complicated for me too. but ur correct, so can u plzz clarify if anything is wrong out there in my code.

Thank,

sanjay

0 Kudos

Hi shiba,

when i m clicking on POSNR its collecting the posnr field.

but as per my condition it shuld pick only wa_vbap-vbeln.

so what can be done.

regards,

sanjay

0 Kudos

But it is not possible you can show some message pls click on vbeln and not to call the tcode.

if f = 'ITAB-VBELN'.

set param...

call transaction......

else.

message 'Pls click on vbeln'. type 'S'.

endif.

or make a hotspot for vbeln field by format option.

write : itab-vbeln hotspot.

regards

shiba dutta

0 Kudos

Hi

see the sample code

CASE SY-ucomm.

WHEN 'PICK'. " Double click line

  • Check field clicked on within ALVgrid report

IF rs_selfield-fieldname = 'VBELN'.

  • Read data table, using index of row user clicked on

READ TABLE t_disp_tab INTO wa_item_tab INDEX

rs_selfield-tabindex.

  • Set parameter ID for transaction screen field

SET PARAMETER ID 'VL' FIELD wa_item_tab-vbeln.

CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

Regards

Anji

Former Member
0 Kudos

a delayed response to those in need:

          SET PARAMETER ID 'AUN' FIELD <sales_order_vbeln>.

          SET PARAMETER ID 'VPO' FIELD <sales_order_posnr>.

          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

  ID 'VPO' for posnumber of sales order.