‎2010 Mar 18 9:10 AM
hi,
thank you for supproting..
Iam reading the sys status for order number.. One order number, we ve got no.of status. i need to keep all status textes in one field..
As well as i need to write the status one which is start with I. so ive kept the condition stat = 'I*'. but its not working. can u plz tell me tht one also..
for this ive wrote the code as below as ..
Ordernumber: Stat " this is from Jest table
R000400008 i008
R000400008 i009
R000400008 i010
R000400008 i011
Stat Spar txt04 " This is from tj02t table " From here i need to Concatenate the all TXT04 INTO one feild for the one ordernumber.. and modify the itab..
i008 E PDV
i009 E DEV "like R00040008 PDV DEV PEN REV "Report should be get like
i010 E PEN
i011 E REV
How to concatenate while looping..?
**Calculation for system status.
ITAB3[] = ITAB[].
clear:wa.
Loop at itab3 into wa.
Select objnr stat from jest into corresponding fields of table lt_jest where objnr = wa-objnr AND stat NE 'X'.
* ( stat <> 'X' AND stat = 'I*' ).
Read table lt_jest into wa_jest with key objnr = wa-objnr transporting all fields.
Select istat TXT04 from tj02t into corresponding fields of table lt_tj02t where istat = wa_jest-stat." and
* spras = 'EN'.
Loop at lt_tj02t into wa_tj02t.
lv_sttxt1 = wa_tj02t-txt04.
CONCATENATE lv_sttxt1 ' ' into lv_sttxt SEPARATED BY space. "Doubt here
Endloop.
Read table itab into wa2 with key objnr = wa-objnr.
Move lv_sttxt To wa2-sttxt."STTXT
lv_tabix = sy-tabix.
Modify itab from wa2 index lv_tabix transporting sttxt.
Endloop.
Regards
‎2010 Mar 18 9:16 AM
‎2010 Mar 18 9:34 AM
Hi,
So what output you are getting currently?
Loop at lt_tj02t into wa_tj02t.
lv_sttxt1 = wa_tj02t-txt04.
CONCATENATE lv_sttxt1 ' ' into lv_sttxt SEPARATED BY space. "Doubt here
Endloop.According to me, you must be getting output as, PDV DEV PEN REV.
Is it correct?
And 1 more doubt is, according to you, you need to Concatenate the all TXT04 INTO one field for the one ordernumber. So, you must have field ordernumber in table lt_tj02t, so that you can concatenate it in a variable and modify itab accordingly.
Thanks,
Archana
‎2010 Mar 18 9:49 AM
Hi,
Thank you for reply.
iam unable to concate all status in one field. just iam getting one status.
Yes ur right. i need to modify my itab also. afer getting the sys status.
Regards
Edited by: balaji kiran on Mar 18, 2010 10:50 AM
‎2010 Mar 18 10:04 AM
Hi,
Loop at lt_tj02t into wa_tj02t.
lv_sttxt1 = wa_tj02t-txt04.
CONCATENATE lv_sttxt1 into lv_sttxt SEPARATED BY space.
clear: wa_tj02t, lv_sttxt1.
Endloop.Also, check in debugging mode if you are getting values in variable lv_sttxt1.
Thanks,
Archana
‎2010 Mar 18 9:51 AM
Do like
Loop at itab3 into wa.
Select objnr stat from jest into corresponding fields of table lt_jest where objnr = wa-objnr AND stat LIKE 'I*'.
CLEAR lt_tj02t .
Select istat TXT04 from tj02t into corresponding fields of table lt_tj02t for all entries in lt_jest where istat = lt_jest -stat.
CONCATENATE wa-objnr ' 'INTO lv_sttxt1 separated by space.
Loop at lt_tj02t into wa_tj02t.
CONCATENATE lv_sttxt1 wa_tj02t-txt04 into lv_sttxt SEPARATED BY space.
Endloop.
Move lv_sttxt To wa-sttxt.
Modify TABLE itab from wa.
Endloop.
Edited by: Sachin Bidkar on Mar 18, 2010 11:07 AM
‎2010 Mar 18 10:36 AM
‎2010 Mar 18 11:58 AM
‎2010 Mar 18 12:11 PM