cancel
Showing results for 
Search instead for 
Did you mean: 

PO approver name & PO approval date in an report

Former Member

Hi,

I am aware that there is no standard SAP report which gives the information of PO approver name and PO approval date. If there is any please let me know.

However we want to develop such report which gives this information and we are bulding logic based on the CDPOS & CDHDR table. Please let me know if there is any other approach to avoid the CDPOS & CDHDR tables in order to avoid any performance issues.

Thanks.

MP

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Based on suggestion I developed above code and worked well. Archiving for future use to anyone 🙂

0 Kudos

DATA: lt_change TYPE mecdgrid_t.


CALL FUNCTION 'ME_CHANGEDOC_SELECT'
EXPORTING
i_document_category = ls_ekko-bstyp
i_document_number = ls_ekko-ebeln
IMPORTING
e_outtab = lt_change.

IF lt_change IS NOT INITIAL.
READ TABLE lt_change INTO DATA(ls_change) WITH KEY fname = 'FRGKE'.
IF sy-subrc EQ 0 AND ls_change-f_new CA 'F'.
READ TABLE lt_change INTO DATA(ls_change1) WITH KEY fname = 'FRGZU'.
IF sy-subrc EQ 0 AND ls_change1-f_new CA 'X'.
SELECT SINGLE * FROM t16fs INTO @DATA(ls_t16fs) WHERE frggr = @ls_ekko-frggr AND frgsx = @ls_ekko-frgsx.
IF sy-subrc EQ 0.
TYPES: BEGIN OF lty_frgc,
frgc TYPE frgco,
END OF lty_frgc,
tt_frgc TYPE STANDARD TABLE OF lty_frgc.
DATA: lt_frgc TYPE STANDARD TABLE OF lty_frgc.
APPEND ls_t16fs-frgc1 TO lt_frgc.
APPEND ls_t16fs-frgc2 TO lt_frgc.
APPEND ls_t16fs-frgc3 TO lt_frgc.
APPEND ls_t16fs-frgc4 TO lt_frgc.
APPEND ls_t16fs-frgc5 TO lt_frgc.
APPEND ls_t16fs-frgc6 TO lt_frgc.
APPEND ls_t16fs-frgc7 TO lt_frgc.
APPEND ls_t16fs-frgc8 TO lt_frgc.

LOOP AT lt_frgc ASSIGNING FIELD-SYMBOL(<lfs_frgc>).
IF <lfs_frgc> IS INITIAL.
CONTINUE.
ENDIF.
CASE <lfs_frgc>+1(1).
WHEN '1'.
<lfs_final>-frgct_1 = ls_change-username.
<lfs_final>-re_date_1 = ls_change-udate.
WHEN '2'.
<lfs_final>-frgct_2 = ls_change-username.
<lfs_final>-re_date_2 = ls_change-udate.
WHEN '3'.
<lfs_final>-frgct_3 = ls_change-username.
<lfs_final>-re_date_3 = ls_change-udate.
WHEN '4'.
<lfs_final>-frgct_4 = ls_change-username.
<lfs_final>-re_date_4 = ls_change-udate.

*****

ADD up to 8 fields here

****
WHEN OTHERS.
ENDCASE.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDIF.

Former Member
0 Kudos

Hi,

I asked our ABAP to develop a report such as this, and we retrieve the data such as PO Number, Document Category, etc. first then used a Function Module (ME_CHANGEDOC_SELECT) to get the Approver and updated Release Date ->this is actually the Change Logs per PO Number. In the E_OUTTAB of the Function Module, the FNAME Field should be equal to FRGKE (which means Release Indicator) and the F_NEW should be equal to an X mark then get the username and date. Note that there's a sorting to get the most updated detail.

If there are more than one approver who released the PO, like for example there are 3, we set 3 columns each equivalent to 1-X, 2-XX, 3-XXX marks.

former_member712038
Contributor
0 Kudos

Hi,

Only CDHDR and CDPOS will help you. There are no other tables. Yoy may use transaction code RSSCD100 also.

Regards