cancel
Showing results for 
Search instead for 
Did you mean: 

Contract creaton in R/3

Former Member
0 Kudos

Dear All,

Iam trying to create a contract using 'BAPI_CONTRACT_CREATEFROMDATA'.

iam populating header with document type,sales org,division and distribution channel.iam also populating CONTRACT_HEADER_INX for respective fields.

iam populating item with item number, material, high level item and target quantity.

for partner iam populating partner role as SP-ship to party, partner no.

i did use BAPI_TRANSACTION_COMMIT.

its giving an error saying enter ship to or sold to party.

iam working on 4.6c version.

is there any other BAPI or FM to do this?if not could some one help me in sorting this out please.

thank you very much.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You must enter at least header data (using the CONTRACT_HEADER_IN structure) and partner data (using the CONTRACT_PARTNERS table) as input parameters.

You enter the item data in the CONTRACT_ITEMS_IN table.

<b>Parameters for the BAPI</b>

<b>1. Required entries:</b>

ORDER_HEADER_IN :

DOC_TYPE Sales document type

SALES_ORG Sales organisation

DISTR_CHAN Distribution channel

DIVISION Division

ORDER_PARTNERS..:

PARTN_ROLE Partner function, SP sold-to party

PARTN_NUMB Customer number

ORDER_ITEMS_IN..:

MATERIAL Material number

<b>2. Ship-to party:</b>

If no ship-to party is specified, the ship-to party is the same as the sold-to party.

<b>3. Commitment Control:</b>

The BAPI does not carry out a database commit. This means that the calling application must leave the commit in order to have changes made to the database. BAPI_TRANSACTION_COMMIT is available for this purpose.

For more information, kindly check the Function Module Documentation in SE37.

Best regards,

Thangesh

Former Member
0 Kudos

Hi Gajendra,

Pass the Partner role as "WE" for Ship to and "AG" for Sold To, when you enter the Partner details (in CONTRACT_PARTNERS table).

regards,

Raj

Former Member
0 Kudos

Hi

I have tried that.it didnt work.has anyone used this bapi.could u please help me with that.

thank you very much.

Regards,

Gajendra.