‎2010 May 14 8:25 AM
Hi
i have written code, my problem is After appending wa_mseg to it_col1 all the values in the fields are displaying as ************************ only Matnr and Mseg values are displaying correctly...
this problem is coming before diplay only...
clear wa_mseg.
sort it_mseg by matnr.
loop at IT_MSEG into WA_MSEG.
at end of matnr.
sum.
append WA_MSEG to IT_COL1.
clear wa_mseg.
ENDAT.
endloop.
Please help me to solve this problem
Regards
Smitha
‎2010 May 14 8:29 AM
hi,
All non-char fields to the RIGHT of MATNR in the work area WA_MSEG will have **************** within
AT END OF matnr.
ENDAT.
‎2010 May 14 8:31 AM
Pass WA value to a TEMP_WA beforw AT END OF statement
loop at IT_MSEG into WA_MSEG.
wa_temp = wa_msg.
at end of matnr.
sum.
append WA_MSEG to IT_COL1.
clear wa_mseg.
ENDAT.
* Use WA_TEMP for your further operations. Also shud clear WA_TEMP everytime
endloop.
‎2010 May 14 8:33 AM
Check the structure for it_col1.It should be same as wa_mseg or use move corresponding.
‎2010 May 14 8:33 AM
Hi,
In control break statements value of your waor area becomes **************
so before using AT statment copy your work area into temp workarea of same type.
Regards,
Sarang
‎2010 May 14 8:34 AM
is coming becuase you have used the at end of matnr statement , it will keep only matnr open and rest all values will come in ********* form.
To sum the values of same matnr, you can use one variable l_matnr = mseg-matnr in the loop and check in loop if
l_matnr = mseg-matnr , then keep on adding the values , if the matnr gets changed the change the value of l_matnr and in next time in loop it will again check the matnr , if the value is same then add else change the l_matnr.
It will solve your problem.