2013 Mar 01 10:30 AM
Hello All,
I'm using BAPI_PR_CHANGE to upload a custom field value. Here is my code:
wa_pheader TYPE BAPIMEREQHEADER-PREQ_NO,
s_bapi_te_mereqitem TYPE bapi_te_mereqitem,
s_bapi_te_mereqitemx TYPE bapi_te_mereqitem,
t_bapi_te_mereqitem TYPE STANDARD TABLE OF bapi_te_mereqitem,
t_bapi_te_mereqitemx TYPE STANDARD TABLE OF bapi_te_mereqitem,
lv_extensionin type BAPIPAREX,
lt_extensionin type STANDARD TABLE OF BAPIPAREX.
wa_pheader = wa_upload-banfn.
s_bapi_te_mereqitem-PREQ_ITEM = wa_upload-bnfpo.
s_bapi_te_mereqitem-zzarno = wa_upload-zzarno.
s_bapi_te_mereqitemx-PREQ_ITEM = wa_upload-bnfpo.
s_bapi_te_mereqitemx-zzarno = 'X'.
lv_extensionin-structure = 'BAPI_TE_MEREQITEM'.
lv_extensionin-valuepart1 = s_bapi_te_mereqitem.
APPEND lv_extensionin TO lt_extensionin .
lv_extensionin-structure = 'BAPI_TE_MEREQITEMX'.
lv_extensionin-valuepart1 = s_bapi_te_mereqitemx.
APPEND lv_extensionin TO lt_extensionin .
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = wa_pheader
TABLES
RETURN = it_return
EXTENSIONIN = lt_extensionin.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = it_commitret.
I can see the success message which says 'PR Number has been changed'. But the custom field value is still not updated. Is there anything which I'm mistaken ?
Regards.
Hello All,
I'm using BAPI_PR_CHANGE to upload a custom field value. Here is my code:
wa_pheader TYPE BAPIMEREQHEADER-PREQ_NO,
s_bapi_te_mereqitem TYPE bapi_te_mereqitem,
s_bapi_te_mereqitemx TYPE bapi_te_mereqitem,
t_bapi_te_mereqitem TYPE STANDARD TABLE OF bapi_te_mereqitem,
t_bapi_te_mereqitemx TYPE STANDARD TABLE OF bapi_te_mereqitem,
lv_extensionin type BAPIPAREX,
lt_extensionin type STANDARD TABLE OF BAPIPAREX.
wa_pheader = wa_upload-banfn.
s_bapi_te_mereqitem-PREQ_ITEM = wa_upload-bnfpo.
s_bapi_te_mereqitem-zzarno = wa_upload-zzarno.
s_bapi_te_mereqitemx-PREQ_ITEM = wa_upload-bnfpo.
s_bapi_te_mereqitemx-zzarno = 'X'.
lv_extensionin-structure = 'BAPI_TE_MEREQITEM'.
lv_extensionin-valuepart1 = s_bapi_te_mereqitem.
APPEND lv_extensionin TO lt_extensionin .
lv_extensionin-structure = 'BAPI_TE_MEREQITEMX'.
lv_extensionin-valuepart1 = s_bapi_te_mereqitemx.
APPEND lv_extensionin TO lt_extensionin .
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = wa_pheader
TABLES
RETURN = it_return
EXTENSIONIN = lt_extensionin.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = it_commitret.
I can see the success message which says 'PR Number has been changed'. But the custom field value is still not updated. Is there anything which I'm mistaken ?
Regards.
2013 Mar 01 11:45 AM
Hi Roshni,
The best way to analyze this is debug and see if your field is getting changed. At times updation takes time.
2016 Feb 19 8:48 PM
It's a very late reply and hope it helps others.
Please populate table parameters PRITEMS and PRITEMX even they are not changed.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |