Production orders – Exits (Bapi, screens…)

Production orders – Exits (Bapi, screens…)

Before save
Header customer screen
Operations


Before save

SMOD Enhancement (Extension) : PPCO0007
FM : EXIT_SAPLCOZV_001
Include : ZXCO1U06


FUNCTION EXIT_SAPLCOZV_001.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"       IMPORTING
*"             VALUE(HEADER_IMP) LIKE  CAUFVD STRUCTURE  CAUFVD
*"       EXPORTING
*"             VALUE(NO_UPDATE) LIKE  SY-DATAR
*"             VALUE(HEADER_EXP) LIKE  CAUFVD STRUCTURE  CAUFVD
*"----------------------------------------------------------------------
  INCLUDE ZXCO1U06 .

ENDFUNCTION.

Update fields you want to change in HEADER_EXP structure.
This concerns only header fields.

To get the list of operations in this exit, you can use something like below code :


  TYPES: BEGIN OF ts_afvg.
           INCLUDE TYPE afvgb.
           TYPES:  indold TYPE sy-tabix,
         END OF ts_afvg,
         ti_afvg TYPE STANDARD TABLE OF ts_afvg.

  FIELD-SYMBOLS : <fs_table_afvg> TYPE ti_afvg.

  ASSIGN ('(SAPLCOBO)AFVG_BT[]') TO  <fs_table_afvg>. " Operation list
    IF <fs_table_afvg> IS ASSIGNED.
      " Your process
    ENDIF.


Header customer screen

Screen exit

Function group : XCO1
Dynpro number : 0100

To add this screen 0100 in a new tab of production order header info, go to transaction SMOD with PPCO0012 enhancement, select Components :

To get more info, check this post : To add a custom tab page in the production order Header Screen.

PBO exit

SMOD Enhancement (Extension) : PPCO0012
FM : EXIT_SAPLCOKO1_001
Include : ZXCO1U11

PAI exit

SMOD Enhancement (Extension) : PPCO0012
FM : EXIT_SAPLCOKO1_002
Include : ZXCO1U12


Operations

Operation changed

SMOD Enhancement (Extension) : PPCO0019
FM : EXIT_SAPLCOVG_001
Include : ZXCO1U19


FUNCTION EXIT_SAPLCOVG_001.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(IS_HEADER) LIKE  CAUFVD STRUCTURE  CAUFVD
*"     VALUE(IS_OPERATION_NEW) LIKE  AFVGD STRUCTURE  AFVGD
*"     VALUE(IS_OPERATION_OLD) LIKE  AFVGD STRUCTURE  AFVGD
*"     VALUE(I_FCODE) LIKE  T185F-FCODE
*"     VALUE(I_MARKED) LIKE  RC27X-FLG_SEL
*"  CHANGING
*"     REFERENCE(C_AKTYP) LIKE  RC27S-AKTYP OPTIONAL
*"  EXCEPTIONS
*"      NO_CHANGES_ALLOWED
*"----------------------------------------------------------------------
  INCLUDE ZXCO1U19 .

ENDFUNCTION.

Search tag : Prod, prodord, prodorder

About the author

fjourneau administrator

Hi, I'm Florian Journeau, SAP ABAP R3 Freelance, based in Toulouse, France. You want to know more about me, have a look on my CV : cv.fjourneau.net.

Leave a Reply