Question

execute a rpi frombackend?


Badge +5

is it possible to execute a Rpi package from backend in so that its result key generated.


This topic has been closed for comments

22 replies

Userlevel 5
Badge +10

Hi Pardeep,

You should be able to do that in a test window with a commit, pass the relevant parameters to the method. I think probably an ‘ATTR’.

 

Userlevel 7
Badge +20

Hi Pradeep,

Check below forum post regarding creating and executing a report from backend.

Batch print Work Instructions for Shop Orders, IFS9 | IFS Community

 

Cheers!

Damith

Badge +5

Hi Pardeep,

You should be able to do that in a test window with a commit, pass the relevant parameters to the method. I think probably an ‘ATTR’.

 

Hello Infaz

can you please send me an example i want  to run CUSTOMER_ORDER_DELIV_NOTE_RPI report from backend. note i don't have any result key of this. i have delivery no for which i want to run report

 

 

Thanks In Advance 

Regards

Pardeep Saini

Userlevel 5
Badge +10

Hi Pardeep,

 

Please refer this

 

Badge +5

Hi Pardeep,

 

Please refer this

 

Hi Infaz,

I try but got error

 

Badge +5

Hi Pardeep,

 

Please refer this

 

Hi Infaz,

I try but got error

 

I am working with IFS 7

Userlevel 5
Badge +10

Rewrite your code like this and retry.

 

declare
 distribution_list_ VARCHAR2(100) := 'IFSAPP';
  result_key_ varchar2(100) := null;
  print_attr_ varchar2(100) := null;
  report_attr_ varchar2(2000);
  parameter_attr_ varchar2(2000);

  

begin
  -- Call the procedure
 
  
  Client_SYS.Clear_Attr(report_attr_);
  Client_SYS.Clear_Attr(parameter_attr_);
  client_sys.clear_attr(print_attr_);
  
  client_sys.add_to_attr('REPORT_ID','CUSTOMER_ORDER_DELIV_NOTE_REP', report_attr_);
  client_sys.add_to_attr('DELNOTE_NO',10035, parameter_attr_);
  client_sys.add_to_attr('DELNOTE_COPY_NO',0, parameter_attr_);
  
  Archive_API.New_Client_Report(result_key_,
                                report_attr_,
                                parameter_attr_ ,
                                distribution_list_,
                                print_attr_);
end;
 

Badge +5

Rewrite your code like this and retry.

 

declare
 distribution_list_ VARCHAR2(100) := 'IFSAPP';
  result_key_ varchar2(100) := null;
  print_attr_ varchar2(100) := null;
  report_attr_ varchar2(2000);
  parameter_attr_ varchar2(2000);

  

begin
  -- Call the procedure
 
  
  Client_SYS.Clear_Attr(report_attr_);
  Client_SYS.Clear_Attr(parameter_attr_);
  client_sys.clear_attr(print_attr_);
  
  client_sys.add_to_attr('REPORT_ID','CUSTOMER_ORDER_DELIV_NOTE_REP', report_attr_);
  client_sys.add_to_attr('DELNOTE_NO',10035, parameter_attr_);
  client_sys.add_to_attr('DELNOTE_COPY_NO',0, parameter_attr_);
  
  Archive_API.New_Client_Report(result_key_,
                                report_attr_,
                                parameter_attr_ ,
                                distribution_list_,
                                print_attr_);
end;
 

try above code but no luck

 

Userlevel 5
Badge +10

Hi Pardeep,

 

Please encapsulate deliv_no & and the other number via strings. 

 

client_sys.add_to_attr('DELNOTE_NO','10037', parameter_attr_);
  client_sys.add_to_attr('DELNOTE_COPY_NO','0', parameter_attr_);

I don’t have IFAPP V7 so please debug and check the error, this is the base and you should be able to create a result key. 

Badge +5

Rewrite your code like this and retry.

 

declare
 distribution_list_ VARCHAR2(100) := 'IFSAPP';
  result_key_ varchar2(100) := null;
  print_attr_ varchar2(100) := null;
  report_attr_ varchar2(2000);
  parameter_attr_ varchar2(2000);

  

begin
  -- Call the procedure
 
  
  Client_SYS.Clear_Attr(report_attr_);
  Client_SYS.Clear_Attr(parameter_attr_);
  client_sys.clear_attr(print_attr_);
  
  client_sys.add_to_attr('REPORT_ID','CUSTOMER_ORDER_DELIV_NOTE_REP', report_attr_);
  client_sys.add_to_attr('DELNOTE_NO',10035, parameter_attr_);
  client_sys.add_to_attr('DELNOTE_COPY_NO',0, parameter_attr_);
  
  Archive_API.New_Client_Report(result_key_,
                                report_attr_,
                                parameter_attr_ ,
                                distribution_list_,
                                print_attr_);
end;
 

try above code but no luck

 

