Application Development and Automation 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: 
Read only

Need a function module to update field PROCSTAT in EKKO table

Former Member
0 Likes
4,584

Hello,

I need a function module to update the field PROCSTAT in the table EKKO.

Is there any way to update the EKKO table to update the field PROCSTAT?

Thanks,

Ravi.

3 REPLIES 3
Read only

Former Member
0 Likes
2,326

Hello Ravi,

Could you please elaborate on how do you want to uopadte that field in EKKO table.

I meant at what event.

Actualy I have found a userexit for that .

FM EXIT_SAPMM06E_012 in exit MM06E005.

See that if could help you in anyway.

You would have to create the structure for parameter in changing tab.

See if it helps, I happened to find that in my search but I don't know

if it actaully works.

Revert in case of any query or success.

Thanks,

Sumit

Read only

0 Likes
2,326

Hi,

Thanks for your interest.

But I want a functional module to update the status(EKKO-PROCSTAT). From SE38 I want to run the function module to update the field. Or suggest me is there any other way to upate the field.

Thanks,

Ravi.

Read only

0 Likes
2,326

Here's how you can update the PROCSTAT field via Function Module ME_UPDATE_DOCUMENT:


  DATA: wa_nekko like ekko,
        wa_oekko like ekko.

  DATA: it_xeket like table of ueket with header line,
        it_xekkn like table of uekkn with header line,
        it_xekpo like table of uekpo with header line,
        it_xkomv like table of komv  with header line,
        it_yeket like table of ueket with header line,
        it_yekkn like table of uekkn with header line,
        it_yekpo like table of uekpo with header line,
        it_ykomv like table of komv  with header line,
        it_xekbe like table of ekbes with header line.

  select *
    into wa_oekko
    from ekko where ebeln = {your_po_number}.
  endselect.

  if wa_oekko-procstat = '08'.

    move-corresponding wa_oekko to wa_nekko.

    wa_nekko-procstat = '03'.

    " Need to re-populate the Pricing Conditions.  If we do not, they will be deleted.
    select *
      into corresponding fields of table it_xkomv
      from konv
      where knumv = wa_oekko-knumv.

    CALL FUNCTION 'ME_UPDATE_DOCUMENT'
      EXPORTING
        NEKKO         = wa_nekko
        OEKKO         = wa_oekko
      TABLES
        XEKET         = it_xeket
        XEKKN         = it_xekkn
        XEKPO         = it_xekpo
        XKOMV         = it_xkomv
        YEKET         = it_yeket
        YEKKN         = it_yekkn
        YEKPO         = it_yekpo
        YKOMVI        = it_ykomv
        XEKBES        = it_xekbe.

  endif.

Hope this helps

Edited by: Matthew Ramella on Jul 16, 2009 10:01 PM

Edited by: Matthew Ramella on Jul 16, 2009 10:02 PM

Edited by: Matthew Ramella on Jul 17, 2009 4:56 PM