Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing string values to parameter from a loop

Status
Not open for further replies.

pator

MIS
Sep 28, 2004
17
IE
I'm using Crystal Reports 10
I have a tricky problem which I'm looking for some ideas on.

I retrive data from a SAP ABAP function using a Remote Function Call (RFC).
To do this I have to pass the following parameters,

{Z_FS_READ_TEXT.I_ZCLIENT} ="020" and
{Z_FS_READ_TEXT.I_ZID} ="ST" and
{Z_FS_READ_TEXT.I_ZLANGUAGE} ="E" and
{Z_FS_READ_TEXT.I_ZOBJECT} = "TEXT" and
({Z_FS_READ_TEXT.I_ZNAME} = "101" or
{Z_FS_READ_TEXT.I_ZNAME} = "102" or
{Z_FS_READ_TEXT.I_ZNAME} = "103")

This retrives comments from the ABAB function for these paticular records.
The key field here is the I_Zname field as there could be hundreds of parameters
for this I.E. "101" to "999" this is a string data type.


My problem is that I want to retrieve all the data from the AbAB function. There could be hundreds of records and I don't want to have to key in the I_Zname parameter hundreds of times.

1, because It's time comsuming ,
2, because I would have to keep changing the report and re-publish every time a new Zname record was added, which can be often.

I have tried wild cards * ? bu to no avail .

I have tried looping through a table with just stores the "101" to "999" data, and then passing that formula as the parameter to the _Zname field.

It needs to have the actual string value
passed as a parameter I.E. "101","102" etc.

Does anyone know how I can pass each of the values I pull using this formula and pass them as strings to the I_Zname field. ?

Regards & Thanks
pator
 
{Z_FS_READ_TEXT.I_ZNAME} looks like it's treated as a field, not a parameter.

Not sure how this function will react to it, but you can try:

{Z_FS_READ_TEXT.I_ZNAME} in ["101" to "999"]

If it's always 3 characters it shouldn't cause bad data to be returned, the question is whether it trips up the function.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top