cancel
Showing results for 
Search instead for 
Did you mean: 

JCo 3.0 issue...

0 Kudos
Hi,
I am using NW7.3 and JCo 3.0 to develop a web application for Purchase Requisitions.
I am using JSPDynpage and no HTMLB.
I am trying to connect to

BAPI_PR_GETDETAIL

When I test this BAPI from ECC by passing just the PR number, it returns the export parameter(Header) and table(item).
But when I try to read the export parameter and item table from JCo, it returns zero data.
Here is the code that I am using.
1.TO SET THE IMPORT PARAMETER

function.getImportParameterList().setValue(

"NUMBER", "2252407");

2.TO READ EXPORT PARAMETER

JCoStructure exportStructure = function.getExportParameterList().getStructure(

"PRHEADER");

for

(int i = 0; i < exportStructure.getMetaData().getFieldCount(); i++)

{

System.

out.println(exportStructure.getMetaData().getName(i) + ":\t" + exportStructure.getString(i));

}

3.TO READ TABLE PARAMETER, ITEM

JCoTable itemData = function.getTableParameterList().getTable(

"PRITEM");

if(itemData == null)

throw new RuntimeException("RETURN table not found in PRITEM...");                  

System.

out.println("itemData.getNumRows():"+itemData.getNumRows());


  for (int i = 0; i < itemData.getNumRows(); i++)

{

          itemData.setRow(i);

          System.

out.println("PR Number:"+itemData.getInt("PREQ_ITEM")+"-PR status:"+itemData.getString("PROC_STAT")+"-PR creator:"+itemData.getString("CREATED_BY")+"-PR status:"+itemData.getString("PROC_STAT")+"-MATL Group:"+itemData.getString("MATL_GROUP"));

}

COULD SOMEONE PLEASE SUGGEST THE REASON FOR THIS?..

Thanks in advance...

Agasthi...

Accepted Solutions (1)

Accepted Solutions (1)

SandipAgarwalla
Active Contributor
0 Kudos

Agasthi

did you check the PR number again? Does it have trailing zeroes in the backend..

Sandip

0 Kudos

Thank you so much...

This solved my problem...

Agasthi...

Answers (0)