Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic Variants

Former Member
0 Likes
460

Hi all

I have a report which has several input fields. One among them is ID.

I have to read all values of this field ID from a database table and pass it as a variant to this report.

How do I automate this process ? Will changing variant FM's help ?

Regards

Somnath

4 REPLIES 4
Read only

Former Member
0 Likes
434

I ASSUME THAT THE id FIELD IS A SELECT-OPTION.

build a ranges table with all the id values in it.

ranges: r_id for <table>-<field>.

loop at itab_ids.

r_id-low = itab_ids-id.

r_id-sign = 'I'.

r_id-option = 'EQ'.

append r_id.

clear r_id.

endloop.

submit <called program name> with s_id in r_id. "s_id is the select option in the called program .

Regards,

ravi

Read only

0 Likes
434

yes it indeed is a select option ....... will try this option ....thank you for ur response.

I have one more question though which you might be able to show a pointer and that is the report I am talking above is a generated report through a FM RSDRD_DELETE_FACTS. How do I get this report name ....because it keeps changing , will FM like 'JOB_SUBMIT' help ?

regards

Somnath

Read only

0 Likes
434

Hi Somnath,

If it is a dynamically generated program name, then you can just say:

submit ( prog_name ) with...." where prog_name contains the name of the generated report.

Regards,

ravi

Read only

Former Member
0 Likes
434

HI,

I think u just need to declare a select-option and then leave it blank and use it in ur select statement to achieve what you are looking for.

santhosh.