Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Please Help me on the Joint Venture Upload

Former Member
0 Kudos

Hi All,

Could you please let me know the procedure how we can upload the Joint Venture data for a company code for the particular Profit Center. I am currently trying this by using a BAPI - PROFITCENTER_CHANGE. This BAPI is showing that its executed successfully but its not showing the cost centers.

The following is part of the code that i am using:

  • build up the call table for companycodes

LOOP AT GT_BUKRS INTO GD_BUKRS.

LOOP AT GS_JVDAT WHERE BUKRS = GD_BUKRS.

GS_PRCT1_BUKRS-COMP_CODE = GD_BUKRS.

GS_PRCT1_BUKRS-ASSIGN_TO_PRCTR = 'X'.

GS_PRCT1_BUKRS-VNAME = GS_JVDAT-VNAME.

GS_PRCT1_BUKRS-RECID = GS_JVDAT-RECID.

GS_PRCT1_BUKRS-ETYPE = GS_JVDAT-ETYPE.

GS_PRCT1_BUKRS-JV_OTYPE = GS_JVDAT-OTYPE.

GS_PRCT1_BUKRS-JV_JIBCL = GS_JVDAT-JIBCL.

GS_PRCT1_BUKRS-JV_JIBSA = GS_JVDAT-JIBSA.

APPEND GS_PRCT1_BUKRS TO GT_PRCT1_BUKRS.

  • prepare xbar for function call

GS_PRCT1_BUKRSX-COMP_CODE = GD_BUKRS.

GS_PRCT1_BUKRSX-ASSIGN_TO_PRCTR = 'X'. "relevant for change

GS_PRCT1_BUKRSX-VNAME = 'X'.

GS_PRCT1_BUKRSX-RECID = 'X'.

GS_PRCT1_BUKRSX-ETYPE = 'X'.

GS_PRCT1_BUKRSX-JV_OTYPE = 'X'.

GS_PRCT1_BUKRSX-JV_JIBCL = 'X'.

GS_PRCT1_BUKRSX-JV_JIBSA = 'X'.

APPEND GS_PRCT1_BUKRSX TO GT_PRCT1_BUKRSX.

ENDLOOP.

ENDLOOP.

CLEAR GS_BAPIRET2.

CALL FUNCTION 'PROFITCENTER_CHANGE'

EXPORTING

PRCTR_DATA = GS_PRCTR_DATA

PRCTR_DATAX = GS_PRCTR_DATAX "empty

NO_CCODES_CHECK = P_NO_CCC

COMPLETE = 'X'

INACTIVE_VERSION = 'X'

TESTRUN = GS_TESTRUN

INSERT_MODE = 'X'

IMPORTING

RETURN = GS_BAPIRET2

TABLES

COMPANYCODE_JOINT_VENTURE = GT_PRCT1_BUKRS

COMPANYCODE_JOINT_VENTUREX = GT_PRCT1_BUKRSX.

Please suggest or clarify to proceed accordingly.

Thanks,

Suresh.

3 REPLIES 3

Former Member
0 Kudos

Hi

Have yuo try to do a commit? you can use BAPI_TRANSACTION_COMMIT.

Max

Message was edited by: max bianchi

0 Kudos

I am using

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = '2'

IMPORTING

RETURN = GS_BAPIRET1.

still its not working.

Please suggest.

Thanx,

Suresh

0 Kudos

Hi

This is very critical, please give me a solution... if you want i will send you the whole code of the program.

Thank You,

Suresh