Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

COPA0001 - Posting VGBEL and VGPOS

Former Member
0 Kudos

Hi all,

Using KEDR following dervation created

28 Table lookup Excise Document number updatoin

Source

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

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

Target

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.

ENDSELECT.

IF sy-subrc NE 0.

e_failed = 'X'.

ENDIF.

ENDCASE.

  • e_copa_item = ce0_1000.

e_global = ls_global.

    • fill temporary structures

*

  • ls_global = i_global.

ENDCASE.

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.

regards

senthil.

1 REPLY 1

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Have you checked Note 124813 - Enhancement COPA0001: Documentation?

Regards

Eduardo