Skip to Content
author's profile photo Former Member
Former Member

problem using BAPI_BUS2001_CREATE to create project definition

Hi,

i have a problem using BAPI_BUS2001_CREATE to create project definition.

i have customer fields in CI_PROJ structure.

i used help structure BAPI_TE_PROJECT_DEFINITION in EXTENSIONIN table

the problem is that customer fields that i have populated in BAPI_TE_PROJECT_DEFINITION are not processed.

please help.

thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 04, 2008 at 04:26 PM

    Hi,

    To Create a Project Definition we can use following BAPIs

    BAPI_PROJECTDEF_CREATE - To Create a Project Definition

    BAPI_BUS2001_CREATE - To Create a Project Definition

    BAPI_PROJECT_MAINTAIN -- It will creates total structure of

    Project/WBS/Network Header/Milestone

    After using above any bapi we have to use BAPI_TRANSACTION_COMMIT

    Then only it will updates

    Thanks

    Ganesh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks for your replay,

      i looked at the badi BAdI BAPIEXT_BUS2001, i see that the customers fields are passed, i dont have ti implement any method.

      i think the problem is in the BAPI_PS_PRECOMMIT function module, it clears the customers fields !

  • author's profile photo Former Member
    Former Member
    Posted on Apr 09, 2008 at 02:47 PM

    solved,

    applay oss note 637345

    Add a comment
    10|10000 characters needed characters exceeded

    • Th snote given cannot be implemented,follow the solution given below.

      Solution

      According to the BAPI customer enhancement concept, you must define your own data structures containing your additional data that is then either transferred to the BAPI or returned by the BAPI. Copy the name of these structures to the STRUCTURE field of the ExtensionIn parameter (or ExtensionOut) for data interpretation.

      These data structures must only contain character-like data! Change your data structures accordingly. Otherwise there is no guarantee that data will be transferred correctly.

      Unfortunately, no explicit reference was made to this important point in older versions of the documentation for the BAPI customer enhancement concept. This note is intended to correct the documentation concerned.

      In many cases, it will be necessary to use non-character-type data (such as DEC, INT). In this case, we recommend recommend the following procedure:

      - Define a structure S1. This contains all your required fields in their actual data type (DEC and INT are allowed here).

      - Define a second structure S2. This contains the same fields as S1, but in the CHAR format. Make sure that you select the CHAR fields so they are long enough to include the complete values.

      - When processing ExtensionOut entries in the source code, proceed as follows: Your starting point is a data record X1 in the internal format of structure S1. First, map this to a data record X2 in the format of structure S2 using move-corresponding. Then map X2 to a data record X3 in the format of structure BAPIPAREX using move.

      - When processing ExtensionIn entries in the source code, proceed in the same way: This time your starting point is a data record X3 in the format BAPIPAREX. Map this to a data record X2 in the format of structure S2 using move. Then map X2 to a data record X1 in the format of structure S1 using move-corresponding.

      - In the STRUCTURE field of the ExtensionIn or ExtensionOut parameters, you must always transfer S2 for interpretation of the data.

      Remarks:

      - With this procedure, the Unicode-critical move is performed between two character-like data structures and does not cause any problems. Mapping between character-like and non-character-like data occurs on a field by field basis and is therefore not critical.

      - If this additional mapping step is necessary, 100 % of the source code examples specified in the documentation cannot be transferred so you must adapt them to your system requirements.

      - Using the BAPI Table Extension concept with SAP-designed processing of the additional fields only works when only character-like data is used in the BAPI table extension.

      If you wish to process non-character-like data using the above workaround, you should not use any SAP-designed BAPI Table Extensions. Instead, define your own data structures as described above and execute the conversion between the extension parameters and internal data structures in the Customer Exits / BadIs yourself.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.