Skip to Content
author's profile photo Former Member
Former Member

Problem while checking code in debug mode

Hi,

I had developed a code in which is working gud as it is displaying the correct data but when i check it in the debug mode at the end of code where write statement is written it moves to some error which is not understandable to me.....

here's d code in which i am facing the problem:-

TABLES: VBAK,VBAP,MARA.

************BEGIN - DATA DECLARATION IN ITAB*****************

DATA: BEGIN OF ITAB OCCURS 0,

MATNR LIKE VBAP-MATNR, "Material Number

VBELN LIKE VBAK-VBELN, "Sales Document

ERDAT LIKE VBAK-ERDAT, "Date on Which Record Was Created

WERKS LIKE VBAP-WERKS, "Plant (Own or External)

POSNR LIKE VBAP-POSNR, "Sales Document Item

SPART LIKE MARA-SPART, "Division

MEINS LIKE MARA-MEINS, "Unit Of Measurment

MTART LIKE MARA-MTART, "Material Type

NTGEW LIKE MARA-NTGEW, "Net Weight

GEWEI LIKE MARA-GEWEI, "Weight Unit

PLNUM LIKE PLAF-PLNUM, "Planned order number

GSMNG LIKE PLAF-GSMNG, "Total planned order quantity

KDAUF LIKE PLAF-KDAUF, "Sales Order Number

KDPOS LIKE PLAF-KDPOS, "Item Number in Sales Order

AUFNR LIKE AFPO-AUFNR, "Order Number

PSMNG LIKE AFPO-PSMNG, "Order item quantity

ITEMDESC LIKE MAKT-MAKTX, "Item Description

TOTWT1 LIKE PLAF-GSMNG, "Calculation 1

TOTWT2 LIKE AFPO-PSMNG, "Calculation 2

WTKG LIKE MARA-NTGEW, "Net Weight

TOT LIKE PLAF-GSMNG, "

END OF ITAB.

DATA: BEGIN OF ITAB1 OCCURS 0,

MATNR LIKE VBAP-MATNR, "Material Number

VBELN LIKE VBAK-VBELN, "Sales Document

ERDAT LIKE VBAK-ERDAT, "Date on Which Record Was Created

WERKS LIKE VBAP-WERKS, "Plant (Own or External)

POSNR LIKE VBAP-POSNR, "Sales Document Item

SPART LIKE MARA-SPART, "Division

MEINS LIKE MARA-MEINS, "Unit Of Measurment

MTART LIKE MARA-MTART, "Material Type

NTGEW LIKE MARA-NTGEW, "Net Weight

GEWEI LIKE MARA-GEWEI, "Weight Unit

PLNUM LIKE PLAF-PLNUM, "Planned order number

GSMNG LIKE PLAF-GSMNG, "Total planned order quantity

KDAUF LIKE PLAF-KDAUF, "Sales Order Number

KDPOS LIKE PLAF-KDPOS, "Item Number in Sales Order

AUFNR LIKE AFPO-AUFNR, "Order Number

PSMNG LIKE AFPO-PSMNG, "Order item quantity

ITEMDESC LIKE MAKT-MAKTX, "Item Description

TOTWT1 LIKE PLAF-GSMNG, "Calculation 1

TOTWT2 LIKE AFPO-PSMNG, "Calculation 2

WTKG LIKE MARA-NTGEW, "Net Weight

TOT LIKE PLAF-GSMNG, "

END OF ITAB1.

**********END - DATA DECLARATION IN ITAB*****************

************BEGIN - ITAB FOR PL.ORDR********************

DATA: BEGIN OF ITPL OCCURS 0,

MATNR LIKE PLAF-MATNR, "Material Number

KDAUF LIKE PLAF-KDAUF, "Sales Order Number

KDPOS LIKE PLAF-KDPOS, "Item Number in Sales Order

PLNUM LIKE PLAF-PLNUM, "Planned order number

GSMNG LIKE PLAF-GSMNG, "Total planned order quantity

AUFNR LIKE PLAF-AUFNR, "Order Number

VQTY LIKE PLAF-GSMNG,

END OF ITPL.

************END - ITAB FOR PL.ORDR***********************

***********BEGIN - ITAB FOR PRD.ORDR********************

DATA: BEGIN OF ITPO OCCURS 0,

MATNR LIKE AFPO-MATNR, "Material Number

KDAUF LIKE AFPO-KDAUF, "Sales Order Number

KDPOS LIKE AFPO-KDPOS, "Item Number in Sales Order

PLNUM LIKE AFPO-PLNUM, "Planned order number

PSMNG LIKE AFPO-PSMNG, "Order item quantity

AUFNR LIKE AFPO-AUFNR, "Order Number

VQTY LIKE PLAF-GSMNG,

END OF ITPO.

DATA: TOT_QTY LIKE PLAF-GSMNG.

