Skip to Content

Internal table in smartforms

Hi Gurus,

Good Day,

I have 5 columns(fields) in my internal table. For example- Installment(TVTBT-TEBEZ), Amount(FPLT-FAKWR), Payment Date(FPLT-AFDAT). The rest of 2 fields I have to calculate i,e Paid Amount(4th field) should be (FPLT-FAKWR) only those values where (FPLT-FKSAF = 'C') and Dues Amount(5th field) should be deducted from Balance amount-Paid Amount. Balance Amount is in my header data which is not an internal table. Here is my code-

SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_TAB FROM TVTBT AS TVTBT

INNER JOIN FPLT AS FPLT ON TVTBTTETBE = FPLTTETXT

INNER JOIN FPLA AS FPLA ON FPLAFPLNR = FPLTFPLNR

INNER JOIN VBAK AS VBAK ON VBAKVBELN = FPLAVBELN

WHERE VBAK~VBELN = SO

AND TVTBT~SPRAS = 'EN'

AND TVTBT~TETBE NE '0009'.

MOVE IT_TAB-PAID_AMOUNT TO PAYMENT. ////// Payment is a variable that i declared before.

SELECT SINGLE FAKWR INTO PAYMENT FROM TVTBT AS TVTBT

INNER JOIN FPLT AS FPLT ON TVTBTTETBE = FPLTTETXT

INNER JOIN FPLA AS FPLA ON FPLAFPLNR = FPLTFPLNR

INNER JOIN VBAK AS VBAK ON VBAKVBELN = FPLAVBELN

WHERE VBAK~VBELN = SO

AND TVTBT~SPRAS = 'EN'

AND FPLT~FKSAF = 'C'.

Now fields are showing in my internal table. But coming repeatedly i,e for 2 rows field are coming twice but it should come once.

Please tell me how can I do this.

Thanks,

Tripod.

Edited by: Tripod on Jan 25, 2010 5:28 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jan 25, 2010 at 11:54 AM

    Hi All,

    Here I found 1 mistake that I am taking the value in a variable. If I use internal table then data not comes, that's why i took variable but problem is that in this variable only 1field is showing repeatedly.

    Please help me.

    Thanks,

    Tripod.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 25, 2010 at 04:54 PM

    I don't understand your question. If you want to understand why you get several lines, break your join into several requests. Moreover, if you select only a few lines, I don't see what is the interest of using joins (more difficult to tune programs).

    > AND TVTBT~SPRAS = 'EN'

    language is only on 1 character (SE11 on table T002), English = 'E'

    > MOVE IT_TAB-PAID_AMOUNT TO PAYMENT. ////// Payment is a variable that i declared before.

    >

    > SELECT SINGLE FAKWR INTO PAYMENT FROM TVTBT AS TVTBT

    > INNER JOIN FPLT AS FPLT ON TVTBTTETBE = FPLTTETXT

    > INNER JOIN FPLA AS FPLA ON FPLAFPLNR = FPLTFPLNR

    > INNER JOIN VBAK AS VBAK ON VBAKVBELN = FPLAVBELN

    > WHERE VBAK~VBELN = SO

    > AND TVTBT~SPRAS = 'EN'

    > AND FPLT~FKSAF = 'C'.

    what are they used for??? (is that part of the question? how is it related to the internal table?)

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2010 at 08:10 AM

    Hi,

    My problem is solved.

    Add a comment
    10|10000 characters needed characters exceeded

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.