Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

urgent: reagrding output display preoblem

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

0 Kudos

hi ,

d problem is when i execute MM04 (for displaying material changes) it shows that the chnges made to material for a purticular month and my report is displaying the all the materials whoes changes had been made but when it coes to display what chnges made to it ,it shows only few chnges i.e. for example if there are 5 five changes made to a material ,it shows only 3 ,the rest of 2 changes does not display.

plzz help me out as help will be definately rewrded.

0 Kudos

Hi,

what u are seeing is in that changes are displayed from the starting but in your program in select options you are giving the date constraint which is restricting all the entries because some of the entries wont be coming in to the date limit u have given thats the reason all the changes are not displayed. Do one thing dont give any date constraint and execute u can see all the changes displayed.

Your program is running perfectly

any query ping me up

regards

swaroop

0 Kudos

hi,

i had tried it by doing dis by cosing the date fields but still it is only showing only 1 change to the material where as when i check MM04 tcode and it shows 4 changes made to that material in dat date.

plzz help me out me as i want to make display all these changes.

0 Kudos

hi,

tell me for which material number it is hapening

thanks

swaroop

0 Kudos

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