‎2009 Dec 16 10:09 AM
Hi!
I'm trying to use BAPI_PR_CHANGE to change the value of a custom field added to EBAN table, with the CI_EBANDB structure.
When I try to change other value (for example in the PRITEM stucture) it's work fine, but for the custon fields it's not updating the new values.
Can you help me?
thanks.
DATA: lt_bapimereqitemimp TYPE TABLE OF bapimereqitemimp ,
llv_bapimereqitemimp LIKE bapimereqitemimp.
lv_bapi_te_mereqitem-cod_presu = 'C123' .
lv_bapi_te_mereqitem-ceco_ben = '0103476034' .
lv_bapi_te_mereqitem-plazo = 12 .
REFRESH lt_extensionin.
lv_extensionin-structure = 'BAPI_TE_MEREQITEM'.
lv_extensionin-valuepart1 = lv_bapi_te_mereqitem .
APPEND lv_extensionin TO lt_extensionin .
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = number
prheader = lv_bapimereqheader
prheaderx = lv_bapimereqheaderx
* testrun = ' '
IMPORTING
prheaderexp = lt_prheaderexp
TABLES
return = return_tab
pritem = lt_bapimereqitemimp
pritemx = lt_bapimereqitemx
pritemexp = lt_pritemexp
pritemsource = lt_pritemsource
praccount = lt_praccount
praccountproitsegment = lt_praccountproitsegment
praccountx = lt_praccountx
praddrdelivery = lt_praddrdelivery
pritemtext = lt_pritemtext
prheadertext = lt_prheadertext
extensionin = lt_extensionin
extensionout = lt_extensionout
prversion = lt_prversion
prversionx = lt_prversionx
allversions = lt_allversions
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
* IMPORTING
* RETURN =
.
* lt_retun_change .
COMMIT WORK AND WAIT .
‎2009 Dec 16 10:51 AM
I find the problem.
There is to populate a line of the 'extensionin' table with a new line with the structure 'BAPI_TE_MEREQITEMX' value
This is the new code that work for me:
lv_extensionin-structure = 'BAPI_TE_MEREQITEM'.
lv_extensionin-valuepart1 = lv_bapi_te_mereqitem .
APPEND lv_extensionin TO lt_extensionin .
lv_extensionin-structure = 'BAPI_TE_MEREQITEMX'.
lv_extensionin-valuepart1 = '00010A020' .
APPEND lv_extensionin TO lt_extensionin .