2008 Jun 13 4:27 AM
Hello Evry one am using BAPI for purchase requisition change
but for custom fields in EBAN it is not updating wht to do ??
suggest. Do BAPI fails for custom fields?
For Standard fields in eban its getting updated but for Custom
fields in EBAN its not updating.
Used: CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
and passed required parameters
Coding:
data: i_items like BAPIEBAN occurs 0 with header line.
data: i_old like BAPIEBANV occurs 0 with header line.
data: i_new like BAPIEBANV occurs 0 with header line.
data: i_ret like BAPIRETURN occurs 0 with header line.
DATA: I_RET2 LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
EXPORTING
number = '0001000785'
ACCOUNT_ASSIGNMENT = ' '
ITEM_TEXTS = ' '
SERVICES = ' '
SERVICE_TEXTS = ' '
tables
requisition_items = i_items
REQUISITION_ACCOUNT_ASSIGNMENT =
REQUISITION_TEXT =
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES =
REQUISITION_SERVICES_TEXTS =
REQUISITION_SRV_ACCASS_VALUES =
RETURN =
.
loop at i_items.
move-corresponding i_items to i_old.
append i_old.
endloop.
loop at i_old.
move-corresponding i_old to i_new.
append i_new.
endloop.
loop at i_new.
i_new-PUR_GROUP = 'GEN'.
I_NEW-PURCHASER = 'test1'.
modify i_new.
endloop.
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
number = '0001000785'
tables
requisition_items_old = i_old
requisition_items_new = i_new
REQUISITION_ACCOUNT_OLD =
REQUISITION_ACCOUNT_NEW =
REQUISITION_TEXT_OLD =
REQUISITION_TEXT_NEW =
RETURN = i_ret.
Hello Evry one am using BAPI for purchase requisition change
but for custom fields in EBAN it is not updating wht to do ??
suggest. Do BAPI fails for custom fields?
For Standard fields in eban its getting updated but for Custom
fields in EBAN its not updating.
Used: CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
and passed required parameters
Coding:
data: i_items like BAPIEBAN occurs 0 with header line.
data: i_old like BAPIEBANV occurs 0 with header line.
data: i_new like BAPIEBANV occurs 0 with header line.
data: i_ret like BAPIRETURN occurs 0 with header line.
DATA: I_RET2 LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'BAPI_REQUISITION_GETDETAIL'
EXPORTING
number = '0001000785'
ACCOUNT_ASSIGNMENT = ' '
ITEM_TEXTS = ' '
SERVICES = ' '
SERVICE_TEXTS = ' '
tables
requisition_items = i_items
REQUISITION_ACCOUNT_ASSIGNMENT =
REQUISITION_TEXT =
REQUISITION_LIMITS =
REQUISITION_CONTRACT_LIMITS =
REQUISITION_SERVICES =
REQUISITION_SERVICES_TEXTS =
REQUISITION_SRV_ACCASS_VALUES =
RETURN =
.
loop at i_items.
move-corresponding i_items to i_old.
append i_old.
endloop.
loop at i_old.
move-corresponding i_old to i_new.
append i_new.
endloop.
loop at i_new.
i_new-PUR_GROUP = 'GEN'.
I_NEW-PURCHASER = 'test1'.
modify i_new.
endloop.
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
number = '0001000785'
tables
requisition_items_old = i_old
requisition_items_new = i_new
REQUISITION_ACCOUNT_OLD =
REQUISITION_ACCOUNT_NEW =
REQUISITION_TEXT_OLD =
REQUISITION_TEXT_NEW =
RETURN = i_ret.
2008 Jun 13 4:55 AM
use the function module it might help you
call function 'BAPI_REQUISITION_CREATE'
exporting
skip_items_with_error = 'X'
importing
number = h_banfn
tables
requisition_items = req_item
requisition_account_assignment = req_acct
requisition_item_text = req_text
return = return
exceptions
others = 0.
PLEASE CHECK OUT THE LINK BELOW IT MIGHT HELP YOU
http://help.sap.com/saphelp_46c/helpdata/en/7c/3ce3ab65ba11d395fe00a0c94260a5/content.htm
OTHER BAPIS RELATED TO THIS ARE BAPI_REQUISITION_GETDETAIL and BAPI_REQUISTION_CHANGE.
Reward points if useful
2008 Jun 13 4:58 AM
Hi,
Just check is there extensionin and extensionout is available for custom fields.
If its there then pass value of custom fields to it and it will get updated.
Reward if useful.
Regards
Susheel
2008 Jun 13 5:12 AM
Hi,
it depends on the way you created your new table field and on the BAPI you use. Check if the BAPI has so-called extension (table) parameters. If so, check the parameters documentation where the necessary steps are explained.
Regards
Kiran Sure