Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions java/src/main/java/com/genexus/sap/EnterpriseConnect.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ public class EnterpriseConnect

public EnterpriseConnect(ModelContext context)
{
Object destination = context.getContextProperty("SAPSessionName");
if (destination !=null)
{
destinationName = (String)destination;
if (context !=null) {
Object destination = context.getContextProperty("SAPSessionName");
if (destination !=null)
{
destinationName = (String)destination;
}
}
}

Expand Down Expand Up @@ -171,8 +173,11 @@ else if (jcoType == JCoMetaData.TYPE_DATE)
{
jTable.setValue(key, jObj.getString(key));
}
else if (jcoType == JCoMetaData.TYPE_INT2 || jcoType == JCoMetaData.TYPE_INT1
|| jcoType == JCoMetaData.TYPE_BYTE)
else if (jcoType == JCoMetaData.TYPE_BYTE)
{
jTable.setValue(key, jObj.getString(key));
}
else if (jcoType == JCoMetaData.TYPE_INT2 || jcoType == JCoMetaData.TYPE_INT1)
{
jTable.setValue(key, jObj.getInt(key));
}
Expand Down Expand Up @@ -228,8 +233,11 @@ else if (jcoType == JCoMetaData.TYPE_DATE)
{
jStruct.setValue(key, jObj.getString(key));
}
else if (jcoType == JCoMetaData.TYPE_INT2 || jcoType == JCoMetaData.TYPE_INT1
|| jcoType == JCoMetaData.TYPE_BYTE)
else if (jcoType == JCoMetaData.TYPE_BYTE)
{
jStruct.setValue(key, jObj.getString(key));
}
else if (jcoType == JCoMetaData.TYPE_INT2 || jcoType == JCoMetaData.TYPE_INT1)
{
jStruct.setValue(key, jObj.getInt(key));
}
Expand Down Expand Up @@ -275,8 +283,11 @@ public void getValue(String parameterName, GXSimpleCollection<?>[] value)
{
jRow.put(field.getName(), field.getLong());
}
else if (field.getType() == JCoMetaData.TYPE_INT2 || field.getType() == JCoMetaData.TYPE_INT1
|| field.getType() == JCoMetaData.TYPE_BYTE )
else if (field.getType() == JCoMetaData.TYPE_BYTE )
{
jRow.put(field.getName(), new String(field.getByteArray()));
}
else if (field.getType() == JCoMetaData.TYPE_INT2 || field.getType() == JCoMetaData.TYPE_INT1)
{
jRow.put(field.getName(), field.getInt());
}
Expand Down Expand Up @@ -340,6 +351,11 @@ public void getValue(String parameterName, java.util.Date[] value)
value[0] = function.getExportParameterList().getDate(parameterName);
}

public void getValue(String parameterName, byte[] value)
{
value[0] = function.getExportParameterList().getByte(parameterName);
}

public void getValue(String parameterName, int[] value)
{
value[0] = function.getExportParameterList().getInt(parameterName);
Expand Down