2010 Apr 21 4:37 AM
In the ALV GRID , I have used the following code to go to VA02 and VA22 .
WHEN c_ic1.
Retrieve the vbeln value of the record selected and use it to open tcode VA02.
CLEAR wa_outtab.
READ TABLE i_outtab INTO wa_outtab with key p_rs_selfield-fieldname.
SET PARAMETER ID c_pid FIELD wa_outtab-vbeln.
if wa_outtab-auart eq C_ZQT .
CALL TRANSACTION c_tcode2 AND SKIP FIRST SCREEN.
ELSEIF wa_outtab-auart eq C_ZQR .
CALL TRANSACTION c_tcode2 AND SKIP FIRST SCREEN.
ELSE.
CALL TRANSACTION c_tcode1 AND SKIP FIRST SCREEN.
ENDIF .
IF sy-subrc <> 0.
no requirement to display error message in case error
in opening tcode va02.
ENDIF.
Now My problem is that when the user clicks on a particular sales order in ALV GRID , that particular sales order should be displayed in VA02 .I,e instead of user entering the value of sales order manualy in VA02 . It has to automatically take from the ALV GRID tht particular sales order whic he has double clicked in the ALV .
Please tell me how to achieve this functionality ..
Regards
pavan
2010 Apr 21 5:08 AM
Hi,
For VA22 / VA02 I think you should set parameter as follow:
SET PARAMETER ID 'AUN' FIELD wa_outtab-vbeln.Before using CALL TRANSACTION .
BR,
Thien
In the ALV GRID , I have used the following code to go to VA02 and VA22 .
WHEN c_ic1.
Retrieve the vbeln value of the record selected and use it to open tcode VA02.
CLEAR wa_outtab.
READ TABLE i_outtab INTO wa_outtab with key p_rs_selfield-fieldname.
SET PARAMETER ID c_pid FIELD wa_outtab-vbeln.
if wa_outtab-auart eq C_ZQT .
CALL TRANSACTION c_tcode2 AND SKIP FIRST SCREEN.
ELSEIF wa_outtab-auart eq C_ZQR .
CALL TRANSACTION c_tcode2 AND SKIP FIRST SCREEN.
ELSE.
CALL TRANSACTION c_tcode1 AND SKIP FIRST SCREEN.
ENDIF .
IF sy-subrc <> 0.
no requirement to display error message in case error
in opening tcode va02.
ENDIF.
Now My problem is that when the user clicks on a particular sales order in ALV GRID , that particular sales order should be displayed in VA02 .I,e instead of user entering the value of sales order manualy in VA02 . It has to automatically take from the ALV GRID tht particular sales order whic he has double clicked in the ALV .
Please tell me how to achieve this functionality ..
Regards
pavan
2010 Apr 21 4:42 AM
Did you pass the Sales Order number to the transaction? Or, do you expect SAP to have an AI & do that automatically for you ?
Anyways to answer your question to need to pass the Sales Order number you have captured through double click & pass that to the CALL TRANSACTION.
You can do so by SET PARAMETER ID (if Param ID defined against the field) or pass a BDC structure.
BR,
Suhas
2010 Apr 21 4:46 AM
2010 Apr 21 5:02 AM
>
> Can u please tell me how to pass the sales order value to that call transaction
Now this is a generic question. Google with the search string "Call Transaction VA02".
2010 Apr 21 6:58 AM
refer this code.....
pass USER_COMMAND IN ALV AND THEN
ADD THE CODE LIKE THIS..
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
*break mtabap.
data : lv_vbeln TYPE vbeln_va.
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'VBELN' .
Read table IT_FINAL into wa_FINAL index rs_selfield-tabindex.
if sy-subrc = 0.
lv_vbeln = wa_FINAL-vbeln.
SET PARAMETER ID 'AUN' FIELD lv_vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
clear lv_vbeln.
endif.
ENDIF.
clear wa_final.
ENDCASE.
ENDFORM. "user_command
2010 Apr 21 5:08 AM
Hi,
For VA22 / VA02 I think you should set parameter as follow:
SET PARAMETER ID 'AUN' FIELD wa_outtab-vbeln.Before using CALL TRANSACTION .
BR,
Thien
2010 Apr 21 6:32 AM
Hi,
You need to set the STANDARD SET PARAMETER ID for the Sales Document and then call transaction.
Regards,
Satish
2010 Apr 21 6:40 AM
HI,
In the user command read the internal table into a work area.
So in that work area u will have the sales order number.
and after that
below is the example .
SET PARAMETER ID 'AUN' FIELD 'ur work area Sales order number '.
call TRANSACTION 'VA02 AND SKIP FIRST SCREEN.
With Regards,
Sumodh.P
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |