Faisal khan
There are two options:
Option1
Take table AFIH into join. Means, Join VIQMEL and AFIH by AUFNR. The field IPHAS in AFIH gives you the Order status.
So you need to have an additional field, if you want the status text instead of 0,1,2,3,4,5,6.
Note: In case you are facing any issues like repetitive lines, after adding the AFIH table in the join then you may look into the option below.
Option2
I'd prefer this option even though I do not have any issues like doubted above. Here there is no need to join AFIH.
In the Infoset , create an additional field say ordstat (char1) and give this syntax in its coding section.
clear ordstat.
Select single iphas from afih into ordstat where aufnr = viqmel-aufnr.
Now have another additional field say status a(char4) and give the coding like this:
clear status.
If ordstat = '0'.
status = 'CRTD'.
elseif ordstat = '2'.
status = 'REL'.
elseif ordstat = '3'.
status = 'TECO'.
elseif ordstat = '4'.
status = 'DLFL'.
endif.
And take the status field into Field Groups and then SQ01 report. Hope you have followed.
Refer to this post: Infoset Query: User Defined Fields | SCN
Because you are working on Infoset Queries this post will be useful to you later.: Infoset Queries: Collection of important posts | SCN
Option3
You can have an additional field Status with data type char40 and in its coding use Function module STATUS_TEXT_EDIT to read the full status text (as you seen in IW32/33) into it.
Regards
KJogeswaraRao