During recording a transaction, SAP may open file dialogue window that cannot be recorded in normal recording process (this cannot be recorded in SAP->SHDB either). You may see a pop-up similar to one below when you attempt to download a file or upload a file or an attachment.
While traditional SHDB recording and LSMW/ABAP programs cannot handle these windows native dialogue box. Process Runner can handle this with special feature. You can even map file name or any other value from Excel to such window as well. Process Runner does this with special Windows API function named as #FILE_DIALOGUE# .
During Process Runner transaction recording, you should finish the recording as you would normally do. If Process Runner finds Windows File Dialogue in recording it will automatically insert #FILE_DIALOGUE# in the Field value in Mapper. You can also manually insert it in mapper tab. Select a position where you want to insert #FILE_DIALOGUE# and right click to bring a menu. Then select “Insert File Window Row” This will insert a field named #FILE_WINDOW#. This field can then be mapped as any other field. When Process Runner executes this file, it will automatically pass the value as per mapping to Windows open file dialogue window as displayed in 1st page. Normally the above example (MM06) will export the report on the specified location as shown below.
But if there already exists a file with the same name (Test101), then SAP will stop there with the following confirmation & thus our recording won’t work. In order to overcome this, following parameters can also be passed to #FILE_WINDOW# #FILE_WINDOW#,1 (Overwrite existing file) Let us overwrite the existing report for material 100-100 with that of 100-200 In mapper edit “#FILE_WINDOW#” to “#FILE_WINDOW#,1” Now if we run the file, it will replace the original file. This can be verified by opening and noticing the entry for material 100-200 instead of 100-100 as shown below.
#FILE_WINDOW#,2 (Rename existing file first and then write new file) If we do not want to overwrite existing and rename it on the fly then we can use the above parameter
This is how Process Runner can handle Windows File Dialogue window. |