still having same error after converting to string

Userlevel 7
Badge +16

Hello,

 

I tried below and got the result key created. 

 

/Dumeesha

Userlevel 5
Badge +10

Rewrite your code like this and retry.

 

declare
 distribution_list_ VARCHAR2(100) := 'IFSAPP';
  result_key_ varchar2(100) := null;
  print_attr_ varchar2(100) := null;
  report_attr_ varchar2(2000);
  parameter_attr_ varchar2(2000);

  

begin
  -- Call the procedure
 
  
  Client_SYS.Clear_Attr(report_attr_);
  Client_SYS.Clear_Attr(parameter_attr_);
  client_sys.clear_attr(print_attr_);
  
  client_sys.add_to_attr('REPORT_ID','CUSTOMER_ORDER_DELIV_NOTE_REP', report_attr_);
  client_sys.add_to_attr('DELNOTE_NO',10035, parameter_attr_);
  client_sys.add_to_attr('DELNOTE_COPY_NO',0, parameter_attr_);
  
  Archive_API.New_Client_Report(result_key_,
                                report_attr_,
                                parameter_attr_ ,
                                distribution_list_,
                                print_attr_);
end;
 

try above code but no luck

 

still having same error after converting to string

Hi Pradeep, please check whether you have the Customer_Order_Deliv_Note_RPI package, also can you debug the code from PL/SQL developer, line by line, and find where the error occurs. When you get the error Report Definition does not exist means this particular report doesn’t exist or you have a typo on the report name.

Badge +5

Hello Dumeesha,

 i got below error

 

Badge +5

Rewrite your code like this and retry.

 

declare
 distribution_list_ VARCHAR2(100) := 'IFSAPP';
  result_key_ varchar2(100) := null;
  print_attr_ varchar2(100) := null;
  report_attr_ varchar2(2000);
  parameter_attr_ varchar2(2000);

  

begin
  -- Call the procedure
 
  
  Client_SYS.Clear_Attr(report_attr_);
  Client_SYS.Clear_Attr(parameter_attr_);
  client_sys.clear_attr(print_attr_);
  
  client_sys.add_to_attr('REPORT_ID','CUSTOMER_ORDER_DELIV_NOTE_REP', report_attr_);
  client_sys.add_to_attr('DELNOTE_NO',10035, parameter_attr_);
  client_sys.add_to_attr('DELNOTE_COPY_NO',0, parameter_attr_);
  
  Archive_API.New_Client_Report(result_key_,
                                report_attr_,
                                parameter_attr_ ,
                                distribution_list_,
                                print_attr_);
end;
 

try above code but no luck

 

still having same error after converting to string

Hi Pradeep, please check whether you have the Customer_Order_Deliv_Note_RPI package, also can you debug the code from PL/SQL developer, line by line, and find where the error occurs. When you get the error Report Definition does not exist means this particular report doesn’t exist or you have a typo on the report name.

Hi 

all parameter are correct and report id also correct

Badge +5

Hello,

 

I tried below and got the result key created. 

 

/Dumeesha

Hi Dumeesha

got below error. i am using ifs v7

report defination object exists but is is showing not exists

 

thanks in advance

Userlevel 7
Badge +16

Hello,

 

Try accessing the Customer_Order_Deliv_Note_RPI  in PL SQL for your login user ?

 

Then try removing the distribution list parameter value and check ?

Badge +5

Hello,

 

Try accessing the Customer_Order_Deliv_Note_RPI  in PL SQL for your login user ?

 

Then try removing the distribution list parameter value and check ?

please correct attached code 

Userlevel 7
Badge +16

Hi Dumeesha

got below error. i am using ifs v7

report defination object exists but is is showing not exists

 

I wanted to mention that remove the user id  - CINC1APP  from the distribution list in above. I got an error that user is not defined  in the distribution list and after removing the value the result key was created. In your scenario it seems that you do not have the access to Customer_Order_Deliv_Note_RPI . Anyway you can try what I did after confirming the access to report method.  There’s nothing to correct in the attached file

 

Badge +5

Hi Dumeesha

got below error. i am using ifs v7

report defination object exists but is is showing not exists

 

I wanted to mention that remove the user id  - CINC1APP  from the distribution list in above. I got an error that user is not defined  in the distribution list and after removing the value the result key was created. In your scenario it seems that you do not have the access to Customer_Order_Deliv_Note_RPI . Anyway you can try what I did after confirming the access to report method.  There’s nothing to correct in the attached file

 

 

Got same error after removing Cinc1app

 

Userlevel 7
Badge +16

Hi,

 

Check the report id in REPORT_SYS_TAB

Badge +5

Hi,

 

Check the report id in REPORT_SYS_TAB

Hi,

Report Id is available in report_sys_tab

Userlevel 7
Badge +16

Then you may need to debug the code in your environment  and locate why this error comes