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

How to enter multiple vendors with-->BAPI_TRADINGCONTRACT_CREATE.

Former Member
0 Likes
1,179

Hi gurus,

I am using "BAPI_TRADINGCONTRACT_CREATE" to create a Trading Contract. While creating it i give inputs in that i need to enter different Vendor for each Items.

I am passing the vendor detail into the BAPI through BUSINESSDATAIN but it only fills the HEADER FIELD in the trading contract.

I Checked all the input structures in that BAPI but couldn't find the right solution .

My question is how do i enter the data into BAPI as ITEM level VENDOR declaration..

thanks in Advance.

Gaja@sap

Hi gurus,

I am using "BAPI_TRADINGCONTRACT_CREATE" to create a Trading Contract. While creating it i give inputs in that i need to enter different Vendor for each Items.

I am passing the vendor detail into the BAPI through BUSINESSDATAIN but it only fills the HEADER FIELD in the trading contract.

I Checked all the input structures in that BAPI but couldn't find the right solution .

My question is how do i enter the data into BAPI as ITEM level VENDOR declaration..

thanks in Advance.

Gaja@sap

7 REPLIES 7
Read only

JL23
Active Contributor
0 Likes
1,100

Try the same using transaction ME31K , I bet you will not be able to do it manually.

And as a BAPI is usually only a different technical solution to get the same result as in a online transaction......it is obvious that you cannot maintain one contract with different vendors.

to which vendor would you like to send the output of such contract?

Read only

Former Member
0 Likes
1,100

hello ,

Thanks for response ,I think You are speaking about Standard contract creating Transactions. But my question is if i Buy from two different companies and sale it to one customer being a trading group. That time i may need this technique to enter two vendors for the same customer. By the way in Transaction- WB22 we can change the trading contract giving different vendor at the item level.

do we have some other options to do this ,..!!

thanks in advance.

Gaja@sap.

Read only

JL23
Active Contributor
0 Likes
1,100

maybe explanation of OSS Note 920010 - GTM: Business data is not transferred completely

can help you a bit.

you entered the item number at this level too?

Read only

Former Member
0 Likes
1,100

Thank you so much for the Note, I am trying to work it out .

And regarding to your question.

when i send the BAPITCBUS structure into BAPI , I am not sending the item number in that structure as it gave me an ERROR saying " No business data exists at header level; check the Interface" .So as per now i am sending all the values instead of Item number in BAPITBUS structure.

Am i heading to the solution correctly ??

Thanks in advance.

Gaja@sap.

Read only

JL23
Active Contributor
0 Likes
1,100

I never worked with that particular BAPI, but you can usually have the same segment many times in an IDOC, which means (just my thoughts) you could have BUSINESSDATAIN without item number which represent the header, and with item number which represents an item.

Read only

Former Member
0 Likes
1,100

Hello Jürgen L. ,

Sorry for the late Update , In my system the Note Oss-920010 is already been implemented .

And i tried all the possible ways to enter the business data with item no but i get an error message in the perform which checks business data itself .

***check first entry is a header data***

if not l_komwbhde-tposn is initial. --->"Item_no is not initial.

call function 'WB2_ERROR_MSG'

exporting

i_msgty = 'E'

i_msgid = 'WB2B'

i_msgno = '297'

tables

t_emsg = t_error_message.

return.

endif.

The above code gives me the error .

Is theer some other place where i can put in my multiple vendors,..

Read only

Former Member
0 Likes
1,100

ISSUE Resolved :

Thanks for the Idea Gurus the problem of adding Multiple vendors is been resolved ,

The Key was in structure-->BUSINESSDATAIN

If you enter without Item number that data will be considered as Header data( MAIN VENDOR ).

If its with the item number then it would be Considered as Item data ( Third Party Vendor in item overview).

NOTE:

you CANNOT CREATE a Trading Contract without the MAIN vendor .

Functionality of Trading Contract :

The main vendor which is passed to trading contract will be duplicated to the item overview vendor (Thrid Party Vendors) IF we dont specify the particular Item level vendors.

Thanks & Regards

Gaja@Sap