Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Retrieve Main table records with multiple lookup table values

Hi,

I have a 30 <b>Flat Table</b>s and 2 <b>Taxonomy table</b>.

Every time i iterate through each Table and set the setSelectFields it is retrieving only the first flat table/Taxonomy Table record value so the soln is to make this dynamic to collect 30 setSelectField and add to supportingResultDefinition[].

the sample snippet code is below:

//for loop to get all the 30 Flat tables

for (int j = 0; j < productLookUpQTables.size(); j++){

tableId3 = (TableId) productLookUpQTables.get(j);

GetFieldListCommand getFieldListCommand = new GetFieldListCommand(connPool);

getFieldListCommand.setSession(sessionId);

getFieldListCommand.setTableId(tableId3);

try{

getFieldListCommand.execute();

} catch (CommandException e){

e.printStackTrace();

}

//fieldproperties contain all the fields for the 30 flat tables

FieldProperties[] lookupQFlatFields = getFieldListCommand.getFields();

for (int m = 0; m < lookupQFlatFields.length; m++){

QflatTableFields = new FieldId[] {lookupQFlatFields[m].getId()};

}

} // 2 For

rdqFlat.setSelectFields(QflatTableFields); //all flat table fields adding it to Result set definition

//How to make this dynamic to collect 30 setSelectField and add to supportingResultDefinition[]

supportingMainResultDefinitions = new ResultDefinition[] ;

With Thanks,

Mary Joseph

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question