Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

COPA0001 - Posting VGBEL and VGPOS

Hi all,

Using KEDR following dervation created

28 Table lookup Excise Document number updatoin


VBRP VBELN Billing Document GLOBAL USERTEMP1 Temporary field 1 (user-defined)

VBRP POSNR Billing item GLOBAL USERTEMP2 Temporary field 2 (user-defined)


VBRP VGBEL Document number of the reference document CO-PA VGBEL Document number of the reference document

VBRP VGPOS Item number of the reference item CO-PA VGPOS Item number of the reference item

requirement is

pass vbeln and posnr from source to global_usertemp1 and global_usertemp2.

based on this vgbel and vgpos should be passed to COPA.

i have done the following coding in exit ZXKKEU11.

TABLES : vbrp.

DATA: ce0_1000 LIKE ce01000, "Import CO-PA structure

ls_global LIKE kedrcopa. "Import USERTEMP field

DATA : BEGIN OF vbrp_work_area,

vbeln LIKE vbrp-vbeln,

posnr LIKE vbrp-posnr,

END OF vbrp_work_area.

CASE i_operating_concern.

  • Derivation enhancements for operating concern 1000

WHEN '1000'.

e_exit_is_active = 'X'.

ce0_1000 = i_copa_item.

ls_global = i_global.

CASE i_step_id .

WHEN '28'.

SELECT vbeln posnr UP TO 1 ROWS

INTO vbrp_work_area

FROM vbrp

WHERE vbeln = ce0_1000-rbeln

AND posnr = ce0_1000-rposn.

ls_global-usertemp1 = vbrp_work_area-vbeln.

ls_global-usertemp2 = vbrp_work_area-posnr.


IF sy-subrc NE 0.

e_failed = 'X'.



  • e_copa_item = ce0_1000.

e_global = ls_global.

    • fill temporary structures


  • ls_global = i_global.


How to write coding for vgpos and vgbel posting?

I have put breakpoint in the exit.

How to test this exit, which tcode should i use

Help required.



Former Member
Not what you were looking for? View more on this topic or Ask a question