05-03-2012 7:44 AM
Hi Experts,
I have a question as menyioned below:
Scenario is : Application server file path consists of filename which will dynamically change daily based on current system date,
Now i need to use this updated filepath in existing job variant of standard SAP program , Please let me know how to achieve this functionality.
I went through below link but it is mentioned for custom program but not for standard program.
http://scn.sap.com/thread/1875136
I tried to get variant details using Function Module " RS_VARIANT_CONTENTS" and "RS_CHANGE_CREATED_VARIANT"
but this VALUTAB/VARI_CONTENTS parameters of these function modules is capable of holding 45 characters itself where as my file name is morethan 45 characters hence i am not able to change the file path using these function modules.
Thanks,
Sateesh
05-04-2012 7:46 AM
If the standard report use field for path with more than 45 characters, you wont be able to change this value with usual FM, nor using TVARVC variables. So you could build a wrapper program with similar parameters, but replace the path with a logical name, and call the standard via SUBMIT with resolved filename/path.
Regards,
Raymond
05-03-2012 8:27 AM
Schedule the custom program in this manner & call the standard inside it
parameters:pa type string no-display.
at selection-screen output.
do 50 times.
concatenate 'A' pa into pa.
enddo.
concatenate pa sy-datum into pa.
start-of-selection.
*call the standard program here using "pa" as your file path
.
05-03-2012 12:43 PM
Hi Kesava,
Already file name will be updated/appended with system date at last and placed in AL11 directory level, Now My requirement is to update this filename in already existing variant of standard program so that when job is running then it has to take updated file name.
I am able to get the filename from AL11 directory but my doubt is how to update the existing variant of standard program by using above mentioned FMs i have length restriction of 45 characters, please suggest.
05-03-2012 12:48 PM
Which standard program is that, does it not allow to use logical file names as input?
Thomas
05-04-2012 7:45 AM
Instead of function module to get/change the variant contents, did you try with EXPORT/IMPORT from database VARI.
05-04-2012 7:46 AM
If the standard report use field for path with more than 45 characters, you wont be able to change this value with usual FM, nor using TVARVC variables. So you could build a wrapper program with similar parameters, but replace the path with a logical name, and call the standard via SUBMIT with resolved filename/path.
Regards,
Raymond
05-07-2012 10:25 AM
Hi ,
If you are using ECC 6.0 EHP5(Enhancement pack 5 and above) then you can use FMs RS_VARIANT_CONTENTS_255_RFC ,
RS_VARIANT_CONTENTS_255 and
RS_CHANGE_CREATED_VARIANT_255,
RS_CHANGE_CREATED_VARI_255_RFC to resolve 45 characters issue.
But I am using EHP4 version hence these FMs not available to me hence May be i need to try option specified by Raymond.
Thanks and Best Regards,
Sateesh