Ansicht
Dokumentation
CN8_MBT_ADM_SUBPRO_CREATE_DARK - Create project and subproject without user interaction (dark)
TXBHW - Original Tax Base Amount in Local Currency Vendor Master (General Section)This documentation is copyright by SAP AG.
Functionality
Project and Subproject will be created without any popup or user interaction.
The import parameter ip_project is mandatory. The project must not be existent. If that project does not exist we create it when the import parameter ip_create_project has the value 'X'. If not we raise an exeption because we assume that the project already exist. We check if we are in a customer or a SAP system. In case of a customer system we check the project name if the first character is a 'Z' or 'Y'. If not we take care that the project name begins with the character 'Z'. The created project name is returned in export parameter ex_project.
The import parameter ip_scenario is mandatory when the import parameter ip_create_project is set ot 'X'.
The import parameter ip_subproject can be initial and is not mandatory. If the import parameter ip_create_subproject is set to 'X' then the project name where the subproject has to be assigned must be available with the import parameter ip_project. We need this import parameter because the function module can be called just for creating a project. Without this parameter a subproject will be created regardless of whether the project name is initial or not. In case of an empty subproject name we will create a subproject with an automatically created subproject name. The subproject name depends on the length of the project name. For example if the project name is 20 characters then it is not possible to use it as part of the subproject name which has the maximal lenght of 20 characters. The created subproject name is returned in the export parameter ep_subproject.
With the import parameter ip_project_descript and ip_subproj_descript you can pass a description for the project and subproject. If this field is initial then a standard text with the project name oder subproject name and the text that the project and subproject is automatically created.
The project name and the subproject name will be returned in the export parameters ep_project and ep_subproject with the name as they were created.
When the project is successfully created the current user will be registered for the subproject. This also applies to the project.
Example
We give some examples how you can create projects and subprojects. If in the example one of the import parameters is not listed then it is initial.
Create project and subproject
You would like to create a project and subproject they not already exist. To do this you have to call the function module with the following parameters. We assume that we are in a customer system.
-> ip_project,,,,,,= 'PROJ_NAME'
-> ip_scenario ,,,,= 'TDMS'
-> ip_create_project ,,= 'X'
->ip_create_subproject,,= 'X'
->ip_project_descript,,= 'My new project'
->ip_subproject_descript,,= 'My new subproject'
<-ex_project,,,,,,= ZPROJ_NAME
<-ex_subproject,,,,= ZPROJ_NAME_2010_12
You can see that the created project name is ZPROJ_NAME and the created subproject name is ZPROJ_NAME_2010_12. The subproject name consists of the project name (ZPROJ_NAME) the current year (2010) and the number of existing subprojects (12).
Create a project
You would like to create project. We assume you are not in a customer system and the project already exist.
->ip_project,,,,,,= 'PROJ_NAME'
->ip_scenario,,,,,,= 'TDMS'
->ip_create_project,,,,= 'X'
<-ex_project,,,,,,= PROJ_NAME_10
The created project name is PROJ_NAME_10. Due to the fact that the project name already exist the project name get the number of projects as suffix. The description will be created automatically and consists of the project name and the text '(automatically generated)'.
Create a subproject
You would like to create a subproject. The project already exist and you are in a customer system.
->ip_project,,,,,,= 'ZPROJ_NAME'
->ip_create_subproject,,= 'X'.
->ip_scenario,,,,,,= 'TDMS'
->ip_project_descript,,= 'My new project'
<-ex_subproject,,,,= ZPROJ_NAME _12
The created subproject name is ZPROJ_NAME_12. The name is a combination of the project name and the number of already existing subprojects.
Notes
Further information
Parameters
EP_PROJECTEP_SUBPROJECT
IP_COT_CONTEXT_ID
IP_CREATE_PROJECT
IP_CREATE_SUBPROJECT
IP_NAMESPACE
IP_PROJECT
IP_PROJECT_DESCRIPT
IP_SCENARIO
IP_SUBPROJECT
IP_SUBPROJ_DESCRIPT
Exceptions
NO_AUTHORIZATIONNO_PROJECT_NAME
NO_SCENARIO
PROJECT_DOESNOT_EXIST
PROJECT_NOT_CREATED
SUBPROJECT_ALREADY_EXIST
SUBPROJECT_NOT_CREATED
WRONG_CLIENT
WRONG_PROJECT
WRONG_USER_FLAG
Function Group
CN8_MBT_ADMABAP Short Reference RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 5301 Date: 20240523 Time: 090319 sap01-206 ( 114 ms )