Application Development and Automation 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: 
Read only

doubt in program logic

Former Member
0 Likes
589

my internal table is:-

DATA : BEGIN OF TBL_FINAL OCCURS 0,

BTEXT TYPE T001P-BTEXT,

NO_OF_OCC(4) TYPE C,

NO_OF_WORKERS TYPE I,

HRS_WORKED TYPE P DECIMALS 2,

WORK_DAYS_LOST TYPE I,

INC_RATE TYPE P DECIMALS 2,

INC_ROLL TYPE P DECIMALS 2,

FREQ_RATE TYPE P DECIMALS 2,

FREQ_ROLL TYPE P DECIMALS 2,

TIME_LOST TYPE P DECIMALS 2,

TIME_ROLL TYPE P DECIMALS 2,

END OF TBL_FINAL.

my selection screen is:-

PARAMETERS : S_BEGDA LIKE PA2001-BEGDA OBLIGATORY,

S_ENDDA LIKE PA2001-ENDDA OBLIGATORY.

SELECT-OPTIONS : S_BTRTL FOR PA0001-BTRTL OBLIGATORY.

i want to calculate btext, no. of workers and work days lost and display in the report output.

can anyone help on this?

a)btext is in t001p

b)SELECT COUNT(*) INTO NO_OF_WORKERS FROM PA0000

*WHERE ENDDA = '99991231' AND STAT2 = '3'.

c)SELECT COUNT(*) INTO WORK_DAYS_LOST FROM PA2001

*WHERE ABWTG = P2001-ABWTG.

i want to disply as in internal table based on selection screen.

Please help on this

<b>Your help would be appreciated.</b>

<b></b>

5 REPLIES 5
Read only

Former Member
0 Likes
563

hi..can anyone help in getting some logic and dissplaying as final internal table..

i want these 3 fields in the corresponding final internal table fields.

so that.. i can do the rest of the fields similar to that.

thank u

Read only

0 Likes
563

HAI PLZ..HELP ME . ITS VERY URGENT

Read only

0 Likes
563

hai..plz hav a look on this program and try to get some desired output as mentioned.

i am new to abap

Read only

Former Member
0 Likes
563

hi,

TBL_FINAL-NO_OF_WORKERS = NO_OF_WORKERS

TBL_FINAL-WORK_DAYS_LOST =WORK_DAYS_LOST

append tbl_final.

finally you have only one record, how do get multiple rows for that ( as per your specification)

sasi

Read only

0 Likes
563

my requirement is to get the no.of workers, no.of work days lost for the given period(selection screen having begda and endda) and also personal sub area number(BTRTL)as range in the selection screen.

my internal tables is:-DATA : BEGIN OF TBL_FINAL OCCURS 0,

BTRTL LIKE PA0001-BTRTL,

BTEXT TYPE T001P-BTEXT,

NO_OF_OCC(4) TYPE C,

NO_OF_WORKERS TYPE I,

HRS_WORKED TYPE P DECIMALS 2,

WORK_DAYS_LOST TYPE I,

INC_RATE TYPE P DECIMALS 2,

INC_ROLL TYPE P DECIMALS 2,

FREQ_RATE TYPE P DECIMALS 2,

FREQ_ROLL TYPE P DECIMALS 2,

TIME_LOST TYPE P DECIMALS 2,

TIME_ROLL TYPE P DECIMALS 2,

END OF TBL_FINAL.

my select queries look like this to calculate:-

1)SELECT COUNT(*) INTO NO_OF_WORKERS FROM PA0000

WHERE ENDDA = '99991231' AND STAT2 = '3'.

2)SELECT COUNT(*) INTO WORK_DAYS_LOST FROM PA2001

WHERE ABWTG = P2001-ABWTG.

also i want to calculate BTEXT(ie., personal sub area text)which is in T001P.

PLEASE DISplay these fields as it is in the internal table....so that i can try the next fields