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

Updating EBAN TAble with custom field values by BAPI_PR_CREATE

Former Member
0 Kudos
735

Hi all,

My requirement is PR creation by BAPI_PR_CREATE Function Module .

for pr item level customer added 10 fields in the EBAN table append structure CI_EBANDB. .

i am creating PR by using Funcation module BAPI_PR_CREATE.

In this Function Module I have to pass the structure name and field values in the EXTENTIONIN .

what is the structure name I have to pass and how populate data in to the EBAN table.

after that i have to create PR and updating 10 two custom field values in the EBAN Table.

how to proceed for updating the customer field values in the eban table.

thanks in advance.

sri

1 REPLY 1
Read only

Former Member
0 Kudos
245

Hi Sri,

better you dont use it. try this..

example code:

data: i_banc type bapiebanc occurs 0 with header line.

data: i_bkn type bapiebkn occurs 0 with header line.

data: i_ret type bapireturn occurs 0 with header line.

data: i_band type bapieband occurs 0 with header line.

data: i_bantx type bapiebantx occurs 0 with header line.

data number type bapiebanc-preq_no.

i_banc-acctasscat = par_asset.

i_banc-short_text = 'VehicleBooking'.

i_banc-quantity = '1'.

i_banc-DEL_DATCAT = '1'.

i_banc-deliv_date = par_date .

i_banc-mat_grp = 'TRAVEL'.

i_banc-unit = 'ST'.

i_banc-c_amt_bapi = 100.

i_bkn-cost_ctr = par_cost.

i_bkn-g_l_acct = par_gl.

i_bkn-fund = par_fund.

i_bkn-funds_ctr = par_fund_ctr.

append i_banc.

append i_bkn.

call function 'BAPI_REQUISITION_CREATE'

  • exporting

  • skip_items_with_error = 'X'

importing

number = number

tables

requisition_items = i_banc

requisition_account_assignment = i_bkn

requisition_item_text = i_bantx

return = i_ret

.

Describe table i_ret lines count.

If count > 0.

loop at i_ret.

Message e000(zbooking) with i_ret-message

endloop.

Endif.

if not number is initial.

S000(zbookings) with 'Requisition number ' , number ,' created'.

endif.

thanks

trinadh