‎2008 Jan 27 6:45 PM
I need to run the sap standard transaction SARA every month over night. However the variant i need to use will change each time. I want to automate this process. Effectively i will be selecting those sales orders that the business has agreed to archive. I can do this in the abap. However I do not want to run the underlying code in sara as sara provides archive management facilities that will be lost if i start calling code dynamically. Hence is it possible to create variants within abap against the transaction sara that i can then call overnight. Any help is much appreciated and hopefully one day when my knowledge base improves i'll be able to reciprocate.
‎2008 Jan 28 11:37 AM
I think you should go for a batch input in this case (I don't know if
there is a better way of doing it, but a batch input sounds like the
best solution,as SARA isn't a report to associate a variant to it
cheers,
chaitanya.
‎2008 Jan 28 11:37 AM
I think you should go for a batch input in this case (I don't know if
there is a better way of doing it, but a batch input sounds like the
best solution,as SARA isn't a report to associate a variant to it
cheers,
chaitanya.
‎2008 Jan 29 4:36 PM
Hi,
It is possible to create variants with variable values. In your case, you will need to make the variant variable by using the table TVARVC.
This is what you will need to do.
1. Create an entry in table TVARVC. Eg. Z_SALES_ORDER of type S
2. Create a variant for the archiving program. Eg: ARC
3. Maintain the variant attributes to use the table TVARVC and variable Z_SALES_ORDER for the field Sales Order Numbers.
4. Create a ABAP program which will update the variable Z_SALES_ORDER with the sales order numbers that you want to archive. Eg: Z_UPD_TVARVC
5. Schedule the program Z_UPD_TVARVC to run before running the archiving program(preprocessing or write).
Checks the following links.
[Using table TVARVC|http://help.sap.com/saphelp_nw70/helpdata/en/c0/9803a7e58611d194cc00a0c94260a5/content.htm]
[Variable Variants|http://help.sap.com/saphelp_nw70/helpdata/en/c0/980398e58611d194cc00a0c94260a5/content.htm]
Hope this helps.
Cheers!!!
Samanjay