Skip to Content
author's profile photo Former Member
Former Member

doubt in program logic

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>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 09:58 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 01:11 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.