Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

comment append stab statement which is causing that extra row to be added.

Regards,

Vishal

4 REPLIES 4

Former Member
0 Kudos

Dear,

where is your WT_EKPO-BANFN?

Check this .

thanks,

jaten

0 Kudos

Dear

This is the part of user exit where somewhere wt_ekpo work area is getting populated

Regards

Sagar

Former Member
0 Kudos

Hi,

comment append stab statement which is causing that extra row to be added.

Regards,

Vishal

Former Member
0 Kudos

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