Skip to Content
0
Former Member
Jan 26, 2007 at 08:32 AM

i got the time out error in production system how can i rectity

22 Views

TYPES : BEGIN OF TY_FINAL_IDEL,

IEDD(10),

  • IEDD LIKE AFRU-IEDD,

MATNR LIKE AFPO-MATNR,

AUFNR LIKE AFPO-AUFNR,

PERNR LIKE AFRU-PERNR,

BUDAT(10),

GRUND LIKE AFRU-GRUND,

MATKL LIKE MARA-MATKL,

  • MENGE LIKE MSEG-MENGE,

PSMNG LIKE AFPO-PSMNG,

  • PSAMG LIKE AFPO-PSAMG,

XMNGA LIKE AFRU-XMNGA,

STPRS LIKE MBEW-STPRS,

  • NETPR LIKE EKPO-NETPR,

TC LIKE MBEW-STPRS,

GRDTX LIKE TRUGT-GRDTX,

ARBPL LIKE CRHD-ARBPL,

MAKTX LIKE MAKT-MAKTX,

END OF TY_FINAL_IDEL.

TYPES : BEGIN OF TY_MARA_IDEL,

  • MATNR LIKE MARA-MATNR,

  • MATKL LIKE MARA-MATKL,

MATNR LIKE MAKT-MATNR,

MAKTX LIKE MAKT-MAKTX,

  • MENGE LIKE MSEG-MENGE,

STPRS LIKE MBEW-STPRS,

  • NETPR LIKE EKPO-NETPR,

END OF TY_MARA_IDEL.

TYPES : BEGIN OF TY_AFPO_IDEL,

AUFNR LIKE AFPO-AUFNR,

PSMNG LIKE AFPO-PSMNG,

MATNR LIKE AFPO-MATNR,

  • PSAMG LIKE AFPO-PSAMG,

BUDAT LIKE AFRU-BUDAT,

ARBID LIKE AFRU-ARBID,

XMNGA LIKE AFRU-XMNGA,

GRUND LIKE AFRU-GRUND,

PERNR LIKE AFRU-PERNR,

  • AUFNR LIKE AFRU-AUFNR,

IEDD LIKE AFRU-IEDD,

  • AUFNR LIKE AFRU-AUFNR,

AUFPL LIKE AFRU-AUFPL,

APLZL LIKE AFRU-APLZL,

VORNR LIKE AFRU-VORNR,

  • GRDTX LIKE TRUGT-GRDTX,

END OF TY_AFPO_IDEL.

TYPES : BEGIN OF TY_CRHD_IDEL,

OBJID LIKE CRHD-OBJID,

ARBPL LIKE CRHD-ARBPL,

AUFPL LIKE V_QAPO-AUFPL,

VORGLFNR LIKE V_QAPO-VORGLFNR,

VORNR LIKE V_QAPO-VORNR,

ARBID LIKE V_QAPO-ARBID,

END OF TY_CRHD_IDEL.

TYPES : BEGIN OF TY_TRUGT_IDEL,

SPRAS LIKE TRUGT-SPRAS,

GRUND LIKE TRUGT-GRUND,

GRDTX LIKE TRUGT-GRDTX,

END OF TY_TRUGT_IDEL.

*

  • TYPES : BEGIN OF TY_AFRU_IDEL,

  • AUFNR LIKE AFRU-AUFNR,

  • END OF TY_AFRU_IDEL.

*

*&----


*

*& VARIABLE DECLARATION *

&----


DATA : R_WERKS LIKE AFRU-WERKS,

R_MATNR LIKE AFPO-MATNR,

  • R_MATKL LIKE MARA-MATKL,

R_AUFNR LIKE AFPO-AUFNR,

  • R_ISDD LIKE AFRU-ISDD,

R_IEDD LIKE AFRU-IEDD.

*&----


*

*& INTERNAL TABLE DECLARATION *

&----


DATA : IT_FINAL_IDEL TYPE STANDARD TABLE OF TY_FINAL_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.

DATA : IT_AFPO_IDEL TYPE STANDARD TABLE OF TY_AFPO_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.

DATA : IT_MARA_IDEL TYPE STANDARD TABLE OF TY_MARA_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.

DATA : IT_CRHD_IDEL TYPE STANDARD TABLE OF TY_CRHD_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.

