AnsweredAssumed Answered

AWA Script Object Authorization issue

Question asked by Daniel_Darling_896 on Nov 11, 2016
Latest reply on Nov 14, 2016 by Daniel_Darling_896
I am attempting to XML_PRINTOFILE but receive a U00020999 Runtime error in object 'XML_EXPORT_REPLACE_IMPORT.JB', line '00021': You do not have the necessary authorization for this instruction. error.

Since the script object doesn't have a login setting I'm unsure which account the AE is using to attempt to print the XML file to file with. I assumed it was my own account which has complete authorization on the client I am running the script on. Unfortunately this is my first foray into leveraging XML logic and the script object itself.

Below is the logic I am using and it is very rudimentary right now since I'm just seeing how the commands function.

!:SET &export_file#=EXPORT("JUNK_TEST_STUFF","\\dc02uc4appuv02.core.him\FTA_Reports\XML_TEST_1.xml","N","N")
:SET &file_var#=PREP_PROCESS_FILE('DC02UC4APPUV01',"\\dc02uc4appuv02.core.him\FTA_Reports\XML_TEST_1.xml",,,,"UC_LOGIN=LOGIN.WINDOWS")
:SET &new_file#="D$\FTA_reports\XML_TEST_2.xml"

:SET &XML# = XML_PROCESS_TO_DOM(&file_var#) 
:SET &ELEMENT# = XML_GET_FIRST_CHILD(&XML#) 
:SET &HND# = XML_SELECT_NODE(&XML#,"JOBS_WINDOWS/POST_SCRIPT/OSCRI")
:SET &add_text# = GET_VAR(VARA.NEW.3,'key_1')
:SET &RET# = XML_SET_NODE_TEXT(&HND#,'&add_text#')

:SET &HND# = XML_DOM_TO_PROCESS(&XML#) 
:PRINT ---------
:PROCESS &HND# 
:  SET &XMLLINE# = GET_PROCESS_LINE(&HND#)
:  PRINT "&XMLLINE#" 
:ENDPROCESS

:SET &FINALXML# = XML_PROCESS_TO_DOM(&HND#) 

:SET &RET1# = XML_BEAUTIFY(&FINALXML#)
:SET &RET2# = XML_PRINTINTOFILE("&new_file#",&FINALXML#) 

Outcomes