10-13-2007 11:26 AM
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
10-13-2007 11:29 AM
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
10-13-2007 11:33 AM
10-13-2007 11:41 AM
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
10-13-2007 12:10 PM
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
10-13-2007 12:12 PM
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
10-13-2007 12:22 PM
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
10-13-2007 12:31 PM
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
10-13-2007 12:56 PM
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
06-10-2014 6:45 AM
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.