09-30-2010 1:17 PM
Hi,
I'm facing a problem with BAPI_CUSTOMERRETURN_CREATE.
We have a standard field in VBAP-MSR_RET_REASON. Could not find a place to populate it from the BAPI. Even tried extension, it did not work.
Please share your ideas to resolve this issue.
Thanks,
Anupam
09-30-2010 7:48 PM
Create an append structure with field name MSR_RET_REASON for standard structure BAPE_VBAP. Populate the custome field
DATA lv_vpart(600) TYPE c.
DATA x_bape_vbap type BAPE_VBAP.
DATA it_extensionin TYPE bapiparex OCCURS 0 WITH HEADER LINE.
* Populate Performance Start and End dates
x_bape_vbap-MSR_RET_REASON= <VALUE>.
* Populate the structure
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = x_bape_vbap
IMPORTING
ex_container = lv_vpart
EXCEPTIONS
illegal_parameter_type = 1
OTHERS = 2.
it_extensionin-structure = 'BAPE_VBAP'.
it_extensionin-valuepart1 = lv_vpart+0(240).
append it_extensionin.
With your other fields call the BAPI BAPI_CUSTOMERRETURN_CREATE, for parameter EXTENSIONIN pass the above populate internal table. Standard program will populate to VBAP table.
For reference check include program LVBAK001, subroutine MAP_VBAP_TOBAPISDIT.
04-05-2011 12:13 PM