2007 Jan 20 1:48 PM
Hello All,
I am trying to create a project plan in SAP using .net connector 2.0. After putting in all the values and verifying that the requested parameters are supplied, i call an RFC. But it raises an exception
"
An unhandled exception of type 'SAP.Connector.RfcSystemException' occurred in sap.connector.rfc.dll
Additional information: Please assign investment prog to WBS
"
Here is more information about the process.
Please let me know what I am doing wrong or where I can find more information about this. I am not the one doing the RFC, I was just told how to call it. It seems to work fine when tested through SAP Logon.
More info:
Dim failTBl As New BAPIRETURN1Table
Dim successTBl As New BAPIRETURN1Table
Dim mspObject As New ZPROJ_INPUT
Dim mspObjectTable As New ZPROJ_INPUTTable
Dim cs As String = "blah blah....
Dim mspProxy As New SAPProxy1(cs)
'populate the mspObjectTbl with all the rows
'and then call the rfc
mspProxy.Zbapi_Project_Create_Msp("X", "X", "X", "X", "X", mspObjectTable, failTBl, successTBl)
The X bascially mean do the tasks:
1. check if porject already exists
2. create project
3. create wbs
4. create network
5. create activity
The mspObjectTable contains the project plan in the form of rows.
The failTbl contains all messages of the actions that failed
The successTbl contains all messages of the successful actions.
Hello All,
I am trying to create a project plan in SAP using .net connector 2.0. After putting in all the values and verifying that the requested parameters are supplied, i call an RFC. But it raises an exception
"
An unhandled exception of type 'SAP.Connector.RfcSystemException' occurred in sap.connector.rfc.dll
Additional information: Please assign investment prog to WBS
"
Here is more information about the process.
Please let me know what I am doing wrong or where I can find more information about this. I am not the one doing the RFC, I was just told how to call it. It seems to work fine when tested through SAP Logon.
More info:
Dim failTBl As New BAPIRETURN1Table
Dim successTBl As New BAPIRETURN1Table
Dim mspObject As New ZPROJ_INPUT
Dim mspObjectTable As New ZPROJ_INPUTTable
Dim cs As String = "blah blah....
Dim mspProxy As New SAPProxy1(cs)
'populate the mspObjectTbl with all the rows
'and then call the rfc
mspProxy.Zbapi_Project_Create_Msp("X", "X", "X", "X", "X", mspObjectTable, failTBl, successTBl)
The X bascially mean do the tasks:
1. check if porject already exists
2. create project
3. create wbs
4. create network
5. create activity
The mspObjectTable contains the project plan in the form of rows.
The failTbl contains all messages of the actions that failed
The successTbl contains all messages of the successful actions.
2007 Jan 21 10:17 AM
Am not sure am in the right category. If not, moderator please help me to movve it.
Am also not sure if this helps, but here is the autogenerated code when an RFC is dragged into the sapproxy
The exception points to
"
results = SAPInvoke("Zbapi_Project_Create_Msp", new Object() { _
Zact_Cre,Znet_Hdr_Cre,Zproj_Exist_Chk,Zwbs_Cre,Zwbs_Hry_Cre,Zproj_Input,Zreturn_Fail,Zreturn_Success })
"
Thanks
Public Overridable Sub Zbapi_Project_Create_Msp ( _
<RfcParameter(AbapName := "ZACT_CRE", RfcType := RFCTYPE.RFCTYPE_CHAR, Optional := true, Direction := RFCINOUT.IN, Length := 1, Length2 := 2), _
XmlElement("ZACT_CRE", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByVal Zact_Cre As String, _
<RfcParameter(AbapName := "ZNET_HDR_CRE", RfcType := RFCTYPE.RFCTYPE_CHAR, Optional := true, Direction := RFCINOUT.IN, Length := 1, Length2 := 2), _
XmlElement("ZNET_HDR_CRE", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByVal Znet_Hdr_Cre As String, _
<RfcParameter(AbapName := "ZPROJ_EXIST_CHK", RfcType := RFCTYPE.RFCTYPE_CHAR, Optional := true, Direction := RFCINOUT.IN, Length := 1, Length2 := 2), _
XmlElement("ZPROJ_EXIST_CHK", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByVal Zproj_Exist_Chk As String, _
<RfcParameter(AbapName := "ZWBS_CRE", RfcType := RFCTYPE.RFCTYPE_CHAR, Optional := true, Direction := RFCINOUT.IN, Length := 1, Length2 := 2), _
XmlElement("ZWBS_CRE", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByVal Zwbs_Cre As String, _
<RfcParameter(AbapName := "ZWBS_HRY_CRE", RfcType := RFCTYPE.RFCTYPE_CHAR, Optional := true, Direction := RFCINOUT.IN, Length := 1, Length2 := 2), _
XmlElement("ZWBS_HRY_CRE", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByVal Zwbs_Hry_Cre As String, _
<RfcParameter(AbapName := "ZPROJ_INPUT",RfcType := RFCTYPE.RFCTYPE_ITAB, Optional := false, Direction := RFCINOUT.INOUT), _
XmlArray("ZPROJ_INPUT", IsNullable := False, Form := XmlSchemaForm.Unqualified), _
XmlArrayItem("item", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByRef Zproj_Input As ZPROJ_INPUTTable, _
<RfcParameter(AbapName := "ZRETURN_FAIL",RfcType := RFCTYPE.RFCTYPE_ITAB, Optional := false, Direction := RFCINOUT.INOUT), _
XmlArray("ZRETURN_FAIL", IsNullable := False, Form := XmlSchemaForm.Unqualified), _
XmlArrayItem("item", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByRef Zreturn_Fail As BAPIRETURN1Table, _
<RfcParameter(AbapName := "ZRETURN_SUCCESS",RfcType := RFCTYPE.RFCTYPE_ITAB, Optional := false, Direction := RFCINOUT.INOUT), _
XmlArray("ZRETURN_SUCCESS", IsNullable := False, Form := XmlSchemaForm.Unqualified), _
XmlArrayItem("item", IsNullable := False, Form := XmlSchemaForm.Unqualified)> _
ByRef Zreturn_Success As BAPIRETURN1Table)
Dim results As Object()
results = SAPInvoke("Zbapi_Project_Create_Msp", new Object() { _
Zact_Cre,Znet_Hdr_Cre,Zproj_Exist_Chk,Zwbs_Cre,Zwbs_Hry_Cre,Zproj_Input,Zreturn_Fail,Zreturn_Success })
Zproj_Input = CType(results(0), ZPROJ_INPUTTable)
Zreturn_Fail = CType(results(1), BAPIRETURN1Table)
Zreturn_Success = CType(results(2), BAPIRETURN1Table)
End Sub
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |