09-24-2008 10:30 PM
I started to post this as a problem, but stumbled into the solution while testing further. Since I didn't find a solution in the SDN.SAP Forums I'm entering this to help others who may have the same problem.
This code would not work:
SET PARAMETER ID 'AUN' FIELD sy-lisel(10). "sy-lisel(10) contains the Scheduling Agreement on the selected line of the report.
CALL TRANSACTION 'VA33' AND SKIP FIRST SCREEN.
It would go to Transaction VA33 but would always default to the last Scheduling Agreement accessed manually instead of the one I needed to see via this call.
When I change the transaction to VA03 it works:
SET PARAMETER ID 'AUN' FIELD sy-lisel(10).
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
We can not access a Scheduling Agreement from VA03 on-line, but for some reason this call displays the correct S/A, and System Status says it is running transactin VA03.
Perhaps it is because we are using a custome Order Type for Scheduling Agreements (YALZ)?
Best wishes to our SAP friends.
09-25-2008 5:34 AM
Hi,
VA33 is for schedulinng Agreement so use..
SET PARAMETER ID 'LPN' FIELD sy-lisel(10).
AUN - Order number
LPN - Scheduling agreement number
now it works..
Regards,
Sathish Reddy.
09-25-2008 12:10 PM
Thank you Sathish,
You are correct - it works now.
How did you know to use LPN? When you click on the selection field in VA33 and select Technical Details it says that the Parameter is AUN.
Regards,
Dave
09-29-2008 5:10 PM
Press F1 in the field in VA33 and read the note in the end (in the text, not in the technical details).
Regards,
Valter Oliveira.
09-29-2008 5:19 PM
Oh sure, Valther. You expect me to read the whole Help Text?
Thank you for reminding me that I have to scroll all the way to the end.
It is worth noting that using Parameter AUN and calling transaction VA03 it will display either a Sales Order or a Scheduling Agreement, whichever matches the value of the parameter. Since I have both Sales Orders and Scheduling Agreements to check, it shortens the code just a little bit.
Thanks again for your wisdom, Valther.
09-29-2008 5:32 PM
ahahah, now you made me laugh ... let's wait for sathish reddy response ...
Have a nice day !!!
Regards,
Valter Oliveira.
09-25-2008 5:40 AM
Hello David,
Try like this:
SET PARAMETER ID 'AUN' FIELD space.
SET PARAMETER ID 'AUN' FIELD sy-lisel(10).
CALL TRANSACTION 'VA33' AND SKIP FIRST SCREEN " Check the Tcode here
CHeers,
Vasanth