2009 Jan 14 9:58 AM
Hi,
I am working on smartform code in which i have to display the condition values of the PO i.e. ZING,ZGRD and ZBDL . I am able to fetch the data for it which is correct but when i want to display that values of it and it is not idsplaying the values of 3 of them .
plzz provide me guidelines how to solve this problem. *
HERE'S D CODE I AM USING RIGHT NOW: -
******************************************************************************************************
LOOP AT item.
SELECT kbetr FROM konv INTO item-rate WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00').
MODIFY item." index sy-tabix ."transporting txz01.
ENDSELECT.
ENDLOOP.
******************************************************************************************************
******************************************************************************************************
LOOP AT item.
SELECT kwert FROM konv INTO vkwert WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00').
ENDSELECT.
ENDLOOP.
******************************************************************************************************
CLEAR : vspl , vspl1 , vspl2 , vspl3 , vspl4.
LOOP AT item.
SELECT kbetr FROM konv INTO vspl WHERE knumv = header-knumv AND kposn = item-ebelp AND kschl = 'ZCOM'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl1 WHERE knumv = header-knumv AND kposn = item-ebelp AND kschl = 'ZBR1'.
ENDSELECT.
******************Begin - new code added on 13.01.2009*****************
SELECT kbetr FROM konv INTO vspl2 WHERE knumv = header-knumv AND kposn = item-ebelp AND kschl = 'ZING'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl3 WHERE knumv = header-knumv AND kposn = item-ebelp AND kschl = 'ZGRD'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl4 WHERE knumv = header-knumv AND kposn = item-ebelp AND kschl = 'ZBRL'.
ENDSELECT.
******************End - new code added on 13.01.2009*****************
ENDLOOP.
LOOP AT item.
item-rate = item-rate + vspl + vspl1.
******************Begin - new code added on 13.01.2009*****************
item-rate1 = item-rate1 + vspl2.
item-rate2 = item-rate2 + vspl3.
item-rate3 = item-rate3 + vspl4.
*******************End - new code added on 13.01.2009******************
MODIFY item INDEX sy-tabix TRANSPORTING rate.
******************Begin - new code added on 13.01.2009*****************
MODIFY item INDEX sy-tabix TRANSPORTING rate1.
MODIFY item INDEX sy-tabix TRANSPORTING rate2.
MODIFY item INDEX sy-tabix TRANSPORTING rate3.
********************End - new code added on 13.01.2009*****************
ENDLOOP.
Edited by: ricx .s on Jan 14, 2009 11:14 AM
Edited by: ricx .s on Jan 14, 2009 11:42 AM
Edited by: ricx .s on Jan 15, 2009 4:54 AM
2009 Jan 15 4:02 AM
Hi
I would suggest, please change the code first which is not as per any coding standards.
Regards
Shiva
2009 Jan 15 4:11 AM