10-17-2008 6:21 AM
Hi All There,
I am new ABAP, I my follwoing code intrnal table STAB contains the value which I am selecting and lso it is giving some 000 value for each fields which is not there in the database
I don't want that 00 value
Data : BEGIN OF STAB OCCURS 0,
MENGE LIKE EBAN-MENGE,
BSMNG LIKE EBAN-BSMNG,
NVALUE LIKE EBAN-BSMNG,
END OF STAB.
REFRESH STAB.
SELECT MENGE BSMNG FROM EBAN INTO CORRESPONDING FIELDS OF TABLE STAB WHERE BANFN = WT_EKPO-BANFN.
APPEND STAB.
LOOP AT STAB.
STAB-NVALUE = STAB-MENGE - STAB-BSMNG.
ENDLOOP.
Regards
Sagar
10-17-2008 6:24 AM
Hi,
comment append stab statement which is causing that extra row to be added.
Regards,
Vishal
10-17-2008 6:23 AM
10-17-2008 6:27 AM
Dear
This is the part of user exit where somewhere wt_ekpo work area is getting populated
Regards
Sagar
10-17-2008 6:24 AM
Hi,
comment append stab statement which is causing that extra row to be added.
Regards,
Vishal
10-17-2008 6:47 AM
Hi Sagar,
First of all u need to define WT_EKPO, which is causing error.
Just go through the following code snippet where i have made an assumption in WHERE clause. You can replace your actual work area with that.
Data : BEGIN OF STAB OCCURS 0,
MENGE LIKE EBAN-MENGE,
BSMNG LIKE EBAN-BSMNG,
NVALUE LIKE EBAN-BSMNG,
END OF STAB.
SELECT MENGE BSMNG FROM EBAN INTO CORRESPONDING FIELDS OF TABLE STAB WHERE BANFN = 'E'.
*APPEND STAB.
LOOP AT STAB.
STAB-NVALUE = STAB-MENGE - STAB-BSMNG.
Modify stab.
ENDLOOP.
Just check it out. Hope this will help you.
Thanks
Nitesh