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: 

Bapi_PO_Create1 having some problem with POCOND

Former Member
0 Kudos

Hello All,

i am using the bapi_po_create1.. i have created PO's from PR's now i have to also add a pricing condition type for Freight. the problem i am having is that i build the data into POCOND and POCONDX for the fields :

fs_pocond-itm_number = '000001'.

fs_pocond-cond_st_no = '001'.

fs_pocond-cond_type = 'FRB1'.

fs_pocond-cond_value = '234.56'.

fs_pocond-currency = 'USD'.

fs_pocondx-itm_number = 'X'.

fs_pocondx-cond_st_no = 'X'.

fs_pocondx-cond_type = 'X'.

fs_pocondx-cond_value = 'X'.

fs_pocondx-currency = 'X'.

But when i check the newly Created PO. In the Detail for Conditions the new FRB1 line item is not there , any ideas on what is going wrong ?

thanks Scott

1 ACCEPTED SOLUTION

former_member181966
Active Contributor

Pl..check OSS note # 571860 and 582221?

6 REPLIES 6

former_member181966
Active Contributor

Pl..check OSS note # 571860 and 582221?

0 Kudos

Hi Saquib,

ok i will thanks...

scott

0 Kudos

Hello Saquib,

ok i checked out the notes and others and i think i should be able to create the PO and add the new condition type. We are at release SAPKH46C50.

What do you think ??

thanks scott

0 Kudos

Well Scott, I am on HR implementation and I don’t have other system available, so I was just trying to give you some clue . I just saw another not which explain the same what you have mentioned in your question.

Check out this note # 580225

you can also see the patches and package in your system using TR.SPAM

<b>FYI..</b>

When you create a purchase order, values I, U and D refer to the conditionsthat were derived automatically, that is, you can also use U and D already during the creation. When you change a purchase order, they also refer to existing conditions.

Prerequisite

You must implement Note 494759 in your system to use these functions.

Example A: CHANGE_ID = 'I'

You create a purchase order with BAPI_PO_CREATE1. The system shoulddetermine the conditions for item 10 automatically. In addition, however, you want to calculate 3 % freight costs. You use condition type FRA1 for the freight costs. Then tables POCOND and POCONDX must be filled with the following values:

POCOND-ITM_NUMBER = 10 (item number)

POCOND-COND_TYPE = FRA1 (condition type)

POCOND-COND_VALUE = 3.0 (condition value)

POCOND-CURRENCY = %

POCOND-CHANGE_ID = I

POCONDX-ITM_NUMBER = 10

POCONDX-ITM_NUMBERX = X

POCONDX-COND_TYPE = X

POCONDX-COND_VALUE = X

POCONDX-CURRENCY = X

POCONDX-CHANGE_ID = X

Example B: CHANGE_ID = 'U'

You create a purchase order with BAPI_PO_CREATE1. The system determines a price (condition type PB00) of 90 EUR for item 10. You want to change the 90 EUR to 100 EUR. To do this, fill tables POCOND and POCONDX with the following values:

POCOND-ITM_NUMBER = 10

POCOND-COND_TYPE = PB00

POCOND-COND_VALUE = 100

POCOND-CURRENCY = EUR

POCOND-CHANGE_ID = U

POCONDX-ITM_NUMBER = 10

POCONDX-ITM_NUMBERX = X

POCONDX-COND_TYPE = X

POCONDX-COND_VALUE = X

POCONDX-CURRENCY = X

POCONDX-CHANGE_ID = X

Example C: CHANGE_ID = 'D'

Now you want to use BAPI_PO_CHANGE to delete the freight costs added in example A again. To do this, fill tables POCOND and POCONDX with the following values:

POCOND-ITM_NUMBER = 10

POCOND-COND_TYPE = FRA1

POCOND-CHANGE_ID = D

POCONDX-ITM_NUMBER = 10

POCONDX-ITM_NUMBERX = X

POCONDX-COND_TYPE = X

POCONDX-CHANGE_ID = X

It is not necessary to transfer additional item data. Theonlyinformation that must be transferred in addition to the condition tables is the purchase order number (PURCHASEORDER field).

1. POCONDHEADER-CHANGE_ID

The header conditionsaretransferred using the POCONDHEADER table. Here, the CHANGE_ID field has the same function as in the POCOND table (see above).

Prerequisite

You must implement Note 494759 in your system to use these functions.

Example

You create a purchase order with several items and want to distributethe amount 100 EUR to the items on a percentage basis. You defined condition type HB00 for this purpose. Then the POCONDHEADER and POCONDHEADERX tables must be filled as follows:

POCONDHEADER-COND_TYPE = HB00

POCONDHEADER-COND_VALUE = 100

POCONDHEADER-CURRENCY = EUR

POCONDHEADER-CHANGE_ID = I

POCONDHEADERX-COND_TYPE = X

POCONDHEADERX-COND_VALUE = X

POCONDHEADERX-CURRENCY = X

POCONDHEADERX-CHANGE_ID = X

Thanks

Saquib

Message was edited by: Saquib Khan

0 Kudos

Hello Saquib,

thanks alot i am looking over all this information and just wanted to say thanks. this should help out. I will get back to you on this probably late tonite or tomorrow. thanks again.

scott

P.S i just awarded you points for a very helpful answer.

0 Kudos

Hello Saquib,

hey we are having all sorts of authorization issues, with the way the desing is of the system and more changes so i can not get good test data.

From as much as i can test it looks like this will work so i am going to close this out. I am also going to create another Post, Now i have to overide the vendor for the partner function "Invoice Presented by" (PI). so i am going to try and use the table POPARTNER , but i get the error "Please enter a partner role ". i pass it the partner number which in this case is the vendor.

I will close out this post and reward you.

thanks again Scott