1 Reply Latest reply: May 29, 2013 10:40 AM by CraigB RSS

    how to submit xml reports request set from backend R12

    MAHA REDDY
      Hi,

      I have submitted xml reports request set in backend it's successfully completed but output format coming xml tags.

      below code i have run Please give me any solution why it's not coming out put.

      declare
      l_success number;
      l_action varchar2(50);
      l_ok boolean;
      l_ok1 boolean;
      l_ok2 boolean;
      XX_LAYOUT boolean;
      XX_LAYOUT1 boolean;
      l_request_id varchar2(20);
      v_request_id number;
      BEGIN
      l_success := 0;
      fnd_global.apps_initialize( user_id => 1197, resp_id => 50680, resp_appl_id => 426);
      begin
      mo_global.set_policy_context('S',85)
      end;
      l_action := 'Launching Request Set';
      DBMS_OUTPUT.PUT_LINE(l_action);
      l_ok := fnd_submit.set_request_set
      (application => 'XXEAM'
      ,request_set => 'FNDRSSUB893'
      );
      XX_LAYOUT := fnd_request.add_layout
      (template_appl_name => 'XXEAM'
      , template_code => 'XXEAM131'
      , template_language => 'en'
      , template_territory => 'IN'
      , output_format => 'PDF');
      IF l_ok <> false AND l_success = 0 AND XX_LAYOUT <> false THEN
      DBMS_OUTPUT.PUT_LINE('Lay out Sucess');
      l_action := '1st job - 1st stage 1st request';
      DBMS_OUTPUT.PUT_LINE(l_action);
      l_ok1 := fnd_submit.submit_program
      (application => 'XXEAM'
      ,program => 'XXEAM131'--'XXEAM Sundry Job Order'
      ,stage => 'STAGE10'
      ,argument1=> 85
      ,argument2=>'JVVNL/JPDC/A1C/SJOE/MM/669'
      ,argument3=>'10008'
      );
      DBMS_OUTPUT.PUT_LINE('success');
      ELSE
      l_success := -100;
      DBMS_OUTPUT.PUT_LINE(l_success);
      END IF;
      XX_LAYOUT1 := fnd_request.add_layout
      (template_appl_name => 'XXEAM'
      , template_code => 'XXEAM183'
      , template_language => 'en'
      , template_territory => 'IN'
      , output_format => 'PDF');
      IF l_ok1<> false AND l_success = 0 and XX_LAYOUT1 <> false THEN
      l_action := '2nd job - 1st stage 2nd request';
      DBMS_OUTPUT.PUT_LINE(l_action);
      l_ok2 := fnd_submit.submit_program
      (application => 'XXEAM'
      ,program => 'XXEAM183'--'XXEAM Shut down Details Report'
      ,stage => 'STAGE20'
      ,argument1=> 85
      ,argument2=>'2BU100'
      );
      dbms_output.put_line('success2');
      ELSE
      l_success := -145;
      DBMS_OUTPUT.PUT_LINE(l_success);
      END IF;
      if l_ok2 <> false and l_success=0 then
      l_request_id := fnd_submit.submit_set(NULL,FALSE);
      DBMS_OUTPUT.PUT_LINE('Request_id = '||l_request_id);
      COMMIT;
      else
      dbms_output.put_line('failed');
      end if;
      end;

      Regards,
      Maha