Renaming a file in ERP 9.1

pbare

Well Known Member
Hi All,

I read many posts about using a function called B0500180 that should allow me to rename a UBE however I didn't see any notes on what the parameters would be or where it should actually be added to the code.

We have a report that we designed to run in the OMW - the report shows all of the objects within a project so that when we go to promote to our production environment, we know exactly what was changed.

I would like to change the name of the report to the name of the project.

Is there some documentation somewhere (or has someone) used this function successfully - I am not very proficient in reading C business functions.

If someone could point me in the right direction, I would appreciate it.

Thanks
Pam
 
I'd recommend adding a call to this BSFN from an application -- not to actually save, but when you get the initial screen after selecting the BSFN, click on the Business Function Notes, and you should see very good documentation on all of the parameters and their usage.
 
TRY THIS CODE, CHANGE DEFAULT UBE NAME TO CUSTOME NAME

VA rpt_2Day = lpad(date_day([SL DateToday]),"0",2)
VA rpt_2Month = lpad(date_month([SL DateToday]),"0",2)

VA rpt_RenameFile = concat("NEWNAME",'_')

VA rpt_GetFileName = "R5543CPO"
VA rpt_GetFileName = concat([VA rpt_GetFileName],'_')
VA rpt_GetFileName = concat(rtrim([VA rpt_GetFileName]," "),rtrim([PO szVersion1]," "))
VA rpt_GetFileName = concat(rtrim([VA rpt_GetFileName]," "),'_D')
VA rpt_GetFileName = concat(rtrim([VA rpt_GetFileName]," "),substr(date_year([SL DateToday]),2,2))
VA rpt_GetFileName = concat(rtrim([VA rpt_GetFileName]," "),[VA rpt_2Month])
VA rpt_GetFileName = concat(rtrim([VA rpt_GetFileName]," "),[VA rpt_2Day])
VA rpt_GetFileName = concat(rtrim([VA rpt_GetFileName]," "),'_T*.PDF')
//
VA rpt_GetFileName = rtrim(concat(rtrim([VA rpt_PathSOURCE]," "),rtrim([VA rpt_GetFileName]," "))," ")
Find a file that matches a String with Wildcards
VA rpt_UBEFileName = concat(rtrim([VA rpt_PathSOURCE]," "),rtrim([VA rpt_UBEFileName]," "))
VA rpt_FlagAda = "WHILE"
VA rpt_Colomn = 0
VA rpt_1Chr = ""
While VA rpt_FlagAda is equal to "WHILE"
VA rpt_1Chr = substr([VA rpt_UBEFileName],[VA rpt_Colomn],1)
If VA rpt_1Chr is equal to <Blank> Or VA rpt_1Chr is equal to <Null>
VA rpt_FlagAda = "ENDWHILE"
End If
VA rpt_Colomn = [VA rpt_Colomn]+1
End While
VA rpt_RenameFile = concat(rtrim([VA rpt_RenameFile]," "),rtrim(substr([VA rpt_UBEFileName],([VA rpt_Colomn]-16),16)," "))
Operating System File Operations Delete, Rename, File Exists
 
Back
Top