Skip to Content
0
Former Member
Feb 18, 2009 at 05:10 AM

BAPI Not executing

21 Views

Hi Friends,

I have written a java program to check if the user DoB is correct as set in backend.

There is a bapi created for it.

When i execute this code, setting external break point in backend, the external break point is not getting executed.

Can you please let me know if there is some thing wrong in the code or any thing that i should check in backend.

I have added all the required jar files.

The JAVA Code is as shown below.


package test;

import java.sql.Date;

import com.sap.aii.proxy.framework.core.ApplicationFaultException;
import com.sap.aii.proxy.framework.core.SystemFaultException;
import com.sap.mw.jco.JCO;

/**
 * @author user
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class connTest {

	public static void main(String[] args)
		throws ApplicationFaultException, SystemFaultException {

		JCO.Client jcoclient =
			JCO.createClient(
				"",			// SAP-Client
			"",			// Username
			"temp07", 		// Password
			"en",				// Language
			"",		// Host IP
			"00");			// System No.

		jcoclient.connect();

		Z_Hrgyyfm_Verify_User_Input input = new Z_Hrgyyfm_Verify_User_Input();
		Proxy_PortType myproxy = new Proxy_PortType();

		myproxy.messageSpecifier.setJcoClient(jcoclient);

		input.setUserid("test");
		input.setDateofbirth(Date.valueOf("1983-01-13"));
		input.setAsatdate(Date.valueOf("2009-02-18"));

		Z_Hrgyyfm_Verify_User_Output output =
			new Z_Hrgyyfm_Verify_User_Output();
		Bapiret2Type bapiOutput = new Bapiret2Type();
		System.out.print(bapiOutput.getType());

		jcoclient.disconnect();
	}

}

The final out put that sustem.out... returns is null

Many Thanks

Sushil Jain