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: 

Update custom fields to table FKKVK

manu_dasa
Explorer
0 Kudos

Hi,

I have a requirement in which I would need to add a custom field to the table FKKVK (Contract account header). The new custom field will need to be updated with data through BAPI_ISUACCOUNT_CREATEFROMDATA. This BAPI has an extension BAPI structure 'BAPI_TE_FKKVK'.

I have appended an .include structure to both the table FKKVK as well as the BAPI extension structure BAPI_TE_FKKVK. Below is the code:

DATA: WA_EXTENSION TYPE BAPIPAREX,

            X_BAPI_TE_FKKVK TYPE BAPI_TE_FKKVK

X_BAPI_TE_FKKVK-VKONT = '   '

X_BAPI_TE_FKKVK-ZCATYPE = 'TEST'.    (The new custom field which was added.)

MOVE 'BAPI_TE_FKKVK' TO WA_EXTENSION-STRUCTURE.

MOVE X_BAPI_TE_FKKVK TO WA_EXTENSION-VALUEPART1.

APPEND WA_EXTENSION TO EXTENSIONIN.

The issue is value is being taken in the BAPI , but my table is not getting updated with the value in the custom field.

Has anyone faced a similar issue, please let me know any inputs if any.
.

9 REPLIES 9

roberto_vacca2
Active Contributor
0 Kudos

Hi.

Did you launch the BAPI_TRANSACTION_COMMIT in the end?

Hope to help

Bye

0 Kudos

Yes Rebecca I did add BAPI_TRANSACTION_COMMIT at the end. All the values are getting updated in the table FKKVK, but not my custom field.

0 Kudos

Hi Manuela , to update Z fields, tables parameter TCONTRACTACCOUNTDATA of BAPIISUVKP must have ZFIELDS.

If your FKKVK has this include with the same fields of  BAPI_TE_FKKVK then your only exception can be:

if FKKVK-vkont = bapi_te_fkkvk-vkont or

            FKKVK-vkont is initial.

Please check this.

Hope to help

Bye

former_member186077
Active Participant
0 Kudos

Hi,

Try passing

X_BAPI_TE_FKKVK-VKONT =   CONTRACTACCOUNT( that you are passing to the BAPI ) instead of Space as you would receive the following error if nothing is passed :


Error processing customer data for include CI_FKKVK, contract account


Thanks.

0 Kudos

Hi Sriranjini,

The BAPI I am using is to create a Contract Account. So before calling the BAPI, I will not have the Contract account number. In that case i cannot fill the extension table with the a contract account number prior to calling the BAPI.

0 Kudos

Hi manu dasa,

Please  do the SPRO settings and FIELD SELECTION GROUP settings.

Regards,

shareef.

Former Member
0 Kudos

Hello

Can you check using FM BAPI_CTRACCONTRACTACCOUNT_CR1 for creating contract account instead of the one you are using now.

Regards

Dwaraka

kathryn_mcgallicher
Active Participant
0 Kudos

Hello,

Try setting X_BAPI_TE_FKKVK-VKONT to a blank field of 12 characters length.

K--

Former Member
0 Kudos

This message was moderated.