REPORT ZVVF_CR017_DESTRUCTIONREP .
*---------------------------------------------------------------------*
*REPORT ZVVF_CR017_DESTRUCTIONREP *
* *
*---------------------------------------------------------------------*
* *
* MODULE : Production Planning *
* *
*---------------------------------------------------------------------*
* Objective : Report for Destruction of P.M. rejected during *
* On-Line Rejection *
* *
* *
* Program : Update Tables( ) Download Data( ) Outputs List (X) *
* Technical Specs No : *
* Date Created : *
* Author : *
* Location : *
* LDB : *
*---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Type-pools
*----------------------------------------------------------------------*
TYPE-POOLS : SLIS.
*---------------------------------------------------------------------*
* Tables *
*---------------------------------------------------------------------*
TABLES : T001W,
AFKO.
*----------------------------------------------------------------------*
* Types Begin with TY_ *
*----------------------------------------------------------------------*
TYPES : BEGIN OF TY_MSEG,
MBLNR LIKE MSEG-MBLNR,
MATNR LIKE MSEG-MATNR,
CHARG LIKE MSEG-CHARG,
AUFNR LIKE MSEG-AUFNR,
END OF TY_MSEG.
TYPES : BEGIN OF TY_MSEG1,
MATNR LIKE MSEG-MATNR,
CHARG LIKE MSEG-CHARG,
WERKS LIKE T001W-WERKS,
MBLNR LIKE MSEG-MBLNR,
EBELN LIKE MSEG-EBELN,
LIFNR LIKE MSEG-LIFNR,
NAME1 LIKE T001W-NAME1,
BUDAT LIKE MKPF-BUDAT,
END OF TY_MSEG1.
TYPES : BEGIN OF TY_MAIN,
MBLNR LIKE MSEG-MBLNR,
MATNR LIKE MSEG-MATNR,
CHARG LIKE MSEG-CHARG,
GRUND LIKE MSEG-GRUND,
ERFMG LIKE MSEG-ERFMG,
ERFME LIKE MSEG-ERFME,
BUDAT LIKE MKPF-BUDAT,
MAKTX LIKE MAKT-MAKTX,
EBELN LIKE MSEG-EBELN,
LIFNR LIKE MSEG-LIFNR,
NAME1 LIKE LFA1-NAME1,
BUDAT1 LIKE MKPF-BUDAT,
GRTXT LIKE T157E-GRTXT,
END OF TY_MAIN.
TYPES : BEGIN OF TY_T157E,
GRUND LIKE T157E-GRUND,
GRTXT LIKE T157E-GRTXT,
END OF TY_T157E.
*---------------------------------------------------------------------*
* INTERNAL TABLE Begin with IT_ *
*---------------------------------------------------------------------*
DATA : IT_MSEG TYPE STANDARD TABLE OF TY_MSEG WITH HEADER LINE.
DATA : IT_MAIN TYPE STANDARD TABLE OF TY_MAIN WITH HEADER LINE.
DATA : IT_MSEG1 TYPE STANDARD TABLE OF TY_MSEG1 WITH HEADER LINE.
DATA : IT_T157E TYPE STANDARD TABLE OF TY_T157E WITH HEADER LINE.
*---------------------------------------------------------------------*
* WORK AREAS Begin with WA_ *
*---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Constants Begin with C_ *
*----------------------------------------------------------------------*
*---------------------------------------------------------------------*
* Data Variables Begin with W_ *
*---------------------------------------------------------------------*
DATA : WA_MAIN LIKE LINE OF IT_MAIN.
DATA : W_CHARG LIKE AFPO-CHARG,
W_MATNR LIKE AFPO-MATNR,
W_MAKTX LIKE MAKT-MAKTX,
W_NAME1 LIKE T001W-NAME1,
W_TEXT1(20) TYPE C,
W_TEXT1_1(20) TYPE C,
W_TEXT2(65) TYPE C,
W_TEXT2_2(65) TYPE C,
W_TEXT3_3(65) TYPE C,
W_TEXT3(65) TYPE C,
w_text4_4(65) type c.
*--------FOR ALV
DATA : W_FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
W_LAYOUT TYPE SLIS_LAYOUT_ALV,
W_LISTHEADER TYPE SLIS_T_LISTHEADER,
W_EVENTS TYPE SLIS_T_EVENT,
W_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
W_REPID TYPE SY-REPID.
DATA : W_INFO(65) TYPE C VALUE 'DESTRUCTION REPORT FOR ON-LINE REJECTION',
W_INFO1(65) TYPE C ,
W_INFO2(65) TYPE C ,
W_INFO3(65) TYPE C ,
W_INFO4(65) TYPE C ,
W_INFO5(65) TYPE C ,
W_INFO6(65) TYPE C .
*---------------------------------------------------------------------*
* parameters Begin with PR_ *
*---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN : SKIP 1.
PARAMETERS : PR_WERKS LIKE T001W-WERKS OBLIGATORY,
PR_AUFNR LIKE AFKO-AUFNR OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
*---------------------------------------------------------------------*
* Select-options Begin with SO_ *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* INITIALIZATION *
*---------------------------------------------------------------------*
INITIALIZATION.
W_REPID = SY-REPID.
PERFORM F003_EVENTTAB_BUILD_TEMP USING W_EVENTS[].
*---------------------------------------------------------------------*
* AT SELECTION-SCREEN output.
*---------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT .
*---------------------------------------------------------------------*
* At selection screen *
*---------------------------------------------------------------------*
AT SELECTION-SCREEN.
PERFORM F001_VALIDATE.
*---------------------------------------------------------------------*
* START-OF-SELECTION *
*---------------------------------------------------------------------*
START-OF-SELECTION .
PERFORM F004_FIELDCAT_INIT.
PERFORM F002_GET_DATA.
PERFORM F005_DISPLAY_DATA USING W_LISTHEADER[].
*---------------------------------------------------------------------*
* END-OF-SELECTION *
*---------------------------------------------------------------------*
END-OF-SELECTION.
PERFORM F006_DISPLAY_LIST.
*----------------------------------------------------------------------*
* TOP-OF-PAGE *
*----------------------------------------------------------------------*
TOP-OF-PAGE.
*----------------------------------------------------------------------*
* END-OF-PAGE *
*----------------------------------------------------------------------*
END-OF-PAGE.
*&---------------------------------------------------------------------*
*& Form F001_VALIDATE
*&---------------------------------------------------------------------*
FORM F001_VALIDATE .
DATA : LW_MBLNR LIKE MSEG-MBLNR.
SELECT MBLNR MATNR CHARG AUFNR
FROM MSEG
INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
WHERE WERKS = PR_WERKS AND
AUFNR = PR_AUFNR AND
BWART = '262'.
IF SY-SUBRC NE 0.
MESSAGE E000(ZVVF_CR017_MESSAGE).
ENDIF.
SORT IT_MSEG BY MBLNR DESCENDING.
READ TABLE IT_MSEG INDEX 1.
LW_MBLNR = IT_MSEG-MBLNR.
LOOP AT IT_MSEG.
IF IT_MSEG-MBLNR NE LW_MBLNR.
DELETE IT_MSEG.
ENDIF.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM IT_MSEG COMPARING MBLNR MATNR CHARG.
SELECT SINGLE CHARG MATNR INTO (W_CHARG,W_MATNR)
FROM AFPO
WHERE AUFNR = PR_AUFNR.
IF SY-SUBRC = 0.
SELECT SINGLE MAKTX INTO W_MAKTX
FROM MAKT
WHERE MATNR = W_MATNR.
ENDIF.
SELECT SINGLE NAME1 INTO W_NAME1
FROM T001W
WHERE WERKS = PR_WERKS.
CONCATENATE 'Plant Code : ' PR_WERKS INTO W_INFO1.
CONCATENATE 'Plant Name : ' W_NAME1 INTO W_INFO2.
SHIFT PR_AUFNR LEFT DELETING LEADING '0'.
CONCATENATE 'Order Number : ' PR_AUFNR INTO W_INFO3.
CONCATENATE 'Batch Number of Order : ' W_CHARG INTO W_INFO4.
SHIFT W_MATNR LEFT DELETING LEADING '0'.
CONCATENATE 'Material : ' W_MATNR INTO W_INFO5.
CONCATENATE 'Material Description : ' W_MAKTX INTO W_INFO6.
CONCATENATE 'Prepared By :' W_TEXT1 INTO W_TEXT1.
CONCATENATE 'Recommended By :' W_TEXT2 INTO W_TEXT2.
CONCATENATE 'Destroyed By :' W_TEXT3 INTO W_TEXT3.
CONCATENATE 'Production Dept' W_TEXT1_1 INTO W_TEXT1_1.
CONCATENATE 'Accounts Dept' W_TEXT2_2 INTO W_TEXT2_2.
CONCATENATE 'Security Dept' W_TEXT3_3 INTO W_TEXT3_3.
CONCATENATE 'Q.C/Q.A.Dept' W_TEXT4_4 INTO W_TEXT4_4.
ENDFORM. " F001_VALIDATE
*&---------------------------------------------------------------------*
*& Form F002_GET_DATA
*&---------------------------------------------------------------------*
FORM F002_GET_DATA .
DATA : LW_MBLNR LIKE MSEG-MBLNR.
SELECT MS~MBLNR MS~MATNR MS~CHARG MS~GRUND MS~ERFMG MS~ERFME
MK~BUDAT
MA~MAKTX
INTO CORRESPONDING FIELDS OF TABLE IT_MAIN
FROM MSEG AS MS INNER JOIN
MKPF AS MK ON MS~MBLNR = MK~MBLNR
INNER JOIN
MAKT AS MA ON MS~MATNR = MA~MATNR
FOR ALL ENTRIES IN IT_MSEG
WHERE MS~MATNR = IT_MSEG-MATNR AND
MS~CHARG = IT_MSEG-CHARG AND
WERKS = PR_WERKS AND
BWART = '344' AND
XAUTO NOT IN ('X','S','U','L','M','W','F').
SORT IT_MAIN BY MBLNR DESCENDING.
READ TABLE IT_MAIN INDEX 1.
LW_MBLNR = IT_MAIN-MBLNR.
LOOP AT IT_MAIN.
IF IT_MAIN-MBLNR NE LW_MBLNR.
DELETE IT_MAIN.
ENDIF.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM IT_MAIN COMPARING MBLNR MATNR CHARG.
SELECT GRUND GRTXT INTO CORRESPONDING FIELDS OF TABLE IT_T157E
FROM T157E
FOR ALL ENTRIES IN IT_MAIN
WHERE GRUND = IT_MAIN-GRUND AND
BWART = '344' AND
SPRAS = 'E'.
LOOP AT IT_MAIN INTO WA_MAIN.
READ TABLE IT_T157E WITH KEY GRUND = IT_MAIN-GRUND.
IF SY-SUBRC = 0.
WA_MAIN-GRTXT = IT_T157E-GRTXT.
MODIFY IT_MAIN FROM WA_MAIN TRANSPORTING GRTXT.
ENDIF.
ENDLOOP.
SELECT MS~MATNR MS~CHARG MS~WERKS MS~MBLNR MS~EBELN MS~LIFNR
TW~NAME1
MK~BUDAT
INTO CORRESPONDING FIELDS OF TABLE IT_MSEG1
FROM MSEG AS MS INNER JOIN
LFA1 AS TW ON MS~LIFNR = TW~LIFNR
INNER JOIN
MKPF AS MK ON MS~MBLNR = MK~MBLNR
FOR ALL ENTRIES IN IT_MAIN
WHERE MATNR = IT_MAIN-MATNR AND
CHARG = IT_MAIN-CHARG AND
MS~WERKS = PR_WERKS AND
BWART IN ('101','105').
LOOP AT IT_MAIN INTO WA_MAIN.
READ TABLE IT_MSEG1 WITH KEY MATNR = IT_MAIN-MATNR CHARG = IT_MAIN-CHARG WERKS = PR_WERKS.
IF SY-SUBRC = 0.
WA_MAIN-EBELN = IT_MSEG1-EBELN.
WA_MAIN-LIFNR = IT_MSEG1-LIFNR.
WA_MAIN-NAME1 = IT_MSEG1-NAME1.
WA_MAIN-BUDAT1 = IT_MSEG1-BUDAT.
MODIFY IT_MAIN FROM WA_MAIN TRANSPORTING EBELN LIFNR NAME1 BUDAT1.
ENDIF.
ENDLOOP.
PERFORM F007_LEADING_ZEROS.
ENDFORM. " F002_GET_DATA
*&---------------------------------------------------------------------*
*& Form F003_EVENTTAB_BUILD_TEMP
*&---------------------------------------------------------------------*
FORM F003_EVENTTAB_BUILD_TEMP USING RT_EVENTS TYPE SLIS_T_EVENT.
DATA : LW_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE INTO LW_EVENT.
IF SY-SUBRC = 0.
MOVE W_TOP_OF_PAGE TO LW_EVENT-FORM.
APPEND LW_EVENT TO RT_EVENTS.
ENDIF.
ENDFORM. " F003_EVENTTAB_BUILD_TEMP
*&---------------------------------------------------------------------*
*& Form F004_FIELDCAT_INIT
*&---------------------------------------------------------------------*
FORM F004_FIELDCAT_INIT .
DATA : LW_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'MATNR'.
LW_FIELDCAT-SELTEXT_M = 'Material No'.
LW_FIELDCAT-OUTPUTLEN = 18.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'MAKTX'.
LW_FIELDCAT-SELTEXT_M = 'Material Description'.
LW_FIELDCAT-OUTPUTLEN = 40.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'BUDAT'.
LW_FIELDCAT-SELTEXT_M = 'Date of Rejection'.
LW_FIELDCAT-OUTPUTLEN = 10.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'ERFMG'.
LW_FIELDCAT-SELTEXT_M = 'Qty in UOE'.
LW_FIELDCAT-OUTPUTLEN = 13.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'ERFME'.
LW_FIELDCAT-SELTEXT_M = 'Unit of Entry'.
LW_FIELDCAT-OUTPUTLEN = 5.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'CHARG'.
LW_FIELDCAT-SELTEXT_M = 'Batch No'.
LW_FIELDCAT-OUTPUTLEN = 10.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'EBELN'.
LW_FIELDCAT-SELTEXT_M = 'Purchase Order No'.
LW_FIELDCAT-OUTPUTLEN = 13.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'LIFNR'.
LW_FIELDCAT-SELTEXT_M = 'Vendor'.
LW_FIELDCAT-OUTPUTLEN = 10.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'NAME1'.
LW_FIELDCAT-SELTEXT_M = 'Vendor Name'.
LW_FIELDCAT-OUTPUTLEN = 40.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'BUDAT1'.
LW_FIELDCAT-SELTEXT_M = 'GR Date'.
LW_FIELDCAT-OUTPUTLEN = 10.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'GRUND'.
LW_FIELDCAT-SELTEXT_M = 'Reason Code'.
LW_FIELDCAT-OUTPUTLEN = 4.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = 'GRTXT'.
LW_FIELDCAT-SELTEXT_M = 'Reason Text'.
LW_FIELDCAT-OUTPUTLEN = 40.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
CLEAR LW_FIELDCAT.
LW_FIELDCAT-FIELDNAME = ''.
LW_FIELDCAT-SELTEXT_M = 'Remarks'.
LW_FIELDCAT-OUTPUTLEN = 40.
APPEND LW_FIELDCAT TO W_FIELDCATALOG.
ENDFORM. " F004_FIELDCAT_INIT
*&---------------------------------------------------------------------*
*& Form F005_DISPLAY_DATA
*&---------------------------------------------------------------------*
FORM F005_DISPLAY_DATA USING GT_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA : LW_LISTHEADER TYPE SLIS_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'H'.
LW_LISTHEADER-INFO = W_INFO.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_INFO1.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_INFO2.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_INFO3.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_INFO4.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_INFO5.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_INFO6.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_TEXT1.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_TEXT2.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_TEXT3.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_TEXT1_1.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_TEXT2_2.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_TEXT3_3.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
CLEAR LW_LISTHEADER.
LW_LISTHEADER-TYP = 'S'.
LW_LISTHEADER-INFO = W_TEXT4_4.
APPEND LW_LISTHEADER TO GT_LISTHEADER.
ENDFORM. " F005_DISPLAY_DATA
*&---------------------------------------------------------------------*
*& Form F006_DISPLAY_LIST
*&---------------------------------------------------------------------*
FORM F006_DISPLAY_LIST .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = W_REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
I_BACKGROUND_ID = 'ALV_BACKGROUND'
* I_GRID_TITLE =
* I_GRID_SETTINGS =
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = W_FIELDCATALOG[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
IT_EVENTS = W_EVENTS[]
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_MAIN
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " F006_DISPLAY_LIST
*&--------------------------------------------------------------------*
*& Form TOP_OF_PAGE
*&--------------------------------------------------------------------*
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = W_LISTHEADER
I_LOGO = ' '.
ENDFORM. "top_of_page_db
*&---------------------------------------------------------------------*
*& Form F007_LEADING_ZEROS
*&---------------------------------------------------------------------*
FORM F007_LEADING_ZEROS .
LOOP AT IT_MAIN INTO WA_MAIN.
SHIFT WA_MAIN-MATNR LEFT DELETING LEADING '0'.
SHIFT WA_MAIN-LIFNR LEFT DELETING LEADING '0'.
MODIFY IT_MAIN FROM WA_MAIN TRANSPORTING MATNR LIFNR.
ENDLOOP.
ENDFORM. " F007_LEADING_ZEROS
No comments:
Post a Comment