‎2008 May 31 8:43 AM
hai,
in report program i am using function module in alv grid control.
in o/p i want to check the condition.
Check the Material Status PSTAT u2013 MARA. It should have (B-Accounting, E-Purchasing, V-Sales, G-Costing & D-MRP)
those fields only display in pstat.
i am using cs for it.
but donot how check it.
for detail i giving ex:
pstat:
1)adretvd
2)kc
3)bess
4)erev
5)sef
6)vd
7)vegsb
here o/p 7 given.
check the order b,e ,v, g,&d.
i.e i want get o/p
1, 3,4 ,5&6.
here checking should be order B,E,V,G & D.
SO, PLEASE MESSAGE ME.
thanks u.
‎2008 Jun 01 11:28 PM
Hello Suresh.
You can use the operator CA for this.
Here's a small example using a IF statement for three of your conditions (variable lv_values contains all possible character values):
DATA: lv_values TYPE STRING VALUE 'BEVGD'.
DATA: lv_1 TYPE STRING VALUE 'ADRETVD'.
DATA: lv_2 TYPE STRING VALUE 'KC'.
DATA: lv_3 TYPE STRING VALUE 'BESS'.
IF lv_1 CA lv_values.
WRITE: / lv_1.
ENDIF.
IF lv_2 CA lv_values.
WRITE: / lv_2.
ENDIF.
IF lv_3 CA lv_values.
WRITE: / lv_3.
ENDIF.
All you have to do is loop into the conditions, and extracts the one's that you are interested in.
Kind regards,
Bruno
‎2008 Aug 06 4:04 PM