2010 Sep 30 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
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.
2010 Sep 30 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.
2011 Apr 05 12:13 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |