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

urgent: reagrding output display preoblem

Hi,

I had made dis report adn when i execute it does not display the all changes made to a purticular material. As i made the report reagrding the changes made to a purticular material in a purticular period. here is d code:-

REPORT ZNEW01 no standard page heading LINE-SIZE 310.

TABLES: CDHDR,CDPOS.

DATA: BEGIN OF ITAB OCCURS 0,

OBJECTCLAS LIKE CDHDR-OBJECTCLAS,

OBJECTID LIKE CDHDR-OBJECTID,

USERNAME LIKE CDHDR-USERNAME,

UDATE LIKE CDHDR-UDATE,

UTIME LIKE CDHDR-UTIME,

TCODE LIKE CDHDR-TCODE,

CHANGE_IND LIKE CDHDR-CHANGE_IND,

END OF ITAB.

DATA: BEGIN OF ITAB1 OCCURS 0,

OBJECTCLAS LIKE CDPOS-OBJECTCLAS,

OBJECTID LIKE CDPOS-OBJECTID,

FNAME LIKE CDPOS-FNAME,

CHNGIND LIKE CDPOS-CHNGIND,

VALUE_OLD LIKE CDPOS-VALUE_OLD,

VALUE_NEW LIKE CDPOS-VALUE_NEW,

END OF ITAB1.

SELECT-OPTIONS: M_DATE FOR CDHDR-UDATE,

U_ID FOR CDHDR-CHANGE_IND.

SELECT BOBJECTCLAS BOBJECTID BUSERNAME BUDATE BUTIME BTCODE B~CHANGE_IND INTO

TABLE ITAB

FROM CDHDR AS B WHERE B~OBJECTCLAS = 'MATERIAL' AND UDATE IN M_DATE AND CHANGE_IND IN U_ID.

Check not itab[] is initial.

SELECT OBJECTCLAS OBJECTID FNAME CHNGIND VALUE_OLD VALUE_NEW INTO TABLE

ITAB1 FROM CDPOS

FOR ALL ENTRIES IN ITAB WHERE OBJECTID = itab-objectid and objectclas = ITAB-OBJECTCLAS .

*SELECT OBJECTCLAS OBJECTID FNAME CHNGIND VALUE_OLD VALUE_NEW INTO TABLE

*ITAB1 FROM CDPOS

*WHERE OBJECTID = itab-objectid and objectclas = ITAB-OBJECTCLAS .

*

ULINE.

LOOP AT ITAB.

WRITE:/ ITAB-OBJECTID,22 ITAB-USERNAME,ITAB-UDATE,ITAB-UTIME,ITAB-TCODE.

LOOP AT ITAB1 WHERE OBJECTCLAS = ITAB-OBJECTCLAS AND OBJECTID = ITAB-OBJECTID.

WRITE: 60 ITAB1-FNAME,ITAB1-CHNGIND,ITAB1-VALUE_OLD(40),ITAB1-VALUE_NEW(40).

ENDLOOP.

ENDLOOP.

PLZZ HELP ME OUT AS HELP WILL BE DEFINATELY REWRDED.

Edited by: ric .s on Jan 31, 2008 9:11 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 06:49 AM

    Hi,

    i have gone trough ur code even exexuted it in my system but i dint get ur doubt it is working properly can u explain the question again properly

    thanks

    swaroop

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi,

      i give u example of that ,if there is material 10000014 and it had been changed by 3 differrent users whic is disaplaying correct but when i click it in MM04 it also displays the correct value dat dese are changed by 3 persons but when i double click that for 1 st user it shows details that these are changes made but when i check my report it is not displaying allthe fields which had been changed.

      plzz help me out as it is really urgent.

      TABLES: CDHDR,CDPOS.

      DATA: BEGIN OF ITAB OCCURS 0,

      OBJECTCLAS LIKE CDHDR-OBJECTCLAS,

      OBJECTID LIKE CDHDR-OBJECTID,

      USERNAME LIKE CDHDR-USERNAME,

      UDATE LIKE CDHDR-UDATE,

      UTIME LIKE CDHDR-UTIME,

      TCODE LIKE CDHDR-TCODE,

      CHANGENR LIKE CDHDR-CHANGENR,

      END OF ITAB.

      DATA: BEGIN OF ITAB1 OCCURS 0,

      OBJECTCLAS LIKE CDPOS-OBJECTCLAS,

      OBJECTID LIKE CDPOS-OBJECTID,

      FNAME LIKE CDPOS-FNAME,

      CHNGIND LIKE CDPOS-CHNGIND,

      VALUE_OLD LIKE CDPOS-VALUE_OLD,

      VALUE_NEW LIKE CDPOS-VALUE_NEW,

      CHANGENR LIKE CDPOS-CHANGENR,

      END OF ITAB1.

      *SELECT-OPTIONS: M_DATE FOR CDHDR-UDATE.

      • U_ID FOR CDHDR-CHANGE_IND.

      SELECT BOBJECTCLAS BOBJECTID BUSERNAME BUDATE BUTIME BTCODE B~CHANGE_IND INTO

      TABLE ITAB

      FROM CDHDR AS B WHERE B~OBJECTCLAS = 'MATERIAL'.

      • AND UDATE IN M_DATE.

      • AND CHANGE_IND IN U_ID.

      Check not itab[] is initial.

      SELECT OBJECTCLAS OBJECTID FNAME CHNGIND VALUE_OLD VALUE_NEW CHANGENR INTO TABLE

      ITAB1 FROM CDPOS

      FOR ALL ENTRIES IN ITAB WHERE OBJECTID = itab-objectid AND objectclas = ITAB-OBJECTCLAS.

      *SELECT OBJECTCLAS OBJECTID FNAME CHNGIND VALUE_OLD VALUE_NEW INTO TABLE

      *ITAB1 FROM CDPOS

      *WHERE OBJECTID = itab-objectid and objectclas = ITAB-OBJECTCLAS .

      ULINE.

      LOOP AT ITAB.

      WRITE:/ ITAB-OBJECTID,22 ITAB-USERNAME,ITAB-UDATE,ITAB-UTIME,ITAB-TCODE.

      LOOP AT ITAB1 WHERE OBJECTCLAS = ITAB-OBJECTCLAS AND OBJECTID = ITAB-OBJECTID AND CHANGENR = ITAB-CHANGENR.

      WRITE: 60 ITAB1-FNAME,ITAB1-CHNGIND,ITAB1-VALUE_OLD(40),ITAB1-VALUE_NEW(40).

      ENDLOOP.

      ENDLOOP.

      DATA: BEGIN OF ITAB OCCURS 0,

      MATNR LIKE MSTA-MATNR,

      LAEDA LIKE MSTA-LAEDA,

      AENAM LIKE MSTA-AENAM,

      STATM LIKE MSTA-STATM,

      WERKS LIKE MSTA-WERKS,

      PSTAT LIKE MARA-PSTAT,

      END OF ITAB.

      SELECT AMATNR ALAEDA AAENAM ASTATM AWERKS BPSTAT INTO TABLE ITAB

      FROM MSTA AS A INNER JOIN MARA AS B ON BMATNR = AMATNR.

      LOOP AT ITAB.

      WRITE: / ITAB-MATNR,ITAB-LAEDA,ITAB-AENAM,ITAB-STATM,ITAB-WERKS.

      ENDLOOP.

      Edited by: ric .s on Jan 31, 2008 10:59 AM

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.