DATA : IT_TRUGT_IDEL TYPE STANDARD TABLE OF TY_TRUGT_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.

DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.

DATA : IT_EVENTCAT TYPE SLIS_T_EVENT.

DATA : WA_EVENTCAT_LN LIKE LINE OF IT_EVENTCAT.

DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.

DATA: S_COL_POS TYPE I.

*&----


*

*& SELECTION SCREEN DECLARATION *

&----


SELECTION-SCREEN BEGIN OF BLOCK : BLOCK WITH FRAME.

SELECT-OPTIONS: S_WERKS FOR AFRU-WERKS DEFAULT 'IN01' NO INTERVALS NO-EXTENSION , "Plant

S_MATNR FOR AFPO-MATNR, "Material Code

  • S_MATKL FOR MARA-MATKL NO INTERVALS NO-EXTENSION, "Material Group

S_AUFNR FOR AFPO-AUFNR, "Order Number

S_IEDD FOR AFRU-IEDD OBLIGATORY. "Confirmed date for execution finish

*NO INTERVALS NO-EXTENSION

SELECTION-SCREEN END OF BLOCK BLOCK.

**************************************************************************

  • AT SELECTION SCREEN *

**************************************************************************

AT SELECTION-SCREEN ON S_WERKS.

SELECT SINGLE WERKS FROM AFRU INTO R_WERKS WHERE WERKS IN S_WERKS.

IF SY-SUBRC <> 0.

MESSAGE E001(ZIN01_RDPR).

ENDIF.

AT SELECTION-SCREEN ON S_MATNR.

SELECT SINGLE MATNR FROM AFPO INTO R_MATNR WHERE MATNR IN S_MATNR.

IF SY-SUBRC <> 0.

MESSAGE E002(ZIN01_RDPR).

ENDIF.

*AT SELECTION-SCREEN ON S_MATKL.

*

  • SELECT SINGLE MATKL FROM MARA INTO R_MATKL WHERE MATKL IN S_MATKL.

  • IF SY-SUBRC <> 0.

  • MESSAGE E003(ZIN01_RDPR).

  • ENDIF.

*

AT SELECTION-SCREEN ON S_AUFNR.

SELECT SINGLE AUFNR FROM AFPO INTO R_AUFNR WHERE AUFNR IN S_AUFNR.

IF SY-SUBRC <> 0.

MESSAGE E004(ZIN01_RDPR).

ENDIF.

AT SELECTION-SCREEN ON S_IEDD.

*

  • SELECT SINGLE IEDD FROM AFRU INTO R_IEDD WHERE IEDD IN S_IEDD.

  • IF SY-SUBRC <> 0.

  • MESSAGE E005(ZIN01_RDPR).

  • ENDIF.

IF S_IEDD-LOW IS INITIAL OR S_IEDD-HIGH IS INITIAL.

MESSAGE E005(ZIN01_RDPR).

ENDIF.

  • SELECT SINGLE IEDD FROM AFRU INTO R_IEDD WHERE IEDD IN S_IEDD.

  • IF SY-SUBRC <> 0.

  • MESSAGE E006(ZIN01_RDPR).

  • ENDIF.

*

*************************************************************************

  • START OF SELECTION *

*************************************************************************

START-OF-SELECTION.

PERFORM SELECT_DATA.

*PERFORM MAIN_DATA.

PERFORM BUILD_FIELDCATALOG.

PERFORM DATA_DISPLAY.

****************************************************************

  • FORM TO SELECT DATA INTO INTERNAL TABLE

*

****************************************************************

FORM SELECT_DATA.

SELECT FAUFNR FPSMNG FMATNR GBUDAT GARBID GXMNGA GGRUND GPERNR GIEDD GAUFNR GAUFPL GAPLZL G~VORNR INTO CORRESPONDING FIELDS OF TABLE IT_AFPO_IDEL

FROM AFPO AS F

INNER JOIN AFRU AS G ON FAUFNR = GAUFNR

WHERE F~AUFNR IN S_AUFNR AND

F~MATNR IN S_MATNR AND

G~WERKS = 'IN01' AND

G~XMNGA <> 0 AND

G~IEDD IN S_IEDD .

  • G~WERKS IN S_WERKS AND

IF SY-SUBRC <> 0.

MESSAGE E006(ZIN01_RDPR).

ENDIF.

  • IF SY-SUBRC = 0.

