‎2008 Nov 13 6:49 AM
Hi Experts,
I am trying to use BAPI_BUS2001_CREATE to create project definition. We also have customer fields defined in CI_PROJ. I am not sure how to use table ExtensionIn of this bapi to pass customer fields data. Can someone guide me please.
Thanks,
Apps
‎2008 Nov 13 7:03 AM
Follow the below steps to populate data into custom fields.
1) Create a structure with all the custom fields that u want to populate data.
eg: structure name: ZTEST
Fields: ZFIELD1 -- Char length 10.
ZFIELD1 -- Char length 15.
2) then pass the structure name to BAPI extension parameter.
eg: EXTENSIONOUT-STRUCTURE = 'ZTEST'.
3)Populate data for custom fields as follows.
EXTENSIONOUT-VALUEPART1+0(10) = ZFIELD1-Value.
EXTENSIONOUT-VALUEPART2+10(15) = ZFIELD2-Value.
append EXTENSIONOUT.
4) Finally pass the above populated structure to BAPI.
‎2008 Nov 13 7:03 AM
Follow the below steps to populate data into custom fields.
1) Create a structure with all the custom fields that u want to populate data.
eg: structure name: ZTEST
Fields: ZFIELD1 -- Char length 10.
ZFIELD1 -- Char length 15.
2) then pass the structure name to BAPI extension parameter.
eg: EXTENSIONOUT-STRUCTURE = 'ZTEST'.
3)Populate data for custom fields as follows.
EXTENSIONOUT-VALUEPART1+0(10) = ZFIELD1-Value.
EXTENSIONOUT-VALUEPART2+10(15) = ZFIELD2-Value.
append EXTENSIONOUT.
4) Finally pass the above populated structure to BAPI.
‎2008 Nov 13 7:21 AM
Hi,
Below is the code. Can someone tell me what's wrong?
data: i_custname like BAPIPAREX occurs 0 WITH HEADER LINE.
i_custname-structure = 'BAPI_TE_PROJECT_DEFINITION'.
Concatenate 'CI_PROJ-ZZCNAME ' itab-cname into i_custname-valuepart1 .
append i_custname.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2001_CREATE'
EXPORTING
I_PROJECT_DEFINITION = i_bapi_pdef
TABLES
ET_RETURN = i_pdef_ret
EXTENSIONIN = i_custname
.
Apps
Edited by: Apps on Nov 13, 2008 8:40 AM
‎2008 Nov 13 8:19 AM
Hi ,
Correct code is
data: i_custname like BAPIPAREX occurs 0 WITH HEADER LINE.
i_custname-structure = 'BAPI_TE_PROJECT_DEFINITION'.
Concatenate 'CI_PROJ-ZZCNAME ' itab-cname into i_custname-valuepart1 . - delete
added *****
i_custname-valuepart1+0(24) = i_bapi_pdef-PROJECT_DEFINITION.
i_custname-valuepart1+24(35) = itab-cname.
end of addition *****
append i_custname.
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
CALL FUNCTION 'BAPI_BUS2001_CREATE'
EXPORTING
I_PROJECT_DEFINITION = i_bapi_pdef
TABLES
ET_RETURN = i_pdef_ret
EXTENSIONIN = i_custname
.
Apps
‎2015 Jan 05 9:22 AM
Hi Poorna Chandrasekhar,
I am first time interacting with BAPi so please help me out urgent.
I am using BAPI_BUS2001_CREATE for creating project, I have created structure and now I have pass the data from internal table to this BAPI for project creation
My structure is:
types:begin of t_header,
PSPID TYPE PROJ-PSPID, "Project Definition
POST1 TYPE PROJ-POST1, " Description .
PROFL TYPE PROJ-PROFL, " Project Profile.
VKOKR type PROJ-VKOKR, "Controlling Area
VBUKR TYPE PROJ-VBUKR, " Company Code.
VERNR TYPE PROJ-VERNR, " Responsible Person.
PLFAZ TYPE PROJ-PLFAZ, " Start Date.
PLSEZ TYPE PROJ-PLSEZ, " Finish date.
TXJCD TYPE PROJ-TXJCD, " Tax Jurisdiction.
END OF t_header.
Please elaborate it well and how to check:
Before the project definition is created, the following is checked:
Is another project already being processed in the LUW (Logical Unit of Work)?
Does another project with the same project definition already exist?
Is the transferred data consistent (do the company code and the controlling area match)?
If all checks are successful, then the project definition is created in the document tables.
Please help me out. Thanks in advance.
Regards,
Vikash