09-18-2014 6:24 PM
Hello guys,
I am making a script of marksheet (snapshot attached) and I want to print '*' (star) for subject (may be more than one) where mark is less than 35. Let me know if it is possible.
If yes, please give me your valuable suggestion.
Thanks
Rohan
09-18-2014 7:07 PM
Hi,
Very basic .
Create a field:
flag_1 type c length 1.
if value LT 35 move '*' to flag_1 else move space to flag_1 .
print flag_1 next to "marks obtained" .
Regards.
09-18-2014 7:07 PM
Hi,
Very basic .
Create a field:
flag_1 type c length 1.
if value LT 35 move '*' to flag_1 else move space to flag_1 .
print flag_1 next to "marks obtained" .
Regards.
09-19-2014 7:23 AM
Hi Eitan,
Thanks for suggestion.
I already tried this and I am getting output like this-
Marks Obtained
75*
60*
57*
33*
63*
43*
55*
There are chances that no. of subject (< 35) are more than one.
Regards
Rohan
09-19-2014 7:33 AM
Hi,
You need to do this check for each line separately .
Loop at data...
if value LT 35 move '*' to flag_1 else move space to flag_1 .
print...(CALL FUNCTION 'WRITE_FORM')
endloop .
Regards.
09-19-2014 8:03 AM
Hi Eitan,
I am appreciate your answer.
but In my case it is not working.
output is same as before.
I have seven work area to compare (< 35).
Regards
Rohan
09-19-2014 8:20 AM
Hi,
It is a fix format ?
All of it printed at once ?
so seven fields are needed and seven compares .
IMHO not very good design (LT 35 ).
Regards.
09-19-2014 8:45 AM
Hi Eitan,
Below are answers of your questions-
It is a fix format?
Ans- Yes.
All of it printed at once?
Ans. Depend on value. Wherever value is LT 35 it should print.
For your reference I have attached a text file . In this text file I copied sample format of my program. Hope, you can understand what I want.
Actually I am beginner for abap so might be I can do mistake while writing coding.
Regards
Rohan
09-19-2014 9:36 AM
Hi,
Hope it helpful.
Create one variable internal table,
While calculating total inside a loop ,
loop at itab into wa.
if mark < 35.
wa_flag = '*'.
endif.
modify itab from wa.
In Script add the field after the marks according to space required.
Regards,
Venkat.
09-19-2014 2:03 PM
Hi Venkat,
Thanks for your suggestion.
I tried that but not working , the output is same as before.
I have seven subjects(work area) to compare.
I want this type of output-
60
30*
56
63
29*
46
Regards
Rohan
09-19-2014 6:10 PM
09-19-2014 6:42 PM
Hi,
Is the information we see here comes from one record ?
If this is the case I think that you have a fault in your tables design.
Think the affect of adding more subjects will be on the system.
You should normalize your data .
I see here at least 3 tables .
- Students (ZSDATA2 ?)
ZSROLL(Key)
ZSTNM
ZCSNM
- Subject table
subject Key (key)
Subject description.
- Grades
ZSROLL(Key)
subject Key (key)
MARK
Regards.
09-20-2014 6:34 AM
Hi Eitan,
This is not home-work.
My TL has solved my query.
Thanks for your valuable suggestions.
Regards
Rohan