*&---------------------------------------------------------------------*
*& Report ZVVF_ANNUXURE_NEW *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT ZVVF_ANNUXURE_NEW LINE-SIZE 300 .
*------------------------------------------------*
Tables : VBRK.
*------------------------------------------------*
*------------------------------------------------*
*Select-options vbeln for vbrk-vbeln.
*------------------------------------------------*
*---------Internal Tables------------------------*
Data : BEGIN OF IT_VBRK OCCURS 0,
VBELN LIKE VBRK-VBELN,
FKDAT LIKE VBRK-FKDAT,
END OF IT_VBRK.
DATA : BEGIN OF IT_VBRP OCCURS 0,
VBELN LIKE VBRP-VBELN,
VGBEL LIKE VBRP-VGBEL,
MATNR LIKE VBRP-MATNR,
ERDAT LIKE VBRP-ERDAT,
FKLMG LIKE VBRP-FKLMG,
MVGR3 LIKE VBRP-MVGR3,
POSNR LIKE VBRP-POSNR,
BSARK LIKE VBKD-BSARK,
AUBEL LIKE VBRP-AUBEL,
WERKS LIKE VBRP-WERKS,
*MATNR LIKE VBRP-MATNR,
LFIMG LIKE LIPS-LFIMG,
VRKME LIKE LIPS-VRKME,
FKDAT LIKE VBRK-FKDAT,
KUNAG LIKE VBRK-KUNAG,
NAME1 LIKE ADRC-NAME1,
STREET LIKE ADRC-STREET,
STR_SUPPL1 LIKE ADRC-STR_SUPPL1,
STR_SUPPL2 LIKE ADRC-STR_SUPPL2,
CITY1 LIKE ADRC-CITY1,
REGION LIKE ADRC-REGION,
POST_CODE1 LIKE ADRC-POST_CODE1,
J_1IEXRG LIKE J_1IMOCUST-J_1IEXRG,
J_1IEXCO LIKE J_1IMOCUST-J_1IEXCO,
J_1IEXDI LIKE J_1IMOCUST-J_1IEXDI,
J_1IEXCD LIKE J_1IMOCUST-J_1IEXCD,
END OF IT_VBRP.
DATA : IT_VBRP1 LIKE IT_VBRP OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF IT_LIPS OCCURS 0,
LFIMG LIKE LIPS-LFIMG,
VRKME LIKE LIPS-VRKME,
END OF IT_LIPS.
DATA: BEGIN OF IT_DATA OCCURS 0,
MATNR LIKE VBRP-MATNR,
FKLMG LIKE VBRP-FKLMG,
VRKME LIKE VBRP-VRKME,
BSARK LIKE VBKD-BSARK,
MVGR3 LIKE VBRP-MVGR3,
AUBEL LIKE VBRP-AUBEL,
VGBEL LIKE VBRP-VGBEL,
END OF IT_DATA.
DATA: BEGIN OF IT_DATA1 OCCURS 0,
VGBEL LIKE VBRP-VGBEL,
MATNR LIKE VBRP-MATNR,
FKLMG LIKE VBRP-FKLMG,
VRKME LIKE VBRP-VRKME,
BSARK LIKE VBKD-BSARK,
MVGR3 LIKE VBRP-MVGR3,
AUBEL LIKE VBRP-AUBEL,
END OF IT_DATA1.
DATA: BEGIN OF IT_DATA3 OCCURS 0,
VGBEL LIKE VBRP-VGBEL,
NO_PACK(150),
END OF IT_DATA3.
Data : IT_TABLE LIKE ZIT_TABLE OCCURS 0 WITH HEADER LINE.
*DATA : WA TYPE ZIT_TABLE.
**---------Internal Tables------------------------*
*-------DATA VARIABLES------------------------------*
DATA : W_LFIMG LIKE LIPS-LFIMG.
DATA : W_MATNR LIKE VBRP-MATNR.
DATA : W_AUBEL LIKE VBRP-AUBEL.
DATA : W_FKDAT LIKE VBRK-FKDAT.
DATA : W_ERDAT LIKE VBRP-ERDAT.
DATA : W_MVGR3 LIKE VBRP-MVGR3.
DATA : W_BSARK LIKE VBKD-BSARK.
DATA : W_WERKS LIKE VBRP-WERKS.
DATA : W_VRKME LIKE VBRP-VRKME.
DATA : W_KUNAG LIKE VBRK-KUNAG.
DATA : W_ADRNR LIKE KNA1-ADRNR.
DATA : W_NAME1 LIKE ADRC-NAME1,
W_NAME2 LIKE ADRC-NAME2,
W_STREET LIKE ADRC-STREET,
W_STR_SUPPL1 LIKE ADRC-STR_SUPPL1,
W_STR_SUPPL2 LIKE ADRC-STR_SUPPL2,
W_CITY1 LIKE ADRC-CITY1,
W_REGION LIKE ADRC-REGION,
W_BEZEI LIKE T005U-BEZEI,
W_POST_CODE1 LIKE ADRC-POST_CODE1,
W_J_1IEXRG LIKE J_1IMOCUST-J_1IEXRG,
W_J_1IEXCO LIKE J_1IMOCUST-J_1IEXCO,
W_J_1IEXDI LIKE J_1IMOCUST-J_1IEXDI,
W_J_1IEXCD LIKE J_1IMOCUST-J_1IEXCD.
.
*------------------------------------------*
*tEXT id
DATA : BEGIN OF ST_LINE OCCURS 0,
TDFORMAT LIKE TLINE-TDFORMAT,
TDLINE LIKE TLINE-TDLINE,
END OF ST_LINE.
DATA :TEMP LIKE THEAD-TDNAME.
data : bnd_text like tline-tdline.
data : SRP_text like tline-tdline.
data : INV_text like tline-tdline.
data : EXC_text like tline-tdline.
data : EXC_text1 like tline-tdline.
data : CEX_text like tline-tdline.
data : CEX_text1 like tline-tdline.
DATA : Z_BSARK LIKE VBKD-BSARK.
DATA : QTY LIKE VBRP-FKIMG.
DATA : QTY1 LIKE VBRP-FKIMG.
DATA : TOT_QTY LIKE VBRP-FKIMG.
DATA : OUT_FKIMG LIKE VBRP-FKIMG.
DATA : FLAG TYPE I.
DATA : FLAG1 TYPE I.
DATA : COUNT TYPE I.
DATA : TXT_COUNT(2) .
DATA : QTY_TEXT LIKE MAKT-MAKTX.
DATA : QTY_TEXT1 LIKE MAKT-MAKTX.
DATA : NO_PACKGS LIKE MARA-WRKST.
DATA : LAST_TEXT LIKE MAKT-MAKTX.
DATA : TMP_TEXT LIKE MAKT-MAKTX.
*-------DATA VARIABLES------------------------------*
*--attaching to output type---------------------------*
*---------VARIABLES--------------------------*
*DATA :TEMP LIKE THEAD-TDNAME.
DATA : TEMP1(50).
DATA : RETCODE LIKE SY-SUBRC.
DATA: XSCREEN(1) TYPE C. "Output on printer or screen
DATA: REPEAT(1) TYPE C.
DATA : LF_FORMNAME TYPE TDSFNAME.
DATA : LF_FM_NAME TYPE RS38L_FNAM.
**-------------------------------------------*
INCLUDE ZVVF_RVADTABL.
**-------------------------------------------*
* FORM ENTRY
**-------------------------------------------*
FORM ENTRY USING RETURN_CODE US_SCREEN.
CLEAR RETCODE.
XSCREEN = US_SCREEN.
PERFORM PROCESSING USING US_SCREEN.
CASE RETCODE.
WHEN 0.
RETURN_CODE = 0.
WHEN 3.
RETURN_CODE = 3.
WHEN OTHERS.
RETURN_CODE = 1.
ENDCASE.
ENDFORM. "ENTRY
*-------------------------------------------*
*---------------------------------------------------------------------*
* FORM PROCESSING *
*---------------------------------------------------------------------*
* --> PROC_SCREEN *
*---------------------------------------------------------------------*
FORM PROCESSING USING PROC_SCREEN.
DATA: LS_CONTROL_PARAM TYPE SSFCTRLOP.
PERFORM GET_DATA.
CHECK RETCODE = 0.
ENDFORM. "PROCESSING
*----------------------------------------------------------------------*
***********************************************************************
* S U B R O U T I N E S *
***********************************************************************
*---------------------------------------------------------------------*
* FORM CHECK_REPEAT *
*---------------------------------------------------------------------*
* A text is printed, if it is a repeat print for the document. *
*---------------------------------------------------------------------*
FORM CHECK_REPEAT.
CLEAR REPEAT.
SELECT * INTO *NAST FROM NAST WHERE KAPPL = NAST-KAPPL
AND OBJKY = NAST-OBJKY
AND KSCHL = NAST-KSCHL
AND SPRAS = NAST-SPRAS
AND PARNR = NAST-PARNR
AND PARVW = NAST-PARVW
AND NACHA BETWEEN '1' AND '4'.
CHECK *NAST-VSTAT = '1'.
REPEAT = 'X'.
EXIT.
ENDSELECT.
ENDFORM. "CHECK_REPEAT
FORM FORM_OPEN USING US_SCREEN US_COUNTRY.
INCLUDE ZVVF_RVADOPFO.
* INCLUDE RVADOPFO.
ENDFORM.
*------------------------------------------
FORM PROTOCOL_UPDATE.
CHECK XSCREEN = SPACE.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = SYST-MSGID
MSG_NR = SYST-MSGNO
MSG_TY = SYST-MSGTY
MSG_V1 = SYST-MSGV1
MSG_V2 = SYST-MSGV2
MSG_V3 = SYST-MSGV3
MSG_V4 = SYST-MSGV4
EXCEPTIONS
OTHERS = 1.
ENDFORM. "PROTOCOL_UPDATE
*------------------------------------------
FORM GET_DATA.
PERFORM DATA_SELECTION.
PERFORM DATA_SORT.
*skip.
*skip.
PERFORM READ_TEXTIDS.
PERFORM DATA_SORT1.
PERFORM SMARTFORM.
ENDFORM.
*------------------------------------------------------*
*------------------------------------------------------*
*SKIP.
INCLUDE ZVVF_ANNUXURE_NEW_DATA_SELEF01.
No comments:
Post a Comment