cancel
Showing results for 
Search instead for 
Did you mean: 

why the changing table is empty ?

carlos_zhang3
Participant
0 Kudos

Dear guru ,

I am writing a java program to call my RFC program , but i found that the changing table is empty when i execute the function :

=================================================

FUNCTION Z_RFCZ_TES.

W_INTERFACE = '001' .

CLEAR: W_MENSAGEM_RF, W_PROBLEMA.

PERFORM GET_PARAMETER_901.

RETURN = 'OK'.

PERFORM 001_DATA_SELECTION.

SELECT * FROM zrfprodsn.

MOVE-CORRESPONDING zrfprodsn TO ZRFPRODSN_TT.

APPEND ZRFPRODSN_TT.

ENDSELECT.

commit work .

ENDFUNCTION.

===============================================================

java program :

JCO.Table result_codes = null ; //Abap 4 internal table or structure

Log.LoggingMessage("SAP_SGAR", this, "Now Start Get Data .");

//Set Connection

bc.SetParametersFromDatabase("300", "RFC", "SAP", "EN", "172.16.38.123", "19", "8400") ;

if ( bc.Connect() == false )

throw null ;

if ( bc.CreateFunction("Z_RFCZ_TES") == false )

throw null ;

//Set Parameters for BAPI

//Execute BAPI

boolean rt = bc.Execute() ;

Log.LoggingMessage("SAP_SGAR", this, " Execute Status : "+rt) ;

//Get Result

result_codes = bc.function.getTableParameterList().getTable("ZRFPRODSN_TT");

....

I tested the function and it works , and also can storage the records in "ZRFPRODSN_TT" ... but when i using java execute this function .... it return 'Empty' to me ......

Does any one can help me ???

thanks a lot !

Best Regards,

Carlos Zhang

Accepted Solutions (0)

Answers (1)

Answers (1)

carlos_zhang3
Participant
0 Kudos

by the way , the same java program when i executed the standard BAPI , such as "BAPI_USER_GETLIST" , the changing table works .....

so i think the problem is in the function settings , but i am not sure ....

please help me ...

thanks in advanced .