Which is the process (or Package) that approve the Purchase Order

Hi All,
I have a custom process that modifies need by date and promised date fields in Purchase Order. After that the Purchase Order that has "Aprove" status change and say "Required Reaprove". Do you know which is the package that I can execute in order to aprove again the PO ?.
Thanks Mariano.-

Hi Hussein,
It was a good idea to make a trace. I finally found the solution. Here it is....
Thanks a lot !!!
begin
FND_GLOBAL.APPS_INITIALIZE(1911,50737,20003);
end;
begin
MO_GLOBAL.SET_POLICY_CONTEXT('S',81);
end;
declare
v_wf_seq NUMBER;
v_itemkey VARCHAR2(100);
begin
SELECT TO_CHAR (po_wf_itemkey_s.NEXTVAL)
INTO v_wf_seq
FROM SYS.DUAL;
v_itemkey := TO_CHAR(5782)|| '-' || v_wf_seq;
po_reqapproval_init1.start_wf_process (itemtype => 'POAPPRV'
,itemkey => v_itemkey
,workflowprocess => 'POAPPRV_TOP'
,actionoriginatedfrom => 'PO_FORM'
,documentid => 5782 -- po_header_id
,documentnumber => '388' -- OC
,preparerid => 82 -- agent_id
,documenttypecode => 'PO'
,documentsubtype => 'STANDARD'
,submitteraction => 'APPROVE'
,forwardtoid => NULL
,forwardfromid => 82 -- agent_id
,defaultapprovalpathid => 10
,note => NULL
,printflag => 'N'
,faxflag => NULL
,faxnumber => NULL
end;

Similar Messages

  • A report which shows the purchase order MM and the linked vendor invoice

    Hi All,
    I wonder if ther's a SAP standard report which shows the purchase order MM and the linked vendor invoice (the FI document)  with the Net due date.
    Could anyone help me?
    Thanks
    G.Rossi

    Hi,
    ME80FN with PO History View
    ME2N with Scope of List "ALLES"

  • Want Interactive Report which displays the Purchase Orders

    Hi all,
    What are the select-options,parameters and tables used in purchase orders report and if possible send me the code for the same.
    Thanks in Advance
    Santosh R

    see if this one helps
    REPORT  YSG_MATSTK_REPT    LINE-SIZE 220
                               LINE-COUNT 50(5).
    *&                       DATA DECLARATION                              *
    TABLES: MARA,                      "GENERAL MASTER DATA
            MARC,                      "PLANT DATA FOR MATERIAL
            MARD,                      "STORAGE LOCATION DATA FOR MATERIAL
            MVKE,                      "SALES DATA FOR MATERIAL
            MAKT,                      "MATERIAL DESCRIPTION
            EKKO,                      "PURCHASING DOCUMENT HEADER
            EKPO,                      "PURCHASING DOCUMENT ITEM
            VBAK,                      "SALES DOCUMENT HEADER DATA
            VBAP.                      "SALES DOCUMENT ITEM DATA
    TYPE-POOLS : SLIS.
    DATA: VT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
          V_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          V_LAYOUT TYPE SLIS_LAYOUT_ALV,
          BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          BEGIN OF I_MARA OCCURS 0,
             MATNR LIKE MARA-MATNR,  "MATERIAL NUMBER
             MBRSH LIKE MARA-MBRSH,  "INDUSTRY SECTOR
             MEINS LIKE MARA-MEINS,  "BASE UNIT OF MEASURE
             MATKL LIKE MARA-MATKL,  "MATERIAL GROUP
          END OF I_MARA,
          BEGIN OF I_MARC OCCURS 0,
             MATNR LIKE MARC-MATNR,  "MATERIAL NUMBER
             WERKS LIKE MARC-WERKS,  "PLANT
             LVORM LIKE MARC-LVORM,  "FLAG MATERIAL FOR DELETION AT PLANT
                                     "LEVEL
             DISPO LIKE MARC-DISPO,  "MRP CONTROLLER
          END OF I_MARC,
          BEGIN OF I_MAKT OCCURS 0,
             MATNR LIKE MAKT-MATNR,  "MATERIAL NUMBER
             MAKTX LIKE MAKT-MAKTX,  "MATERIAL DESCRIPTION
             SPRAS LIKE MAKT-SPRAS,  "LANGUAGE KEY
          END OF I_MAKT,
          BEGIN OF I_MVKE OCCURS 0,
             MATNR LIKE MVKE-MATNR,  "MATERIAL NUMBER
             VKORG LIKE MVKE-VKORG,  "SALES ORGANIZATION
             VTWEG LIKE MVKE-VTWEG,  "DISTRIBUTION CHANNEL
          END OF I_MVKE,
          BEGIN OF I_MARD OCCURS 0,
            MATNR LIKE MARD-MATNR,  "MATERIAL NUMBER
            LGORT LIKE MARD-LGORT,  "STORAGE LOCATION
            LABST LIKE MARD-LABST,  "VALUATED STOCK WITH UNRESTRICTED USE
          END OF I_MARD,
          BEGIN OF I_EKPO OCCURS 0,
            EBELN LIKE EKPO-EBELN,  "PURCHASING DOCUMENT NUMBER
            EBELP LIKE EKPO-EBELP,  "ITEM NUMBER OF PURCHASING DOCUMENT
            MATNR LIKE EKPO-MATNR,  "MATERIAL NUMBER
          END OF I_EKPO,
          BEGIN OF I_VBAP OCCURS 0,
            VBELN LIKE VBAP-VBELN,  "SALES DOCUMENT
            POSNR LIKE VBAP-POSNR,  "SALES DOCUMENT ITEM
            MATNR LIKE VBAP-MATNR,  "MATERIAL NUMBER
          END OF I_VBAP,
          BEGIN OF I_OUT OCCURS 0,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            LVORM LIKE MARC-LVORM,
            DISPO LIKE MARC-DISPO,
            MBRSH LIKE MARA-MBRSH,
            MEINS LIKE MARA-MEINS,
            MATKL LIKE MARA-MATKL,
            VKORG LIKE MVKE-VKORG,
            VTWEG LIKE MVKE-VTWEG,
            SPRAS LIKE MAKT-SPRAS,
            MAKTX LIKE MAKT-MAKTX,
            LGORT LIKE MARD-LGORT,
            LABST LIKE MARD-LABST,
            EBELN LIKE EKPO-EBELN,
            EBELP LIKE EKPO-EBELP,
            VBELN LIKE VBAP-VBELN,
            POSNR LIKE VBAP-POSNR,
          END OF I_OUT,
          BEGIN OF I_HEADING OCCURS 0,
            TEXT1(20),
            TEXT2(20),
            TEXT3(20),
            TEXT4(20),
            TEXT5(20),
            TEXT6(20),
            TEXT7(20),
            TEXT8(20),
            TEXT9(20),
            TEXT10(20),
            TEXT11(40),
            TEXT12(20),
            TEXT13(20),
            TEXT14(20),
            TEXT15(20),
            TEXT16(20),
            TEXT17(20),
          END OF I_HEADING.
    *&                   S E L E C T I O N - S C R E E N                   *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR. "OBLIGATORY.
    PARAMETERS: P_WERKS LIKE MARC-WERKS. "OBLIGATORY.
    SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
                    S_DISPO FOR MARC-DISPO,
                    S_EBELN FOR EKPO-EBELN .
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-101.
    PARAMETERS : RB1 RADIOBUTTON GROUP G1,
                 RB2 RADIOBUTTON GROUP G1,
                 RB3 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF BLOCK B2.
    *&                  I N I T I A L I Z A T I O N                      *
    *INITIALIZATION.
    *&             S T A R T - O F - S E L E C T I O N                     *
    START-OF-SELECTION.
      SELECT MATNR WERKS LVORM DISPO FROM MARC
      INTO CORRESPONDING FIELDS OF TABLE I_MARC
                          WHERE MATNR IN S_MATNR
                          AND DISPO IN S_DISPO
                          AND WERKS = P_WERKS.
      IF I_MARC[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
        EXIT.
      ENDIF.
      PERFORM PURCHASEDATA_VALIDATION.
      PERFORM SALESDATA_VALIDATION.
      SELECT MATNR LGORT LABST FROM MARD INTO TABLE  I_MARD
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR
                          AND WERKS EQ P_WERKS
                          AND LGORT IN S_LGORT.
      IF I_MARD[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
        EXIT.
      ENDIF.
      SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR.
      IF I_MVKE[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
        EXIT.
      ENDIF.
      LOOP AT I_MARC.
        MOVE-CORRESPONDING I_MARC TO I_OUT.
        CLEAR MARC.
        SELECT SINGLE MATNR MBRSH MEINS MATKL FROM MARA
                          INTO CORRESPONDING FIELDS OF MARA
                          WHERE MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MARA-MBRSH TO I_OUT-MBRSH,
                MARA-MEINS TO I_OUT-MEINS,
                MARA-MATKL TO I_OUT-MATKL.
        ELSE.
          CONTINUE.
        ENDIF.
        SELECT SINGLE MATNR MAKTX SPRAS FROM MAKT
                        INTO  CORRESPONDING FIELDS OF MAKT
                        WHERE  MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MAKT-MAKTX TO I_OUT-MAKTX,
                MAKT-SPRAS TO I_OUT-SPRAS.
        ELSE.
          CONTINUE.
        ENDIF.
        LOOP AT I_EKPO WHERE MATNR =  I_MARC-MATNR.
          MOVE: I_EKPO-EBELN TO I_OUT-EBELN,
                I_EKPO-EBELP TO I_OUT-EBELP.
        ENDLOOP.
        LOOP AT I_VBAP WHERE MATNR =  I_MARC-MATNR.
          MOVE: I_VBAP-VBELN TO I_OUT-VBELN,
                I_VBAP-POSNR TO I_OUT-POSNR.
        ENDLOOP.
        LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MARD-LABST TO I_OUT-LABST,
                I_MARD-LGORT TO I_OUT-LGORT.
        ENDLOOP.
        LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
                I_MVKE-VTWEG TO I_OUT-VTWEG.
        ENDLOOP.
        APPEND I_OUT.
        CLEAR I_OUT.
      ENDLOOP.
      PERFORM OPTIONS.
    *                      FORM  OPTIONS                                *
    FORM OPTIONS.
      IF RB2 = 'X'.
        PERFORM FIELDCAT.
        PERFORM OUTPUT.
      ELSE.
        IF RB1 = 'X'.
          PERFORM HEADINGS.
          PERFORM DLOAD.
        ELSE.
          IF RB3 = 'X'.
            PERFORM HEADINGS.
            PERFORM DLOAD.
            PERFORM FIELDCAT.
            PERFORM OUTPUT.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    "OPTIONS
    *                      FORM  HEADINGS                               *
    FORM HEADINGS.
      I_HEADING-TEXT1 = 'MATNR'.
      I_HEADING-TEXT2 = 'WERKS'.
      I_HEADING-TEXT3 = 'LVORM'.
      I_HEADING-TEXT4 = 'DISPO'.
      I_HEADING-TEXT5 = 'MBRSH'.
      I_HEADING-TEXT6 = 'MEINS'.
      I_HEADING-TEXT7 = 'MATKL'.
      I_HEADING-TEXT8 = 'VKORG'.
      I_HEADING-TEXT9 = 'VTWEG'.
      I_HEADING-TEXT10 = 'SPRAS'.
      I_HEADING-TEXT11 = 'MAKTX'.
      I_HEADING-TEXT12 = 'LGORT'.
      I_HEADING-TEXT13 = 'LABST'.
      I_HEADING-TEXT14 = 'EBELN'.
      I_HEADING-TEXT15 = 'EBELP'.
      I_HEADING-TEXT16 = 'VBELN'.
      I_HEADING-TEXT17 = 'POSNR'.
      APPEND I_HEADING.
    ENDFORM.                    "HEADINGS
    *                      FORM  DLOAD                                  *
    FORM DLOAD.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME              = 'C:MATSTK.csv'
          FILETYPE              = 'DAT'
          WRITE_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB              = I_HEADING
        EXCEPTIONS
          FILE_WRITE_ERROR      = 1.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME              = 'C:MATSTK.csv'
          FILETYPE              = 'DAT'
          APPEND                = 'X'
          WRITE_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB              = I_OUT.
    ENDFORM.                    "DLOAD
    *                           FORM  FIELDCAT                          *
    FORM FIELDCAT.
      V_FIELDCAT-COL_POS = '1'.
      V_FIELDCAT-FIELDNAME     = 'MATNR'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'MATNR'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '2'.
      V_FIELDCAT-FIELDNAME     = 'WERKS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'WERKS'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '3'.
      V_FIELDCAT-FIELDNAME     = 'LVORM'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'LVORM'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '4'.
      V_FIELDCAT-FIELDNAME     = 'DISPO'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'DISPO'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '5'.
      V_FIELDCAT-FIELDNAME     = 'MBRSH'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MBRSH'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '6'.
      V_FIELDCAT-FIELDNAME     = 'MEINS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MEINS'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '7'.
      V_FIELDCAT-FIELDNAME     = 'MATKL'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MATKL'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '8'.
      V_FIELDCAT-FIELDNAME     = 'VKORG'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'VKORG'.
      V_FIELDCAT-REF_TABNAME   = 'MVKE'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '9'.
      V_FIELDCAT-FIELDNAME     = 'VTWEG'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'VTWEG'.
      V_FIELDCAT-REF_TABNAME   = 'MVKE'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '10'.
      V_FIELDCAT-FIELDNAME     = 'SPRAS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'SPRAS'.
      V_FIELDCAT-REF_TABNAME   = 'MAKT'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '11'.
      V_FIELDCAT-FIELDNAME     = 'MAKTX'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MAKTX'.
      V_FIELDCAT-REF_TABNAME   = 'MAKT'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '12'.
      V_FIELDCAT-FIELDNAME     = 'LGORT'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
    *  V_FIELDCAT-REF_FIELDNAME = 'LGORT'.
    *  V_FIELDCAT-REF_TABNAME   = 'MARD'.
      V_FIELDCAT-SELTEXT_L = 'STRG LOCT'.
      V_FIELDCAT-OUTPUTLEN = 10.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '13'.
      V_FIELDCAT-FIELDNAME     = 'LABST'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-SELTEXT_M = 'STOCK'.
      V_FIELDCAT-OUTPUTLEN = 15.
    *  V_FIELDCAT-REF_FIELDNAME = 'LABST'.
    *  V_FIELDCAT-REF_TABNAME   = 'MARD'.
      V_FIELDCAT-DO_SUM = 'X'.
      V_LAYOUT-TOTALS_TEXT = 'TOTAL STOCK:'.
      V_FIELDCAT-HOTSPOT = 'X'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '14'.
      V_FIELDCAT-FIELDNAME     = 'EBELN'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'EBELN'.
      V_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '15'.
      V_FIELDCAT-FIELDNAME     = 'EBELP'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'EBELP'.
      V_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '16'.
      V_FIELDCAT-FIELDNAME     = 'VBELN'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'VBELN'.
      V_FIELDCAT-REF_TABNAME   = 'VBAP'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '17'.
      V_FIELDCAT-FIELDNAME     = 'POSNR'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'POSNR'.
      V_FIELDCAT-REF_TABNAME   = 'VBAP'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
    ENDFORM.                      "FIELDCAT
    *                           FORM  OUTPUT                            *
    FORM OUTPUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-REPID
          I_CALLBACK_TOP_OF_PAGE  = 'TOP-OF-PAGE'
          I_GRID_TITLE = 'CLICK ON MATERIAL/PURDOC/SALESDOC FOR DETAILS'
          I_CALLBACK_USER_COMMAND = 'DISPLAYDETAILS'
          IS_LAYOUT               = V_LAYOUT
          IT_FIELDCAT             = VT_FIELDCAT1
        TABLES
          T_OUTTAB                = I_OUT.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    "OUTPUT
    *                         FORM  TOP-OF-PAGE                         *
    FORM TOP-OF-PAGE.
      DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
            WA_HEADER TYPE SLIS_LISTHEADER.
      WA_HEADER-TYP = 'H'.
      WA_HEADER-INFO = 'REPORT FOR : '.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'MATERIAL DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'PURCHASE ORDER DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'SALES ORDER DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          I_LOGO             = 'GEAR'
          IT_LIST_COMMENTARY = T_HEADER.
    ENDFORM.                    "TOP-OF-PAGE
    *&                       FORM  DISPLAYDETAILS                          *
    FORM DISPLAYDETAILS USING UCOMM LIKE SY-UCOMM
          SELFIELD TYPE SLIS_SELFIELD.
      IF SELFIELD-FIELDNAME = 'EBELN'.
        IF UCOMM = '&IC1'.
          READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
          PERFORM PORECDNG.
          CLEAR BDCDATA[].
        ENDIF.
      ELSE.
        IF SELFIELD-FIELDNAME = 'MATNR'.
          IF UCOMM = '&IC1'.
            READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
            PERFORM MMRECDNG.
            CLEAR BDCDATA[].
          ENDIF.
        ELSE.
          IF SELFIELD-FIELDNAME = 'VBELN'.
            IF UCOMM = '&IC1'.
              READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
              PERFORM SALESRECDNG.
              CLEAR BDCDATA[].
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    "DISPLAYDETAILS
    *                     FORM PORECDNG                                   *
    FORM PORECDNG.
      PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0105'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RM06E-BSTNR'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'RM06E-BSTNR'
                                    I_OUT-EBELN.
      PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RM06E-BSTPO(01)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=AH'.
      PERFORM BDC_FIELD       USING 'RM06E-EBELP'
                                    I_OUT-EBELP.
      PERFORM BDC_FIELD       USING 'RM06E-TCSELFLAG(01)'
                                    'X'.
      PERFORM BDC_TRANSACTION USING 'ME23'.
    ENDFORM.                    "PORECDNG
    *                     FORM MMRECDNG                                   *
    FORM MMRECDNG.
      PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RMMG1-MATNR'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'RMMG1-MATNR'
                                    I_OUT-MATNR.
      PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0070'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'MSICHTAUSW-DYTXT(01)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=ENTR'.
      PERFORM BDC_FIELD       USING 'MSICHTAUSW-KZSEL(01)'
                                    'X'.
      PERFORM BDC_TRANSACTION USING 'MM03'.
    ENDFORM.                    "MMRECDNG
    *                     FORM SALESRECDNG                                *
    FORM SALESRECDNG.
      PERFORM BDC_DYNPRO      USING 'SAPMV45A' '0102'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'VBAK-VBELN'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'VBAK-VBELN'
                                    I_OUT-VBELN.
      PERFORM BDC_TRANSACTION USING 'VA03'.
    ENDFORM.                    "SALESRECDNG
    *                  FORM BDC_TRANSACTION                               *
    FORM BDC_TRANSACTION USING TCODE.
      CALL TRANSACTION TCODE USING BDCDATA MODE 'E'.
    ENDFORM.                    "BDC_TRANSACTION
    *                        FORM BDC_DYNPRO                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM = PROGRAM.
      BDCDATA-DYNPRO = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
    *                        INSERT FIELD                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_FIELD
    *&                  FORM  PURCHASEDATA_VALIDATION                      *
    FORM PURCHASEDATA_VALIDATION.
      SELECT EBELN EBELP MATNR
                 FROM EKPO
                 INTO TABLE I_EKPO
                 FOR ALL ENTRIES IN I_MARC
                 WHERE MATNR = I_MARC-MATNR
                 AND EBELN IN S_EBELN
                 AND WERKS EQ P_WERKS.
      IF I_EKPO[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM TABLE EKPO'.
        EXIT.
      ENDIF.
      DATA: T_EKPO LIKE I_EKPO OCCURS 0 WITH HEADER LINE.
      T_EKPO[] = I_EKPO[].
      REFRESH I_EKPO.
      FREE I_EKPO.
      LOOP AT T_EKPO.
        SELECT SINGLE EBELN FROM EKKO INTO EKPO-EBELN
        WHERE EBELN = T_EKPO-EBELN.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING T_EKPO TO I_EKPO.
          APPEND I_EKPO.
          CLEAR I_EKPO.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDLOOP.
      SORT I_EKPO.
    ENDFORM.                    "PURCHASEDATA_VALIDATION
    *&                  FORM  SALESDATA_VALIDATION                         *
    FORM SALESDATA_VALIDATION.
      SELECT VBELN POSNR MATNR
              FROM VBAP
              INTO CORRESPONDING FIELDS OF TABLE
              I_VBAP FOR ALL ENTRIES IN I_MARC
              WHERE MATNR = I_MARC-MATNR.
    IF I_VBAP[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM TABLE VBAP'.
        EXIT.
      ENDIF.
      DATA: T_VBAP LIKE I_VBAP OCCURS 0 WITH HEADER LINE.
      T_VBAP[] = I_VBAP[].
      REFRESH I_VBAP.
      FREE I_VBAP.
      LOOP AT T_VBAP.
        SELECT SINGLE VBELN FROM VBAK INTO VBAK-VBELN
        WHERE VBELN = T_VBAP-VBELN.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING T_VBAP TO I_VBAP.
          APPEND I_VBAP.
          CLEAR I_VBAP.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDLOOP.
      SORT I_VBAP.
    ENDFORM.                    "SALESDATA_VALIDATION

  • How to know that the purchase order link to which inbound delivery ?

    Dear Support ,
    I am looking for one way which can check which purchase order ( only for trading goods ) link to which inbound delivery ....
    Now my way is use the purchase order number as a condiction to check in LIPS table , but i think this is a stupid way , right ?
    In fact , i am writing one report which can show all the Open Purchase Order ( Only for trading goods and already created the inbound delivery & shipment costs ) which can do the MIGO without the problems ....
    Has any way to check it ?
    Many thanks .....
    Best Regards
    Carlos

    PO and inbound delivery link.
    In PO item , Conformation Tab : conf ctrl. if its is active U can GR with inbound delivery only (VL31N)
    and not with MIGO.
    rep
    VL06I - Inbound Delivery Monitor
    V_UC_7 - Incomplete Inbound Deliveries
    VL06I Inbound Delivery Monitor
    VL06IC Confirmation of putaway inb. deliv.
    VL06ID Inbound Deliveries for Distribution
    VL06IF Selection inbound deliveries
    VL06IG Inbound deliveries for goods receip
    VL06IP Inbound deliveries for putaway.
    Go to --Information systems > General report selection > Logistics execution > shipping
    REWGDS

  • Can we create the Purchase order that using P&L account or just using account do not use cost center.

    Dear Experts,
    Could you please advise :
    1) Can we create the purchase order that using profit and loss account ? ( if yes , which kind of account assignment category we should use ?)
    2) How to create a purchase order for service charge .( just using GL account )
    Thanks & Best Regards,
    Watson

    Hi,
       May I know why you do not use cost center for consumption?
       You may create a new account assignment category in OME9 by copying K and maintain the cost center as optional. Please note that you have to maintain the item category blank and the account assignment category combination in OMG0. Now, you can use a GL account in PO which doesnt require a cost center assignment (in OBC4 against the field status group of the GL)
       You may use the same account assignment category created in the previous step with item category D, after you maintain the combination of the account assignment with item category D in OMG0.
        Please test the scenario and revert back.
    Regards,
    AKPT

  • Printing persons authorised to process the purchase order

    dear friends,
                        my requirement is I have to print all the names of persons who involved in purchase order processing i.e. we have some hairarcy to process the purchase order like jr. manager ,sr. manager, AGM, GM based on the worth of that PO. I have to print the names of all above managers at the bottom of PO. plz help me.
    regards,
    Srinivas.

    Hi Faheem,
       Thanks very much for your help. Your idea really works, but other problem occurs if we use this idea. If we issue an error message in EXIT_SAPMM06E_013 to prevent PO from being holding, all the PO data ( include header and items etc,) are cleared by program.
    At last, we negotiated with users and take a non-program step to prevent the PO from being hoding.
    Thanks.
    Joe
    Edited by: Gangrong Chen on Dec 7, 2010 10:45 AM

  • Is there an unlimited music download package that can be purchased or do all downloads have to be bought individually?

    Is there an unlimited music download package that can be purchased or do all downloads have to be bought individually?

    There is no subscription model for iTunes. You purchase the songs you want individually.
    (58812)

  • To SET -UP message type 5 External Send to the purchase order approver

    Hi All
    Please help me to To SET -UP message type 5 External Send to the purchase order approver
    Susan

    Susan,
    This to me sounds like a release strategy setup using workflow. Could you please set up Release strategies initially and and then the workflow part couldd  be handled by a workflow personnel.
    Else, Setup teh message type with medium 7, and partner function MP, put the user name in the partner field. Go to communication method, choose the recipient type and fiull other required parameters and you should be set.
    Edited by: Pavan Kumar on Apr 6, 2010 12:27 PM

  • At which level is the purchase order history kept?

    Dear Gurus,
    At which level is the purchase order history kept?
    thanks..

    No ...its generated per purchasing doc/ PO number...
    You can also check the supporting link:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/75/ee0e1d55c811d189900000e8322d00/frameset.htm
    Regards
    Priyanka.P

  • Shipping tab is getting poplated in the Purchase order (STO Process)

    HI Friends,
    In Stock transfer order processs the shipping tab is getting poplated in the purchase order
    I am using the docuemnt type UB Stock transfer order .
    Error message: Not possible to determine shipping data for material "460000295"
    Thanks,
    Phani

    Refer following SDN threads for reference/understanding for your requirement:
    - STO - Not possible to Determine Shipping Data for Material.
    - STO-Not possible to determine shipping data for material 1A0135J00VB-00M
    - ERROR"Not possible to determine shipping data for material XXX"
    - Not possible to determine shipping data for material
    Regards
    JP

  • How to cancel approved (draft) purchase order prior to adding it

    Please help with this scenario..... We have a purchase order approval in place for service purchase orders. User entered one line of PO correct and then on second line, entered something in description but did not enter GL account code.
    Purchase order followed approval stage and is now approved, however since PO line does not have GL account we receive error regarding missing GL account.
    Problem is now that PO is approved we cannot update it and we also cannot cancel the purchase order draft since it is approved.
    What do we do??

    Hi Keith,
    I'm afraid it is not possible to delete a document which has been going through the approval process.
    What you can do is to add the PO and then cancel it.

  • Retrieve the Purchase Order Condition Records Table

    Hallo!
    I have found this code right here:
    http://www.sap-basis-abap.com/sapab025.htm
    It is very useful particular for purposes which I need. Please can somebody
    try to fix the error to get it working. There is an internal table missing.
    Regards
    Ilhan
    Retrieve the Purchase Order Condition Records Table
    select * from ekko.
           select * from konv where knumv = ekko-knumv
               "Get all the condition records for the purchase order
           endselect.
    endselect.
    * Get the info record conditions record
    * First declare the record structure for the key
    data: begin of int_konp,
                 txt1(5),
                 lifnr(5),
                 matnr(18),
                 txt2(4),
                 txt3(1),
            end of int_konp.
    clear: konh, konp, int_konp.
    * data for the record key konh-vakey
    int_konp-txt1    = '00000'.
    int_konp-lifnr    = ekko-lifnr+5(5).
    int_konp-matnr = ekpo-matnr(18).
    int_konp-txt2    = 'ALL'.
    int_konp-werks = ekpo-werks.
    int_konp-txt3    = '0'.
    select * from konh where      kschl = 'PB00'            "Conditions (Header)
                                         and datab => p_datum.       "valid from date
          if konh-vakey = int_konp.                                  "Conditions (Item)
                 select single * from konp where knumh = konh-knumh.
                 continue.
          endif.
    endselect.

    Hi flora
    Just get through the sequence .
    see the table fields ...
    1. From EKKO table take an entry which is having pricing conditions.
    Now in the fields list check out for field EKKO-KNUMV(document condition number).
    2.Take this condition number and now goto table KONV.
    Give the document condition number in the field  KONV-KNUMV and execute .
    This will lead to a list of document condition numbers and some other fields .
    3.Now check for field KONV-KNUMH ,KONV-KAWRT(quantity) and note the value KONV-KWERT  .
    (Remember this is at header level).
    This is ur condition record number.
    **comments
    Now from document condition number we got the condition record number (KNUMH).
    4. now since u want the item level tax procedure go to table KONP and give the condition record number and execute .
    This will give u a list of details .
    Now concentrate on KONV-KAWRT (scale quantity) KONP-KBETR(rate) as this table will store “Pricing  per UNIT “ so product of these two will give u the total pricing tax, for a particular condition type say PR00  .
    For that particular condition item .
    Check the pricing procedure .
    See t-code VK13 and check the pricing procedure .
    From me23 check the same PO num select the item and check the pricing conditions applicable .
    Select a particular pricing and goto condition->analysis->analysis pricing  ,
    Better take help of a SD functional consultant in the process.
    regards,
    vijay.

  • PO not visible in the Purchase Orders screen

    Hi All,
    There is a Purchase Order which we are not able to view in the 'Purchase Orders' screen. The PO status is 'IN PROCESS'. The PO is visible in the Purchase Orders Summary screen. Need to do some changes to the PO. Can you please let me know the exact cause for the issue.
    Regards,
    Radhika.

    There are times that documents may go into In Process - due to workflow setbacks.
    Please use the script POXRESPO.sql for these situations.
    The script resides in $PO_TOP/sql.
    You can also obtain it from the following patch -
    Patch 9072294 - Oracle Purchasing Reset PO script was giving a 'ORA-01476: DIVISOR IS EQUAL TO ZERO' Error.
    The script will handle most scenarios and can also take action to save the action history or remove it - but more importantly considers budgetary implications
    if Encumbrance is turned on in the system.
    The script given previous is not recommended.
    Regards,
    Mike

  • Material Statuses based on the Purchase order Document type

    Hi Experts,
    We need to maintain the Plant material status based on the purchase order document type.
    Example - If I am using NB for normal purchase orders and ZB for STO procurement then, there should be a material status which should give warning message - 'do not use ' for ZB STO purchase orders and it should allow to create NB purchase orders for that same materials.
    Please advise what are the possibilities?
    Thanks
    Regards
    MM

    Hi Gurus,
    Thank you for  your reply, Please find my replies below
    @@ - Mallinath - We need this restrictions for some type of materials ( with specific Material types) which should not be procured through inter company STO process, buying plant should use the normal purchase. for other Material types they should be able to use the inter company STO process.
    @@ DEV - We are already using the Spl. Procurement keys for inter company STO process.
    Example - Material type ZXYX should not use the inter company STO process, but it should be allowed all other processes.
    Please advise how we can control this process?
    Thanks
    Regards
    Raja

  • To enable filtering the Purchase Orders based on Purchasing Group in Issue

    Hi All,
    We are facing one issue
    Currently we are working with Extended Classic Scenario with SRM 5.0 and support pack 11
    If the buyer uses Issue PO transaction in SRM, there are POs from all the buyers.
    There is no filter to allow the buyer to display only POs relevant for his/her Purchasing group.
    To enable filtering the Purchase Orders based on Purchasing Group in Issue Purchase Order transction, we found one
    OSS note : 1162884 - BBP_PPF: Purchasing group as search criteria for PO
    But we found that this oss note is not applicable for our system version
    Could you please help me to resolve this issue by any suggestion or by any other oss note?
    Thanks
    Snehal

    Hi Snehal,
    There is a easy way to do that.
    Go to buyer role in PFCG transaction and look for profile and go inside profile ...look for your transaction...
    for Process PO  transaction -  BBP_PD_PO and you have field BBP_PURGRP...using which you can restrict it on purchasing group..
    You may have to copy same role and create new roles based on purchasing group..
    I feel that basis or Security and Authorization team can help you in this matter.
    Regards,Nishant

Maybe you are looking for

  • How to publish a Crystal Report in Business One

    Hi Please can anyone tell me how I publish a Crystal report (which is now inbuilt in SAP B1) so it is available to all users?  I have full administrator/manager user rights. I have so far created the report and saved it to my SAP server machine on it

  • JMS dynamic queue time out

    I need to create a JMS dynamic queue and wait to listen in that queue for say 5 secs. Can anyone explain how this works. i.e I want to know what will happen after 5 secs. Will I receive a JMS Message object which is null or it will throw some excepti

  • Finder not opening in dock

    When i click the finder application in my dock, it wont open... What do i do?

  • Problem  in Subtype Creation

    Prb 1  >    Whenver  we are creating the Subtype then it is   Compalsoury  that   to Copy the Standard Bus to  Customised Bus ( i.e  Z Bus )  and then Creating  Subtype ?   Or  We can  Directly   Create Subtype  for  Standard Bus  .    Please Provide

  • I restored from a Time Machine back up and now my Creative Suite 4 gives me error 150:30

    I have the same problem when I migrated CS4 to a new Retina MacBook Pro from a Time Machine drive. I get Error: 150:30 when I try to launch Photoshop CS4. The License Recovery Tool does not seem to work with Mountain Lion. I cannot reinstall the soft