Skip to Content
author's profile photo Former Member
Former Member

how to save the change record of the additional field?

I updated the value of an additional field on header level of my purchase order, but I find that there is no change record.

why? how to save the change record of the additional field.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 10, 2009 at 03:58 AM

    Hi,

    Are you using Enhancement MM06E005?

    If yes, then refer SAP Note no 206043, 407975 and 408017. Using these notes, I have fulfilled the same requirement.

    ----


    • INCLUDE LXM06F36 *

    ----


    *

    • store transaction type for later modification of screen attributes

    *

    gl_aktyp = i_trtyp.

    gl_no_screen = i_no_screen.

    *

    • store current state of customer data in ekko_ci (structure for screen)

    *

    ekko_ci = i_ci_ekko.

    *

    • store reference document

    *

    if i_rekko-ebeln ne gl_rekko-ebeln and

    not i_rekko-ebeln is initial and

    gl_rekko-ebeln is initial.

    ekko_ci-zzflag = i_rekko-zzflag.

    gl_rekko = i_rekko.

    endif.

    ----


    • INCLUDE LXM06F37 *

    ----


    *

    • e_ci_ekko is the returning parameter

    • gl_ekko_ci : values stored at PBO

    *

    e_ci_ekko = gl_ekko_ci.

    *

    • ekko_ci contains the actual values of the Dynpro fields

    • e_ci_update is only set if you really want the fields

    • on the Dynpro to be saved. You must set it then to 'X'

    • the field ekko_ci-zzflag will here only be saved if there

    • was a change and the transaction is not in display mode

    *

    if gl_ekko_ci-zzflag ne ekko_ci-zzflag.

    e_ci_ekko-zzflag = ekko_ci-zzflag.

    if gl_aktyp ne 'A'.

    e_ci_update = 'X'.

    endif.

    endif.

    ----


    • INCLUDE LXM06F38 *

    ----


    *

    • store ekko to gl_ekko

    *

    move-corresponding i_ekko to gl_ekko_ci.

    ----


    • INCLUDE LXM06F39 *

    ----


    clear: ekko_ci,

    ekpo_ci,

    gl_no_screen,

    gl_aktyp,

    gl_ekko_ci,

    gl_rekko,

    gl_ekpo,

    gl_ucomm.

    refresh: gt_ref_ekpo_tab.

    ----


    • INCLUDE LXM06F40 *

    ----


    *

    • move stored global values back to the returning structure

    *

    e_ci_ekpo = gl_ekpo_ci.

    *

    • in case the Button was clicked the value of ekpo_ci-zzfield

    • will be taken from the copied PO

    *

    if i_ucomm = 'ZZDETERMINE'.

    data: ls_ref_ekpo like line of gt_ref_ekpo_tab.

    *

    • gt_ref_ekpo_tab contains all positions of the copied PO

    *

    read table gt_ref_ekpo_tab into ls_ref_ekpo

    with key ebelp = gl_ekpo-ebelp.

    if sy-subrc is initial.

    ekpo_ci-zzfield = ls_ref_ekpo-ekpo-zzfield.

    endif.

    else.

    *

    • return the function code of the Screen. This code will be handled

    • in the SAP program. It can only be handled if you use SAP function

    • codes

    *

    e_ucomm = i_ucomm.

    endif.

    *

    • ekko_ci contains the actual values of the Dynpro fields

    • e_ci_update is only set if you really want the fields

    • on the Dynpro to be saved. You must set it then to 'X'

    • the field ekko_ci-zzfield will here only be saved if there

    • was a change and the transaction is not in display mode

    *

    if gl_ekpo_ci-zzfield ne ekpo_ci-zzfield.

    e_ci_ekpo-zzfield = ekpo_ci-zzfield.

    if gl_aktyp ne 'A'.

    e_ci_update = 'X'.

    endif.

    endif.

    ----


    • INCLUDE LXM06F41 *

    ----


    data: ls_ref_ekpo like line of gt_ref_ekpo_tab.

    *

    • store transaction type for later modification of screen attributes

    *

    gl_aktyp = i_aktyp.

    gl_no_screen = i_no_screen.

    *

    • store current state of customer data in ekko_ci (structure for screen)

    *

    ekpo_ci = i_ci_ekpo.

    gl_ekpo = i_ekpo.

    if not i_rekpo-ebeln is initial and

    not i_ekpo-ebelp is initial.

    clear ls_ref_ekpo.

    read table gt_ref_ekpo_tab into ls_ref_ekpo

    with key ebelp = i_ekpo-ebelp.

    if ls_ref_ekpo-ekpo-ebeln ne i_rekpo-ebeln and

    ls_ref_ekpo-ekpo-ebelp ne i_rekpo-ebelp.

    ls_ref_ekpo-ebelp = i_ekpo-ebelp.

    ls_ref_ekpo-ekpo = i_rekpo.

    if sy-subrc is initial.

    modify gt_ref_ekpo_tab from ls_ref_ekpo index sy-tabix.

    else.

    append ls_ref_ekpo to gt_ref_ekpo_tab.

    endif.

    endif.

    endif.

    ----


    • INCLUDE LXM06F42 *

    ----


    move-corresponding i_ekpo to gl_ekpo_ci.

    gl_ekpo = i_ekpo.

    Regards,

    Anil Salekar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.