1

I would like to integrate the SAP transaction code CJ20N (Project Builder) for Project creation in .Net. Once we create this in SAP system we get a Charge Code (WBS Element) and Network ID.

Is it possible to get this as an output using SAP .NET Connector 3.0 using RFC's to connect to SAP's Function Modules or BAPI.

Kindly let me know if more information would be required.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

1 Answers1

0

Here is the project creation ABAP code you need to call in SAP .Net Connector:

DATA: proj_def TYPE bapi_bus2001_new,
      return   TYPE TABLE OF bapiret2,
      return2  TYPE TABLE OF bapiret2.

CALL FUNCTION 'BAPI_PS_INITIALIZATION'.

* project definition
* proj_def = ...

CALL FUNCTION 'BAPI_BUS2001_CREATE'
  EXPORTING
    i_project_definition = proj_def
  TABLES
    et_return = return.

CALL FUNCTION 'BAPI_PS_PRECOMMIT'
  TABLES
    et_return = return2.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Suncatcher
  • 10,355
  • 10
  • 52
  • 90