SELECT GRUND GRDTX INTO CORRESPONDING FIELDS OF TABLE IT_TRUGT_IDEL FROM TRUGT

FOR ALL ENTRIES IN IT_AFPO_IDEL

WHERE GRUND = IT_AFPO_IDEL-GRUND .

  • ENDIF.

SELECT HOBJID HARBPL IAUFPL IVORGLFNR IVORNR IARBID INTO CORRESPONDING FIELDS OF TABLE IT_CRHD_IDEL

FROM CRHD AS H

INNER JOIN V_QAPO AS I ON HOBJID = IARBID

FOR ALL ENTRIES IN IT_AFPO_IDEL

WHERE VORGLFNR = IT_AFPO_IDEL-APLZL AND

ARBID = IT_AFPO_IDEL-ARBID AND

OBJID = IT_AFPO_IDEL-ARBID .

  • IF SY-SUBRC = 0.

SELECT BMATNR BMAKTX BSPRAS DMATNR D~STPRS INTO CORRESPONDING FIELDS OF TABLE IT_MARA_IDEL

FROM MAKT AS B

INNER JOIN MBEW AS D ON BMATNR = DMATNR

FOR ALL ENTRIES IN IT_AFPO_IDEL

WHERE DMATNR = IT_AFPO_IDEL-MATNR AND BSPRAS = 'EN'.

  • ENDIF.

****************************************************************

  • END OF SELECTION

*

****************************************************************

DATA : PEDATE(10),

POSDATE(10).

LOOP AT IT_AFPO_IDEL.

CONCATENATE IT_AFPO_IDEL-IEDD6(2) IT_AFPO_IDEL-IEDD4(2) IT_AFPO_IDEL-IEDD+0(4)

INTO PEDATE SEPARATED BY '.'.

IT_FINAL_IDEL-IEDD = PEDATE.

CONCATENATE IT_AFPO_IDEL-BUDAT6(2) IT_AFPO_IDEL-BUDAT4(2) IT_AFPO_IDEL-BUDAT+0(4)

INTO POSDATE SEPARATED BY '.'.

IT_FINAL_IDEL-BUDAT = POSDATE.

IT_FINAL_IDEL-PERNR = IT_AFPO_IDEL-PERNR.

IT_FINAL_IDEL-MATNR = IT_AFPO_IDEL-MATNR.

IT_FINAL_IDEL-AUFNR = IT_AFPO_IDEL-AUFNR.

IT_FINAL_IDEL-PSMNG = IT_AFPO_IDEL-PSMNG.

IT_FINAL_IDEL-XMNGA = IT_AFPO_IDEL-XMNGA.

IT_FINAL_IDEL-GRUND = IT_AFPO_IDEL-GRUND.

READ TABLE IT_TRUGT_IDEL WITH KEY GRUND = IT_AFPO_IDEL-GRUND.

IT_FINAL_IDEL-GRDTX = IT_TRUGT_IDEL-GRDTX.

READ TABLE IT_CRHD_IDEL WITH KEY VORGLFNR = IT_AFPO_IDEL-APLZL AUFPL = IT_AFPO_IDEL-AUFPL.

IT_FINAL_IDEL-ARBPL = IT_CRHD_IDEL-ARBPL.

*

READ TABLE IT_MARA_IDEL WITH KEY MATNR = IT_AFPO_IDEL-MATNR.

IF SY-SUBRC = 0.

IT_FINAL_IDEL-MAKTX = IT_MARA_IDEL-MAKTX.

IT_FINAL_IDEL-STPRS = IT_MARA_IDEL-STPRS.

IT_FINAL_IDEL-TC = IT_AFPO_IDEL-XMNGA * IT_MARA_IDEL-STPRS.

ENDIF.

how can i rectify that one

in b5t run fine

but brp i got time_out error

how to rectify

give me a solution ,its very very urgent

Regards

ds

APPEND IT_FINAL_IDEL.

  • CLEAR : IT_FINAL_IDEL,IT_AFPO_IDEL,IT_MARA_IDEL,IT_CRHD_IDEL.

CLEAR : IT_TRUGT_IDEL-GRDTX,IT_FINAL_IDEL-TC,IT_FINAL_IDEL-MATNR,IT_FINAL_IDEL-MAKTX, IT_FINAL_IDEL-PSMNG, IT_FINAL_IDEL-STPRS.

ENDLOOP.