***********END - ITAB FOR PRD.ORDR********************

***********BEGIN - SELECTION SCREEN AND PARAMETERS AND VARIABLES**********

PARAMETERS : PLANT LIKE VBAP-WERKS OBLIGATORY.

SELECT-OPTIONS: SO_ORD FOR VBAK-VBELN,

DIV FOR MARA-SPART,

SO_DATE FOR VBAK-ERDAT,

P_MATNR FOR VBAP-MATNR.

***********END - SELECTION SCREEN AND PARAMETERS******

****BEGIN - DATA RETERIVAL FROM TABLES**********

SELECT BMATNR AVBELN AERDAT BWERKS BPOSNR CSPART CMEINS CMTART CNTGEW CGEWEI

FROM VBAK AS A

INNER JOIN VBAP AS B ON BVBELN = AVBELN

INNER JOIN MARA AS C ON CMATNR = BMATNR AND CSPART = BSPART

INTO TABLE ITAB WHERE CMTART = 'FERT' AND BWERKS = PLANT AND AVBELN IN SO_ORD AND CSPART IN DIV AND AERDAT IN SO_DATE AND BMATNR IN P_MATNR.

**********END - DATA RETERIVAL FROM TABLES**********

******BEGIN - TAKING DATA FROM TABLE ITPL AND ITPO TO ITAB********

LOOP AT ITAB.

REFRESH ITPL.

SELECT MATNR KDAUF KDPOS PLNUM GSMNG AUFNR FROM PLAF INTO TABLE ITPL WHERE

KDAUF = ITAB-VBELN AND

KDPOS = ITAB-POSNR AND

MATNR = ITAB-MATNR.

REFRESH ITPO.

SELECT MATNR KDAUF KDPOS PLNUM PSMNG AUFNR FROM AFPO INTO TABLE ITPO WHERE

KDAUF = ITAB-VBELN AND

KDPOS = ITAB-POSNR AND

MATNR = ITAB-MATNR.

LOOP AT ITPL.

ITAB-GSMNG = ITAB-GSMNG + ITPL-GSMNG.

ENDLOOP.

LOOP AT ITPO.

ITAB-PSMNG = ITAB-PSMNG + ITPO-PSMNG.

ENDLOOP.

MODIFY ITAB.

ENDLOOP.

SORT ITAB BY VBELN POSNR.

ITAB1[] = ITAB[].

SORT ITAB1 BY VBELN POSNR.

LOOP AT ITAB1.

TOT_QTY = ITAB1-GSMNG + ITAB1-PSMNG.

WRITE: / ITAB1-VBELN,ITAB1-MATNR,ITAB1-GSMNG,ITAB1-PSMNG,TOT_QTY,ITAB1-SPART.

ENDLOOP.

PLZZ tell me why the error is occurring?

Edited by: ricx .s on Jul 22, 2008 10:51 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 08:54 AM

    What is the error you are getting?!

    We aren't psychic!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 08:54 AM

    Hi ricx,

    You posted your code not the problem, Can you please tell us the error that you are getting.

    Regards,

    Sai

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 08:56 AM

    HI,

    I am sorry for not highlighting the problem.

    here it is in the write statement :-

    LOOP AT ITAB1.

    TOT_QTY = ITAB1-GSMNG + ITAB1-PSMNG.

    WRITE: / ITAB1-VBELN,ITAB1-MATNR,ITAB1-GSMNG,ITAB1-PSMNG,TOT_QTY,ITAB1-SPART.*

    ENDLOOP.

    Edited by: ricx .s on Jul 22, 2008 10:56 AM

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI,

      I had told you my friend that i got error in the in the debug mode... more over i had changed the data type of TOT_QTY and then stored in ITAB1-TOT.

      in the write statement:-

      WRITE: / ITAB1-VBELN,ITAB1-ITEMID,ITAB1-GSMNG,ITAB1-PSMNG,TOT_QTY,ITAB1-TOT,ITAB1-SPART.

      and the description of error in the debug mode is:-

      1 FUNCTION CONVERSION_EXIT_ISOLA_OUTPUT.

      2 *"----


      3 ""Lokale Schnittstelle:

      4 *" IMPORTING

      5 *" VALUE(INPUT)

      6 *" EXPORTING

      7 *" VALUE(OUTPUT)

      8 *"----


      9 OUTPUT = SAVE_INPUT(1) = INPUT.

      10 CHECK SAVE_INPUT(1) NA ' *'.

      11 SELECT SINGLE * FROM T002 WHERE SPRAS = INPUT.

      12 CHECK SY-SUBRC = 0.

      13 OUTPUT = T002-LAISO.

      14 ENDFUNCTION.

      Edited by: ricx .s on Jul 22, 2008 11:14 AM

  • author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2008 at 04:34 AM

    i am closing as solved the problem myself.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.