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

PO Release

Former Member
0 Likes
888

HI All,

Can anyone tell me how to retreive the Person's Name who has released the PO.

Thx in Adv.

HI All,

Can anyone tell me how to retreive the Person's Name who has released the PO.

Thx in Adv.

5 REPLIES 5
Read only

Former Member
0 Likes
844

hi..

Try with objectclass '<b>EINKBELEG</b>' in <b>CDHDR, CDPOS</b> if such kind of information is not stored in <b>EKKO</b>

you can find in <b>EKPO</b> Table - ernam and also last changed name also..

<b>Reward points if useful</b>

Regards

Ashu

Read only

varma_narayana
Active Contributor
0 Likes
844

Hi ..

Check out the Table field EKBE-ERNAM.

Regards.

Read only

Former Member
0 Likes
844

HI,

Check the Table <b>EKAB - Release Documentation</b>.

Regards,

Padmam.

Read only

Former Member
0 Likes
844

Hi

Somebody in the Purchasing group will release the PO

check the table T024 and field EKNAM it is the name of the person/username.

check the tables

T16FS, T16FG, T16FB and EKAB for the release info like release codes, release startegy etc

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

KjetilKilhavn
Active Contributor
0 Likes
844

Do you mean as an ad-hoc thing? Look at the change documents.

Do you mean in order to correct SAP's incorrect implementation of the release sub-screen, and display historically correct information for the release codes for which the PO is released?

You need to implement the enhancement for role determination in purchase order release (M06E0005) and have some code similar to the following in the include:


* 2007-09-25, Kjetil Kilhavn (Blue Consulting)
* Display historically correct data for already released codes

DATA: l_actor LIKE LINE OF actor_tab[].

"Has this release code been released?
DATA: l_t16fs    TYPE t16fs,
      l_position TYPE n.

CLEAR l_position.

SELECT SINGLE *
       INTO CORRESPONDING FIELDS OF l_t16fs
       FROM t16fs
       WHERE frggr = i_ekko-frggr AND
             frgsx = i_ekko-frgsx.
IF sy-subrc = 0.
  CASE i_frgco.
    WHEN l_t16fs-frgc1.
      l_position = 1.
    WHEN l_t16fs-frgc2.
      l_position = 2.
    WHEN l_t16fs-frgc3.
      l_position = 3.
    WHEN l_t16fs-frgc4.
      l_position = 4.
    WHEN l_t16fs-frgc5.
      l_position = 5.
    WHEN l_t16fs-frgc6.
      l_position = 6.
    WHEN l_t16fs-frgc7.
      l_position = 7.
    WHEN l_t16fs-frgc8.
      l_position = 8.
  ENDCASE.

  IF l_position CA '12345678'.
    l_position = l_position - 1.

    IF NOT i_ekko-frgzu+l_position(1) = 'X'.
      CLEAR l_position.
    ELSE.
      l_position = l_position + 1.
    ENDIF.
  ENDIF.
ENDIF.

IF l_position CA '12345678'.
  "Find user who released
  CONSTANTS: c_cd_objectclas_purchaseorder TYPE cdhdr-objectclas VALUE 'EINKBELEG',
             c_cd_tabname_releasestatus    TYPE cdpos-tabname    VALUE 'EKKO',
             c_cd_fname_releasestatus      TYPE cdpos-fname      VALUE 'FRGZU'.

  DATA: l_cd_objectid TYPE cdhdr-objectid,
        l_cdhdr       TYPE cdhdr,
        l_cdpos       TYPE cdpos.

  l_cd_objectid = i_ekko-ebeln.

  l_position = l_position - 1.

  SELECT *
         INTO CORRESPONDING FIELDS OF l_cdhdr
         FROM cdhdr
         WHERE objectclas = c_cd_objectclas_purchaseorder AND
               objectid   = l_cd_objectid
         ORDER BY udate    DESCENDING
                  utime    DESCENDING
                  changenr ASCENDING.
    SELECT *
           INTO CORRESPONDING FIELDS OF l_cdpos
           FROM cdpos
           WHERE objectclas = l_cdhdr-objectclas         AND
                 objectid   = l_cdhdr-objectid           AND
                 changenr   = l_cdhdr-changenr           AND
                 tabname    = c_cd_tabname_releasestatus AND
                 fname      = c_cd_fname_releasestatus.
      IF l_cdpos-value_new+l_position(1) = 'X' AND
         l_cdpos-value_old+l_position(1) = ' '.
        l_actor-otype = 'US'.
        l_actor-objid = l_cdhdr-username.
      ENDIF.
    ENDSELECT.

    IF NOT l_actor IS INITIAL.
      EXIT.
    ENDIF.
  ENDSELECT.

  l_position = l_position + 1.
ENDIF.

If nothing is found here (l_actor is initial) you need to find the agent who is supposed to perform the release (recipient of the work item if workflow is involved).

<i>Message was edited by Kjetil Kilhavn: Added actual implementation code to display historically correct information.</i>


Kjetil Kilhavn (Vettug AS) - ABAP developer since Feb 2000, but will probably never be a Rockstar developer