Application Development and Automation 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: 
Read only

Problem in creating contract

Former Member
0 Likes
813

Hi

I am facing problem in creating the customer contract using ''BAPI_CONTRACT_CREATEFROMDATA'.

The following Error has been occured .

Error in SALES_ITEM_IN 000010

Condition ZP01 is not allowed as header condition

and the coding for condition table is.

CLEAR :CONTRACT_CONDITIONS_IN,

CONTRACT_CONDITIONS_INX.

CONTRACT_CONDITIONS_IN-ITM_NUMBER = CONTRACT_ITEMS_IN-ITM_NUMBER.

CONTRACT_CONDITIONS_IN-COND_ST_NO = '010'.

CONTRACT_CONDITIONS_IN-COND_TYPE = 'ZP01'.

CONTRACT_CONDITIONS_IN-COND_UPDAT = 'X'.

CONTRACT_CONDITIONS_IN-APPLICATIO = 'V'.

CONTRACT_CONDITIONS_IN-COND_VALUE = IADVCNT-NETWR.

CONTRACT_CONDITIONS_IN-CURRENCY = 'INR'.

CONTRACT_CONDITIONS_IN-COND_P_UNT = '1'.

CONTRACT_CONDITIONS_INX-ITM_NUMBER = CONTRACT_ITEMS_IN-ITM_NUMBER.

CONTRACT_CONDITIONS_INX-COND_ST_NO = '010'.

CONTRACT_CONDITIONS_INX-COND_COUNT = '01'.

CONTRACT_CONDITIONS_INX-COND_TYPE = 'ZP01'.

CONTRACT_CONDITIONS_INX-UPDATEFLAG = 'U'.

CONTRACT_CONDITIONS_INX-COND_VALUE = 'X'.

CONTRACT_CONDITIONS_INX-CURRENCY = 'X'.

CONTRACT_CONDITIONS_INX-COND_P_UNT = 'X'.

CONTRACT_CONDITIONS_INX-COND_UNIT = 'X'.

APPEND CONTRACT_CONDITIONS_INX .

CLEAR CONTRACT_CONDITIONS_INX.

APPEND CONTRACT_CONDITIONS_IN .

CLEAR CONTRACT_CONDITIONS_IN.

Can you please tell me the way how to solve this issue.

Thanks

Sunita

6 REPLIES 6
Read only

Former Member
0 Likes
723

First thing you could try is to create the Sales contract using the normal transaction (VA41) with the same data. Do you get the same error?

Regards,

John.

Read only

0 Likes
723

Hi

Contarct is created via VA41 Transaction with the same condition type ZP01.

Regards,

Sunita

Read only

vinod_vemuru2
Active Contributor
0 Likes
723

Hi Sunitha,

I think u are trying to pass invalid condition type for that sales area and customer. Try creating the contract with same data in VA41 transaction. If get the same error then it must be problem with test data.

Thanks,

Vinod.

Read only

0 Likes
723

With the same data contarct is created in the Va41 but via

Bapi, it is showing error.

Read only

0 Likes
723

Hi,

Try to pass the item as 000010 instead of 010.

CONTRACT_CONDITIONS_IN-COND_ST_NO = '000010'.

I can't see any parameter in FM interface like CONTRACT_CONDITIONS_INX. I am in 4.6C version. Where are u passing this. Can u paste the piece of code for this.

Also pass CONTRACT_CONDITIONS_IN parameter with table body operator in the FM interface

CONTRACT_CONDITIONS_IN[]

and check the FM documentation once for any thing else u need to pass.

Thanks,

Vinod.

Read only

0 Likes
723

Hi

Contract is created now, but valid from and valid to dates are

not updated in VBAK .

And i pass the folowing data intol header table

CONTRACT_HEADER_IN-DOC_TYPE = ZADVCONT-AUART.

CONTRACT_HEADER_IN-SALES_ORG = ZADVCONT-VKORG.

CONTRACT_HEADER_IN-DISTR_CHAN = ZADVCONT-VTWEG.

CONTRACT_HEADER_IN-DIVISION = ZADVCONT-SPART.

CONTRACT_HEADER_IN-SALES_OFF = ZADVCONT-VKBUR.

CONTRACT_HEADER_IN-SALES_GRP = ZADVCONT-VKGRP.

CONTRACT_HEADER_IN-CT_VALID_F = ZADVCONT-GUEBG.

CONTRACT_HEADER_IN-CT_VALID_T = ZADVCONT-GUEEN.

Pls suggest the solution.