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

BAPI_PO_CREATE1 - help loading item condition !!

Former Member
0 Likes
780

Guys,

I am having problem loading BAPI_PO_CREAT1 Structure - POCOND. I am currently using the following values for the BAPI structure :

POCOND-COND_VALUE = '20' " NET PRICE

POCOND-COND_TYPE = 'ZP11' " Custom value type

POCOND-CURRENCY = 'USD'

POCOND-COND_UNIT = 'EA'

POCOND-CHANGE_ID = 'I' " I have also tried using code 'U'.

I applied the same data to BAPI Structure POCONDHEADER and set their respective change tool bar to 'X', I am getting an error message : "No Condition determined" .

Looking forward for your help, also a sample code will be appreciated showing how to load this BAPI Structure.

- Frank

2 REPLIES 2
Read only

former_member221770
Contributor
0 Likes
592

Hi Frank,

I have used the following code in my PO Upload program and it works fine:


FORM populate_pricing .

  CLEAR: tbl_pocond,
         tbl_pocondx.

* Pricing Conditions
  tbl_pocond-itm_number    = tbl_item-ebelp.
  tbl_pocond-cond_st_no    = '1'.
  tbl_pocond-cond_type     = 'PB00'.
  tbl_pocond-cond_value    = tbl_item-netpr.
  tbl_pocond-currency      = tbl_header-waers.
  tbl_pocond-change_id     = 'I'.
  APPEND tbl_pocond.

  tbl_pocondx-itm_number    = tbl_item-ebelp.
  tbl_pocondx-cond_st_no    = '1'.
  tbl_pocondx-itm_numberx   = 'X'.
  tbl_pocondx-cond_st_nox   = 'X'.
  tbl_pocondx-cond_type     = 'X'.
  tbl_pocondx-cond_value    = 'X'.
  tbl_pocondx-currency      = 'X'.
  tbl_pocondx-change_id     = 'X'.
  APPEND tbl_pocondx.

ENDFORM.                    " populate_pricing

Hope this helps.

Cheers,

Pat.

PS. Kindly assign Reward Points to the posts you find helpful.

Read only

0 Likes
592

Thanks a million Patrick - Your sample code worked